-
Notifications
You must be signed in to change notification settings - Fork 0
Command Line Usage
Languages: English | Français
This page is the complete CLI reference. For guided explanations, see Configuration and History and resume.
On this page:
Syntax: ngPost (options)* (-i | --auto | --monitor )+
--help : Help: display syntax
-v or --version : app version
-c or --conf : use configuration file (if not provided, ngPost uses the per-user config path described below)
--disp_progress : display cmd progressbar: NONE (default), BAR or FILES
-d or --debug : display extra information
--fulldebug : display full debug information
-l or --lang : application language
--check : check nzb file (if articles are available on Usenet)
-q or --quiet : quiet mode (no output on stdout)
// structured post history & article-level resume (SQLite database)
// every option below accepts both the _ and - form (e.g. --history_show or --history-show)
--history : list the structured post history (add --json for machine-readable output)
--history_show <id> : show the details of one history post
--history_import_csv <file> : import a legacy POST_HISTORY csv into the database
--regenerate_nzb <id> : regenerate an nzb from the history (use -o to set the output path)
--include_password : include the stored archive password in regenerated/shown output
--post_db <file> : path to the structured SQLite history database
--resume_list : list resumable or partial posts (add --json)
--resume_check <id> : show the resume status for one post
--resume_post <ids> : resume one or several post ids (coma separated)
--resume_all : resume all resumable posts
--resume_abandon <id> : mark an incomplete post as abandoned (requires --yes)
--resume_purge <id> : purge the technical resume data of a post (requires --yes)
--dry_run : simulate a resume command without actually posting
--yes : assume yes for non-interactive destructive commands
--json : emit JSON output for script usage
// automated posting (scanning and/or monitoring)
--auto : parse directory and post every file/folder separately. You must use --compress, should add --gen_par2, --gen_name and --gen_pass
--monitor : monitor directory and post every new file/folder. You must use --compress, should add --gen_par2, --gen_name and --gen_pass
--rm_posted : delete file/folder once posted. You must use --auto or --monitor with this option.
// quick posting (several files/folders)
-i or --input : input file to upload (single file or directory), you can use it multiple times
-o or --output : output file path (nzb)
-x or --obfuscate : obfuscate the subjects of the articles (CAREFUL you won't find your post if you lose the nzb file)
-g or --groups : newsgroups where to post the files (coma separated without space)
-m or --meta : extra meta data in header (typically "password=qwerty42")
-f or --from : poster email (random one if not provided)
-a or --article_size: article size (default one: 716800)
-z or --msg_id : msg id signature, after the @ (default one: ngPost)
-r or --retry : number of time we retry to an Article that failed (default: 5)
-t or --thread : number of Threads (the connections will be distributed amongs them)
--gen_from : generate a new random email for each Post (--auto or --monitor)
// for compression and par2 support
--tmp_dir : temporary folder where the compressed files and par2 will be stored
--rar_path : RAR absolute file path (external application)
--rar_size : size in MB of the RAR volumes (0 by default meaning NO split)
--rar_max : maximum number of archive volumes
--par2_pct : par2 redundancy percentage (0 by default meaning NO par2 generation)
--par2_path : par2 absolute file path
--pack : Pack posts using config PACK definition (subset of COMPRESS, GEN_NAME, GEN_PASS, GEN_PAR2)
--auto_compress : alias of --pack: enable auto-packing using the config PACK definition
--compress : compress inputs using RAR or 7z
--gen_par2 : generate par2 (to be used with --compress)
--rar_name : provide the RAR file name (to be used with --compress)
--rar_pass : provide the RAR password (to be used with --compress)
--gen_name : generate random RAR name (to be used with --compress)
--gen_pass : generate random RAR password (to be used with --compress)
--length_name : length of the random RAR name (to be used with --gen_name), default: 17
--length_pass : length of the random RAR password (to be used with --gen_pass), default: 13
--rar_no_root_folder: Remove root (parent) folder when compressing Folders using RAR
// NFO options
--keep_nfo_extension: Keep the .nfo extension visible when obfuscating file names
--nzb_copy_nfo : Copy the original .nfo file next to the generated nzb
--auto_include_nfo : auto-post: include a sibling .nfo (same name, different extension) in the same post
// VPN overrides (one-shot for this run, not saved to config)
--vpn : Force all NNTP connections through the configured VPN (master switch ON)
--no_vpn : Disable VPN for this run (master switch OFF, per-server useVpn ignored)
--vpn_profile : Select the active VPN profile by name (must exist in config)
// you can provide servers in one string using -S and/or split the parameters for ONE SINGLE server
-S or --server : NNTP server following the format (<user>:<pass>@@@)?<host>:<port>:<nbCons>:(no)?ssl
-h or --host : NNTP server hostname (or IP)
-P or --port : NNTP server port
-s or --ssl : use SSL
-u or --user : NNTP server username
-p or --pass : NNTP server password
-n or --connection : number of NNTP connections
Examples:
- with VPN override: ngPost-v5.4.0-x86_64.AppImage -i /data/myPost --pack --vpn --vpn_profile Mullvad-NL
- with monitoring: ngPost-v5.4.0-x86_64.AppImage --monitor /data/folder1 --auto_compress --rm_posted --disp_progress files
- with auto post: ngPost-v5.4.0-x86_64.AppImage --auto /data/folder1 --compress --gen_par2 --gen_name --gen_pass --rar_size 42 --disp_progress files
- with NFO options: ngPost-v5.4.0-x86_64.AppImage -i /data/myPost --auto_compress --keep_nfo_extension --nzb_copy_nfo
- list history as JSON: ngPost-v5.4.0-x86_64.AppImage --history --json
- resume a failed post: ngPost-v5.4.0-x86_64.AppImage --resume_post 42
Since v5.4.0, ngPost records every post in a structured SQLite database (replacing the
old CSV POST_HISTORY file, which can still be imported with --history_import_csv). The
database tracks each post down to the individual article, which makes it possible to inspect
the history, regenerate an NZB, or resume a partial/failed post directly from the command line.
By default the database lives next to the configuration:
| Platform | Default path |
|---|---|
| Linux | ~/.config/ngPost/ngPost_history.sqlite |
| Windows | %LOCALAPPDATA%\ngPost\ngPost_history.sqlite |
| macOS | ~/Library/Application Support/ngPost/ngPost_history.sqlite |
Use --post_db <file> (or the POST_DB config keyword) to point to another database.
Note: every option accepts both the underscore and dash form, e.g.
--history_showor--history-show.
# list all posts (TSV columns: id, status, created, name, groups, password)
ngPost --history
# same list as compact JSON for scripting
ngPost --history --json
# full details of one post (files, nzb path, archive name, article counts)
ngPost --history_show 42
ngPost --history_show 42 --include_password # reveal the stored archive passwordThe JSON objects returned by --history expose: id, name, status, groups,
created_at, has_password and password_stored. This pairs nicely with jq:
# names of every completed post
ngPost --history --json | jq -r '.[] | select(.status=="done") | .name'Because it is plain SQLite, you can also query the database directly:
sqlite3 ~/.config/ngPost/ngPost_history.sqlite \
"SELECT id, status, created_at, nzb_name FROM posts ORDER BY id DESC LIMIT 20;"ngPost --regenerate_nzb 42 -o /path/to/output.nzb
ngPost --regenerate_nzb 42 -o output.nzb --include_passwordWhen a post is interrupted (network loss, crash, …), the articles that never reached the server are flagged and can be re-posted with a fresh Message-ID — no need to re-upload the whole archive.
ngPost --resume_list # show resumable / partial posts (add --json)
ngPost --resume_check 42 # show the resume status of one post
ngPost --resume_post 42 # resume one post
ngPost --resume_post 42,43,57 # resume several posts (coma separated)
ngPost --resume_all # resume everything that is resumable
ngPost --resume_post 42 --dry_run # show what would be re-posted, without postingngPost --resume_abandon 42 --yes # mark an incomplete post as abandoned
ngPost --resume_purge 42 --yes # drop the technical resume data of a postngPost --history_import_csv /path/to/POST_HISTORY.csvThe original CSV file is preserved; ngPost also imports it automatically on first launch.
Since v5.4.0, the default configuration file moved from the old legacy location to a per-user application configuration directory:
| Platform | New default config path | Legacy path |
|---|---|---|
| Linux |
$XDG_CONFIG_HOME/ngPost/ngPost.conf or ~/.config/ngPost/ngPost.conf
|
~/.ngPost |
| Windows | %LOCALAPPDATA%\ngPost\ngPost.conf |
ngPost.conf next to the executable |
| macOS | ~/Library/Application Support/ngPost/ngPost.conf |
~/.ngPost |
On first launch, if a legacy configuration exists and the new file does not, ngPost copies the legacy file to the new location and keeps the original file in place. This keeps older ngPost versions usable while allowing v5.4+ to use the new layout.
The same configuration directory is also used for related per-user data, including VPN profile files and the default structured history database ngPost_history.sqlite.
You can still override the configuration file explicitly with:
ngPost -c /path/to/ngPost.confStart
Use ngPost
Project
Démarrer
Utiliser ngPost
Projet