diff --git a/doc/changelog.txt b/doc/changelog.txt index 18b55a1e0..c1a706f1c 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -7,6 +7,7 @@ Features: Changes: - cmdline: Comic lists are now displayed one page at a time. +- events: HTML output now embeds the images in the page. Fixes: - cmdline: Catch error when piping output to another diff --git a/dosagelib/comic.py b/dosagelib/comic.py index e75bfcbbd..3944d5335 100644 --- a/dosagelib/comic.py +++ b/dosagelib/comic.py @@ -98,5 +98,5 @@ class ComicImage(object): raise else: out.info("Saved %s (%s)." % (fn, strsize(size))) - getHandler().comicDownloaded(self.name, fn) + getHandler().comicDownloaded(self, fn) return fn, True diff --git a/dosagelib/events.py b/dosagelib/events.py index d0d907dfd..1201f1d66 100644 --- a/dosagelib/events.py +++ b/dosagelib/events.py @@ -70,12 +70,13 @@ class RSSEventHandler(EventHandler): def comicDownloaded(self, comic, filename): """Write RSS entry for downloaded comic.""" - url = self.getUrlFromFilename(filename) - title = '%s - %s' % (comic, os.path.basename(filename)) - description = '
View Comic' % (url, url) + imageUrl = self.getUrlFromFilename(filename) + title = '%s - %s' % (comic.name, os.path.basename(filename)) + pageUrl = comic.referrer + description = '
View Comic' % (imageUrl, pageUrl) args = ( title, - url, + imageUrl, description, util.rfc822date(time.time()) ) @@ -125,31 +126,33 @@ class HtmlEventHandler(EventHandler): self.html.write(u''' - + + Comics for %s Previous Day | Next Day \n') - self.lastComic = comic - self.html.write(u'''
  • %s
  • - \n') + self.lastComic = comic.name + self.html.write(u'
  • %s
  • \n' % comic.name) + self.html.write(u'