Page 1 of 4 123 ... LastLast
Results 1 to 10 of 37

Thread: HOWTO: post to usenet with Ubuntu

  1. #1
    Join Date
    Feb 2007
    Location
    Nowhere important
    Beans
    1,198
    Distro
    Ubuntu 12.04 Precise Pangolin

    HOWTO: post to usenet with Ubuntu

    Hi,
    Because it's a bit hard to post (binary files) to Usenet with Linux, I decided to make this tutorial.

    Note: All commands, which you have to run in a terminal, are in code tags.

    1. First install a few programs
    Code:
    sudo apt-get install par2 newspost rar
    2. Place the files you want to upload in a folder.

    3. Most files on Usenet are in rar-files. You can create these rar-files with this command:
    Code:
    rar a "name of rar file" -v10m -m0 "/home/example/upload/"*
    Let me explain the command:
    name of rar file: This is the name of the rar-file. ".rar" will automatic be added.
    -v10m: Split the file(s) to a new rar-archive after 10 MB
    -m0: Set compression level (0-store...3-default...5-best).
    "/home/example/upload/"*: This means; rar everything in the folder '/home/example/upload'

    4. Now we can create par files.
    Code:
    par2create -r10 -n7 "name of par file" /home/example/upload/*.rar*
    -r10: Percent par-files you want to create
    -n7: Number of par-files you want to create
    "name of par file": I don't want to explain this
    /home/example/upload/*.rar*: means; Create par-files of everything in the folder /home/eample/upload, which ends with .rar

    5. Upload your files
    Code:
    newspost -i upload.eweka.nl -u USERNAME -p PASSWORD -f noadress@gmail.com -n alt.binaries.boneless -y -s "SUBJECT" "/home/example/upload/*.part*" "/home/example/upload/*.par*"

    Extra notes:
    This is it. You can run commands after each one is done (with &&). Then it will be something like:
    Code:
    rar a "name of rar file" -v10m -m0 "/home/example/upload/"* && par2create -r10 -n7 "name of par file" /home/example/upload/*.rar* && newspost -i upload.eweka.nl -u USERNAME -p PASSWORD -f noadress@gmail.com -n alt.binaries.boneless -y -s "SUBJECT" "/home/example/upload/*.part*" "/home/example/upload/*.par*"
    Last edited by Martje_001; February 11th, 2008 at 04:42 PM. Reason: Made type errors
    ➙ Synchronize all your files across Windows, Linux and Mac OS with Dropbox (2GB free storage!). By signing up via this link I'll get some extra space also, thanks!

    Multiseat on Ubuntu 10.04

  2. #2
    Join Date
    May 2008
    Beans
    10

    Re: HOWTO: post to usenet with Ubuntu

    I would very much like to use this, but newspost is not in the repositories of Hardy. Can I still use this program?

  3. #3
    Join Date
    Feb 2007
    Location
    Nowhere important
    Beans
    1,198
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: post to usenet with Ubuntu

    Of course

    i386:
    Code:
    wget http://nl.archive.ubuntu.com/ubuntu/pool/universe/n/newspost/newspost_2.1.1-4_i386.deb
    sudo dpkg -i newspost_2.1.1-4_i386.deb
    amd64:
    Code:
    wget http://nl.archive.ubuntu.com/ubuntu/pool/universe/n/newspost/newspost_2.1.1-4_amd64.deb
    sudo dpkg -i newspost_2.1.1-4_amd64.deb
    ➙ Synchronize all your files across Windows, Linux and Mac OS with Dropbox (2GB free storage!). By signing up via this link I'll get some extra space also, thanks!

    Multiseat on Ubuntu 10.04

  4. #4
    Join Date
    Apr 2006
    Beans
    28

    Re: HOWTO: post to usenet with Ubuntu

    greate guide!
    Only a question: why do you split file in rar of 10MB? isn't usefull bigger blocks? maybe 40MB?
    Last edited by rabside; May 23rd, 2008 at 06:51 PM.

  5. #5
    Join Date
    Feb 2007
    Location
    Nowhere important
    Beans
    1,198
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: post to usenet with Ubuntu

    Thank you! And, yes, it is, but this is only an example.
    ➙ Synchronize all your files across Windows, Linux and Mac OS with Dropbox (2GB free storage!). By signing up via this link I'll get some extra space also, thanks!

    Multiseat on Ubuntu 10.04

  6. #6
    Join Date
    Apr 2006
    Beans
    28

    Re: HOWTO: post to usenet with Ubuntu

    Hi guys,
    this is a little script to automate the upload:

    Code:
    #!/bin/bash
    
    #---------- config start----------
    username="username"
    password="password"
    server="newsserver"
    temppath="path of temp dir used to post material es: /media/dati/"
    newsgroup="newsgroup, es: alt.binaries.multimedia.divx.italian"
    poster="poster name, es: poster"
    email="email address, es: poster@gmail.com" 
    #---------- config end----------
    
    
    error="false"
    filename="$(basename $1)"
    subject="${filename%.*}"
    
    
    
    function checkLastCommand {
    	if [ "$1" != "0" ]; then
    		error="true"
    	fi
    }
    
    #rar split of file
    rar a "$temppath$filename" -v40m -m0 $1
    
    #checkresult
    checkLastCommand "$?"
    
    #create par
    if [ "$error" != "true" ]; then
    	par2create -r10 -n7 "$temppath$filename" "$temppath"*.rar*
    fi
    
    #checkresult
    checkLastCommand "$?"
    
    #post
    if [ "$error" != "true" ]; then
    	newspost -i "$server" -u "$username" -p "$password" -f "$email" -n "$newsgroup" -y -s "$subject" "$temppath"*
    fi
    
    #checkresult
    checkLastCommand "$?"
    
    #delete tmpfile
    if [ "$error" != "true" ]; then
    	rm "$temppath"*
    fi
    I hope this help

  7. #7
    Join Date
    Feb 2007
    Location
    Nowhere important
    Beans
    1,198
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: post to usenet with Ubuntu

    I'm working on this myself, see this:
    http://www.xs4all.nl/~mgj1/bnewspost.htm
    ➙ Synchronize all your files across Windows, Linux and Mac OS with Dropbox (2GB free storage!). By signing up via this link I'll get some extra space also, thanks!

    Multiseat on Ubuntu 10.04

  8. #8
    Join Date
    Jan 2008
    Location
    R.O.K.
    Beans
    6
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: post to usenet with Ubuntu

    Martje!! Thank you for you guide. It's very helpful. Rabside, how do i use your script? I get a
    Cannot create path of temp dir used to post material es: /media/dati/.rar
    No such file or directorybasename: missing operand
    Try `basename --help' for more information.
    in konsole when i run the script. Basename --help didn't help me at all. I have no idea how to adjust the script (if it indeed needs that).

  9. #9
    Join Date
    Jan 2008
    Location
    R.O.K.
    Beans
    6
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: post to usenet with Ubuntu

    Thanks for the script but can you help me out of my error message http://ubuntuforums.org/showpost.php...59&postcount=8

  10. #10
    Join Date
    Apr 2006
    Beans
    28

    Re: HOWTO: post to usenet with Ubuntu

    You have to change the value of variable temppath. Choose what you want.

Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •