commit c159e808338f9297f44f53de3cb5cb254f68357d
parent 9381ed93d8d120f18492d7722524802f3eb4fad9
Author: hhvn <dev@hhvn.uk>
Date: Tue, 31 May 2022 13:51:23 +0100
--date option for tag/* scripts
Diffstat:
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/.scripts/tag/interactive b/.scripts/tag/interactive
@@ -4,7 +4,7 @@ usage = (
'usage: tag/interactive [-n] [-k] [-p metadata] [--artist artist]'
' [--title title] [--album album]'
' [--track track] [--comment comment]'
-' files...'
+' [--date date] files...'
''
'tag/interactive is an interactive interface to tag/set.'
''
@@ -13,7 +13,7 @@ usage = (
'-n Dry run. Prints commands to be executed.'
'-k Preserve all metadata this is not specified.'
''
-'--artist, --title, --album, --track, and --comment'
+'--artist, --title, --album, --track, --comment and --date'
' Specify default metadata to apply to all files.'
)
@@ -64,6 +64,9 @@ while (!~ $#* 0) {
case --comment
addmd $*
shift
+ case --date
+ addmd $*
+ shift
case -p
if (~ $2 ()) {
usage
diff --git a/.scripts/tag/set b/.scripts/tag/set
@@ -1,7 +1,7 @@
#!/bin/rc
usage = (
-'usage: tag/set [-n] [-k] [--artist artist]'
+'usage: tag/set [-n] [-k] [--artist artist] [--date date]'
' [--title title] [--album album]'
' [--track track] [--comment comment]'
' files...'
@@ -14,7 +14,7 @@ usage = (
' except -n. This option was added to prevent accidental destruction.'
'-k Preserve all metadata that is not specified'
''
-'--artist, --title, --album, --track, and --comment'
+'--artist, --date, --title, --album, --track, and --comment'
' Specify replacement metadata.'
)
@@ -63,6 +63,9 @@ while (!~ $#* 0) {
case --artist
addmd $*
shift
+ case --date
+ addmd $*
+ shift
case --title
addmd $*
shift