From d9c267d2048ae1943830255ef1a921e21d75d8eb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 19 Feb 2010 20:30:00 -0700 Subject: [PATCH] IGN:Tag release --- src/calibre/ebooks/metadata/meta.py | 8 +++++ src/calibre/ebooks/oeb/transforms/rescale.py | 2 +- src/calibre/manual/viewer.rst | 2 +- src/calibre/translations/calibre.pot | 32 ++++++++++---------- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/calibre/ebooks/metadata/meta.py b/src/calibre/ebooks/metadata/meta.py index 94c0388b99..2d22190ad4 100644 --- a/src/calibre/ebooks/metadata/meta.py +++ b/src/calibre/ebooks/metadata/meta.py @@ -70,6 +70,14 @@ def is_recipe(filename): filename.rpartition('.')[0].endswith('_recipe_out') def get_metadata(stream, stream_type='lrf', use_libprs_metadata=False): + pos = stream.tell() + try: + return _get_metadata(stream, stream_type, use_libprs_metadata) + finally: + stream.seek(pos) + + +def _get_metadata(stream, stream_type, use_libprs_metadata): if stream_type: stream_type = stream_type.lower() if stream_type in ('html', 'html', 'xhtml', 'xhtm', 'xml'): stream_type = 'html' diff --git a/src/calibre/ebooks/oeb/transforms/rescale.py b/src/calibre/ebooks/oeb/transforms/rescale.py index df4cc206a2..980c27d504 100644 --- a/src/calibre/ebooks/oeb/transforms/rescale.py +++ b/src/calibre/ebooks/oeb/transforms/rescale.py @@ -29,7 +29,7 @@ class RescaleImages(object): page_width, page_height = self.opts.dest.width, self.opts.dest.height - if not self.opts.is_image_collection: + if not getattr(self.opts, 'is_image_collection', False): page_width -= (self.opts.margin_left + self.opts.margin_right) * self.opts.dest.dpi/72. page_height -= (self.opts.margin_top + self.opts.margin_bottom) * self.opts.dest.dpi/72. for item in self.oeb.manifest: diff --git a/src/calibre/manual/viewer.rst b/src/calibre/manual/viewer.rst index 70bf98412a..dd70674b99 100644 --- a/src/calibre/manual/viewer.rst +++ b/src/calibre/manual/viewer.rst @@ -1,6 +1,6 @@ .. include:: global.rst -.. _gui: +.. _viewer: The E-book Viewer ============================= diff --git a/src/calibre/translations/calibre.pot b/src/calibre/translations/calibre.pot index 83efdfcea1..44710ffffa 100644 --- a/src/calibre/translations/calibre.pot +++ b/src/calibre/translations/calibre.pot @@ -4,9 +4,9 @@ # msgid "" msgstr "" -"Project-Id-Version: calibre 0.6.41\n" -"POT-Creation-Date: 2010-02-19 12:51+MST\n" -"PO-Revision-Date: 2010-02-19 12:51+MST\n" +"Project-Id-Version: calibre 0.6.42\n" +"POT-Creation-Date: 2010-02-19 19:53+MST\n" +"PO-Revision-Date: 2010-02-19 19:53+MST\n" "Last-Translator: Automatically generated\n" "Language-Team: LANGUAGE\n" "MIME-Version: 1.0\n" @@ -126,9 +126,9 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/library/database2.py:757 #: /home/kovid/work/calibre/src/calibre/library/database2.py:1186 #: /home/kovid/work/calibre/src/calibre/library/database2.py:1223 +#: /home/kovid/work/calibre/src/calibre/library/database2.py:1613 #: /home/kovid/work/calibre/src/calibre/library/database2.py:1615 -#: /home/kovid/work/calibre/src/calibre/library/database2.py:1617 -#: /home/kovid/work/calibre/src/calibre/library/database2.py:1737 +#: /home/kovid/work/calibre/src/calibre/library/database2.py:1735 #: /home/kovid/work/calibre/src/calibre/library/server.py:645 #: /home/kovid/work/calibre/src/calibre/library/server.py:721 #: /home/kovid/work/calibre/src/calibre/library/server.py:768 @@ -598,7 +598,7 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:132 #: /home/kovid/work/calibre/src/calibre/library/database2.py:1110 #: /home/kovid/work/calibre/src/calibre/library/database2.py:1114 -#: /home/kovid/work/calibre/src/calibre/library/database2.py:1503 +#: /home/kovid/work/calibre/src/calibre/library/database2.py:1501 msgid "News" msgstr "" @@ -1108,11 +1108,11 @@ msgstr "" msgid "Converting input to HTML..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/plumber.py:796 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/plumber.py:797 msgid "Running transforms on ebook..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/plumber.py:883 +#: /home/kovid/work/calibre/src/calibre/ebooks/conversion/plumber.py:884 msgid "Creating" msgstr "" @@ -2278,8 +2278,8 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/catalog/catalog_epub_mobi.py:20 #: /home/kovid/work/calibre/src/calibre/library/catalog.py:280 -#: /home/kovid/work/calibre/src/calibre/library/database2.py:1465 -#: /home/kovid/work/calibre/src/calibre/library/database2.py:1484 +#: /home/kovid/work/calibre/src/calibre/library/database2.py:1464 +#: /home/kovid/work/calibre/src/calibre/library/database2.py:1482 msgid "Catalog" msgstr "" @@ -7028,27 +7028,27 @@ msgid "" "For help on an individual command: %%prog command --help\n" msgstr "" -#: /home/kovid/work/calibre/src/calibre/library/database2.py:1763 +#: /home/kovid/work/calibre/src/calibre/library/database2.py:1761 msgid "

Migrating old database to ebook library in %s

" msgstr "" -#: /home/kovid/work/calibre/src/calibre/library/database2.py:1792 +#: /home/kovid/work/calibre/src/calibre/library/database2.py:1790 msgid "Copying %s" msgstr "" -#: /home/kovid/work/calibre/src/calibre/library/database2.py:1809 +#: /home/kovid/work/calibre/src/calibre/library/database2.py:1807 msgid "Compacting database" msgstr "" -#: /home/kovid/work/calibre/src/calibre/library/database2.py:1902 +#: /home/kovid/work/calibre/src/calibre/library/database2.py:1900 msgid "Checking SQL integrity..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/library/database2.py:1939 +#: /home/kovid/work/calibre/src/calibre/library/database2.py:1937 msgid "Checking for missing files." msgstr "" -#: /home/kovid/work/calibre/src/calibre/library/database2.py:1961 +#: /home/kovid/work/calibre/src/calibre/library/database2.py:1959 msgid "Checked id" msgstr ""