Skip to content

Post Info Files

Hydro74000 edited this page Aug 21, 2026 · 19 revisions
ngPost

Post info files

Languages: English | Français

From version 5.4.3 on. Everything on this page needs ngPost 5.4.3 or later; earlier versions have no post info files.

On this page:

What is a post info file?

After each post, ngPost can write a small text file next to your .nzb, describing what you just posted: the name, the size, the archive name, your own notes.

Some Usenet indexes ask for such a file to reference a post. ngPost knows no index format. You give it a model, and it fills in the blanks. That way, if an index changes its format, only its model changes, and everybody else is unaffected.

It is optional. As long as you do not set POST_INFO_TEMPLATE, no file is written, nothing is asked, nothing changes.

In 3 minutes

1. Copy this into a new text file called my_sheet.txt:

date =__date__
name =__originalName__
size =__postSize__
archive =__rarName__
groups =__groups__

Everything written __like_this__ is a variable that ngPost replaces. Every other character is written exactly as you typed it, so text and variables mix freely on one line:

comment =shot by me, __originalName__, posted in __groups__

A line starting with # in the first column is a comment: it is not written to the sheet. Indent it by one space if you want it written after all. There is no other escaping to learn.

2. Put that file where you can read it. Next to your ngPost.conf is the simplest choice:

System Folder
Windows %LOCALAPPDATA%\ngPost\
Linux ~/.config/ngPost/
macOS ~/Library/Application Support/ngPost/

3. Add these two lines to your ngPost.conf:

POST_INFO_TEMPLATE = my_sheet.txt
POST_INFO_OUTPUT = __nzbDir__/__nzbName__.info.txt

4. Post something.

5. Look next to your .nzb: a .info.txt file is waiting, filled in:

date =2026-08-18
name =Backup-Photos-2026.tar
size =2505484398
archive =876EFID5Y22SH1CO5C7C
groups =alt.binaries.test

That is the whole idea. The rest of this page is detail.

Where to put the model

Anywhere. What matters is only that ngPost can read the model and write the sheet.

If the model is not in the same folder as your ngPost.conf, write its full path. A bare file name in the configuration means "next to the configuration file", and nowhere else: ngPost will not go looking for it.

  • An absolute path is used as is: /home/me/models/my_sheet.txt, C:\Users\me\models\my_sheet.txt.
  • A relative path written in ngPost.conf is understood from the folder of that configuration file: my_sheet.txt means "next to my conf".
  • A relative path given on the command line (--post_info_template) is understood from the folder you are standing in.
  • ~ is expanded to your home folder.

AppImage users: the folder the AppImage runs from is not a place you can rely on. Put your model in your configuration folder or in your home folder.

Windows users: C:\Program Files\... is read only for a normal user (UAC). Do not put your model, and above all not the produced file, in there.

The templates/ folder of the ngPost sources holds ready made models you can copy, but there is nothing special about that folder: it is just examples.

Choosing the model in the interface

From version 5.4.3 on, the Post information… dialog offers a list of models rather than a path to type:

  • the model from your configuration (POST_INFO_TEMPLATE) comes first, marked (default). Selecting it means "whatever the configuration says": change the configuration later and this post follows;
  • Choose a file… opens a file browser. A model opened this way is added to the list and stays there for the rest of your ngPost session, so the next posts of the same evening find it in one click. Closing ngPost forgets it — it is a convenience, not a setting;
  • the small next to the list removes the selected model from that list. It does not delete the file, and it cannot remove the configured default;
  • Use this model for my next posts too writes the selected model into your configuration as POST_INFO_TEMPLATE. It then becomes the default, for this post and every one after it.

Auto Post has the same pair of controls, with one difference: what you set there applies to every post that run creates, not to a single one.

The two halves of the window

The window holds two different things, and keeping them apart is the whole point:

The model — the file, line by line. This is the file. One row per line, in the file's order: the name on the left of the =, the content on the right (text, variables, or both), and what will come out. Comments appear too, greyed and marked (not written). You can change a line, add one under the selected one, or drop one — but these changes only reach the disk through Save as…, because the post reads the file, not this table. If you leave with unsaved changes, ngPost says so rather than showing you one sheet and writing another.

Your fields — the values of this post. One row per __meta:name__ the model uses, wherever it appears — alone on a line or in the middle of a sentence. These values belong to the post, never to the model, so they are never written into the file above. Add a field creates both the value and the line that writes it.

The third column is a live preview: type a title and the line that uses it updates. A value already known while you prepare the post is shown as it will be; one that only exists once the post is over stays blank and says filled in after the post. And it shows the password if your model writes it — the column is what the file will hold, so hiding it there would be a comfortable lie.

The ? What can I put in a model button lists every variable ngPost knows, what each one holds, and whether it exists before or after the post. It is built from the same table the renderer uses, so it can never describe a variable ngPost does not actually support.

The three settings

Key Example What it does
POST_INFO_TEMPLATE my_sheet.txt your model. Empty (the default) means the feature is off
POST_INFO_OUTPUT __nzbDir__/__nzbName__.info.txt where to write the sheet. Variables work here too, and a relative path is understood from the folder of your configuration file
POST_INFO_ONLY_ON_SUCCESS true (default) no sheet for a post that failed or is incomplete

POST_INFO_OUTPUT accepts the same variables as the model itself, which is handy:

# next to the nzb (the default)
POST_INFO_OUTPUT = __nzbDir__/__nzbName__.info.txt

# all sheets together, in a folder your index watches
POST_INFO_OUTPUT = /home/me/index_inbox/__nzbName__.txt

# sorted by your own category, folders are created as needed
POST_INFO_OUTPUT = /home/me/sheets/__meta:category__/__nzbName__.txt

POST_INFO_ONLY_ON_SUCCESS is on by default because an index importing these files automatically has no use for a sheet describing a broken post.

All three, and every post command setting, also exist as command line options (--post_info_template, --post_info_output, --no_post_info_only_on_success, …), so ngPost can be driven without any configuration file. See Command line usage.

All the variables

Anything not recognised is left untouched in the file, and ngPost tells you about it in the log, so a typo is visible rather than silent.

Names and paths

Variable Example Meaning
__originalName__ Backup-Photos-2026.tar the name of what you asked to post
__sourcePath__ /data/backup/Backup-Photos-2026.tar its full path
__originalPath__ /data/backup folder of the posted files (kept for old scripts)
__nzbPath__ /data/nzb/Backup-Photos-2026.nzb the nzb file
__nzbDir__ /data/nzb the folder holding it
__nzbName__ Backup-Photos-2026 its name, without .nzb
__nzbFileName__ Backup-Photos-2026.nzb its name, with .nzb
__rarName__ 876EFID5Y22SH1CO5C7C the archive name — the one to search for on Usenet

Sizes

Variable Example ⚠ Read this
__postSize__ 2505484398 bytes of the archive and its parity, before yEnc encoding. A .nfo copied next to the rar volumes is not counted
__postSizeHuman__ 2.33 GB the same, readable
__sizeInByte__ 2505484398 legacy, kept unchanged for existing scripts. Prefer __postSize__ in a new model

Counts and status

Variable Example Meaning
__status__ success success, partial or failed
__nbFiles__ 42 posted files
__nbArticles__ 3600 articles
__nbArticlesPosted__ 3600 articles that went through
__nbArticlesFailed__ 0 articles that failed
__avgSpeed__ 12.5 MB/s average speed
__durationSec__ 200 duration in seconds
__postId__ 42 id in the history database
__appVersion__ 5.5.0 the ngPost that made the post

Dates

Variable Example Meaning
__date__ 2026-08-18 end of the post, local time
__date:dd/MM/yyyy__ 18/08/2026 the same, your format
__dateStart__ 2026-08-18 when the transfer started
__dateStart:HH:mm__ 21:30 the same, your format

The format between : and __ is a Qt date format: dd day, MM month, yyyy year, HH:mm:ss time.

Others, with a catch

Variable ⚠ Read this
__par2Pct__ par2 redundancy. Empty when par2 is disabled, even if a percentage is configured, because there is no parity to describe
__nzbPoster__ the poster written in the nzb. Under article obfuscation the real From: of each article is random and different: this variable is the declared one, not those
__rarPass__ the archive password. See below
__meta:<name>__ one of your own pieces of information, see the next section
__postInfoPath__ path of the post info file itself. Empty inside the sheet (it does not exist yet), filled in for the post commands that run right after
__jsonPath__ temporary json file describing the whole post, post commands only, empty in a sheet

Your own information, and who sees it

A title, a portal link, a category: ngPost cannot invent those, you type them.

In the interface: in the posting tab, tick Create a post info file, then click Post information…. Every __meta:name__ your model uses appears in the Your fields table at the bottom of the window, waiting for a value — you have nothing to guess and nothing to declare.

On the command line:

ngPost -i Rando-Mercantour-2026.mkv \\
       --post_meta "title=Mercantour hike, 2026" \\
       --post_meta "category=My own footage"

Each line has an Also in NZB box, unticked by default. A field always goes into the post info file; the box only adds a second destination:

Post info file Inside the nzb
box unticked (default) yes no
box ticked yes yes

An nzb circulates. It is shared, uploaded, sometimes republished. A portal link, a private note or a customer name has no business travelling with it. That is why nothing is published unless you say so.

On the command line the same rule applies: both write the field in the post info file, and -m/--meta publishes it in the nzb on top of that. --post_meta never does.

A piece of information you did not fill in renders as empty. That is normal, not an error: a model is written once and used for every post.

The password in a record sheet

The generic model shipped with ngPost does not write the password. Adding password =__rarPass__ to your model is a deliberate act, because the file then becomes as sensitive as the password itself.

When ngPost writes a sheet containing the password:

  • On Linux and macOS, the file is created readable by you only, and the permissions are set before the first byte is written, so it is never exposed even briefly.
  • On Windows, the file inherits the permissions of its folder. ngPost warns you in the log; put such files in a folder only you can read.

When exporting the sheet of an older post, ngPost asks before including the password, and only when the model actually asks for it.

A complete example

Reproducing the record sheet of an index, here Baselien.

The model (baselien.txt):

date =__date:dd/MM/yyyy__
nom du post =__originalName__
taille post =__postSize__
mot de passe =__rarPass__
nom a rechercher =__rarName__
posteur =__nzbPoster__
groupe =__groups__
pourcent =__par2Pct__
portail1 =__meta:portail1__
titre =__meta:titre__
categorie =__meta:categorie__
qualite =__meta:qualite__
genre =__meta:genre__

What you type in the posting tab:

Name Value NZB
portail1 https://example.org/my-albums/mercantour-2026
titre Mercantour hike, 2026
categorie My own footage
qualite 1080p
genre Nature

What you get, next to your nzb:

date =15/08/2026
nom du post =Rando-Mercantour-2026.mkv
taille post =2505484398
mot de passe =nHkPz2wQr
nom a rechercher =876EFID5Y22SH1CO5C7C
posteur =h0wsef7@8xw81s.r7
groupe =alt.binaries.test
pourcent =8
portail1 =https://example.org/my-albums/mercantour-2026
titre =Mercantour hike, 2026
categorie =My own footage
qualite =1080p
genre =Nature

That model is in templates/post_info_baselien.txt in the ngPost sources.

Exporting the sheet of an older post

Posts already in your history can produce their sheet too.

In the interface: History tab, select a post, then Export info file… (also in the right click menu).

On the command line:

# into a file
ngPost --export_post_info 42 --post_info_template my_sheet.txt -o sheet.txt

# to the standard output, to pipe it somewhere
ngPost --export_post_info 42 --post_info_template my_sheet.txt

One limit, stated plainly: for posts made before the ngPost version that introduced this feature, the par2 percentage, the source name and your own information were never recorded. Those lines come out empty, and ngPost tells you so. Everything else (date, name, size, archive, password, groups) is exact.

Using it from a script

NZB_POST_CMD runs a command at the end of each post. The same variables work there, and they are all available as environment variables, so a script can be called with no argument at all:

NZB_POST_CMD = /home/me/scripts/send_to_index.sh
#!/bin/bash
# every fixed variable of the page is here, in CAPITALS, prefixed with NGPOST_
echo "posted: $NGPOST_ORIGINAL_NAME ($NGPOST_POST_SIZE bytes)"
echo "nzb:    $NGPOST_NZB_PATH"
echo "sheet:  $NGPOST_POST_INFO_PATH"
# the date comes as NGPOST_DATE / NGPOST_DATE_START (ISO) and NGPOST_DATE_EPOCH
echo "date:   $NGPOST_DATE"

# your own information is in a json file, keys untouched
python3 -c "import json,os; print(json.load(open(os.environ['NGPOST_JSON']))['meta'])"

curl -F "nzb=@$NGPOST_NZB_PATH" -F "sheet=@$NGPOST_POST_INFO_PATH" https://my.index/api

Good to know:

  • the commands of a post run one after the other, in the order you declared them, and after the nzb upload if you configured one;
  • ngPost waits for them before quitting, so a command started at the very end of a post is no longer killed halfway;
  • a command that fails, crashes or cannot even start is reported in the log with its exit code and its error output;
  • the exit code of ngPost is unchanged by a failed command, unless you set POST_CMD_FAIL_IS_ERROR = true;
  • a command that hangs keeps ngPost alive; Ctrl+C always interrupts, and POST_CMD_TIMEOUT = 300 kills it after five minutes;
  • the archive password is not put in the environment nor in the json. __rarPass__ as an argument still works, and POST_CMD_EXPOSE_PASSWORD = true puts it back everywhere if you need it;
  • a value holding spaces or quotes stays one single argument.

It does not work

What you see What to look at
no file at all is POST_INFO_TEMPLATE set? Is the post a success? By default nothing is written for a failed post (POST_INFO_ONLY_ON_SUCCESS)
cannot read the template ... the path in the log is the one ngPost tried. A relative path in the conf is looked up next to the conf
cannot write ... the destination folder does not exist or is not yours to write in. Program Files is a classic
refusing to overwrite ... the destination is your nzb, your model, or one of your source files. Change POST_INFO_OUTPUT
a __variable__ stayed as is typo in the name. The log lists the ones it did not recognise. Beware, it is case sensitive
a %1 in my text became a path %1 is the historical alias of the nzb path in NZB_POST_CMD only. In a model it is left alone, but check you are not looking at a post command
a line is empty normal for a __meta:...__ you did not fill in, and for __par2Pct__ when par2 is off
accents look wrong the file is written in UTF-8. Tell your editor, or your importer, to read it as UTF-8
where is the log? the interface shows it in the bottom panel; in command line it is on the output, and LOG_IN_FILE = true writes it to a file

Clone this wiki locally