mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 22:57:55 +00:00
68 lines
2.7 KiB
Plaintext
68 lines
2.7 KiB
Plaintext
= Multimedia archiving
|
|
:toc:
|
|
|
|
More like offline delivery, really.
|
|
Just wait for the task to complete and you have your videos, pictures, music, and whatever questionable files you want to download.
|
|
It's a nice offline repository for it especially that internet usually randomly disconnects so that's nice while I still have something working, yeah?
|
|
|
|
|
|
|
|
|
|
== Project structure
|
|
|
|
The following listing block shows the files and folders that this project should have.
|
|
|
|
[source, tree]
|
|
----
|
|
./modules/nixos/tasks/multimedia-archive/
|
|
├── data/
|
|
├── scripts/
|
|
├── default.nix
|
|
└── README.adoc
|
|
----
|
|
|
|
Some points of interests include...
|
|
|
|
* link:./data/[`./data/`] contains a bunch of data (i.e., jobs for various services).
|
|
This is used to easily import them from a process that is used to externally generate them.
|
|
Some of the data may have a schema available (e.g., link:./data/jobs.schema.json[`./data/jobs.schema.json`] for the jobs database).
|
|
|
|
* link:./scripts/[`./scripts/`] contains a bunch of scripts specific for this tasks.
|
|
Mainly, it contains scripts to generate data found in `./data/` such as link:./scripts/create-jobs-from-newpipe-db[a script that is used to generate a jobs database suitable for this task from a NewPipe database].
|
|
|
|
* link:./default.nix[`./default.nix`], the entry point for this module.
|
|
|
|
|
|
|
|
|
|
== Integrating with Newpipe subscriptions
|
|
|
|
In this task, I usually just download videos from YouTube.
|
|
While I could note every preferred creator manually, I could automate them by getting a list of subscriptions from my Newpipe config which I use surprisingly more often than I thought.
|
|
This is done by running the link:./scripts/create-jobs-from-newpipe-db[`./scripts/create-jobs-from-newpipe-db`] script and specifying the exported Newpipe database (as a ZIP file).
|
|
|
|
[CAUTION]
|
|
====
|
|
Please don't run the task with all of the subscriptions.
|
|
You should select only a few categories and clean them up.
|
|
====
|
|
|
|
[source, sh]
|
|
----
|
|
./convert-newpipe-db-to-json ~/Downloads/NewPipeData-20220714_185126.zip
|
|
----
|
|
|
|
You can run the script with the `-h` flag for more information.
|
|
There are nifty things you can do with the script.
|
|
Such as the following code block which you can interactively select which folders to export.
|
|
|
|
[source, sh]
|
|
----
|
|
./convert-newpipe-db-to-json ~/Downloads/NewPipeData-20220714_185126.zip --list-categories \
|
|
| fzf --multi --prompt "Choose which categories to export " \
|
|
| ./convert-newpipe-db-to-json ~/Downloads/NewPipeData-20220714_185126.zip -o ./newpipe-db.json
|
|
----
|
|
|
|
Remember the larger the list, the larger the chances for a throttling.
|
|
Thus, it is heavily encouraged that you clean up your list (and/or get good at organizing your categories) before activating the updated version.
|