From 463a95cb26430ba27fc18a3e0da4b4a00dcf1e88 Mon Sep 17 00:00:00 2001 From: GRiker Date: Sun, 26 Dec 2010 07:33:38 -0700 Subject: [PATCH] GwR catalog revisions wip --- src/calibre/library/catalog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/library/catalog.py b/src/calibre/library/catalog.py index 7d1dd47b08..28161249a5 100644 --- a/src/calibre/library/catalog.py +++ b/src/calibre/library/catalog.py @@ -4321,14 +4321,14 @@ class EPUB_MOBI(CatalogPlugin): _soup = BeautifulSoup('') genresTag = Tag(_soup,'p') gtc = 0 - for tag in book.get('tags', []): + for (i, tag) in enumerate(book.get('tags', [])): aTag = Tag(_soup,'a') if self.opts.generate_genres: aTag['href'] = "Genre_%s.html" % re.sub("\W","",tag.lower()) aTag.insert(0,escape(NavigableString(tag))) genresTag.insert(gtc, aTag) gtc += 1 - if gtc < len(book['tags']): + if i < len(book['tags'])-1: genresTag.insert(gtc, NavigableString(' %s ' % MIDDOT)) gtc += 1 genres = genresTag.renderContents()