podracer-1.4/0000755000175000017500000000000010376146554012474 5ustar hamishhamishpodracer-1.4/TODO0000644000175000017500000000143110376146554013163 0ustar hamishhamishPodracer TODO It has been suggested by a few people that a verbose option should be added in order to keep trak of what Podracer is doing if it is not being run from a cron job. I agree with this suggestion and plan to add it. Unfortunately, however, this will take a considerable amount of coding time, so it didn't make it into this mostly bugfix release. I hope to add it in the next release, most likely version 1.5. The BitTorrent retrieval code needs to be rewritten. Currently it depends specifically on version 3.4.2. Any other version causes Podracer to choke when the code is executed. The next major release (2.0) will fix this either by completely rewriting Podracer or adding a small program that depends on libtorrent. At this point, libtorrent is the preferred method. podracer-1.4/LICENSE0000644000175000017500000000204210253402013013452 0ustar hamishhamishCopyright (c) 2005 Lorenzo Taylor Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. podracer-1.4/README0000644000175000017500000001224410376142666013357 0ustar hamishhamishPodracer v1.4 By Lorenzo Taylor Description: Podracer is a podcast downloader. It takes a file with the URLs to all your podcast rss feeds and goes and gets the mp3s and stores them in a specified location. It is a BASH script with an internal BitTorrent downloader written in Python. See the CREDITS file for information on all the great work that helped make Podracer the winner of the pod race. Features: * Catchup feature updates the log without downloading all podcasts * Run as a cron job to automatically receive podcasts * Properly fails (with no error message for the sake of cron) if already running * Download podcast enclosures of any file format * Support for BitTorrent downloading and seeding of podcasts * Configurable seed time management and upload bandwidth management * Background torrent seeding continues after program ends and stops automatically * System-wide and user-specific configuration * User-specific subscription file and podcast download directories * Commentable subscription file - go ahead and mark it up * Fully configurable placement of files and directories * Support for dynamic creation of download directories, i.e. based on date/time * Appears in podcasters' logs as a podcast aggregator * Automatic creation of m3u playlists * User may request that m3u not be created * Automatic removal of empty download directories * Your suggestions... Requirements: Podracer does require a few things to make it run. here I am listing the requirements which may not be installed on a standard Unix system: * /bin/bash * Python - required by BitTorrent: http://www.python.org * BitTorrent - the original client by Bram Cohen: http://www.bittorrent.com * Screen - required for background torrent seeding: ftp://ftp.uni-erlangen.de/pub/utilities/screen * Curl - http/ftp file downloader: http://curl.haxx.se * Timeout - run a program for a specified time: normally only available as part of a larger package that is used for "post-mortem analysis of a UNIX system after a breakin", I have included it in the Podracer distribution to be installed automatically if you don't already have it. License: This software is licensed under the MIT License. See the LICENSE file to find out what that means to you. As a side note, although not required by the license or by me, I would enjoy receiving an e-mail letting me know if you modify Podracer in any way, letting me know how Podracer is working for you or giving me comments or suggestions on how Podracer can be improved. You can reach me at lorenzo at taylor dot homelinux dot net. Just don't send me spam. ;-) Installation and removal Podracer is currently packaged in two ways, a self-installing package and a standard bzip2 tarball. The self-installing package has an embedded script that will both install and remove Podracer. The tarball also has this script, but it must be run explicitly after untarring Podracer. Instructions for using the self-installing package: Download the self-installing package and make it executable. Then run it as root with ``install'' as its only argument if you want to install it. Keep the package on your computer or stored on disk. If you want to remove Podracer, run the self-installing package as root with either ``remove'' or ``uninstall'' as its only argument. Or to remove both Podracer and Timeout, add ``timeout'' after ``remove'' or ``uninstall''. Once Podracer has been removed, it is safe to delete the package file. Instructions for installing and removing Podracer from a tarball: Untar Podracer and cd to the newly created directory. Then, as root, run ./installer install or ./installer remove [timeout] or ./installer uninstall [timeout] the same way as above. Note that running either the ./installer script or the self-installing package file as any user with no arguments or unrecognized arguments will give you a description of Podracer and a short version of these installation and removal instructions. Postinstallation instructions: You may now wish to create your subscription file. Subscriptions are by default placed in ~/.podracer/subscriptions, and are in the format: Optional comment giving title or other info about this podcast http://www.sample.com/podcasts/rss.xml optional-dirname another podcast http://www.podcastsample.net/samplepodcast.rss no quotes needed here ... Note that Podracer automatically recognizes any line that begins with anything other than a URL as a comment. It also ignores blank lines. If you don't create a subscription file, a sample with real podcasts may be created for you the first time you run Podracer. If you don't want every single podcast starting sometimes as much as a month back to be automatically downloaded to your computer, you should run Podracer for the first time in catchup mode: podracer catchup You may then wish to add the following line, or something similar, to your crontab file: 0 */4 * * * podracer This is not done for you, since you may not want to use it that way, although it is highly recommended that you do run it as a cron job in order to get the full benefit of having podcasts automatically downloaded to your computer. The only other step is to enjoy your new podcasts and keep winning the pod race with Podracer. podracer-1.4/podracer0000755000175000017500000003452110376142241014213 0ustar hamishhamish#!/bin/bash # Podracer v1.4 # By Lorenzo Taylor # # Podracer is based on Bashpodder by Linc Fessenden of The Linux Link Tech Show. # Bashpodder can be found at: # http://linc.homeunix.org:8080/scripts/bashpodder # See the CREDITS file for more information about all the great work that helped # make Podracer the winner of the pod race. # This is the name, version and configuration files for this program progname=podracer version=1.4 releasedate='19 February 2006' progdir="$HOME/.$progname" systemconf=/etc/$progname.conf userconf=$progdir/$progname.conf # We respond to version queries here, since we don't want to do anything but # display the program name and version number if -v, -version, --version or # version is specified on the command line. case $1 in -v|-version|--version|version) echo $progname version $version echo Released $releasedate echo by Lorenzo Taylor \ exit 0 esac # All default configuration values are set here to avoid forcing the user to # create a configuration file. However, an example showing the defaults is # provided for those of us who think outside the box. # poddir is the directory where you want podcasts to be saved # Directory names may be created dynamically based on time, date and many other # possibilities. Directory names based on feeds are listed in the subscriptions # file. poddir=$HOME/podcasts/$(date +%Y-%m-%d) # incoming is the directory where incoming podcasts are saved before completion incoming=$progdir/part # Subscription file - this holds a list of RSS feeds for podcasts subscriptions=$progdir/subscriptions # The location of the sample subscription file that will be copied to a user's # directory when running Podracer for the first time sample=/usr/share/doc/$progname/sample.subscriptions # A temporary place to store subscriptions. It allows for comments in the # original subscription file. tempsub=$progdir/tempsub # Set to the amount of time in seconds you would like to seed torrents, or if # you don't have the upload bandwidth to seed, set to 0. I personally recommend # seeding for at least an hour, (3600 seconds), which is the default. seedtime=3600 # Set maximum upload speed in kB/s when seeding - defaults to 0 (no limit) uploadrate=0 # Directory where torrents are stored torrentdir=$progdir/torrents # The number of times Podracer will retry a download if an error occurs retries=2 # Set the minimum download speed in bytes per second for non-torrent downloads. # Podracer will abort a download to prevent hangs if the connection drops below # this speed for the time given below in the downloadtimeout option. minspeed=1 # set the time in seconds after which to abort a download if the connection # speed drops below the above minspeed value. downloadtimeout=60 # Logfiles podcastlog=$progdir/podcast.log temppodcastlog=$progdir/temp.log # Many podcasters check their logs to determine how many people use a podcast # aggregator vs. directly downloading the shows. This setting will allow # Podracer to be recognized as a true podcast agregator. longname="$progname v$version; $(uname -o); $(uname -m)" # set to a filename to create an m3u playlist which will be saved in $poddir # If no filename is set, an m3u playlist will not be created. m3u=$(date +%Y-%m-%d)-podcasts.m3u # Override defaults with config file settings test -e "$systemconf" && source "$systemconf" test -e "$userconf" && source "$userconf" # Check for and create progdir if necessary: test -d "$progdir" || mkdir -p "$progdir" # A subscription file is required in order to receive podcasts # A sample will be created on user request if test ! -e "$subscriptions" then echo You haven\'t subscribed to any podcasts. until [[ $copysample == [YyNn] ]] do echo -n "Would you like a sample subscription file? [Y/N] " read -n 1 copysample echo done case $copysample in N|n) echo Please create a file called $subscriptions and add the feeds for the echo podcasts you want to receive. You may also add comments preceeded by echo hash marks, "(#)" to make a note of the name of each podcast or any other echo information you may wish to add to your subscription file. exit 0 ;; Y|y) if test -e $sample then cp $sample $subscriptions echo The sample subscription file has been saved to echo $subscriptions. echo -n Please wait while\ case $1 in -c | -catchup | --catchup | catchup) echo the log is updated ;; *) echo your podcasts are downloaded. esac else echo The sample subscription file is missing. This indicates either improper echo installation or misconfiguration. Please contact your system administrator to echo fix this problem. exit 2 fi esac fi # Check for and create poddir if necessary: test -d "$poddir" || mkdir -p "$poddir" # Check for and create incoming directory test -d "$incoming" || mkdir -p "$incoming" # Each user may only run one copy of Podracer at a time. It will fail if it is # already running for the current user. test -e "$tempsub" && exit 1 touch "$tempsub" # Delete any temp file when interrupted or terminated: trap 'echo Signal caught: exiting.;rm -f "$temppodcastlog";rm -f $tempsub;exit 3' hup int quit term # If catching up, remove podcast log. This keeps the log's size manageable by # removing unnecessary old entries. case $1 in -c|-catchup|--catchup|catchup) rm $podcastlog esac # Check for and create podcast log to avoid spurious errors test -e "$podcastlog" || touch "$podcastlog" # Read the subscription file and curl or catch up any url not already in the podcast log: grep -E "^(http|ftp|/)" "$subscriptions" > "$tempsub" while read podcast feeddir do test -z "$feeddir" -o -d "$poddir/$feeddir" || mkdir -p "$poddir/$feeddir" file=$(curl -A "$longname" -s -L $podcast | tr '\r' '\n' | tr \' \" | sed 's/>/>\n/g' | sed -n 's/.*url="\([^"]*\)".*/\1/p' | sed 's/&/&/g') for url in $file do if ! grep "$url" $podcastlog > /dev/null then #Catch up on new subscriptions or after a vacationso every podcast isn't downloaded case $1 in -c | -catchup | --catchup | catchup) echo "$url" >> "$podcastlog" ;; *) #lets get the real url in the case of dynamically generated feeds like lugradio realurl=`curl -s -I -L -w %{url_effective} --url "$url" | tail -n 1` #we'll need filename to allow us to move the podcast into poddir[/feeddir] filename=`echo "$realurl" | awk -F / '{print $NF}' | sed -e "s/%20/ /g" -e "s/%27/'/g" -e "s/%23/#/g" | awk '-F?' '{print $1}'` #file is a torrent so use the internal torrent downloader if [ "$(echo $filename | grep .torrent)" ] then gottorrent='Yes' #We only need to create torrentdir if we #have never downloaded a torrent file or #if torrentdir has been removed. test -d $torrentdir || mkdir -p $torrentdir curl -A "$longname" -s -y $downloadtimeout -Y $minspeed --retry $retries -L "$realurl" -o "$incoming/$filename" #try with and without .py extension if [ `which btshowmetainfo` ]; then audiofilename=`btshowmetainfo "$incoming/$filename" | grep name | sed 's/file name.....: //'` else audiofilename=`btshowmetainfo.py "$incoming/$filename" | grep name | sed 's/file name.....: //'` fi #the embedded python code will download the file referenced in the torrent and then #return control to Podracer python - --saveas "$incoming/$audiofilename" "$incoming/$filename" << "END" > /dev/null ########## Begin python code ########## # Written by Bram Cohen # Modified by Lorenzo Taylor for use in Podracer # Uses code by Huw Lynes import sys from BitTorrent.download import download from threading import Event from os.path import abspath from sys import argv, stdout from cStringIO import StringIO from string import find from time import time def hours(n): if n == -1: return '' if n == 0: return 'complete!' n = long(n) h, r = divmod(n, 60 * 60) m, sec = divmod(r, 60) if h > 1000000: return '' if h > 0: return '%d hour %02d min %02d sec' % (h, m, sec) else: return '%d min %02d sec' % (m, sec) class HeadlessDisplayer: def __init__(self): self.done = False self.file = '' self.percentDone = '' self.timeEst = '' self.downloadTo = '' self.downRate = '' self.upRate = '' self.downTotal = '' self.upTotal = '' self.errors = [] self.last_update_time = 0 def finished(self): self.done = True self.percentDone = '100' self.timeEst = 'Download Succeeded!' self.downRate = '' self.display({}) self.errors.append("sys.exit(0)") sys.exit(0) def failed(self): self.done = True self.percentDone = '0' self.timeEst = 'Download Failed!' self.downRate = '' self.display({}) def error(self, errormsg): noneerror = 0 self.errors.append(errormsg) for errorstr in self.errors: self.display({}) if find(errorstr, "sys.exit(0)") != -1: noneerror = 1 if noneerror == 1 : sys.exit(0) else: self.display({}) sys.exit(1) def display(self, dict): if self.last_update_time + 0.1 > time() and dict.get('fractionDone') not in (0.0, 1.0) and not dict.has_key('activity'): return self.last_update_time = time() if dict.has_key('spew'): print_spew(dict['spew']) if dict.has_key('fractionDone'): self.percentDone = str(float(int(dict['fractionDone'] * 1000)) / 10) if dict.has_key('timeEst'): self.timeEst = hours(dict['timeEst']) if dict.has_key('activity') and not self.done: self.timeEst = dict['activity'] if dict.has_key('downRate'): self.downRate = '%.2f K/s' % (float(dict['downRate']) / (1 << 10)) if dict.has_key('upRate'): self.upRate = '%.2f K/s' % (float(dict['upRate']) / (1 << 10)) if dict.has_key('upTotal'): self.upTotal = '%.1f M' % (dict['upTotal']) if dict.has_key('downTotal'): self.downTotal = '%.1f M' % (dict['downTotal']) print '\n\n' for err in self.errors: print 'ERROR: ' + err + '\n' print 'saving: ', self.file print 'percent done: ', self.percentDone print 'time left: ', self.timeEst print 'download to: ', self.downloadTo if self.downRate != '': print 'download rate: ', self.downRate if self.upRate != '': print 'upload rate: ', self.upRate if self.downTotal != '': print 'download total:', self.downTotal if self.upTotal != '': print 'upload total: ', self.upTotal stdout.flush() def chooseFile(self, default, size, saveas, dir): self.file = '%s (%.1f M)' % (default, float(size) / (1 << 20)) if saveas != '': default = saveas self.downloadTo = abspath(default) return default def newpath(self, path): self.downloadTo = path def print_spew(spew): s = StringIO() s.write('\n\n\n') for c in spew: s.write('%20s ' % c['ip']) if c['initiation'] == 'local': s.write('l') else: s.write('r') rate, interested, choked = c['upload'] s.write(' %10s ' % str(int(rate))) if c['is_optimistic_unchoke']: s.write('*') else: s.write(' ') if interested: s.write('i') else: s.write(' ') if choked: s.write('c') else: s.write(' ') rate, interested, choked, snubbed = c['download'] s.write(' %10s ' % str(int(rate))) if interested: s.write('i') else: s.write(' ') if choked: s.write('c') else: s.write(' ') if snubbed: s.write('s') else: s.write(' ') s.write('\n') print s.getvalue() def run(params): cols = 80 h = HeadlessDisplayer() download(params, h.chooseFile, h.display, h.finished, h.error, Event(), cols, h.newpath) if not h.done: h.failed() if __name__ == '__main__': run(argv[1:]) ########## End python code ########## END #if we've succeeded add file to podcast log and move to poddir[/feeddir] if [ $? -eq 0 ] then mv "$incoming/$audiofilename" "$poddir/$feeddir" mv "$incoming/$filename" "$torrentdir" echo "$url" >> $podcastlog fi #not a torrent so directly download the enclosure else curl -A "$longname" -s -y $downloadtimeout -Y $minspeed --retry $retries -L -C - -o "$incoming/$filename" "$realurl" #if we succeeded in the download add the file to the log if [ $? -eq 0 ] then mv "$incoming/$filename" "$poddir/$feeddir" echo "$url" >> $podcastlog fi fi esac fi done test $feeddir && rmdir --ignore-fail-on-non-empty "$poddir/$feeddir" unset feeddir done < "$tempsub" rm "$tempsub" # Move dynamically created log file to permanent log file: cat "$podcastlog" > "$temppodcastlog" sort "$temppodcastlog" | uniq > "$podcastlog" rm "$temppodcastlog" # remove poddir if there are no files if [[ -z $(ls $poddir) ]]; then rmdir $poddir else # Create an m3u playlist if configured by the user #slightly more complicated to deal with #geeknewscentral who put their stuff in directories if [ $m3u ] then ( cd "$poddir" find . -name \*.mp3 > "$m3u" find . -name \*.ogg >> "$m3u" find . -name \*.m4a >> "$m3u" find . -name \*.m4b >> "$m3u" ) fi fi # Relaunch the torrents to seed. This will timeout automatically, so there is no # need to find the process and shut it down. if [ $seedtime -gt 0 ] then #we only need to do the following if we actually encountered #some torrents if [ $gottorrent ] then #Some distributions of BitTorrent remove the .py #extention. We will try both cases. if [ `which btlaunchmany` ]; then #Screen has the advantage here of letting podracer #finish normally while letting torrents seed in #the background. screen -d -m timeout $seedtime btlaunchmany --max_upload_rate $uploadrate --saveas "$poddir/$feeddir" "$torrentdir" else screen -d -m timeout $seedtime btlaunchmany.py --saveas "$poddir/$feeddir" "$torrentdir" fi fi fi podracer-1.4/timeout.c0000644000175000017500000000505310253402013014304 0ustar hamishhamish/*++ /* NAME /* timeout 1 /* SUMMARY /* run command with bounded time /* SYNOPSIS /* \fBtimeout\fR [-\fIsignal\fR] \fItime\fR \fIcommand\fR ... /* DESCRIPTION /* \fBtimeout\fR executes a command and imposes an elapsed time limit. /* The command is run in a separate POSIX process group so that the /* right thing happens with commands that spawn child processes. /* /* Arguments: /* .IP \fI-signal\fR /* Specify an optional signal to send to the controlled process. /* By default, \fBtimeout\fR sends SIGKILL, which cannot be caught /* or ignored. /* .IP \fItime\fR /* The elapsed time limit after which the command is terminated. /* .IP \fIcommand\fR /* The command to be executed. /* DIAGNOSTICS /* The command exit status is the exit status of the command /* (status 1 in case of a usage error). /* AUTHOR(S) /* Wietse Venema /* This program is part of SATAN. /*--*/ /* System libraries. */ #include #include #include #include #include extern int optind; /* Application-specific. */ #define perrorexit(s) { perror(s); exit(1); } static int kill_signal = SIGKILL; static char *progname; static char *commandname; static void usage() { fprintf(stderr, "usage: %s [-signal] time command...\n", progname); exit(1); } static void terminate(sig) int sig; { signal(kill_signal, SIG_DFL); fprintf(stderr, "Timeout: aborting command ``%s'' with signal %d\n", commandname, kill_signal); kill(0, kill_signal); } int main(argc, argv) int argc; char **argv; { int time_to_run; pid_t pid; pid_t child_pid; int status; progname = argv[0]; /* * Parse JCL. */ while (--argc && *++argv && **argv == '-') if ((kill_signal = atoi(*argv + 1)) <= 0) usage(); if (argc < 2 || (time_to_run = atoi(argv[0])) <= 0) usage(); commandname = argv[1]; /* * Run the command and its watchdog in a separate process group so that * both can be killed off with one signal. */ setsid(); switch (child_pid = fork()) { case -1: /* error */ perrorexit("timeout: fork"); case 00: /* run controlled command */ execvp(argv[1], argv + 1); perrorexit(argv[1]); default: /* become watchdog */ (void) signal(SIGHUP, terminate); (void) signal(SIGINT, terminate); (void) signal(SIGQUIT, terminate); (void) signal(SIGTERM, terminate); (void) signal(SIGALRM, terminate); alarm(time_to_run); while ((pid = wait(&status)) != -1 && pid != child_pid) /* void */ ; return (pid == child_pid ? status : -1); } } podracer-1.4/sample.subscriptions0000644000175000017500000000232210253402013016560 0ustar hamishhamish# ChuckChat Freestyle http://feeds.feedburner.com/ChuckChat # ChuckChat Technorama http://feeds.feedburner.com/ChuckChatTechnorama # Digital Experience Podcast http://lance.heathville.com/depmp3.xml # Geek News Central http://www.geeknewscentral.com/podcast.xml # In the Trenches http://kevindevin.com/wp-rss2.php # Linux Log: News, Links, & Podcasting http://linux.quicksurf.com/wp-rss2.php # One Minute Tip http://radio.weblogs.com/0141930/rss.xml # The Linux Link Tech Show http://www.thelinuxlink.net/tllts/tllts.rss # Dailysonic, An MP3zine http://www.dailysonic.com/auto.php # Insomnia Radio http://www.insomniaradio.net/rss.xml # The Daily Source Code http://live.curry.com/rss.xml # Morning Coffee Notes http://www.morningcoffeenotes.com/rss.xml # IT Conversations http://www.itconversations.com/rss/recentWithEnclosures.php # SlashDot Review http://content.downloadradio.org/sdr-rss.xml # Evil Genius Chronicles http://www.evilgeniuschronicles.org/cgi-bin/blosxom.cgi/index.rss20 # Jimmy Jett http://www.jimmyjett.com/wordpress/wp-rss2.php # The Adventures of Dr. Floyd http://www.godcast.org/categories/drFloyd/rss.xml # Yesteryear Radio Vault http://otr.libsyn.com/rss # Botar's Old Time Radio http://www.botar.us/real.rss podracer-1.4/ChangeLog0000644000175000017500000000530310376143117014237 0ustar hamishhamishPodracer By Lorenzo Taylor ChangeLog Version 1.4 - 19 February 2006 * Podracer uses some BASH-specific functionality; changed script line to reflect this. * Redirections are now followed correctly when fetching RSS feeds and podcasts. * Fixed a bug which caused only the last URL to be retrieved from feeds with no line breaks. * Blank lines and lines that don't begin with a URL or the absolute path to a local file are now ignored in the subscription file. Comments no longer need a `#' at the beginning of the line. * Fixed a bug which caused a `cannot open file' error on some systems. This was caused by an unescaped shell metacharacter. * Added a command line option to retrieve version information. * Added minspeed and downloadtimeout config options to prevent hanging when downloading non-torrent podcasts. * Catchup mode now completely replaces the podcast log so that old useless entries are removed. * Rewrote comment to m3u config file option to specify how to cause the playlist not to be created. * Updated man page and README file to reflect recent changes. * The installer script now correctly removes man pages when uninstalling Podracer and Timeout. Version 1.3 - 1 September 2005 * Fixed a bug where URLs with `&' rather than `&' were fetched incorrectly * Fixed a rare bug which sometimes caused files to be saved with eronious data appended to their filenames * Removed code which depended specifically on gawk. Any implementation of awk may now be used. * temporary files are now removed when SIGHUP, SIGINT, SIGQUIT or SIGTERM is caught. * A TODO file has been added to list major changes in upcoming releases Version 1.2.2 - 20 June 2005 * Fixed a bug which caused an error when a torrent filename contained spaces * Seeding of a torrent is only attempted if the download is complete * Very minor code cleanup Version 1.2.1 - 17 June 2005 * Installer now shows the errors that cause Podracer to fail to install * Installer now detects where man pages are installed Version 1.2 - 15 June 2005 * Save torrents in their own directory for later use outside of Podracer * Use btlaunchmany to seed all saved torrents at once * added uploadrate config option to limit bandwidth used when seeding torrents * removed toplevel config option since poddir can handle this functionality * a directory name may be added to an entry in the subscriptions file to store a podcast feed in its own directory relative to poddir * The prompt to create the sample subscriptions file may now be answered with a single y or n - it is not necessary to press enter * The receiver config option has been changed to longname for readability * minor code cleanup Version 1.0 - 7 June 2005: * Initial Podracer release podracer-1.4/CREDITS0000644000175000017500000000211110375723155013504 0ustar hamishhamishI would like to take this opportunity to acknowledge all the contributors I am aware of to Podracer. Thank you all for the hard work that made Podracer take off. First of all, Podracer is based on the strong foundation of Bashpodder by Linc Fessenden. You can find his original script as well as many modified versions including this one at: http://linc.homeunix.org:8080/scripts/bashpodder Huw Lynes provided the foundation for the BitTorrent support so that podcasts using BitTorrent distribution may be both downloaded and seeded. Leon Pennington contributed the ability to remove empty download directories rather than creating an empty playlist inside the empty directory. And Ben Osteenadded the ability to add comments to the subscription file. Several people have also sent me suggestions and patches via e-mail and through the Debian bug tracking system. Thanks much for those. Any other contributions have been either folded into the original Bashpodder script, ("many contributors") or are my own Podracer specific modifications. Thanks again to all contributors. Lorenzo Taylor podracer-1.4/installer0000755000175000017500000000666410375746103014426 0ustar hamishhamish#!/bin/sh # Podracer installer # By Lorenzo Taylor testroot() { if test ! $(whoami) = "root" then echo Only root can $1 Podracer. return 2 fi } installtimeout() { cc timeout.c -o /usr/bin/timeout ||return 1 if test -d /usr/share/man/man1 then cp timeout.1.gz /usr/share/man/man1 || return 1 else cp timeout.1.gz /usr/man/man1 || return 1 fi echo Timeout has been successfully installed. } removetimeout() { rm /usr/bin/timeout >& /dev/null || return 1 rm -f /usr/share/man/man1/timeout.1.gz >& /dev/null || return 1 rm -f /usr/man/man1/timeout.1.gz >& /dev/null || return 1 echo Timeout has been successfully removed. } checkdeps() { fail=0 if test ! $(which curl) then echo Curl is not installed. fail=1 fi if test ! $(find /usr -name BitTorrent) then echo BitTorrent is not installed. fail=1 fi if test ! $(which screen) then echo Screen is not installed. fail=1 fi if test ! $(which timeout) then echo Timeout was not installed on this system. Installing it now. if ! installtimeout then echo Failed installing timeout. fail=1 fi fi return $fail } install() { if ! checkdeps then echo Failed dependency check. return 3 fi echo Installing Podracer... mkdir -p /usr/share/doc/podracer || return 1 cp CREDITS LICENSE README ChangeLog TODO sample.subscriptions \ /usr/share/doc/podracer || return 1 cp podracer /usr/bin || return 1 chmod 755 /usr/bin/podracer || return 1 cp podracer.conf /etc || return 1 if test -d /usr/share/man/man1 then cp podracer.1.gz /usr/share/man/man1 || return 1 else cp podracer.1.gz /usr/man/man1 || return 1 fi echo Podracer has been successfully installed. echo All documentation files may be found in /usr/share/doc/podracer echo The podracer program is /usr/bin/podracer echo And the system-wide configuration file is /etc/podracer.conf echo You can get info on how to use podracer by typing echo man podracer echo Keep winning the pod race with Podracer. } uninstall() { echo Removing Podracer... rm -R /usr/share/doc/podracer >& /dev/null || return 1 rm /usr/bin/podracer >& /dev/null || return 1 rm /etc/podracer.conf >& /dev/null || return 1 rm -f /usr/share/man/man1/podracer.1.gz >& /dev/null || return 1 rm -f /usr/man/man1/podracer.1.gz >& /dev/null || return 1 echo Podracer has been successfully removed. } description() { cat <<- END Podracer v1.4 By Lorenzo Taylor To install Podracer, run this script with \`\`install'' as the argument. To remove Podracer from your system, run this script with \`\`remove'' or \`\`uninstall'' as the argument. If you used this package to install Timeout and wish to remove it as well, add \`\`timeout'' as a second argument after \`\`remove'' or \`\`uninstall''. Description: Podracer is a podcast downloader. It takes a file with the URLs to all your podcast rss feeds and goes and gets the mp3s and stores them in a specified location. It is a BASH script with an internal BitTorrent downloader written in Python. See the CREDITS file for information on all the great work that helped make Podracer the winner of the pod race. END } case $1 in install) testroot $1 && install || echo Podracer installation failed. Aborting installer. ;; remove|uninstall) testroot $1 && uninstall || echo Podracer is not installed. test $2 && if test $2 = 'timeout' then echo Removing Timeout... removetimeout || echo Failed removing timeout. fi ;; *) description esac podracer-1.4/podracer.1.gz0000644000175000017500000000163410376142502014765 0ustar hamishhamishBCpodracer.1T6+U(PjXayE%d&):.~{II޴ `"gypO~u;Z \oYТו%EI-:ЊU H4F8m,݉1١qBvgyi*>oʿ< =V9I Z3XUțp&gC}LviI *}V(sWl9rr'%I-]`)XK5sUQy\! 8u$.=\%W@ mid"(ѾF:>,] @g;ZܔKd?Yis}A --YTJ>g"],dOoV[6{bwS0| 1"3JaU]whq7pmUI zS3xe1&