### Install Benchmark Setup Script Source: https://github.com/animetosho/nyuu/blob/master/bench/info.md This command downloads and executes a setup script for running Usenet poster benchmarks. It is designed for Ubuntu/Debian-based systems and will prompt the user during installation. The script prepares the environment and generates a test file. ```bash wget https://raw.githubusercontent.com/animetosho/Nyuu/master/bench/setup.sh -O-|sh ``` -------------------------------- ### Nyuu Basic Upload Example Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt A basic example demonstrating how to upload a file to a specified NNTP server. ```shell nyuu -h example.com some_file ``` -------------------------------- ### Install Nyuu Project Dependencies Source: https://github.com/animetosho/nyuu/blob/master/README.md Installs project dependencies for Nyuu when running from source or a local directory. This command reads the 'package.json' file and installs the required Node.js modules. ```bash npm install --production ``` -------------------------------- ### Building Nyuu Binary with Nexe Source: https://github.com/animetosho/nyuu/blob/master/README.md Steps to compile the Nyuu application into a standalone binary using the nexe tool. This involves installing project dependencies, nexe dependencies, and running the build script. ```shell npm install cd nexe npm install node build ``` -------------------------------- ### Building Nyuu Binary (Windows Specific) Source: https://github.com/animetosho/nyuu/blob/master/README.md Command to build the Nyuu binary on Windows using `vcbuild.bat`. This example shows common build options for creating a release version. ```shell vcbuild.bat nosign x86 noetw intl-none release static no-cctest without-intl ltcg ``` -------------------------------- ### Install Nyuu via NPM Source: https://github.com/animetosho/nyuu/blob/master/README.md Installs the Nyuu package globally using NPM. The `--production` flag ensures only production dependencies are installed. This command makes the 'nyuu' executable available in your system's PATH. ```bash npm install -g nyuu --production ``` -------------------------------- ### Install Nyuu with Unsafe Permissions Source: https://github.com/animetosho/nyuu/blob/master/README.md Installs Nyuu globally using NPM with the `--unsafe-perm` flag. This is a workaround for 'EACCES: permission denied' errors during installation, often necessary on systems with strict permission settings. ```bash npm install -g nyuu --production --unsafe-perm ``` -------------------------------- ### Creating Nyuu Executable Wrapper (Windows) Source: https://github.com/animetosho/nyuu/blob/master/README.md A batch script example for Windows to create a `nyuu.cmd` file. This wrapper allows executing the Nyuu Node.js script from any directory by specifying the full path to the Node.js executable and the script. ```batch "@C:\node\node.exe" "C:\path\to\nyuu\bin\nyuu.js" %* ``` -------------------------------- ### Running Nyuu Executable Source: https://github.com/animetosho/nyuu/blob/master/README.md Instructions on how to execute the Nyuu application from the command line after installing dependencies. It can be run directly using Node.js. ```shell node bin/nyuu nodejs bin/nyuu ``` -------------------------------- ### Running Nyuu Tests Source: https://github.com/animetosho/nyuu/blob/master/README.md Instructions for running the project's tests using the Mocha test framework. Ensure Mocha is installed globally (`npm install -g mocha`) before running this command in the project's root directory. ```shell mocha ``` -------------------------------- ### Install Node.js Async Dependency Source: https://github.com/animetosho/nyuu/blob/master/README.md Installs the 'async' Node.js module using the APT package manager, typically on Debian or Ubuntu systems. This is an alternative to using NPM for dependency management. ```shell apt-get install node-async ``` -------------------------------- ### Build Nyuu with Nexe Source: https://github.com/animetosho/nyuu/blob/master/README.md Instructions for compiling Nyuu into a single binary using nexe 1.x for NodeJS 8.x.x or older. This process involves a custom build script and specific setup steps for bundling the yencode module. ```shell export AR=gcc-ar ``` ```shell cd nexe1 node build.js ``` -------------------------------- ### Nyuu Advanced Upload with NZB Generation Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt An example showing an advanced upload scenario to an NNTPS server, specifying multiple connections, user credentials, target group, and outputting an NZB file. ```shell nyuu -h news.example.com -S -u cat -p nyahaha -n3 -f 'Cat ' -g alt.binaries.multimedia -o my_cat.nzb my_cat.mp4 ``` -------------------------------- ### Module Preloading Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Allows preloading modules into Node's module cache before the application starts. This can serve as a workaround for Node.js's limitations in asynchronous module loading and might be beneficial in environments with high CPU or disk load, though it can sometimes lead to slower startup times. ```APIDOC --preload-modules Preload modules into Node's module cache before starting (flag option). This is mostly a workaround to Node's shortcomming of not being able to load modules asynchronously. Usually is slower, but may be useful if the CPU or disk is overloaded. ``` -------------------------------- ### Uninstall Nyuu via NPM Source: https://github.com/animetosho/nyuu/blob/master/README.md Removes the Nyuu package from global NPM installations. This command reverts the changes made by the installation command. ```bash npm uninstall -g nyuu ``` -------------------------------- ### Nyuu Configuration and Help Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Covers options for specifying custom configuration files and accessing help information. Configuration files can be in JSON or JS format, and users can view summarized or full help screens. ```APIDOC Configuration and Help: -C, --config Use a custom configuration file. Options in the file correspond to command arguments. Supports JSON (config-sample.json) and complex JS (config.js) formats. SECURITY WARNING: Do not load untrusted config files. -?, --help Display a summarized list of options. --help-full Display the complete help screen. --version Print the application version number. --package-info Print detailed package and Node.js information. ``` -------------------------------- ### Nyuu Command-Line Options Source: https://github.com/animetosho/nyuu/blob/master/help.txt Comprehensive documentation for Nyuu's command-line interface, covering all available options for uploading files to Usenet servers, managing article properties, configuring post-checking mechanisms, generating NZB files, and controlling the user interface. Options can be set via command-line arguments or a configuration file. ```APIDOC Nyuu Command-Line Interface Documentation Usage: nyuu [options] file1 file2 ... All options take one parameter, except for those marked as a flag option. Options can also be set using a custom config file (see `--config` option), in which case, flag options, if set, can be unset by prefixing `no-` to the name, for example, `--no-ssl` to explicitly disable SSL. Use `--help-full` to see a full list of options. Upload Server Options: -h, --host Host/server to upload to. -P, --port Port to connect to (default 119 or 563 if `--ssl` is specified). -S, --ssl Connect over SSL/TLS (flag option). --ignore-cert Ignore SSL certificate problems (flag option). -u, --user Username to authenticate with. -p, --password Password to authenticate with. -n, --connections Number of connections to use (default 3). Article/Post Options: -a, --article-size Target size of each news post (default 700K). -t, --comment Comment to insert before post subject. -f, --from Name and email of uploader. Defaults to 'username ', where these values are sourced from the local system. -g, --groups Comma separated list of groups to post to. Do not add spaces between commas. Defaults to alt.binaries.test. Post Check Options: -k1, --check-connections=1 Enable post checking (flag option). --check-tries Maximum number of check attempts to perform. A value of 0 disables post checking (default 2). --check-delay Initial delay after posting before performing first check (default 5s). --check-retry-delay Delay for check retries, if a check fails (default 30s). Not used if `--check-tries` < 2. --check-post-tries Maximum number of attempts to re-post articles that the post check could not find. Set to 0 to disable re-posting articles (default 1). Other Upload/Check Options: -e, --skip-errors=all Continue processing regardless of errors. By default, Nyuu stops on all errors. NZB Output Options: -o, --out If supplied, will write NZB to this file. -O, --overwrite If NZB exists, overwrite it, otherwise will error (flag option). --nzb-title A human-readable identifiable title for the contents of the NZB. --nzb-tag An attribute of the NZB contents, such as "SD". Can be specified multiple times. --nzb-category Suggested category as used by your indexing service (preferrably one, but can be specified multiple times). --nzb-password Attach a password to this NZB if its contents requires one. Can be specified multiple times if there are multiple passwords. UI Options: -q, --quiet Only show warnings/errors (flag option). -C, --config Use a custom configuration file, see config-sample.json for an example. The options correspond with the command arguments documented in this help file (full options only, short aliases aren't supported). -?, --help Display this help screen (flag option). --help-full Display full help screen (flag option). Input Files: Additional arguments are taken as files to be posted. Directories can be specified as well, in which case all files inside are processed according to the following option: -r, --subdirs=keep Upload all files in directories, recursively. Otherwise, nested directories are skipped. Examples: nyuu -h example.com some_file Uploads some_file to the NNTP server at example.com nyuu -h news.example.com -S -u cat -p nyahaha -n3 -f 'Cat ' -g alt.binaries.multimedia -o my_cat.nzb my_cat.mp4 Uploads my_cat.mp4 to NNTPS server at news.example.com in group alt.binaries.multimedia. Upload is performed using 3 connections. The from username is specified, and Nyuu will output an NZB, my_cat.nzb. ``` -------------------------------- ### Nyuu Input File and Directory Handling Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Documents how Nyuu processes input files and directories. Options control subdirectory traversal, symbolic link handling, inclusion of empty files, and methods for supplying input file lists. ```APIDOC Input Files and Directory Handling: Input Arguments: Additional arguments are taken as files to be posted. Directories can be specified, and files within them are processed according to the following options. Directory Handling: -r, --subdirs How directories should be handled: skip: Ignore nested files. include: Include files in specified directories without recursion (default). keep: Upload all files in sub-directories (with recursion). -L, --skip-symlinks If specified, all symbolic links (files and directories) will be ignored. By default, all symlinks are followed. --include-empty If specified, 0-byte files will not be skipped. Supplying Input Files: -i, --input-file Supply a text file listing files, separated by newlines. Can be: '-' for stdin. 'proc://' to read from process stdout (e.g., `proc://cat somefile.txt`). 'fd://' to read from a file descriptor (e.g., `fd://0` for stdin). Can be specified multiple times. -0, --input-file0 Same as --input-file, but files are separated by null characters. --input-file-enc Encoding used for all specified input files. Must be a NodeJS recognized encoding (e.g., `utf8`, `utf16le`, `latin1`). Defaults to `utf8`. BOMs are not interpreted. ``` -------------------------------- ### Nyuu Upload and Check Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt This section details the command-line options for the Nyuu tool, categorized into general upload server options, post check options, and other related configurations. These options allow fine-grained control over the posting process, including header management, connection settings, retry logic, and error handling. ```APIDOC --keep-message-id Description: Prevents randomization of the Message-ID for each post submission. Type: Flag -H, --header
Description: Specifies an NNTP header. Can be in the form "MyHeader: MyValue", "MyHeader=MyValue" to set a header, or just "MyHeader" to unset it. Can be specified multiple times. Note: Specifying the same header more than once is not currently supported. Tokens listed in the `--subject` option can be used in the header value. Type: String (multiple allowed) --yenc-name Description: Overrides the 'name' field in the yEnc header. Accepts tokens like `--subject`, excluding {size}, {timestamp}, {part}, and {0part}. Defaults to `{filename}`. Type: String Default: `{filename}` --article-encoding Description: Sets the character encoding for article/yEnc headers and NNTP commands. Accepted values are `ascii`, `latin1`, and `utf8`. Type: String Default: `utf8` Post Check Options: Options prefixed with `--check-` override corresponding "Upload Server Options" for post checking connections. -k, --check-connections Description: Number of connections to create for post checking. Set to 1 to enable checking. Higher numbers are useful if post checking is a bottleneck. The total number of connections is this number plus `--connections`. Type: Integer Default: 0 --check-tries Description: Maximum number of attempts to perform post checks. A value of 0 disables post checking. Type: Integer Default: 2 --check-delay Description: Initial delay after posting before the first check is performed. Type: Duration (e.g., 5s) Default: 5s --check-retry-delay Description: Delay between check retries if a check fails. Not used if `--check-tries` is less than 2. Type: Duration (e.g., 30s) Default: 30s --check-post-tries Description: Maximum number of attempts to re-post articles that the post check could not find. Setting to 0 disables re-posting. Type: Integer Default: 1 --check-queue-size Description: Maximum number of articles queued for checking. Posting stalls if the number of articles to be checked exceeds this. Type: Integer Default: 10000 Other Upload/Check Options: -e, --skip-errors Description: Continues processing despite specified errors. By default, Nyuu stops on all errors. Can be set to `all` to skip all skippable errors, or a comma-separated list of specific errors: - `post-timeout`: Post request timed out; assumes post was successful. - `post-reject`: Server rejects sent post; assumes post was successful. - `post-fail`: Posting failed for any reason; skips the post. - `check-timeout`: Check request timed out; assumes check was successful. - `check-missing`: Post checking fails to find the article; assumes success. - `check-fail`: Check failed for any reason; assumes success. - `connect-fail`: Connect/login failed; ignores failed connections. Note: For retried requests (like posting), only the last result is considered. Nyuu exits with return code 32 instead of 0 if the process completes with skipped errors. Type: String (all or comma-separated list) ``` -------------------------------- ### Advanced Disk and Posting Tuning Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Options for fine-tuning disk read operations and article posting behavior. Includes settings for read request size, read-ahead buffering, and managing the queue for posting articles. ```APIDOC --disk-req-size Disk read request size (default roundup(1M, `--article-size`)) --disk-buf-size Number of requests to read-ahead (default 1). Set to 0 to disable read-ahead buffering. --post-queue-size Max number of buffered articles for posting (default min(round(`--connections`*0.5)+2,25)) --check-queue-cache Max number of articles to cache in the check queue (default 5, or if un-seekable streams are present, min(`--connections`*8, 100)). Cache is not used if `--check-post-tries` is 0. Caching prevents articles from being re-read off disk if reposting is necessary. --post-chunk-size Limit upload chunk size to specified amount. Set to 0 to disable (default 192K if `--max-upload-rate` not specified) ``` -------------------------------- ### Nyuu Piped Input with procjson Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Nyuu supports piping inputs from a command using the `procjson://` prefix. This requires specifying the filename, exact size in bytes, and the command to execute. The command's stdout is uploaded, and its stderr is discarded. Data can also be read from a file descriptor by supplying a number instead of a command string. ```APIDOC procjson://"[name]",[size_in_bytes],"[command]" - [name]: The filename to be used for the upload. - [size_in_bytes]: The exact size of the data to be emitted from [command], in bytes. - [command]: The command to execute. Its stdout will be uploaded. If a number is supplied instead of a string, data will be read from the specified file descriptor (requires NodeJS >= 0.12). Note: Quotation marks and special characters may need to be escaped with backslashes, as per JSON encoding rules. ``` ```shell nyuu -h 0 'procjson://"moe_kyun.jpg",6144,"cat trollface.jpg"' ``` -------------------------------- ### Memory Management and Buffering Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Configuration for memory management and buffering strategies, specifically concerning NZB output buffering and the use of a buffer pool for posting articles to improve performance and memory efficiency. ```APIDOC --nzb-cork Cork (buffer) all NZB output (flag option). Requires NodeJS >= 0.12 --use-post-pool Use a buffer pool to improve memory management. Buffers are pre-allocated, which can also improve performance, but can increase memory usage. If not enabled, will rely on V8's GC to clean up buffers. Default is enabled, and is a flag option. Use `--no-use-post-pool` to disable the buffer pool. ``` -------------------------------- ### Token Evaluation with Javascript Templates Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Enables an alternative evaluation strategy for token-based options, treating their values as Javascript template strings. This allows for dynamic content generation using variables like filename and part numbers. Care must be taken with backticks and backslashes within the template strings. Requires NodeJS >= 4. ```APIDOC -E, --token-eval For all options which accept tokens (except `--copy-input`), switches to an alternative evaluation strategy, where the value is treated as a Javascript template string. Note that variables starting with '0' are not available. Example value for `--subject`: `${filename}: part ${part-1} of ${parts}` WARNING: as the value is wrapped in a Javascript template string (backticks), without escaping, care must be taken when using backticks and backslashes. For example, the following will cause a syntax error: `--from 'A`nt ${Date.now()}'` The backtick above needs to be escaped with a backslash, like in a template string. NOTE: this syntax and rules are not considered final, and may change in future Nyuu releases This option takes no values. Requires NodeJS >= 4 ``` -------------------------------- ### Nyuu Posting Configuration Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Configures how Nyuu handles posting articles, including error limits, connection strategies, timeout actions, posting methods, and group checking. ```APIDOC --post-error-limit If specified, and errors are being skipped with `--skip-errors`, will limit the number of post errors that are tolerated before aborting the post process. --use-lazy-connect Only create connections when necessary and prefer using as few as possible (flag option). --on-post-timeout A list of actions to take in response to a post request timing out. Available actions are: retry, strip-hdr=X, ignore. List is comma separated; after all actions have been tried, the post will fail. If this option is supplied, `--request-retries` will not be used for posts. Example usages: --on-post-timeout retry,retry,ignore --on-post-timeout retry,strip-hdr=User-Agent,retry Note: removed headers stay removed, even when the post is re-posted due to a check failure. --post-method Command used for posting articles. Supported commands: POST, IHAVE, XREPLIC, TAKETHIS. Default is POST. Warning: XREPLIC only uses first specified group and randomly generated article number. --use-ihave Alias for `--post-method IHAVE` (flag option). Option is deprecated. --check-group Checking connections will be set to this group. Some servers seem to want one set, otherwise checking fails. If you set one, use a valid group that you're not posting to, such as "bit.test". ``` -------------------------------- ### Run Nyuu Project Benchmarks Source: https://github.com/animetosho/nyuu/blob/master/bench/info.md Downloads and executes the benchmark script for the Nyuu project. The script is fetched from a GitHub repository and run directly. Users can modify the command to log output to a file. ```Shell wget https://raw.githubusercontent.com/animetosho/Nyuu/master/bench/run.sh -O-|sh ``` -------------------------------- ### Nyuu Upload Server Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Configuration options related to connecting to and interacting with the Usenet upload server. These options control host, port, IP version, SSL/TLS settings, and authentication. ```APIDOC -h, --host Host/server to upload to. Prefix with `unix:` to specify a Unix socket path. SSL with Unix sockets requires NodeJS >= 0.12 -P, --port Port to connect to (default 119 or 563 if `--ssl` is specified) -6, --ipv6 Connect over IPv6 (flag option). Requires NodeJS >= 0.12 --bind-host Local address to bind to --tcp-keep-alive Enables TCP keep-alive with the probe interval set to the specified number. -S, --ssl Connect over SSL/TLS (flag option) --ignore-cert Ignore SSL certificate problems (flag option) --sni-host SNI host name to send if connecting over SSL --ssl-ciphers List of SSL ciphers to use, in OpenSSL format. See https://nodejs.org/api/tls.html for defaults. Requires NodeJS >= 0.12 --ssl-method Force SSL/TLS method. For details, see `secureProtocol` at https://nodejs.org/api/tls.html --ssl-ca PEM encoded file containing trusted CA for certificate validation. Can be specified multiple times. Specifying this option disables the default CA trust store. -u, --user Username to authenticate with -p, --password Password to authenticate with ``` -------------------------------- ### Configure NZB File Writing Strategy Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Defines how NZB files are written to disk. Options include streaming output directly, deferring writing until the end, or using a temporary file that is renamed upon completion. ```APIDOC --nzb-file-mode Strategy for writing NZB files. Options are: stream: stream output to file (default) defer: write file only at end, in one go temp: stream to temp file, then rename at end ``` -------------------------------- ### Building Nyuu Binary (Linux Specific) Source: https://github.com/animetosho/nyuu/blob/master/README.md Command to strip the compiled Nyuu executable on Linux to reduce its file size. This is an optional step after a successful binary build. ```shell strip nyuu ``` -------------------------------- ### Linking Nyuu to System PATH (Linux) Source: https://github.com/animetosho/nyuu/blob/master/README.md This snippet demonstrates how to create a symbolic link for the Nyuu executable in the system's PATH on Linux, making it globally accessible. It also sets the execute permissions. ```shell ln -s "`pwd`/bin/nyuu.js" /usr/bin/nyuu chmod a+x bin/nyuu.js ``` -------------------------------- ### NZB Output Optimization Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Options to optimize the generated NZB files, including minification and compression. Compression supports various algorithms like gzip, zlib, deflate, and brotli, with configurable levels. ```APIDOC --minify Minify outputted NZB (flag option) --nzb-compress Compress outputted NZB. Can be gzip, zlib, deflate or brotli. (brotli requires NodeJS >= 11.7.0) --nzb-compress-level Compression level (0-9) to use. Default is 6. For Brotli, range is 0-11, default being 11 ``` -------------------------------- ### Nyuu File Copying Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Nyuu allows copying input files to a file or process without an additional disk read. This feature is experimental. Placeholders like `{filename}` and `{size}` can be used in the copy command. Filters can be applied to include or exclude specific files. ```APIDOC --copy-input Copy each input into specified file or stdin of specified process. See `--out` for syntax. Special placeholders: {filename}: upload name of the file (no path). {size}: size of file in bytes. --copy-include Regular expression filter of which files to copy. Only file names matching this filter will be copied. Default: ".*" (include all files). --copy-exclude Regular expression exclusion filter over files to copy. File names matching this expression won't be copied. Default: ".^" (no excluded files). --copy-queue-size Maximum unconsumed buffer size for copied inputs. If this buffer fills up, processing will slow down. Applies individually to each input. Set to 0 for no limit. (default 4). Note: This is somewhat connected to `--post-queue-size`. ``` ```shell -I 'proc://echo `md5sum|sed s/-//` {filename} >>md5list' ``` -------------------------------- ### Nyuu Command Line Usage Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt The primary command-line interface for the Nyuu tool, specifying files to post and available options. Options can be set via command line or a configuration file. ```APIDOC nyuu [options] file1 file2 ... ``` -------------------------------- ### Nyuu Configuration Source: https://github.com/animetosho/nyuu/blob/master/README.md Nyuu supports configuration via a JSON file or an environment variable. The `--config` or `-C` option specifies the config file path, and the `NYUU_CONFIG` environment variable can be set for a default configuration. ```json { "setting1": "value1", "setting2": 123 } ``` ```env export NYUU_CONFIG=/path/to/your/config.json ``` -------------------------------- ### Post Handling and Debugging Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Provides options for managing and debugging the posting process. This includes dumping failed posts for analysis, treating input files as raw posts for re-uploading, and deleting raw posts after successful upload. ```APIDOC --dump-failed-posts Write out articles that fail to post to this location. Message-ID will be appended to this to get the file name. This is a debugging feature and should not be used unless needed. ``` ```APIDOC --input-raw-posts Treat input files as raw posts to be uploaded (flag option). All options for Articles/Posts, NZB output and Input will be ignored, as well as `--disk-*` options. `--keep-message-id` option is also implied (use `--no-keep-message-id` to disable). This is the counterpart to `--dump-failed-posts` as it can be used to re-post these failed posts. ``` ```APIDOC --delete-raw-posts Delete successfully posted raw articles (flag option). This only has any effect if the `--input-raw-posts` flag is specified. ``` -------------------------------- ### Nyuu Header and Date Configuration Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Provides options to configure standard email headers like 'From' and 'Newsgroups', and to override the Date header and associated timestamps for posts. ```APIDOC CLI Options: -f, --from Description: Shortcut for `-H From=...`. Defaults to 'username ', sourced from the local system. -g, --groups Description: Shortcut for `-H Newsgroups=...`. Separate multiple groups with commas, without any spaces. Defaults to alt.binaries.test. --date Description: Override the Date header, Message-ID timestamp, and timestamps for generated NZBs. Can use 'now' to refer to Nyuu's start time. If unset (default), uses the time at which each post is encoded, differing from 'now' by not being a fixed timestamp across the run. Example: --date "2023-10-27T10:00:00Z" or --date now ``` -------------------------------- ### Nyuu Progress Reporting Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Details the various methods for reporting progress during Nyuu operations, including logging, TCP, and HTTP servers. Users can specify intervals and hosts/ports for these reporting mechanisms. ```APIDOC Progress Reporting: --progress [:|:[:]] Controls how progress information is displayed. Can be specified multiple times. Default is `--progress stderr` if verbosity >= 3; specify `--progress none` to suppress. Types: - stderr: Output to stderr (default behavior for verbosity >= 3). - stdout: Same as stderr but output to stdout. - stdoutx: Same as stderrx but output to stdout. - log[:]: Output log entries at specified intervals (e.g., '30s'). Defaults to 60s. - tcp[:[:]]: Start a TCP server. Listens on specified host/port or random port if unspecified. - http[:[:]]: Start an HTTP server. Listens on specified host/port or random port if unspecified. Examples: --progress log:30s Logs progress every 30 seconds. --progress http:[2001::1]:1234 Start HTTP server on IPv6 address 2001::1, port 1234. --progress tcp:localhost Start TCP server on localhost, using a random port. ``` -------------------------------- ### Nyuu Posting and Connection Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Options that control the posting process, connection management, and retry behavior. This includes connection counts, upload rates, timeouts, and retry logic. ```APIDOC -n, --connections Number of connections to create for posting (default 3) --max-upload-rate Throttle rate at which posts are uploaded at. Format: {size}/{time}, e.g., "10M/5s". If quantity is omitted, 1 is assumed (e.g., "2M/s"). The size indicates the burst rate. Set to 0 to disable. --timeout Timeout on server responses (default 30s). Set to 0 to disable. --connect-timeout Connect timeout (default 30s). Set to 0 to disable. --post-timeout Timeout on sending post data (default 120s). Set to 0 to disable. --connect-retries Number of connection retry attempts (default 1) --reconnect-delay Delay connection retries (default 15s) --request-retries Number of request retry attempts (default 5) --retry-on-bad-resp Treat bad responses as a request failure instead of a fatal error (flag option) --post-retries Number of post retry attempts in response to 441 errors (default 1) --post-retry-delay Delay post retries (default 0s) --post-fail-reconnect Treat posting failures as connection fatal errors, causing the connection to be reestablished. If set, `--post-retries` and `--post-retry-delay` are ignored (flag option). --error-teardown Force teardown of bad connections (flag option). If unset, bad connections are closed gracefully. --disconnect-timeout How long to wait for a connection to disconnect before forcefully tearing it down (default 5s). Set to 0 to disable. --keep-alive Try to always keep connection alive even if not needed (flag option). ``` -------------------------------- ### Customize NZB Metadata Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Allows adding custom metadata tags to the NZB file, such as title, tags, categories, and passwords. These are shortcuts for the more general -M or --meta option. ```APIDOC --nzb-title A human-readable identifiable title for the contents of the NZB. Shortcut for `-M title=...` --nzb-tag <tag> An attribute of the NZB contents, such as "SD". Can be specified multiple times. Shortcut for `-M tag=...` --nzb-category <category> Suggested category as used by your indexing service (preferrably one, but can be specified multiple times). Shortcut for `-M category=...` --nzb-password <password> Attach a password to this NZB if its contents requires one. Can be specified multiple times if there are multiple passwords. Shortcut for `-M password=...` ``` -------------------------------- ### Nyuu Article/Post Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Options that define the characteristics of the articles or posts being uploaded, such as size, line length, and comments. ```APIDOC -a, --article-size Target size of each news post (default 700K). Note that yEnc makes the actual size larger. --article-line-size Target bytes per line (default 128) -t, --comment Comment to insert before post subject --comment2 Comment to append after post subject -F, --group-files Group files by filename, similar to how indexers group files. ``` -------------------------------- ### Nyuu NZB Output Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Controls how Nyuu generates and outputs NZB files, including file naming conventions, overwriting existing files, and handling incomplete outputs. ```APIDOC -o, --out If supplied, will write NZB to this file. Can be '-' which writes the NZB to stdout. You can also pipe this into the stdin of another process by prefixing a command with `proc://`, for example: `-o 'proc://cat>out.nzb'`, which is the same as using `-o- | cat>out.nzb`. The stdout and stderr of the process is discarded. The following tokens are also supported (see `--subject` for details): {filenum}, {0filenum}, {files}, {filename}, {fnamebase}, {filesize}, {fileksize}, {filemsize}, {fileasize}, {part}, {0part}, {parts} If tokens are used, multiple NZB files may be created (or multiple processes spawned if proc:// is used). Nyuu can also pipe to a specified fd if prefixed with fd:// (requires NodeJS >= 0.12), i.e. `fd://1` being a shortcut for stdout. -O, --overwrite If NZB exists, overwrite it, otherwise will error (flag option). --nzb-del-incomplete Remove NZB file if Nyuu exits without finishing. Note: deletion may not occur in the event of a failure. ``` -------------------------------- ### Nyuu Filename Transformation Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Specifies how on-disk filenames are transformed into the 'filename' placeholder used in posting. Supports placeholder substitution and random text generation. ```APIDOC CLI Options: --filename <format> Description: How on disk file names are transformed into a 'filename' for use in posting. The following placeholders are available: {filename} Full file name and path as specified in command supplied {basename} Base file name without path {pathname} Path component of file name This also accepts the ${rand(N)} token (see `--subject`). Default: {basename} (effectively discards path names). Note: This option has no effect on files not sourced from disk. ``` -------------------------------- ### Nyuu Command Line Usage Source: https://github.com/animetosho/nyuu/blob/master/README.md Nyuu can be controlled via command-line arguments. Detailed usage information is available in separate help files. ```shell nyuu --help-full # or nyuu -h ``` -------------------------------- ### Nyuu Subject Formatting Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Configures the subject line for posts, supporting extensive placeholder substitution for dynamic content. This option defines the entire subject string, and Nyuu does not enforce any specific format. ```APIDOC CLI Options: -s, --subject <format> Description: Subject to use for posts. The following placeholders are available: {filenum} Current file number in collection {0filenum} Current file number in collection, pre-padded with 0's {files} Number of files in collection {filename} File's name {fnamebase} File's name without extension; uses same logic as `--group-files` {filesize} File's size in bytes {fileksize} File's size in KiB, rounded to 2dp. Replace 'k' with 'm', 'g', 't' for MiB, GiB, TiB (e.g., {filemsize}). {fileasize} Friendly formatted file size, e.g., '4.85 MiB' or '35.1 GiB' {part} Article part number, starts at 1 {0part} Article part number, pre-padded with 0's to be as long as {parts} {parts} Number of articles for the file {size} Article chunk size (before yEnc) {comment} Value from `--comment` {comment2} Value from `--comment2` {timestamp} Unix timestamp of post ${rand(N)} Random text, N characters long Default: {comment} [{0filenum}/{files}] - "{filename}" yEnc ({part}/{parts}) {filesize} {comment2} Note: {timestamp} and ${rand(N)} are intended for `--message-id`, not `--subject`. ``` -------------------------------- ### Connection Threading Options Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Manages the number of threads used for distributing connections. Setting this to a non-zero value can improve performance, especially with TLS/SSL enabled, by offloading encryption to separate threads. Note that `--max-upload-rate` is not supported when connection threading is enabled. Requires specific Node.js versions. ```APIDOC --connection-threads <number> Number of threads to distribute connections over. If set, posting connections will be allocated evenly across the specified number of threads. A value of 0 disables migrating connections to threads, using default NodeJS behaviour of handling connections on the main thread. Running connections in separate threads is mostly useful if TLS/SSL is enabled but connection speed is being limited by how fast one CPU core can encrypt data. This option requires NodeJS >= 11.7 or NodeJS >= 10.5 with `--experimental-worker` flag set. `--max-upload-rate` is not supported with connection threading. Default: 0 ``` -------------------------------- ### Nyuu Message-ID Formatting Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Defines the format for generated Message-IDs, allowing dynamic content through placeholders similar to the subject formatting. ```APIDOC CLI Options: --message-id <format> Description: Format of generated Message-ID. See `--subject` for available placeholders. Default: ${rand(24)}-{timestamp}@nyuu ``` -------------------------------- ### NZB Encoding and Subject/Poster Overrides Source: https://github.com/animetosho/nyuu/blob/master/help-full.txt Specifies the character encoding for the NZB file and allows overriding the default subject and poster information derived from the article headers. Supports token substitution for dynamic values. ```APIDOC --nzb-encoding <encoding> Character encoding used in the NZB (default utf-8). See https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings for valid encodings. --nzb-subject <subject> Override the subject specified in the NZB. By default, Nyuu uses the Subject header sent for the first article of each file. This option supports tokens like `--out`. Default is {value}. --nzb-poster <poster> Override the poster specified in the NZB, which is taken from the From header by default. Details are the same as `--nzb-subject`. Default is {value}. ```