about summary refs log tree commit diff stats
path: root/hm
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-01-06 21:55:58 +0100
committerSoispha <soispha@vhack.eu>2024-01-06 21:55:58 +0100
commit458f53234587c29aefea2c41f869097d020816bf (patch)
treee0581ddbe23a6cb5c7e631487403e21215c0a877 /hm
parentfix(hm/pkgs/scr/specific/ytcc/yts): Actually make the subcommands optional (diff)
downloadnixos-config-458f53234587c29aefea2c41f869097d020816bf.tar.gz
nixos-config-458f53234587c29aefea2c41f869097d020816bf.zip
feat(hm/pkgs/scr/specific/ytcc/description): Add command to display description
Diffstat (limited to 'hm')
-rw-r--r--hm/soispha/pkgs/scripts.nix8
-rwxr-xr-xhm/soispha/pkgs/scripts/specific/ytcc/description8
2 files changed, 16 insertions, 0 deletions
diff --git a/hm/soispha/pkgs/scripts.nix b/hm/soispha/pkgs/scripts.nix
index 7babfae2..c425e9df 100644
--- a/hm/soispha/pkgs/scripts.nix
+++ b/hm/soispha/pkgs/scripts.nix
@@ -75,6 +75,13 @@
         '';
     };
   };
+  description-scr = write_shell {
+    name = "description";
+    path = "specific/ytcc";
+    dependencies = builtins.attrValues {
+      inherit (pkgs) jq fmt less locale;
+    };
+  };
   filter-comments-scr = sysLib.writeShellScriptWithLibrary {
     name = "comments";
     src = ./scripts/specific/ytcc/filter_comments.sh;
@@ -251,6 +258,7 @@ in [
   # llp-scr # TODO: see above
   aumo-scr
   con2pdf-scr
+  description-scr
   filter-comments-scr
   fupdate-scr
   hibernate-scr
diff --git a/hm/soispha/pkgs/scripts/specific/ytcc/description b/hm/soispha/pkgs/scripts/specific/ytcc/description
new file mode 100755
index 00000000..53da6129
--- /dev/null
+++ b/hm/soispha/pkgs/scripts/specific/ytcc/description
@@ -0,0 +1,8 @@
+#!/usr/bin/env dash
+
+# shellcheck source=/dev/null
+SHELL_LIBRARY_VERSION="1.10.2" . %SHELL_LIBRARY_PATH
+
+jq --raw-output '.description' "$XDG_RUNTIME_DIR/ytcc/running" | fmt -u -s | less
+
+# vim: ft=sh