QUICKSTART
First create a .ypostrc file in your home directory ("~/.ypostrc") containing your news server information.
This file will keep you from having to enter the server information on the command line every time you run the program.
Make sure the file is not readable by other users ("chmod 0600 ~/.ypostrc") if it contains a username or password.
You can run "man ypostrc" for the full documentation, but here's an example that should give you a good start:
# ~/.ypostrc - sample configuration
server = news.example.com # The name of your news server
user = user1234 # Username (if your server requires it)
pass = IloveUnix # Password (if your server requires it)
author = "juser@example.net (Joe User)" # Use this address in the From: line
Now, let's say you have a short video you want to post, and all the files are in the directory /home/bboy/video:
total 6816
-rw-r--r-- 1 bboy bboy 1776 Mar 14 23:24 shortfilm.nfo
-rw-r--r-- 1 bboy bboy 3072000 Mar 14 23:13 shortfilm.r00
-rw-r--r-- 1 bboy bboy 817510 Mar 14 23:13 shortfilm.r01
-rw-r--r-- 1 bboy bboy 3072000 Mar 14 23:13 shortfilm.rar
To post these files to the newsgroup alt.binaries.test.yenc, and create an SFV file for them as well, you would
run:
ypost --sfv -g alt.binaries.test.yenc /home/bboy/video/*
When you run the command, ypost will output a summary of the messages it is about to post, before actually posting
the messages:
Server: news.example.com
Newsgroup: alt.binaries.test.yenc
Author: juser@example.net (Joe User)
1. "shortfilm.nfo" 1776 yEnc bytes
2. "shortfilm.sfv" 402 yEnc bytes
3. "shortfilm.rar" yEnc (x/5) 3072000 bytes
4. "shortfilm.r00" yEnc (x/5) 3072000 bytes
5. "shortfilm.r01" yEnc (x/2) 817510 bytes
Post 5 files (14 parts)? [y]es, [n]o:
Notice that ypost tries to post your files in a sensible order. .nfo and .sfv files and the like
get posted first, and the .rar file gets posted before the .r00 file, instead of at the end.
The yEnc specification includes subject line formats for single part and multipart Usenet posts, and strongly
recommends their use. ypost is compliant with the specification, and no facility is included to override this
behavior. However, there are two comment areas allowed by the specification: one before, and one after the file information.
The comment before the file info may be specified by the -s (--subject) option, and the comment after the
file info may be specified by the -c (--comment) option. Thus
ypost -s'Test Post' -c'file %f of %F' test.zip test.txt
would post the two files specified (test.zip and test.txt) with the following subject lines:
[Test Post] "test.txt" 4281 yEnc bytes [file 1 of 2]
[Test Post] "test.zip" yEnc (1/5) 3065891 bytes [file 2 of 2]
[Test Post] "test.zip" yEnc (2/5) 3065891 bytes [file 2 of 2]
[Test Post] "test.zip" yEnc (3/5) 3065891 bytes [file 2 of 2]
[Test Post] "test.zip" yEnc (4/5) 3065891 bytes [file 2 of 2]
[Test Post] "test.zip" yEnc (5/5) 3065891 bytes [file 2 of 2]
The variables used in the preceding example may be included in either the subject or the comment line, and will be
replaced on a per-file basis with the relevant data. The available variables are:
- %p
- The current part number within the current file.
- %P
- The total number of parts within the current file.
- %f
- The current file number within the overall list of files to post.
- %F
- The total number of files to be posted.
If you specify either the -s (--subject) or -c (--comment) option without an argument, ypost
will prompt you to enter this information.