swarmtv(1)

NAME
swarmtv - Forwards shows from RSS to your torrent program.

SYNOPSIS
swarmtv [-hnRrqvcSfJkw] [-m text] [-C name:value] [-s name:url] [-D name] [-t type] [-d name] [-p name] [-F name:query] [-T query] [-P name] [-j name] [-e name] [-E regexp] [-N regexp] [-O size] [-o size] [-u type] [-g value] [-G value] [-i id] [-M id] [-L] [-a regexp]

DESCRIPTION
Most bittorrent sites on the internet have RSS streams announcing the new content they provide. RSS-torrent searches there announcements using user defined filters, and downloads the torrent for your favourite torrent program to pick up. When content matching the filters is found there is an option to send an email to a specified address.

RSS-torrent supports RSS feeds and Twitter time lines as sources.

OPTIONS

-h, --help
    display a help text.

-n, --nodetach
    When combined with -r keeps RSS-torrent from detaching.

-R, --once
    Runs the download cycle once.

-r, --run
    Without extra arguments, runs RSS-torrent in daemon mode.

-q, --test
    When provided together with an add filter command, tests that filter.

-m, --test-mail text
    Sends an email containing the text provided to the email address provided in the config.

-v --version
    Prints version of RSS-torrent.

-c --list-config
    List configuration items and their value.

-C --set-config name:value
    Set configuration value.

-s --add-source name
    Add RSS source.

-I --url
    The URL of the RSS source to add

-Z --metatype
    The type of meta file expected in the RSS source (nzb/torrent).

-D --del-source name
    Delete RSS source.

-S --list-sources
    List RSS sources.

-t --source-parser type
    Set RSS source parser type.

-d --del-filter name
    Delete a SQL filter, use name 'all' to delete all SQL filters.

-f --list-filters
    List all SQL filters.

-p --print-filter name
    Print SQL filter in shell format.

-F --add-sql-filter name:query
    Set SQL download filter. (use with -T)

-T --nodup-sql-filter
    Set SQL duplicate filter.

-J --list-simple
    List all simple filters.

-P --print-simple name
    Print simple filter in shell format.

-A --print-all-simple
    Print all simple filters in shell format.

-j --del-simple name
    Delete a simple filter.

-k --del-all-simple
    Delete all simple filters.

-K --reinit-database
    Drop all tables and reinitialize the empty database. (Warning all data stored in the database is lost)

-i --id-download
    Download a torrent providing it's id.

-M --id-del-downed
    Delete a record in the downloaded table.

-L --find
    Find torrents. (use with simple options)

-a --find-downed
    Find entries in the downloaded table.

-Y --print-lastdowned
    Print the last downloaded content per filter.

-e --add-simple name
    Add a new simple filter providing it's name.

-w --wizard-simple
    Add a simple filter through a wizard dialog. (Filters can be added and modified)

-E --title regexp
    The regexp that must match the title of a torrent.

-N --exclude regexp
    The regexp that must NOT match the title of the torrent.

-U --category regexp
    The regexp that must match the category of the torrent.

-l --source regexp
    The regexp that must match the source of the torrent.

-O --max-size size
    The maximal size the torrent contents must be. (human readable format)

-o --min-size size
    The minimal size the torrent contents must be. (human readable format)

-u --nodup type
    Simple no duplicate filter type. (none, link, unique, unique-title, newer, newer-title)
    See the "NODUP Filters explained" section for an explanation.

-g --from-season value
    Season number to start downloading from.

-G --from-episode value
    Episode number to start downloading from.

-z --auto-avoid-old
    Auto set --from-season and --from-episode based on torrents already present in the database.

CONFIG SETTING

torrentdir
    The directory the downloaded torrents get stored.

logfile
    The path to the log file.

lockfile
    The path to the lock file.

refresh
    The time between RSS downloads.

retain
    The amount of days records from the sources are being retained.

default_parser
    The default source parser to use when no parser is provided on the command line.

smtp_enable
    When a torrent is downloaded, send an email (set to value 'Y' to enable).

smtp_to
    The email address the email notification needs to be sent to.

smtp_from
    The from email-address in the mail headers.

smtp_host
    The STMP server and port used to send the notifications. (example: smtp.foobar.com:25)

min_size
    When the given size in the source is smaller then this number (in bytes), the torrent is downloaded to extract the size from there.

EXAMPLES

Add a RSS source provided by Eztv.
    swarmtv --add-source="Eztv" --url="http://www.ezrss.it/feed/" --source-parser="defaultrss" --metatype="torrent"

Add a Twitter source using the Twitter API. (provide own account)
    swarmtv --add-source="Twitter" --url="https://<username>:<password>@twitter.com/statuses/friends_timeline.xml" --metatype="torrent" --source-parser="twitter"

Add a simple filter, matching newer house episodes, excluding "House hunters international".
    swarmtv --add-simple="House" --title="^house" --exclude="hunters international" --min-size="200mb" --max-size="700mb" --nodup="newer"

Test a simple filter, showing the matches the filter yields on the current database, without downloading anything.
    swarmtv --test --add-simple="House" --title="^house" --exclude="hunters international" --min-size="200mb" --max-size="700mb" --nodup="newer"

Run RSS-torrent as daemon.
    swarmtv --run

Show Config settings.
    swarmtv --list-config

Enable email notifications.
    swarmtv --set-config="smtp_enable:Y"

    swarmtv --set-config="smtp_to:your@address"

    swarmtv --set-config="smtp_from:server@address"

    swarmtv --set-config="smtp_host:smtp.foo.bar:25"

Change Directory torrents are downloaded to.
    swarmtv --set-config="torrentdir:<path>"

Change RSS check frequency.
    swarmtv --set-config="refresh:<seconds>"

Create a SQL filter.
    swarmtv -F "DollHouse:select link, title, pubdate, category, season, episode from newtorrents where title REGEXP('^[Dd]ollhouse') AND size < '400000000' AND new = 'Y'" \

    -T "SELECT title FROM downloaded WHERE link=?1 OR (season>=?2 AND episode>=?3 AND title REGEXP('^[Dd]ollhouse'))"

NOTES

  NODUP Filters explained
none No duplicate avoiding, download all that matches filter.

link
    Do not download content with the same meta file link.

unique
    Do not download content that matches the filter regexp and has the same season/episode numbers.

unique-title
    Same as above, but uses the matched title to avoid duplicate downloads.

newer
    Only download content when the content matches the filter regexp, and is newer than the previous download.

newer-title
    Same as above, but uses the matched title to avoid duplicate downloads.

EXIT STATUS
When RSS-torrent runs in the shell, 0 is returned on normal exit, otherwise 1.

AUTHOR
Paul Honig (swarmtv (at) swarmtv.nl)

SEE ALSO
rtorrent(1) curl(1)