-
Notifications
You must be signed in to change notification settings - Fork 4
Command Line Reference
Raventric edited this page Nov 14, 2023
·
8 revisions
> juicenet --help
Usage: juicenet [-h] [--config CONFIG] [--version] [--public] [--nyuu] [--parpar] [--raw] [--skip-raw] [--match] [--pattern [*/ ...]] [--debug] [--move] [--only-move] [--exts [mkv mp4 ...]] [path]
Crude CLI tool to upload files to Usenet using Nyuu and ParPar
Positional Arguments:
path directory containing your files (default: CWD)
Options:
-h, --help show this help message and exit
--config CONFIG specify the path to your juicenet config file
--version print juicenet version
--public use your public config
--nyuu only run Nyuu
--parpar only run ParPar
--raw only repost raw articles
--skip-raw skip reposting raw articles
--match enable pattern matching mode
--pattern [*/ ...] specify the glob pattern(s) to be matched in pattern matching mode
--debug show logs
--move move files into their own directories (foobar.ext -> foobar/foobar.ext)
--only-move move files into their own directories (foobar.ext -> foobar/foobar.ext) and exit
--exts [mkv mp4 ...] look for these extensions in <path> (ignores config)Brief explanation of each option:
- The directory containing the files you want to upload to Usenet
- Defaults to Current working directory (CWD) if not provided
- Example:
juicenet "/path/to/upload/directory"
- Display the help message and exit the program
- Example:
juicenet --help
- Specify the path to configuration file
- If this path is wrong or unspecified, script will fallback to the env variable called
JUICENET_CONFIG, and if that's not present either, it'll again fallback to config file present in current working directory, and if that's not present it'll stop and error - The env variable
JUICENET_CONFIGis quite handy, allowing you to set and forget it and not having to bother passing--configeverytime - If
JUICENET_CONFIGis defined, it'll never fallback to config file present in current working directory but it can still be overriden by manually specifying--config - The order of precedence, if all three are present, is:
command-line argument > environment variable > config file in the current working directory - Example:
juicenet --config path/to/juicenet.yaml
- Print the current version and exit
- Example:
juicenet --version
- Use your public nyuu config if both private and public are specified. If you haven't specified a public config, it'll fall back to using the private config but still seperate the output into
output/public/. This is intentional and a "feature" so I can use the same config to post it both privately and publicly while keeping them seperate - Example:
juicenet "path/to/folder" --public
- Only run Nyuu, in case you already have the par2 files generated
- Example:
juicenet "path/to/folder" --nyuu
- Only run ParPar, in case you don't want to let the script upload
- Example:
juicenet "path/to/folder" --parpar
- Only repost raw articles
- Example:
juicenet --raw
- Skip reposting raw articles. This will do everything as usual minus the reposting raw articles part
- Example:
juicenet "path/to/folder" --skip-raw
- Enable pattern matching mode. Useful for times when extensions aren't enough, e.g., directories, BDMVs, etc. This is meant to be used with the next option.
- Example:
juicenet "path/to/folder" --match
- Specify the glob pattern(s) to be matched in pattern matching mode. You can provide one or more patterns to select specific files/folders for upload when pattern matching mode is enabled.
- If you do not specify this, it'll default to
*/which translates to "every top subdirectory in path" - Make sure to quote your patterns on Linux, otherwise Linux will first glob it before passing it to juicenet
- Example Usage:
juicenet "path/to/folder" --match --pattern *.mkv *BDMV*/(This example will grab all the mkv files and folders with the word "BDMV" in them) - Example Patterns:
-
*/- match all subdirectories present in the root of<path>(This is the default if you pass--matchwithout--pattern) -
*/*/- match subdirectories within the subdirectories present in<path>. You can keep on going with like*/*/*/...and it's like controlling the depth. -
**/- recursively match all subdirectories at all depths in<path> -
*BDMV*/- match every subdirectory with the word "BDMV" in<path>
-
- Show logs for debugging purposes
- Example:
juicenet "path/to/folder" --debug
- Organize files into individual directories for easier manual uploading. I would not recommened moving files. Do note moving will fail if your file is being used by another process, e.g, seeding. This will first move your files and then process them as usual.
- Example:
juicenet "path/to/folder" --move
- Organize files into individual directories for easier manual uploading. I would not recommened moving files. Do note moving will fail if your file is being used by another process, e.g, seeding. This will move your files and exit.
- Example:
juicenet "path/to/folder" --only-move
- Specify extensions to look for in the specified directory. This lets you pass any extensions you wish while ignoring the extensions defined in the config file.
- Example:
juicenet "path/to/folder" --exts mkv mp4 epub