diff --git a/resources/images/news/ourdailybread.png b/resources/images/news/ourdailybread.png new file mode 100644 index 0000000000..771f252216 Binary files /dev/null and b/resources/images/news/ourdailybread.png differ diff --git a/resources/recipes/ourdailybread.recipe b/resources/recipes/ourdailybread.recipe index 0b37880377..e0d38db821 100644 --- a/resources/recipes/ourdailybread.recipe +++ b/resources/recipes/ourdailybread.recipe @@ -1,9 +1,7 @@ -#!/usr/bin/env python - __license__ = 'GPL v3' -__copyright__ = '2009, Darko Miletic ' +__copyright__ = '2009-2010, Darko Miletic ' ''' -rbc.org +odb.org ''' from calibre.web.feeds.news import BasicNewsRecipe @@ -11,27 +9,29 @@ from calibre.web.feeds.news import BasicNewsRecipe class OurDailyBread(BasicNewsRecipe): title = 'Our Daily Bread' __author__ = 'Darko Miletic and Sujata Raman' - description = 'Religion' + description = "Our Daily Bread is a daily devotional from RBC Ministries which helps readers spend time each day in God's Word." oldest_article = 15 - language = 'en' - lang = 'en' - + language = 'en' max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False - category = 'religion' + category = 'ODB, Daily Devotional, Bible, Christian Devotional, Devotional, RBC Ministries, Our Daily Bread, Devotionals, Daily Devotionals, Christian Devotionals, Faith, Bible Study, Bible Studies, Scripture, RBC, religion' encoding = 'utf-8' - + conversion_options = { - 'comments' : description - ,'tags' : category - ,'language' : 'en' + 'comments' : description + ,'tags' : category + ,'language' : language + ,'linearize_tables' : True } - keep_only_tags = [dict(name='div', attrs={'class':['altbg','text']})] + keep_only_tags = [dict(attrs={'class':'module-content'})] + remove_tags = [ + dict(attrs={'id':'article-zoom'}) + ,dict(attrs={'class':'listen-now-box'}) + ] + remove_tags_after = dict(attrs={'class':'readable-area'}) - remove_tags = [dict(name='div', attrs={'id':['ctl00_cphPrimary_pnlBookCover']}), - ] extra_css = ''' .text{font-family:Arial,Helvetica,sans-serif;font-size:x-small;} .devotionalTitle{font-family:Arial,Helvetica,sans-serif; font-size:large; font-weight: bold;} @@ -40,14 +40,9 @@ class OurDailyBread(BasicNewsRecipe): a{color:#000000;font-family:Arial,Helvetica,sans-serif; font-size:x-small;} ''' - feeds = [(u'Our Daily Bread', u'http://www.rbc.org/rss.ashx?id=50398')] + feeds = [(u'Our Daily Bread', u'http://odb.org/feed/')] def preprocess_html(self, soup): - soup.html['xml:lang'] = self.lang - soup.html['lang'] = self.lang - mtag = '' - soup.head.insert(0,mtag) - return self.adeify_images(soup) def get_cover_url(self): @@ -61,3 +56,4 @@ class OurDailyBread(BasicNewsRecipe): cover_url = a.img['src'] return cover_url + diff --git a/src/calibre/devices/hanlin/driver.py b/src/calibre/devices/hanlin/driver.py index c6c9fb876a..adb4b353f3 100644 --- a/src/calibre/devices/hanlin/driver.py +++ b/src/calibre/devices/hanlin/driver.py @@ -123,5 +123,12 @@ class BOOX(HANLINV3): EBOOK_DIR_MAIN = 'MyBooks' EBOOK_DIR_CARD_A = 'MyBooks' + def windows_sort_drives(self, drives): + return drives + def osx_sort_names(self, names): + return names + + def linux_swap_drives(self, drives): + return drives diff --git a/src/calibre/devices/prs500/cli/main.py b/src/calibre/devices/prs500/cli/main.py index 6ad5fe2087..cd8395467b 100755 --- a/src/calibre/devices/prs500/cli/main.py +++ b/src/calibre/devices/prs500/cli/main.py @@ -337,7 +337,7 @@ def main(): dev.touch(args[0]) elif command == 'test_file': parser = OptionParser(usage=("usage: %prog test_file path\n" - 'Open device, copy file psecified by path to device and ' + 'Open device, copy file specified by path to device and ' 'then eject device.')) options, args = parser.parse_args(args) if len(args) != 1: diff --git a/src/calibre/devices/prs505/sony_cache.py b/src/calibre/devices/prs505/sony_cache.py index 88384a804d..71e7b9cff3 100644 --- a/src/calibre/devices/prs505/sony_cache.py +++ b/src/calibre/devices/prs505/sony_cache.py @@ -290,7 +290,7 @@ class XMLCache(object): lpath_map = self.build_lpath_map(root) for book in bl: - record = lpath_map[book.lpath] + record = lpath_map.get(book.lpath, None) if record is not None: title = record.get('title', None) if title is not None and title != book.title: diff --git a/src/calibre/manual/customize.rst b/src/calibre/manual/customize.rst index e5635d5165..f875b0e648 100644 --- a/src/calibre/manual/customize.rst +++ b/src/calibre/manual/customize.rst @@ -19,12 +19,20 @@ use *plugins* to add funtionality to |app|. Environment variables ----------------------- - * ``CALIBRE_CONFIG_DIRECTORY`` - * ``CALIBRE_OVERRIDE_DATABASE_PATH`` - * ``CALIBRE_DEVELOP_FROM`` - * ``CALIBRE_OVERRIDE_LANG`` - * ``SYSFS_PATH`` - * ``http_proxy`` + * ``CALIBRE_CONFIG_DIRECTORY`` - sets the directory where configuration files are stored/read. + * ``CALIBRE_OVERRIDE_DATABASE_PATH`` - allows you to specify the full path to metadata.db. Using this variable you can have metadata.db be in a location other than the library folder. Useful if your library folder is on a networked drive that does not support file locking. + * ``CALIBRE_DEVELOP_FROM`` - Used to run from a calibre development environment. See :ref:`develop`. + * ``CALIBRE_OVERRIDE_LANG`` - Used to force the language used by the interface (ISO 639 language code) + * ``SYSFS_PATH`` - Use if sysfs is mounted somewhere other than /sys + * ``http_proxy`` - Used on linux to specify an HTTP proxy + +Tweaks +------------ + +Tweaks are small changes that you can specify to control various aspects of |app|'s behavior. You specify them by editing the 2tweaks.py file in the config directory. +The default tweaks.py file is reproduced below + +.. literalinclude:: ../../../resources/default_tweaks.py A Hello World plugin