Name

uraniacast — The non-interactive Tcl podcast downloader.

Synopsis

uraniacast [-c directory] [-e number] [-r exp] [-M string] [-hvsdflDoaC]

DESCRIPTION

uraniacast grabs podcast feeds, parses them, downloads any media files mentioned in the feed & (optionally) does a selective processing of podcast files (for example, changes/adds ID3 mp3 tags or converts from ogg to mp3 or whatever).

By default, the program uses ~/.uraniacast directory for storing downloaded media, the configuration file, the history databases and so on; this directory can be changed with -c command line option.

By default, uraniacast tries to get only 2 most recent entries in the feed, so if you want to download more podcast files, look at -e option.

The options are as follows:

-c directory
An alternate "home" directory. If it does not exist it will be created.
-e digit
How many entries in each feed will be analysed (starting from the most recent). Use 0 for all entries.
-d
Delete all downloaded media files for each feed before processing it.
-D

Delete all downloaded media files for each feed before processing it only and only if the time at which a marker file ~/.uraniacast/.sync was last modified > than the last successful downloads. Of course this requires some external tool (which is used for syncing media files with an mp3-player) to touch the marker.

In contrib directory with uraniacast source code there is an example.

-f
Force uraniacast to download files even if they were already fetched in the past.
-r exp
re_syntax(n) filter for feed names (not URIs).
-l
List all subscribtions & exit.
-o

List all orphan directories in the media directory. For example, safely delete all empty orphans:

uraniacast -o | xargs rmdir
-s
Show some statistics at the end of the program run. -ss prints a terse value, suitable for Tcl [dict get …] input.
-a
Don’t try to download new media files—only add them to the history db.
-C

Check only for new media files (don’t download them).

uraniacast -vC -r econtalk

In the statistics (-s) such new files will be under "failed" column.

-M string

Merge a provided string of feed-specific settings with every feed. Usually makes sense only with -r option. For example, if you want to temporally override the sort parameter for a particular feed but don’t want to edit the configuration file:

uraniacast -v -r back2work -M 'sort increasing'
-v
Increase the verbosity level. If you type it 3 times (-vvv), a debug mode turns on and a downloading of files will be substituted with a test activity. If you type it 2 times (-vv) then all treatment operations will be simulated only.
-h
Version info.

FILES

~/.uraniacast/config
A configuration file where you specify your podcast subscriptions. See config.example file that comes with uraniacast distribution for further explanations.
~/.uraniacast/media
A directory for downloaded files.
~/.uraniacast/feeds
A directory with a feeds cache.
~/.uraniacast/logs
Treatment scripts put some junk here.
~/.uraniacast/.history.sqlite
History database. If this file becomes too big for you, run uraniacast_history program to shrink it.
~/.uraniacast/.sync
A marker for -D command line option.

EXIT STATUS

0 on success (something was downloaded), 1 if you have no new files from podcasts, or > 1 if en error occurs.

EXAMPLES

Select only "copm.*" feeds, extract at least 8 enclosures from each feed, try to download them, be verbose about it & print the statistics:

uraniacast -vs -r 'comp.*' -e 8

IMPLEMENTATION NOTES

Besides an external HTTP downloader, uraniacast requires Tcl >= 8.5, SQLite 3.x and (optionally) TclX. If you do not have TclX installed, locking and signals support will be disabled.

Locking helps not to write to the "home" directory with 2 copies of uraniacast in the memory. Signal catching helps making a graceful exit if user presses <Ctrl-C> twice in the console.

BUGS

  • Ruglish everywhere.
  • Tcl. Don’t repeat my mistake, use Ruby.
  • Nothing is concurrent & everything is synchronous.

HISTORY

I was afraid of iTunes.

SEE ALSO

config.sample, uraniacast_history(1), uraniacast_treatment(7), uraniacast_opml(1), re_syntax(n)

AUTHORS

Alexander Gromnitsky <alexander.gromnitsky@gmail.com>.