Headless Usenet Posting v2

From banana_wiki
Jump to: navigation, search

This method works better, since it is using NewsMangler which is a much more up to date, usenet poster. It creates nzbs which is great.

Get required software.

apt-get install par2 rar git
git clone https://github.com/madcowfred/newsmangler.git

Setup the newsmangler config:

cp sample.conf ~/.newsmangler.conf 
nano ~/.newsmangler.conf

Make sure to setup a yenc module

https://github.com/thebananafish/yenc-freddie

Prep the files to post.

rar a "name of rar file" -v15m -m0 "/home/example/upload/"* 
par2create -r10 -n7 "name of par file" /home/example/upload/*.rar*

Now post!

python mangler.py "test post please ignore"

Now this is all great and everything, but we want it automated!

this script will rar and par every folder in a directory it will then post each directory to usenet, as a separate post.

#!/bin/bash

#Created on 3/19/2013
#Posting to usenet script
#Explain: this script takes every directory in a directory, rars them, pars them
#and then posts to usenet.  It is a little messy, but hey it works.
#this script will ask the user for a prefix of the folder it creates to post
#this is not the same as the prefix used by newsmangler

echo "please enter a prefix!:"
read prefix
for dir in */
do

        base=$(basename "$dir")
        rar a "${base}" -v15m -m0 "$dir"
        par2create -r10 -n7 "${base}" ${base}*.rar
        mkdir "$prefix $dir"
    mv "${base}".* "$prefix $dir"
    python /home/nick/newsmangler/mangler.py "$prefix $dir"

echo "$prefix $dir has been posted!"

done

make sure you dont use yenc vanilla it ruins stuff