aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-10-16 18:03:36 -0700
committerFuwn <[email protected]>2024-10-16 18:08:51 -0700
commitaecc4d760b10388b43923395bb0d0b64e0f705a7 (patch)
tree442b64c3bc3769e3d1d692eef547840c58c0a2de
parentfeat(ahoviewer): update dialogue compatibility (diff)
downloadtsutsumi-aecc4d760b10388b43923395bb0d0b64e0f705a7.tar.xz
tsutsumi-aecc4d760b10388b43923395bb0d0b64e0f705a7.zip
feat(pkgs): ripper and parse-ripper-output packages
-rw-r--r--README.md5
-rw-r--r--flake.nix2
-rw-r--r--pkgs/parse-ripper-output.nix23
-rw-r--r--pkgs/ripper.nix23
-rw-r--r--yae.json10
5 files changed, 62 insertions, 1 deletions
diff --git a/README.md b/README.md
index f2b7f71..c44ee0f 100644
--- a/README.md
+++ b/README.md
@@ -35,9 +35,14 @@ running `nix run github:Fuwn/tsutsumi#rui`. (or any other package in place of
- [Lilipod](https://github.com/89luca89/lilipod) - Simple container manager
- [peerflix](https://github.com/mafintosh/peerflix) - Command-line streaming
BitTorrent client
+- [`parse-ripper-output`](github.com/saucecode/reddit-thread-ripper) - Sister
+ program to `reddit-thread-ripper` that parses the output of the latter into
+ an HTML document
- [Private Internet Access](https://www.privateinternetaccess.com/)
(`private-internet-access`) - Private Internet Access VPN binaries and
configuration files
+- [reddit-thread-ripper](github.com/saucecode/reddit-thread-ripper) - a Python
+ program/library to download an entire reddit thread's comment section
- [`suzuri`](https://github.com/Fuwn/suzuri) - Command-line interface to [sumi.news](https://sumi.news)
- [swaddle](https://github.com/ATTron/swaddle) - `swayidle` inhibitor when
watching content or listening to audio
diff --git a/flake.nix b/flake.nix
index 30ad5e1..45ac303 100644
--- a/flake.nix
+++ b/flake.nix
@@ -80,8 +80,10 @@
mayu = yaePackage "mayu";
html2md = pkgs.callPackage ./pkgs/html2md.nix { };
lilipod = pkgs.callPackage ./pkgs/lilipod.nix { };
+ parse-ripper-output = pkgs.callPackage ./pkgs/parse-ripper-output.nix { source = yae.ripper; };
private-internet-access = pkgs.callPackage ./pkgs/private-internet-access.nix { };
rui = yaePackage "rui";
+ ripper = pkgs.callPackage ./pkgs/ripper.nix { source = yae.ripper; };
suzuri = pkgs.callPackage ./pkgs/suzuri.nix { inherit (self.packages.${system}) html2md; };
swaddle = pkgs.callPackage ./pkgs/swaddle.nix { };
t = pkgs.callPackage ./pkgs/t { };
diff --git a/pkgs/parse-ripper-output.nix b/pkgs/parse-ripper-output.nix
new file mode 100644
index 0000000..8aa092b
--- /dev/null
+++ b/pkgs/parse-ripper-output.nix
@@ -0,0 +1,23 @@
+{
+ source,
+ fetchzip,
+ writeShellScriptBin,
+ python3,
+ runtimeShell,
+}:
+let
+ ripper = fetchzip {
+ inherit (source) url sha256;
+ };
+
+ python = python3.withPackages (
+ ps: with ps; [
+ markdown
+ ]
+ );
+in
+writeShellScriptBin "parse-ripper-output" ''
+ #!${runtimeShell}
+
+ ${python}/bin/python3 ${ripper}/extras/parse-rip-output.py "$@"
+''
diff --git a/pkgs/ripper.nix b/pkgs/ripper.nix
new file mode 100644
index 0000000..345c272
--- /dev/null
+++ b/pkgs/ripper.nix
@@ -0,0 +1,23 @@
+{
+ source,
+ fetchzip,
+ writeShellScriptBin,
+ python3,
+ runtimeShell,
+}:
+let
+ ripper = fetchzip {
+ inherit (source) url sha256;
+ };
+
+ python = python3.withPackages (
+ ps: with ps; [
+ requests
+ ]
+ );
+in
+writeShellScriptBin "ripper" ''
+ #!${runtimeShell}
+
+ ${python}/bin/python3 ${ripper}/ripper.py "$@"
+''
diff --git a/yae.json b/yae.json
index 13724f2..0ba361e 100644
--- a/yae.json
+++ b/yae.json
@@ -37,6 +37,14 @@
"trim_tag_prefix": "v",
"pinned": true
},
+ "ripper": {
+ "url": "https://github.com/Fuwn/reddit-thread-ripper/archive/master.tar.gz",
+ "sha256": "09sc14917nhyix81y1znbrzvn21sgasn5la4giab0s7r2vpa17fs",
+ "unpack": true,
+ "type": "git",
+ "version": "master",
+ "url_template": "https://github.com/Fuwn/reddit-thread-ripper/archive/{version}.tar.gz"
+ },
"rui": {
"url": "https://github.com/Fuwn/rui/archive/main.tar.gz",
"sha256": "1k36bw9p69cl71pf3cy3xm2rn1gy7d0xd13bfwnrr4zns654d56i",
@@ -92,4 +100,4 @@
"version": "twilight",
"url_template": "https://github.com/zen-browser/desktop/releases/download/{version}/zen.linux-specific.tar.bz2"
}
-} \ No newline at end of file
+}