From 916a780ebfed7a66e1e6dd3dcfb23e8ac529a2c2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 23 Jan 2010 08:54:47 -0700 Subject: [PATCH 1/4] Save templates: Handle user specifying author instead of authors --- src/calibre/library/save_to_disk.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/library/save_to_disk.py b/src/calibre/library/save_to_disk.py index 5076f10d86..0404289cb3 100644 --- a/src/calibre/library/save_to_disk.py +++ b/src/calibre/library/save_to_disk.py @@ -112,6 +112,7 @@ def get_components(template, mi, id, timefmt='%b %Y', length=250, format_args['title'] = mi.title if mi.authors: format_args['authors'] = mi.format_authors() + format_args['author'] = format_args['authors'] if mi.author_sort: format_args['author_sort'] = mi.author_sort if mi.tags: From 20d7986126be326e29c655410220f23c826dffd4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 23 Jan 2010 08:56:37 -0700 Subject: [PATCH 2/4] New recipe for HotAir by Walt Anthony --- resources/images/news/hotair.png | Bin 0 -> 363 bytes resources/recipes/hotair.recipe | 41 +++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 resources/images/news/hotair.png create mode 100644 resources/recipes/hotair.recipe diff --git a/resources/images/news/hotair.png b/resources/images/news/hotair.png new file mode 100644 index 0000000000000000000000000000000000000000..f6b391ce3fe6bf0d574e594eb92461de359897f1 GIT binary patch literal 363 zcmV-x0hIoUP)J#NB45Jq3plXNID6-8PrM?lI6_6oiTLTM;mrZp7}1>yow z2w*n* zAK+s=PJ?c@yhtjnuavAjPXt7!Q)|s(3B6u=4hF|b*lNwiXheONSS*eM#6iGyKB;xF z(57pXB(iawRJ-xm^F%yPBuO&0R=~GXndZp2ZI}f>G#qA{A3;`s?s-6A22rQ8kDq|L z@iHp_-skgu`~qA86X0`~Y&5C?KftSr&w)4K88`!Q-NS&UQrrPwz!h*0G!1OqZWlG= zhqw$w@f}BekQl@_8+d57tY6u>#$_1Ft?SB-0rZuU&3bJG`~sG7Wa@9Z2J!#^002ov JPDHLkV1n%7lCuB+ literal 0 HcmV?d00001 diff --git a/resources/recipes/hotair.recipe b/resources/recipes/hotair.recipe new file mode 100644 index 0000000000..96ba213b94 --- /dev/null +++ b/resources/recipes/hotair.recipe @@ -0,0 +1,41 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Walt Anthony ' +''' +www.hotair.com +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class hotair(BasicNewsRecipe): + title = u'Hot Air' + __author__ = 'Walt Anthony' + description = "The world's first, full-service conservative Internet broadcast network" + publisher = 'Hot Air' + category = 'news, politics, USA' + oldest_article = 3 + max_articles_per_feed = 100 + summary_length = 150 + language = 'en' + encoding = 'utf-8' + use_embedded_content = False + remove_javascript = True + + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + + + + keep_only_tags = [dict(name='div', attrs={'id':'page-post'})] + + remove_tags = [dict(name=['iframe', 'small', 'embed', 'object','link','script','form'])] + + feeds = [ + ('Hot Air', 'http://feeds.feedburner.com/hotair/main'), + ('The Greenroom', 'http://feeds2.feedburner.com/hotair/greenroom') + ] From ee5a5789dd6685315083c70d3f3a4692c9caa695 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 23 Jan 2010 09:23:15 -0700 Subject: [PATCH 3/4] Greensboro news and record by Walt Anthony --- .../news/greensboro_news_and_record.png | Bin 0 -> 480 bytes .../recipes/greensboro_news_and_record.recipe | 54 ++++++++++++++++++ src/calibre/ebooks/pdf/reflow.py | 21 +++++-- 3 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 resources/images/news/greensboro_news_and_record.png create mode 100644 resources/recipes/greensboro_news_and_record.recipe diff --git a/resources/images/news/greensboro_news_and_record.png b/resources/images/news/greensboro_news_and_record.png new file mode 100644 index 0000000000000000000000000000000000000000..91097cd15b007e73cd59c4b5640ba9bf1c2f47a4 GIT binary patch literal 480 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*U87#KM{T^vI!PG6mLF!!*6MC*Px*#pvBZXQs! zU{+WvY?9h|M7=MtZ_XUf0wYHyLkHU?^A)=rtsSdRI6FHX zGdsX1(U|%rk;UL#m;>{a0}BGP?koN(V2W^&&sxCF^kRC|96H({O${wy;^5~ z$(r+*?OvnyhAulEhJIo3y$tfN&V+LbRxp_zNdK~MewCBlmFQE-(W`cDEn2_ahnZz3 z)A9HNYYVr{U`>gA`Ceh}f%BR#S`V#iP}_d&?RC}M-p#XlY#6d1ziG9<&M&(=>TS}a z^Sgi{q*~${QIe8al4_M)lnSI6j0_A7bPWu3jf_JKEUk Date: Sat, 23 Jan 2010 09:31:46 -0700 Subject: [PATCH 4/4] ... --- src/calibre/gui2/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/device.py b/src/calibre/gui2/device.py index 72229f6c19..5a977b37a6 100644 --- a/src/calibre/gui2/device.py +++ b/src/calibre/gui2/device.py @@ -932,7 +932,7 @@ class DeviceGUI(object): if isinstance(job.exception, FreeSpaceError): where = 'in main memory.' if 'memory' in str(job.exception) \ else 'on the storage card.' - titles = '\n'.join(['
  • '+mi['title']+'
  • ' \ + titles = '\n'.join(['
  • '+mi.title+'
  • ' \ for mi in metadata]) d = error_dialog(self, _('No space on device'), _('

    Cannot upload books to device there '