about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--hm/soispha/pkgs/scripts.nix4
-rwxr-xr-xhm/soispha/pkgs/scripts/specific/ytcc/yts29
2 files changed, 33 insertions, 0 deletions
diff --git a/hm/soispha/pkgs/scripts.nix b/hm/soispha/pkgs/scripts.nix
index f69bc4cf..7babfae2 100644
--- a/hm/soispha/pkgs/scripts.nix
+++ b/hm/soispha/pkgs/scripts.nix
@@ -10,6 +10,7 @@
     path,
     dependencies ? [],
     keep_path ? false,
+    completions ? false,
   }:
     if keep_path
     then
@@ -17,12 +18,14 @@
         inherit name;
         src = ./scripts/${path}/${name};
         dependencies = dependencies ++ [pkgs.dash];
+        generateCompletions = completions;
       }
     else
       sysLib.writeShellScriptWithLibrary {
         inherit name;
         src = ./scripts/${path}/${name};
         dependencies = dependencies ++ [pkgs.dash];
+        generateCompletions = completions;
       };
   write_python = {
     name,
@@ -239,6 +242,7 @@
     name = "yts";
     path = "specific/ytcc";
     keep_path = true; # We need neovim
+    completions = true;
     dependencies = builtins.attrValues {
       inherit (pkgs) ytcc jq gawk ytc;
     };
diff --git a/hm/soispha/pkgs/scripts/specific/ytcc/yts b/hm/soispha/pkgs/scripts/specific/ytcc/yts
index 4d6cc6e6..d3508bba 100755
--- a/hm/soispha/pkgs/scripts/specific/ytcc/yts
+++ b/hm/soispha/pkgs/scripts/specific/ytcc/yts
@@ -4,6 +4,10 @@
 SHELL_LIBRARY_VERSION="1.10.2" . %SHELL_LIBRARY_PATH
 
 TASK_UUID=ce4f9e07-8324-4570-8be6-967955e9271e
+# these are used in version()
+AUTHORS="Soispha"
+YEARS="2023"
+NAME="neorg"
 
 cleanup() {
     task stop "$TASK_UUID"
@@ -19,6 +23,31 @@ help_text="
 # These lines can be re-ordered; they are executed from top to bottom.
 # vim: ft=gitrebase"
 
+help() {
+cat << EOF
+A help script to make selecting videos to play for ytcc easier.
+
+USAGE:
+    $NAME [OPTIONS] [COMMAND]
+
+OPTIONS:
+    --help      | -h
+                            Display this help and exit.
+
+    --version   | -v
+                            Display version and copyright information and exit.
+COMMANDS:
+    order MODE
+                            Select the ordering mode.
+ARGUMENTS:
+    MODE := date | raw
+                            date will sort descending by publishing date,
+                            whilest raw esxposes the ytcc interface. See
+                            the help info of the 'ytcc list --help'
+                            '--order-by' option for more details.
+EOF
+}
+
 for arg in "$@"; do
     case "$arg" in
         "--help")