diff options
author | 2015-08-08 13:49:04 -0700 | |
---|---|---|
committer | 2015-08-08 17:38:18 -0700 | |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/pytvshows/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/pytvshows/files')
3 files changed, 324 insertions, 0 deletions
diff --git a/net-misc/pytvshows/files/pytvshows-0.2-ezrss.it.patch b/net-misc/pytvshows/files/pytvshows-0.2-ezrss.it.patch new file mode 100644 index 000000000000..d72a35ffa152 --- /dev/null +++ b/net-misc/pytvshows/files/pytvshows-0.2-ezrss.it.patch @@ -0,0 +1,30 @@ +This patch simply alters the feed site since txrss.net was closed/shut down. +Luckily, ezrss.it expects the same arguments and should generally work. You can +find similar details at: +http://sourceforge.net/projects/pytvshows/forums/forum/726961/topic/3309243?message=7544190 + +Yes, this could have been accomplished via the --feed paramater, but this is +more user friendly. + +--- pytvshows.orig 2009-09-15 22:36:34.575002779 -0500 ++++ pytvshows 2009-09-15 22:43:18.283754081 -0500 +@@ -59,7 +59,7 @@ + -cFILE, --config FILE + Path to config file. Default: ~/.pytvshows.cfg + -fFEED, --feed=FEED +- Override the tvrss.net feed. %%s is replaced with the ++ Override the ezrss.it feed. %%s is replaced with the + exact show name. + -h, --help This help message + -oDIR, --output_dir=DIR +@@ -77,8 +77,8 @@ + commands = ['update', 'subscribe', 'unsubscribe', 'run'] + config = { + 'config_file': os.path.expanduser("~/.pytvshows.cfg"), +- 'feed': "http://tvrss.net/search/index.php?show_name=%s&show_name_exact" \ +- "=true&mode=rss", ++ 'feed': "http://www.ezrss.it/search/index.php?show_name=%s" \ ++ "&show_name_exact=true&mode=rss", + 'output_dir': os.path.expanduser("~/"), + 'output_dir2': None, + 'quality_matches': { diff --git a/net-misc/pytvshows/files/pytvshows-0.2-feedurl.patch b/net-misc/pytvshows/files/pytvshows-0.2-feedurl.patch new file mode 100644 index 000000000000..db01c5193258 --- /dev/null +++ b/net-misc/pytvshows/files/pytvshows-0.2-feedurl.patch @@ -0,0 +1,279 @@ +David Reitz writes: + +I created this so that I could specify a feedurl parameter in the config file, +which allows me to use the public RSS feeds at showRSS (http://showrss.karmorra.info/). +This patch will ONLY work for seasonepisode. I made no modifications for other types. + +Simply apply this patch and then modify your config like so: + +[Weeds] +feedurl = http://showrss.karmorra.info/feeds/68.rss +episode = 4 +season = 5 +show_type = seasonepisode +human_name = Weeds + +http://sourceforge.net/tracker/index.php?func=detail&aid=2818315&group_id=203642&atid=986413 + +--- pytvshows.orig 2009-06-20 15:46:23.000000000 -0400 ++++ pytvshows 2009-07-07 20:41:39.000000000 -0400 +@@ -83,11 +83,14 @@ config = { + 'output_dir2': None, + 'quality_matches': { + "[HD": 1, ++ "HDTV": 1, + "[DSRIP": 1, + "[TVRIP": 1, + "[PDTV": 1, + "[DVD": 1, + "[HR": 2, ++ "720p": 3, ++ "720P": 3, + "[720p": 3, + "[720P": 3, + }, +@@ -189,6 +192,7 @@ class Show(object): + self.show_type = args['show_type'] + self.season = args['season'] + self.episode = args['episode'] ++ self.feedurl = args['feedurl'] + #YYYY-MM-DD HH:MM:SS + if args['date']: + self.date = datetime.datetime(*(time.strptime( +@@ -290,7 +294,10 @@ class Show(object): + + def _get_rss_feed(self): + """Gets the feedparser object.""" +- url = config['feed'] % self.exact_name ++ if self.feedurl: ++ url = self.feedurl ++ else: ++ url = config['feed'] % self.exact_name + if config['verbose']: + print "Downloading and processing %s..." % url + r = feedparser.parse(url) +@@ -335,50 +342,21 @@ class Show(object): + if not self.rss: + return False + episodes = {} +- for episode in self.rss['entries']: +- if self.show_type == 'seasonepisode': +- r = re.compile('Season\s*: ([0-9]*?);') +- season_match = r.search(episode.description) +- r = re.compile('Episode\s*:\ ([0-9]*?)$') +- episode_match = r.search(episode.description) +- if not season_match or not episode_match: +- # This might be a special with a title +- r = re.compile('Show\s*Title\s*:\s*(.*?);') +- title_match = r.search(episode.description) +- if title_match and title_match.group(1) != 'n/a' \ +- and title_match.group(1) != '': +- title = title_match.group(1) +- if config["verbose"]: +- print "Found episode with title %s and no " \ +- "season or episode in seasonepisode show." % title +- quality = 0 +- for key, value in config["quality_matches"].items(): +- if key in episode.title: +- quality = value +- break +- date = datetime.datetime(* episode.updated_parsed[:6]) +- obj = EpisodeWithTitle( +- self, +- episode.link, +- date, +- title, +- quality) +- last_key = 0 +- for key in episodes.keys(): +- if key[0] == 0 and key[1] > last_key: +- last_key = key[1] +- episodes[0, last_key] = [obj] +- elif not self.ignoremissingdetails: +- print >> warn, 'W: Could not match season and/or ' \ +- 'episode in %s' % episode.description +- else: ++ # we've defined a feedurl in the config file... ++ if self.feedurl: ++ for episode in self.rss['entries']: ++ if self.show_type == 'seasonepisode': ++ r = re.compile('S([0-9]+)E([0-9]+)') ++ match = r.search( episode.title ) ++ season_num = int(match.group(1)) ++ episode_num = int(match.group(2)) ++ if config["verbose"]: ++ print "Found Show: Season %i, Episode %i" % (season_num, episode_num) + quality = 0 + for key, value in config["quality_matches"].items(): + if key in episode.title: + quality = value + break +- season_num = int(season_match.group(1)) +- episode_num = int(episode_match.group(1)) + if season_num != 0 and episode_num != 0: + obj = EpisodeWithSeasonAndEpisode( + self, +@@ -394,57 +372,117 @@ class Show(object): + elif config['verbose']: + print 'Season or episode number is 0 in %s' \ + % episode.description +- elif self.show_type == 'date': +- r = re.compile('Episode\s*Date:\s*([0-9\-]+)$') +- date_match = r.search(episode.description) +- if not date_match: +- if not self.ignoremissingdetails: +- print >>warn, 'W: Could not match date in %s' % \ +- episode.description +- else: ++ else: ++ for episode in self.rss['entries']: ++ if self.show_type == 'seasonepisode': ++ r = re.compile('Season\s*: ([0-9]*?);') ++ season_match = r.search(episode.description) ++ r = re.compile('Episode\s*:\ ([0-9]*?)$') ++ episode_match = r.search(episode.description) ++ if not season_match or not episode_match: ++ # This might be a special with a title ++ r = re.compile('Show\s*Title\s*:\s*(.*?);') ++ title_match = r.search(episode.description) ++ if title_match and title_match.group(1) != 'n/a' \ ++ and title_match.group(1) != '': ++ title = title_match.group(1) ++ if config["verbose"]: ++ print "Found episode with title %s and no " \ ++ "season or episode in seasonepisode show." % title ++ quality = 0 ++ for key, value in config["quality_matches"].items(): ++ if key in episode.title: ++ quality = value ++ break ++ date = datetime.datetime(* episode.updated_parsed[:6]) ++ obj = EpisodeWithTitle( ++ self, ++ episode.link, ++ date, ++ title, ++ quality) ++ last_key = 0 ++ for key in episodes.keys(): ++ if key[0] == 0 and key[1] > last_key: ++ last_key = key[1] ++ episodes[0, last_key] = [obj] ++ elif not self.ignoremissingdetails: ++ print >> warn, 'W: Could not match season and/or ' \ ++ 'episode in %s' % episode.description ++ else: ++ quality = 0 ++ for key, value in config["quality_matches"].items(): ++ if key in episode.title: ++ quality = value ++ break ++ season_num = int(season_match.group(1)) ++ episode_num = int(episode_match.group(1)) ++ if season_num != 0 and episode_num != 0: ++ obj = EpisodeWithSeasonAndEpisode( ++ self, ++ episode.link, ++ datetime.datetime(* episode.updated_parsed[:6]), ++ season_num, ++ episode_num, ++ quality) ++ try: ++ episodes[season_num, episode_num].append(obj) ++ except KeyError: ++ episodes[season_num, episode_num] = [obj] ++ elif config['verbose']: ++ print 'Season or episode number is 0 in %s' \ ++ % episode.description ++ elif self.show_type == 'date': ++ r = re.compile('Episode\s*Date:\s*([0-9\-]+)$') ++ date_match = r.search(episode.description) ++ if not date_match: ++ if not self.ignoremissingdetails: ++ print >>warn, 'W: Could not match date in %s' % \ ++ episode.description ++ else: ++ quality = 0 ++ for key, value in config["quality_matches"].items(): ++ if key in episode.title: ++ quality = value ++ break ++ date = datetime.datetime(*(time.strptime( ++ date_match.group(1), "%Y-%m-%d")[0:6])).date() ++ obj = EpisodeWithDate( ++ self, ++ episode.link, ++ datetime.datetime(* episode.updated_parsed[:6]), ++ date, ++ quality) ++ try: ++ episodes[date].append(obj) ++ except KeyError: ++ episodes[date] = [obj] ++ elif self.show_type == 'time': ++ r = re.compile('Show\s*Title\s*:\s*(.*?);') ++ title_match = r.search(episode.description) ++ if not title_match: ++ if not self.ignoremissingdetails: ++ print >>warn, 'W: Could not match title in %s' % \ ++ episode.description ++ title = "" ++ else: ++ title = title_match.group(1) + quality = 0 + for key, value in config["quality_matches"].items(): + if key in episode.title: + quality = value + break +- date = datetime.datetime(*(time.strptime( +- date_match.group(1), "%Y-%m-%d")[0:6])).date() +- obj = EpisodeWithDate( ++ date = datetime.datetime(* episode.updated_parsed[:6]) ++ obj = EpisodeWithTitle( + self, + episode.link, +- datetime.datetime(* episode.updated_parsed[:6]), + date, ++ title, + quality) + try: + episodes[date].append(obj) + except KeyError: + episodes[date] = [obj] +- elif self.show_type == 'time': +- r = re.compile('Show\s*Title\s*:\s*(.*?);') +- title_match = r.search(episode.description) +- if not title_match: +- if not self.ignoremissingdetails: +- print >>warn, 'W: Could not match title in %s' % \ +- episode.description +- title = "" +- else: +- title = title_match.group(1) +- quality = 0 +- for key, value in config["quality_matches"].items(): +- if key in episode.title: +- quality = value +- break +- date = datetime.datetime(* episode.updated_parsed[:6]) +- obj = EpisodeWithTitle( +- self, +- episode.link, +- date, +- title, +- quality) +- try: +- episodes[date].append(obj) +- except KeyError: +- episodes[date] = [obj] + self.episodes = episodes + return episodes + +@@ -597,6 +635,7 @@ def main(argv=None): + 'date': None, + 'time': None, + 'ignoremissingdetails': False, ++ 'feedurl': None, + } + for key in args.keys(): + if f.has_option(exact_name, key): diff --git a/net-misc/pytvshows/files/pytvshows-0.2-improved-re.patch b/net-misc/pytvshows/files/pytvshows-0.2-improved-re.patch new file mode 100644 index 000000000000..fbd316a5c3c2 --- /dev/null +++ b/net-misc/pytvshows/files/pytvshows-0.2-improved-re.patch @@ -0,0 +1,15 @@ +Improved regular expression for matching season and episode; see +http://sourceforge.net/tracker/index.php?func=detail&aid=2818315&group_id=203642&atid=986413 + +--- pytvshows.orig 2011-08-17 23:20:16.000000000 +0200 ++++ pytvshows 2011-08-17 23:22:30.000000000 +0200 +@@ -346,7 +346,8 @@ + if self.feedurl: + for episode in self.rss['entries']: + if self.show_type == 'seasonepisode': +- r = re.compile('S([0-9]+)E([0-9]+)') ++ #r = re.compile('S([0-9]+)E([0-9]+)') ++ r = re.compile(r'\bS?([0-9]{1,2})\s*(?:E|x)?\s*([0-9]{1,2})\b') + match = r.search( episode.title ) + season_num = int(match.group(1)) + episode_num = int(match.group(2)) |