Modified:
branches/0.9/CHANGES
branches/0.9/feedjack/bin/feedjack_update.py
branches/0.9/setup.py
Log:
0.9.15 release
Modified: branches/0.9/CHANGES
==============================================================================
--- branches/0.9/CHANGES (original)
+++ branches/0.9/CHANGES Mon Jul 7 00:02:53 2008
@@ -1,5 +1,8 @@
CHANGES:
+Feedjack 0.9.15
+* Fixing feedjack_update for posts without a modified date (yay rss 0.92!)
+
Feedjack 0.9.14
* Lots of fixes/improvements in feedjack_update.py:
- better unicode handling on logging, this will prevent feeds not updating
Modified: branches/0.9/feedjack/bin/feedjack_update.py
==============================================================================
--- branches/0.9/feedjack/bin/feedjack_update.py (original)
+++ branches/0.9/feedjack/bin/feedjack_update.py Mon Jul 7 00:02:53 2008
@@ -22,7 +22,7 @@
except ImportError:
threadpool = None
-VERSION = '0.9.14'
+VERSION = '0.9.15'
URL = 'http://www.feedjack.org/'
USER_AGENT = 'Feedjack %s - %s' % (VERSION, URL)
SLOWFEED_WARNING = 10
@@ -55,11 +55,12 @@
return datetime.datetime.fromtimestamp(time.mktime(ttime))
class ProcessEntry:
- def __init__(self, feed, options, entry, postdict):
+ def __init__(self, feed, options, entry, postdict, fpf):
self.feed = feed
self.options = options
self.entry = entry
self.postdict = postdict
+ self.fpf = fpf
def get_tags(self):
""" Returns a list of tag objects from an entry.
@@ -184,15 +185,15 @@
retval = ENTRY_NEW
if self.options.verbose:
prints('[%d] Saving new post: %s' % (self.feed.id, link))
- if not date_modified:
+ if not date_modified and self.fpf:
# if the feed has no date_modified info, we use the feed
# mtime or the current time
if self.fpf.feed.has_key('modified_parsed'):
date_modified = mtime(self.fpf.feed.modified_parsed)
elif self.fpf.has_key('modified'):
date_modified = mtime(self.fpf.modified)
- else:
- date_modified = datetime.datetime.now()
+ if not date_modified:
+ date_modified = datetime.datetime.now()
tobj = models.Post(feed=self.feed, title=title, link=link,
content=content, guid=guid, date_modified=date_modified,
author=author, author_email=author_email,
@@ -206,11 +207,13 @@
def __init__(self, feed, options):
self.feed = feed
self.options = options
+ self.fpf = None
def process_entry(self, entry, postdict):
""" wrapper for ProcessEntry
"""
- entry = ProcessEntry(self.feed, self.options, entry, postdict)
+ entry = ProcessEntry(self.feed, self.options, entry, postdict,
+ self.fpf)
ret_entry = entry.process()
del entry
return ret_entry
Modified: branches/0.9/setup.py
==============================================================================
--- branches/0.9/setup.py (original)
+++ branches/0.9/setup.py Mon Jul 7 00:02:53 2008
@@ -9,7 +9,7 @@
setup(
name = 'Feedjack',
- version = '0.9.14',
+ version = '0.9.15',
url = 'http://www.feedjack.org/',
author = 'Gustavo Picón',
author_email = 'gpi...@gmail.com',