# This is a sample config .. You can use it to customize your self fmTorrent config
# which will land in ~/.fmTorrent on first run of master.py script

# the config uses python syntax.. have phun :)
import re

# Filters ... They are then associated w/ Channels, see below
Filter_vtv = "(?P<Show>.*)\s\d+x\d+\s\(HDTV\-TCM\)*"

# if links found in RSS don't point directly to torrents, you can
# figure out how to guess the torrent url. Here is an example:
def getTorrentFromMininova (pageUrl):
    import re
    return re.sub('http\://www\.mininova\.org/tor/(\d+)',
                  r'http://www.mininova.org/get/\1', pageUrl)

def Filter_Digg (name):
    # diggnation--0025--2005-12-15--small.m4v.torrent
    import re
    match = re.match ("diggnation--(?P<episode>\d+)--.*--small.m4v.torrent", name)
    if match:
        ep = int (match.groupdict ()['episode'])
        return (ep > 24)
    return False

# Please no ?!*# or things like this in channel names
# urls can refer to full RSS path (if you know it) .. or not :)
Channels = {
  'Systm':('http://revision3.com/systm/feed/small.xvid.avi.torrent.xml', '3h',
           []),
  'Digg':('http://revision3.com/diggnation/feed/high.mp3.torrent.xml', '3h',
          []),
  'DiggVid':('http://revision3.com/diggnation/feed/small.mov.torrent.xml', '3h',
             [Filter_Digg,]),
  }

# explanation: here we update Systm and Digg feeds every 3 hours. For the Digg video feed, we apply
#              a filter (we don't want episodes prior to #24)
#              Got the trick ? :)
# warning: refresh rates have to respect the
#          rule (nd:mh:om) .. colon is mandatory

# directory storing old feeds by channel
CacheDir = "~/.fmTorrent/cache"

Encoding = "iso8859-1"

# keywords white-list -- stores a list of strings.
# Use it when you want to filter content of RSS feeds
# example:
# WhiteListKeywords = [ 'foo', 'bar', 'python' ]
WhiteListKeywords = []

# keywords black-list -- stores a list of strings that you don't want to see
# If any RSS feed item matches one of those keywords, it won't be showed to you
# example:
# BlackListKeywords = [ 'porn', 'p0rn', 'java' ]
BlackListKeywords = []