sync with John's branch
@ -2,11 +2,10 @@
|
||||
.check-cache.pickle
|
||||
src/calibre/plugins
|
||||
resources/images.qrc
|
||||
resources/compiled_coffeescript.zip
|
||||
src/calibre/ebooks/oeb/display/test/*.js
|
||||
src/calibre/manual/.build/
|
||||
src/calibre/manual/cli/
|
||||
src/calibre/manual/template_ref.rst
|
||||
manual/.build/
|
||||
manual/cli/
|
||||
manual/template_ref.rst
|
||||
build
|
||||
dist
|
||||
docs
|
||||
|
11
COPYRIGHT
@ -4,11 +4,6 @@ License: GPL-3
|
||||
The full text of the GPL is distributed as in
|
||||
/usr/share/common-licenses/GPL-3 on Debian systems.
|
||||
|
||||
Files: src/calibre/ebooks/pdf/*.h,*.cpp
|
||||
License: GPL-2 or later
|
||||
The full text of the GPL is distributed as in
|
||||
/usr/share/common-licenses/GPL-2 on Debian systems.
|
||||
|
||||
Files: setup/iso_639/*
|
||||
Copyright: Various
|
||||
License: LGPL 2.1
|
||||
@ -21,6 +16,12 @@ License: BSD
|
||||
The full text of the BSD license is distributed as in
|
||||
/usr/share/common-licenses/BSD on Debian systems.
|
||||
|
||||
Files: src/qtcurve/*
|
||||
Copyright: Craig Drummond, 2007 - 2010 craig.p.drummond@gmail.com
|
||||
License: GPL-2
|
||||
The full text of the GPL is distributed as in
|
||||
/usr/share/common-licenses/GPL-2 on Debian systems.
|
||||
|
||||
Files: src/calibre/ebooks/chardet/*
|
||||
Copyright: Copyright (C) 1998-2001 Netscape Communications Corporation
|
||||
License: LGPL-2.1+
|
||||
|
542
Changelog.yaml
@ -19,6 +19,548 @@
|
||||
# new recipes:
|
||||
# - title:
|
||||
|
||||
- version: 0.8.60
|
||||
date: 2012-07-13
|
||||
|
||||
new features:
|
||||
- title: "When searching, allow use of un-accented characters to match accented characters in all fields and all languages (not just authors and English as before)"
|
||||
description: "The rules for matching un-accented characters are done in a language dependent way. So if your calibre interface language is set to English, n will match both n and ñ, but if it is set to Spanish, it will match only n, as in Spanish ñ is a separate alphabet in Spanish. This makes searching a little slower, so if you have a very large library you can turn it off via Preferences->Searching."
|
||||
type: major
|
||||
|
||||
- title: "Content server: Show a best guess for the IP address the content server is currently listening at in the connect/share menu."
|
||||
tickets: [1024128]
|
||||
|
||||
- title: "E-book viewer: Add an option to show a clock in full screen mode."
|
||||
tickets: [1022086]
|
||||
|
||||
- title: "Drivers for Paquito Imaginarium and a few Android phones"
|
||||
tickets: [1024021,1023613,1023461,1022401]
|
||||
|
||||
- title: "HTMLZ Output: Add option to use the book title as the filename for the html file inside the archive"
|
||||
|
||||
- title: "Make the list of displayed fields in the book details panel a per library setting"
|
||||
|
||||
- title: "Have autocomplete on authors/series/tags/etc. ignore accented characters when finding matches (similar to the changes to search above)"
|
||||
|
||||
- title: "Support for retina displays in OS X (I hope)"
|
||||
tickets: [1022191]
|
||||
|
||||
- title: "Remove the dependency on the zip command line tool when developing plugins"
|
||||
|
||||
bug fixes:
|
||||
- title: "Kobo driver: Do not perform write operations on the Kobo database if its version is newer than the latest version the driver supports, for safety"
|
||||
|
||||
- title: "KF8 Input: Ignore encoding declarations inside the html markup, as they are sometimes incorrect."
|
||||
tickets: [1022933]
|
||||
|
||||
- title: "Force refresh of cached composite column values when values in the cache are changed"
|
||||
|
||||
- title: "Fix a regression that broke calibre --shutdown-running-calibre on windows."
|
||||
tickets: [1022504]
|
||||
|
||||
- title: "Possible workaround for Qt 4.8.2 open file dialog failing on some linux distros."
|
||||
tickets: [1022019]
|
||||
|
||||
- title: "Catalogs: Fix some epubcheck errors when generating catalogs in EPUB format"
|
||||
|
||||
- title: "Linux installer: When calling the xdg utilities use system libraries rather than the libraries bundled with calibre"
|
||||
|
||||
- title: "Fix numeric sort for composite custom columns that use custom separators"
|
||||
tickets: [1021814]
|
||||
|
||||
- title: "Tag browser: When grouping by first letter, handle languages that have 'letters' made of more than one character. This can be turned off via Preferences->Tweaks"
|
||||
|
||||
improved recipes:
|
||||
- Hola magazine
|
||||
- Adventure Gamers
|
||||
- Cosmopolitan UK
|
||||
- Onda Rock
|
||||
|
||||
new recipes:
|
||||
- title: Empire Magazine
|
||||
author: Dave Asbury
|
||||
|
||||
- title: NZZ Folio
|
||||
author: Bernd Leinfelder
|
||||
|
||||
- title: Warentest
|
||||
author: asdfdsfksd
|
||||
|
||||
|
||||
- version: 0.8.59
|
||||
date: 2012-07-06
|
||||
|
||||
new features:
|
||||
- title: "Drivers for Samsung SGH-T989 and Sony Ericsson Sola"
|
||||
tickets: [1021365]
|
||||
|
||||
- title: "Conversion pipeline: When removing the first image, also remove the html file the image is found in, if that file has no other content. Allows this option to be used to remove covers from EPUB files without leaving behind a blank page."
|
||||
|
||||
- title: "Content server: Add a navigation panel at the bottom of each page."
|
||||
tickets: [1020225]
|
||||
|
||||
- title: "calibredb: Add a backup_metadata command to manually run the backup to opf from the command line"
|
||||
|
||||
- title: "User defined driver: Add option to swap main memory and card a."
|
||||
tickets: [1020056]
|
||||
|
||||
- title: "Add new option to the series_index_auto_increment tweak, no_change, that causes calibre not to change the series_index when the series is changed"
|
||||
|
||||
bug fixes:
|
||||
- title: "PDF Output: Resize large images so that they do not get off at the right edge of the page."
|
||||
|
||||
- title: "On linux ensure that WM_CLASS for the main calibre GUI is set to 'calibre-gui' to match the name of the calibre-gui.desktop file. This is apparently required by the GNOME 3 shell."
|
||||
tickets: [1020297]
|
||||
|
||||
- title: "Update ICU in all builds to version 49.1"
|
||||
|
||||
- title: "Tag browser: Fix regression that broke drag and drop between user categories in the tag browser"
|
||||
|
||||
- title: "When copying to library and deleting after copy, do not place deleted files in recycle bin, as this is redundant and slow (they have already been copied into another library)"
|
||||
|
||||
- title: "Fix yes/no fields with value of No not showing up in the book details panel"
|
||||
|
||||
- title: "Catalogs: Better sorting for non English languages"
|
||||
tickets: [930882]
|
||||
|
||||
- title: "Get Books: Fix Foyles UK, Weightless books, ebooks.com and ozon.ru"
|
||||
|
||||
- title: "CHM Input: Fix handling of chm files that split their html into multiple sub-directories."
|
||||
tickets: [1018792]
|
||||
|
||||
improved recipes:
|
||||
- FHM UK
|
||||
- The Age
|
||||
- weblogs_ssl
|
||||
- Heraldo.es
|
||||
|
||||
new recipes:
|
||||
- title: CATO Institute and Heritage Foundation
|
||||
author: _reader
|
||||
|
||||
- version: 0.8.58
|
||||
date: 2012-06-29
|
||||
|
||||
new features:
|
||||
- title: "Add some texture to calibre generated covers"
|
||||
|
||||
- title: "Drivers for Sogo SS-4370, HTC G2 and Lenovo ThinkPad Tablet"
|
||||
tickets: [1019050, 1017010]
|
||||
|
||||
- title: "Add search to the Manage tags/series/etc. dialogs"
|
||||
|
||||
- title: "News download: Add support for images embedded in the HTML"
|
||||
|
||||
- title: "calibre -s now waits for calibre to shutdown"
|
||||
|
||||
bug fixes:
|
||||
- title: "Workaround for iTunes breaking scripting with version 10.6.3 on OS X."
|
||||
tickets: [1012243]
|
||||
|
||||
- title: "EPUB Input: When there are multiple elements of the same type in the OPF guide, use the first rather than the last element."
|
||||
|
||||
- title: "Windows: Disable the new UI style if the color depth of the desktop is less than 32 bits per pixel"
|
||||
|
||||
- title: "ISBNDB metadata plugin: Return results even though they have no comments"
|
||||
|
||||
- title: "More robust handling of EINTR during IPC"
|
||||
|
||||
- title: "Metadata download: Support for amazon's new results page markup"
|
||||
|
||||
- title: "EPUB Output: Fix a bug that could cause corrupted output when doing an EPUB/OEB to EPUB conversion if the input EPUB had multiple files with the same name"
|
||||
|
||||
- title: "KF8 Output: Fix a couple of bugs that could lead to generation of invalid KF8 files."
|
||||
tickets: [1016672]
|
||||
|
||||
improved recipes:
|
||||
- ABC Digital
|
||||
- O Globo
|
||||
|
||||
new recipes:
|
||||
- title: Sign of the Times and New Statesman
|
||||
author: TerminalVeracity
|
||||
|
||||
- title: CT24
|
||||
author: zoidozoido
|
||||
|
||||
- title: SmileZilla
|
||||
author: Will
|
||||
|
||||
- title: Marketing Sensoriale
|
||||
author: NotTaken
|
||||
|
||||
- version: 0.8.57
|
||||
date: 2012-06-22
|
||||
|
||||
new features:
|
||||
- title: "PDF Output: Full pagination support. No more cutoff bottom line."
|
||||
type: major
|
||||
description: "Fixes a long standing bug in calibre's PDF Output that caused the bottom line of some pages to be partially cut off and prevented top and bottom margins from working."
|
||||
|
||||
- title: "calibredb add now prints out the ids of added books"
|
||||
tickets: [1014303]
|
||||
|
||||
- title: "Kobo Vox driver: Add support for new Google Play firmware"
|
||||
tickets: [1014129]
|
||||
|
||||
- title: "Driver for Prestigio PMP5097PRO"
|
||||
tickets: [1013864]
|
||||
|
||||
- title: "Add option to disable tooltips in the book list under Preferences->Look & Feel"
|
||||
|
||||
- title: "When customizing builtin recipes download the latest version of the recipe to customize instead of using the possibly out of date bundled version"
|
||||
|
||||
bug fixes:
|
||||
- title: "PDF Output: Use the cover from the input document when no cover is specified during a conversion"
|
||||
|
||||
- title: "E-book Viewer: Printing now has proper pagination with top and bottom margins no lines partially cut-off at the bottom and full style retention"
|
||||
|
||||
- title: "KF8 Input: Handle files with incorrectly encoded guide type entries."
|
||||
tickets: [1015020]
|
||||
|
||||
- title: "E-book viewer: Disable hyphenation on windows xp as Qt WebKit barfs on soft hyphens on windows XP"
|
||||
|
||||
- title: "Handle OS X systems with invalid palette colors."
|
||||
tickets: [1014900]
|
||||
|
||||
- title: "Tag Browser: Fix regression that broke partitioning of hierarchical categories."
|
||||
tickets: [1014065]
|
||||
|
||||
- title: "LRF Output: Handle negative page margins"
|
||||
tickets: [1014103]
|
||||
|
||||
- title: "Template language: Fix arithmetic functions to tolerate the value 'None' as returned by raw_field()"
|
||||
|
||||
- title: "Fix custom title sort set in the edit metadata dialog getting reset by the conversion dialog"
|
||||
|
||||
improved recipes:
|
||||
- The Economist
|
||||
- Akter
|
||||
- 24 Sata sr
|
||||
- Novi List
|
||||
- Metro Montreal
|
||||
- Mode Durable
|
||||
- CanardPC
|
||||
- The Economic Collapse
|
||||
- Our Daily Bread
|
||||
|
||||
new recipes:
|
||||
- title: Akter Daily
|
||||
author: Darko MIletic
|
||||
|
||||
- title: BBC Brasil
|
||||
author: Claviola
|
||||
|
||||
- title: Homopedia.pl
|
||||
author: rainbowwarrior
|
||||
|
||||
- title: National Geographic Magazine
|
||||
author: Terminal Veracity
|
||||
|
||||
- title: Something Awful
|
||||
author: atordo
|
||||
|
||||
- title: Huffington Post UK
|
||||
author: Krittika Goyal
|
||||
|
||||
- version: 0.8.56
|
||||
date: 2012-06-15
|
||||
|
||||
new features:
|
||||
- title: "Make the new calibre style default on Windows and OS X."
|
||||
type: major
|
||||
description: "This change gives a more 'modern' feel to the calibre user interface with focus highlighting, gradients, rounded corners, etc. In case you prefer the old look, you can restore under Preferences->Look & Feel->User interface style"
|
||||
|
||||
- title: "Get Books: Add the new SONY Reader store"
|
||||
|
||||
- title: "Read metadata from .docx (Microsoft Word) files"
|
||||
|
||||
- title: "Allow customizing the behavior of the searching for similar books by right clicking the book. You can now tell calibre to search different columns than the traditional author/series/publisher/tags/etc. in Preferences->Searching"
|
||||
|
||||
- title: "Add option to restore alternating row colors to the Tag Browser under Preferences->Look & Feel->Tag Browser"
|
||||
|
||||
- title: "Update to Qt 4.8.2 on windows compiled with link time code generation for a small performance boost"
|
||||
|
||||
bug fixes:
|
||||
- title: "Get Books: Update plugins to handle website changes at ebooks.com, project gutenberg, and virtualo"
|
||||
|
||||
- title: "AZW3 Output: Fix TOC at start option not working"
|
||||
|
||||
- title: "AZW3 Output: Close self closing script/style/title/head tags explicitly as they cause problems in webkit based renderers like the Kindle Fire and calibre's viewers."
|
||||
|
||||
- title: "Fix the current_library_name() template function not updating after a library switch"
|
||||
|
||||
- title: "AZW3 Output: Handle the case of a link pointing to the last line of text in the document."
|
||||
tickets: [1011330]
|
||||
|
||||
- title: "Fix regression in 0.8.55 that broke highlighting of items matching a search in the Tag Browser"
|
||||
tickets: [1011030]
|
||||
|
||||
- title: "News download: Handle query only relative URLs"
|
||||
|
||||
improved recipes:
|
||||
- Christian Science Monitor
|
||||
- Neue Zurcher Zeitung
|
||||
- Birmignham Post
|
||||
- Metro UK
|
||||
- New Musical Express
|
||||
- The Independent
|
||||
- The Daily Mirror
|
||||
- Vreme
|
||||
- Smithsonian Magazine
|
||||
|
||||
new recipes:
|
||||
- title: NZZ Webpaper
|
||||
author: Bernd Leinfelder
|
||||
|
||||
|
||||
- version: 0.8.55
|
||||
date: 2012-06-08
|
||||
|
||||
new features:
|
||||
- title: "Add a new 'Calibre style' interface look that is more modern than the default look. You can select it via Preferences->Look & Feel->User interface style."
|
||||
|
||||
- title: "New, subtler look for the Tag Browser"
|
||||
|
||||
- title: "Driver for Trekstor Pyrus and Pantech Android Tablet"
|
||||
tickets: [1008946, 1007929]
|
||||
|
||||
- title: "Conversion pipeline: Handle guide elements with incorrectly cased hrefs. Also handle guide elements of type coverimagestandard and thumbimagestandard."
|
||||
|
||||
- title: "Allow user to customize trekstor plugin to send books into sub directories."
|
||||
tickets: [1007646]
|
||||
|
||||
- title: "EPUB Input: Add support for EPUB files that use the IDPF font obfuscation algorithm. Apparently, people have started producing these now."
|
||||
tickets: [1008810]
|
||||
|
||||
- title: "Save single format to disk: Only show the format available in the selected books."
|
||||
tickets: [1007287]
|
||||
|
||||
bug fixes:
|
||||
- title: "MOBI Output: When using the insert metadata at start of book option, do not use a table to layout the metadata, as the Kindle Fire crashes when rendering the table."
|
||||
tickets: [1002119]
|
||||
|
||||
- title: "Device detection: Fix a bug that could cause device detection to fail completely if devices with certain vendor/product ids are connected."
|
||||
tickets: [1009718]
|
||||
|
||||
- title: "MOBI Output: When rasterizing svgs only compute style information when an actual svg image is present. Small speedup when converting large svg-free documents to MOBI."
|
||||
|
||||
- title: "SONY T1 driver: Fix support for collections of books placed on the SD card"
|
||||
tickets: [986044]
|
||||
|
||||
- title: "Fix partitioning problems in tag browser with fields that have no name, such as identifiers and formats"
|
||||
|
||||
- title: "Welcome wizard: Preferentially use the kindle email address set as default when more than one such address exists."
|
||||
tickets: [1007932 ]
|
||||
|
||||
- title: "Fix regression in 0.8.54 that broke the use of the shortcut Alt+A to select books by the same author"
|
||||
|
||||
improved recipes:
|
||||
- Various Polish recipes
|
||||
- Vice Magazine
|
||||
- EL Mundo Today
|
||||
- Haaretz
|
||||
- Good Housekeeping
|
||||
- El Pais
|
||||
- Christian Science Monitor
|
||||
- Marketing Magazine
|
||||
- Instapaper
|
||||
|
||||
new recipes:
|
||||
- title: Various Philippine news sources
|
||||
author: jde
|
||||
|
||||
- title: Natemat.pl and wirtualnemedia.pl
|
||||
author: fenuks
|
||||
|
||||
- title: Rabble.ca
|
||||
author: timtoo
|
||||
|
||||
- version: 0.8.54
|
||||
date: 2012-05-31
|
||||
|
||||
new features:
|
||||
- title: "E-book viewer: The Table of contents panel now tracks the current position in the book. As you scroll through the book, the entry you are currently on is highlighted."
|
||||
type: major
|
||||
description: "To see this feature in action, open the Table of Contents panel in the viewer by clicking the button with three blue lines on it. As you page through the book, the chapter you are reading currently is highlighted in the Table of Contents Panel. Obviously, this will only work if the book you are reading has a Table of Contents. You can also use the Ctrl+PgUp and Ctrl+PgDn keys to quickly skip between chapters."
|
||||
|
||||
- title: "calibredb: Allow setting metadata for individual fields with the set_metadata command"
|
||||
|
||||
- title: "Make it a little harder to accidentally change the sorting of items in the Tag Browser. Also frees up more vertical space for the Tag Browser itself."
|
||||
|
||||
- title: "The calibre user manual is now available in AZW3 format as well as EPUB"
|
||||
|
||||
bug fixes:
|
||||
- title: "Automatic titlecasing: No longer try to capitalize scottish names, as there are too many special cases."
|
||||
tickets: [775825]
|
||||
|
||||
- title: "Never crash when reading metadata from PDF files (reading now always happens in a worker process)"
|
||||
tickets: [1006452]
|
||||
|
||||
- title: "EPUB Input: Do no skip the valid children of an NCX node that has no text/href"
|
||||
|
||||
- title: "Archos driver: Detect SD card"
|
||||
tickets: [1005650]
|
||||
|
||||
- title: "When bulk downloading metadata and the user deletes one of the books for which metadata is being downloaded, just ignore it, instead of erroring out"
|
||||
|
||||
- title: "When deleting books from the bottom of the booklist, ensure that the bottom book after deleting is selected"
|
||||
|
||||
- title: "Fix regression in 0.8.53 that broke sending APNX files to older Kindle devices"
|
||||
|
||||
- title: "Use correct text color for selected rows in the list of matches when downloading metadata and showing results in get books."
|
||||
tickets: [1004568]
|
||||
|
||||
improved recipes:
|
||||
- The Independent
|
||||
- Welt der Physik
|
||||
- China Daily
|
||||
- The Grid
|
||||
- Prospect Magazine
|
||||
|
||||
new recipes:
|
||||
- title: La gazetta del Mezzogiorno
|
||||
author: faber1971
|
||||
|
||||
- version: 0.8.53
|
||||
date: 2012-05-25
|
||||
|
||||
new features:
|
||||
- title: "Kindle Touch/4 driver: Upload cover thumbnails when sending books to device by USB to workaround Amazon bug of not displaying covers for sync-enabled books"
|
||||
|
||||
- title: "Support for updating metadata in FB2 files"
|
||||
|
||||
- title: "Set a different background color when choosing formats to not delete as opposed to choosing format to delete."
|
||||
tickets: [ 1001741 ]
|
||||
|
||||
- title: "E-book viewer: Add an option to prevent the up and down arrow keys from scrolling past page breaks"
|
||||
|
||||
- title: "Get Books: Remove ebookshoppe.com at the website's request"
|
||||
|
||||
bug fixes:
|
||||
- title: "PDF Input: Support image rotation commands in PDF files. Fixes the long standing problem of some images being flipped when converting from PDF in calibre."
|
||||
|
||||
- title: "Fix a regression in 0.8.51 that caused conversion to HTMLZ to not have any CSS"
|
||||
|
||||
- title: "Get Books: Fix website change at kobo.com causing prices not to be found"
|
||||
|
||||
- title: "Edit the time in the 24 hour clock when calibre's interface language is set to German."
|
||||
tickets: [ 1001809 ]
|
||||
|
||||
- title: "MOBI Output: When generating joint KF8/MOBI6 .mobi files set the text length field in the MOBI 6 header correctly. "
|
||||
tickets: [ 1003489 ]
|
||||
|
||||
- title: "ODT Input: More workarounds for LibreOffice 3.5's habit of inserting pointless margin:100% directives everywhere."
|
||||
tickets: [ 1002702 ]
|
||||
|
||||
- title: "Fix regression that broke smarten punctuation when quotes were next to html tags."
|
||||
tickets: [ 998900 ]
|
||||
|
||||
- title: "Fix published date from ozon.ru wrong in some timezones"
|
||||
tickets: [ 975338 ]
|
||||
|
||||
- title: "Catalogs: Handle the use of custom columns with non-ascii names correctly"
|
||||
tickets: [1001437]
|
||||
|
||||
- title: "Conversion pipeline: Remove the attempt to detect and autocorrect if text will go off the left edge of the page, as it was a rather crude heuristic. Also do not remove fake margins if the book uses negative text indents on the margined elements."
|
||||
|
||||
- title: "KF8 Output: Set offsets to tags in the skeleton the same way kindlegen does. Also linearize non linear ToCs to ensure section to section jumping works."
|
||||
|
||||
- title: "Conversion pipeline: Use correct default value of 'inherit' for font-family and font-size when normalizing the shorthand font property."
|
||||
|
||||
- title: "When running python scripts via calibre-debug ensure that user plugins are loaded"
|
||||
|
||||
improved recipes:
|
||||
- Business Week Magazine
|
||||
- Metro Nieuws NL
|
||||
|
||||
new recipes:
|
||||
- title: Attac.es
|
||||
author: Marc Busque
|
||||
|
||||
- title: Drytooling.com
|
||||
author: Damian Granowski
|
||||
|
||||
- title: Shortlist.com
|
||||
author: Dave ASbury
|
||||
|
||||
- title: National Geographic (es)
|
||||
author: vakya
|
||||
|
||||
- version: 0.8.52
|
||||
date: 2012-05-18
|
||||
|
||||
new features:
|
||||
- title: "EPUB Input: When setting the cover for a book that identifies its cover image, but not the html wrapper around the cover, try to detect and remove that wrapper automatically."
|
||||
tickets: [ 999959 ]
|
||||
|
||||
- title: "When deleting books of a specific format, show the number of books with each format available"
|
||||
|
||||
- title: "Linux install: No longer create MAN pages as all utilities have more comprehensive command line --help anyway"
|
||||
|
||||
- title: "Add a tweak Preferences->Tweaks to control the default choice of format for the Tweak Book feature"
|
||||
|
||||
- title: "Conversion: Allow setting negative page margins. A negative page margin means that calibre will not specify any page margin in the output document (for formats that support this)"
|
||||
|
||||
bug fixes:
|
||||
- title: "Tweak book: Fix handling of covers when tweaking KF8 books"
|
||||
|
||||
- title: "KF8 Output: Handle input documents with out of sequence ToC entries. Note that currently section jumping in the KF8 output produced by calibre for such files does not work."
|
||||
tickets: [1000493]
|
||||
|
||||
- title: "Edit metadata dialog: Fix the edit values button for custom tag-like columns showing a unneeded warning about changed values"
|
||||
|
||||
- title: "EPUB Output: Be a little more conservative when removing <form> tags. Only remove them if they have actual forms inside. "
|
||||
tickets: [ 1000384 ]
|
||||
|
||||
- title: "EPUB Input: Correctly update the Cover entry in the ToC even when the entry has a fragment reference. "
|
||||
tickets: [ 999973 ]
|
||||
|
||||
- title: "Update ImagMagick DLLs in all calibre binary builds to fix security vulnerabilities in ImageMagick"
|
||||
tickets: [ 999496 ]
|
||||
|
||||
- title: "Advanced search dialog: Fix equals and regex matching not being applied for custom column searches."
|
||||
tickets: [ 980221 ]
|
||||
|
||||
- title: "RTF Input: Handle old RTF files that have commands without braces."
|
||||
tickets: [ 994133 ]
|
||||
|
||||
- title: "Get Books: Diesel, fix results not showing when only a single match is found"
|
||||
|
||||
- title: "Get Books: Fix DRM status indicators for Kobo and Diesel stores. Fix smashwords not returning results."
|
||||
tickets: [ 993755 ]
|
||||
|
||||
- title: "Fix regression in 0.8.51 that broke viewing of LIT and some EPUB files"
|
||||
tickets: [998248, 998216]
|
||||
|
||||
improved recipes:
|
||||
- Clarin
|
||||
- Spiegel
|
||||
- Spiegel International
|
||||
- Montreal Gazette
|
||||
- Gosc Niedzelny
|
||||
- Ars Technica
|
||||
|
||||
new recipes:
|
||||
- title: "Army/Navy/Air force/Marine Times and News busters"
|
||||
author: jde
|
||||
|
||||
- title: "Ads of the World, Heavy Meta (Italian) and Juve La Stampa"
|
||||
author: faber1971
|
||||
|
||||
- title: "Revista Summa"
|
||||
author: Vakya
|
||||
|
||||
- title: "Strategic culture"
|
||||
author: Darko Miletic
|
||||
|
||||
- title: Stars and Stripes
|
||||
author: adoucette
|
||||
|
||||
- title: Nackdenkseiten
|
||||
author: jrda
|
||||
|
||||
|
||||
- version: 0.8.51
|
||||
date: 2012-05-11
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
import sys, os
|
||||
|
||||
# If your extensions are in another directory, add it here.
|
||||
sys.path.append(os.path.abspath('../../../'))
|
||||
sys.path.append(os.path.abspath('../src'))
|
||||
sys.path.append(os.path.abspath('.'))
|
||||
__appname__ = os.environ.get('__appname__', 'calibre')
|
||||
__version__ = os.environ.get('__version__', '0.0.0')
|
||||
@ -98,7 +98,7 @@ html_favicon = 'favicon.ico'
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the built-in static files,
|
||||
# so a file named "default.css" will overwrite the built-in "default.css".
|
||||
html_static_path = ['resources', '../../../icons/favicon.ico']
|
||||
html_static_path = ['resources', '../icons/favicon.ico']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
@ -669,7 +669,6 @@ Some limitations of PDF input are:
|
||||
* Complex, multi-column, and image based documents are not supported.
|
||||
* Extraction of vector images and tables from within the document is also not supported.
|
||||
* Some PDFs use special glyphs to represent ll or ff or fi, etc. Conversion of these may or may not work depending on just how they are represented internally in the PDF.
|
||||
* Some PDFs store their images upside down with a rotation instruction, |app| currently doesn't support that instruction, so the images will be rotated in the output as well.
|
||||
* Links and Tables of Contents are not supported
|
||||
* PDFs that use embedded non-unicode fonts to represent non-English characters will result in garbled output for those characters
|
||||
* Some PDFs are made up of photographs of the page with OCRed text behind them. In such cases |app| uses the OCRed text, which can be very different from what you see when you view the PDF file
|
@ -15,7 +15,7 @@ Here, we will teach you how to create your own plugins to add new features to |a
|
||||
:depth: 2
|
||||
:local:
|
||||
|
||||
.. note:: This only applies to calibre releases >= 0.7.53
|
||||
.. note:: This only applies to calibre releases >= 0.8.60
|
||||
|
||||
Anatomy of a |app| plugin
|
||||
---------------------------
|
||||
@ -32,11 +32,15 @@ and enter the following Python code into it:
|
||||
.. literalinclude:: plugin_examples/helloworld/__init__.py
|
||||
:lines: 10-
|
||||
|
||||
That's all. To add this code to |app| as a plugin, simply create a zip file with::
|
||||
That's all. To add this code to |app| as a plugin, simply run the following in
|
||||
the directory in which you created :file:`__init__.py`::
|
||||
|
||||
zip plugin.zip __init__.py
|
||||
calibre-customize -b .
|
||||
|
||||
Add this plugin to |app| via :guilabel:`Preferences->Plugins`.
|
||||
.. note::
|
||||
On OS X you have to first install the |app| command line tools, by
|
||||
going to :guilabel:`Preferences->Miscellaneous` and clicking the
|
||||
:guilabel:`Install command line tools` button.
|
||||
|
||||
You can download the Hello World plugin from
|
||||
`helloworld_plugin.zip <http://calibre-ebook.com/downloads/helloworld_plugin.zip>`_.
|
||||
@ -172,7 +176,7 @@ You can see the ``prefs`` object being used in main.py:
|
||||
:pyobject: DemoDialog.config
|
||||
|
||||
|
||||
The different types of plugins
|
||||
The plugin API
|
||||
--------------------------------
|
||||
|
||||
As you may have noticed above, a plugin in |app| is a class. There are different classes for the different types of plugins in |app|.
|
||||
@ -191,14 +195,12 @@ When running from the command line, debug output will be printed to the console,
|
||||
|
||||
You can insert print statements anywhere in your plugin code, they will be output in debug mode. Remember, this is python, you really shouldn't need anything more than print statements to debug ;) I developed all of |app| using just this debugging technique.
|
||||
|
||||
It can get tiresome to keep re-adding a plugin to calibre to test small changes. The plugin zip files are stored in the calibre config directory in plugins/ (goto Preferences->Misc and click open config directory to see the config directory).
|
||||
You can quickly test changes to your plugin by using the following command
|
||||
line::
|
||||
|
||||
Once you've located the zip file of your plugin you can then directly update it with your changes instead of re-adding it each time. To do so from the command line, in the directory that contains your plugin source code, use::
|
||||
calibre-debug -s; calibre-customize -b /path/to/your/plugin/directory; calibre
|
||||
|
||||
calibre -s; sleep 4s; zip -R /path/to/plugin/zip/file.zip *; calibre
|
||||
|
||||
This will shutdown a running calibre. Wait for the shutdown to complete, then update your plugin files and relaunch calibre.
|
||||
It relies on the freely available zip command line tool.
|
||||
This will shutdown a running calibre, wait for the shutdown to complete, then update your plugin in |app| and relaunch |app|.
|
||||
|
||||
More plugin examples
|
||||
----------------------
|
@ -5,9 +5,9 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
import sys, os, re, textwrap
|
||||
|
||||
sys.path.insert(0, os.path.abspath('../../'))
|
||||
sys.extensions_location = '../plugins'
|
||||
sys.resources_location = '../../../resources'
|
||||
sys.path.insert(0, os.path.abspath('../src'))
|
||||
sys.extensions_location = '../src/calibre/plugins'
|
||||
sys.resources_location = '../resources'
|
||||
|
||||
from sphinx.util.console import bold
|
||||
|
||||
@ -116,44 +116,42 @@ def generate_ebook_convert_help(preamble, info):
|
||||
from calibre.utils.logging import default_log
|
||||
preamble = re.sub(r'http.*\.html', ':ref:`conversion`', preamble)
|
||||
raw = preamble + textwrap.dedent('''
|
||||
Since the options supported by ebook-convert vary depending on both the
|
||||
input and the output formats, the various combinations are listed below:
|
||||
The options and default values for the options change depending on both the
|
||||
input and output formats, so you should always check with::
|
||||
|
||||
ebook-convert myfile.input_format myfile.output_format -h
|
||||
|
||||
Below are the options that are common to all conversion, followed by the
|
||||
options specific to every input and output format
|
||||
|
||||
''')
|
||||
toc = {}
|
||||
sec_templ = textwrap.dedent('''\
|
||||
.. include:: ../global.rst
|
||||
|
||||
{0}
|
||||
================================================================
|
||||
|
||||
.. contents:: Contents
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
''')
|
||||
for i, ip in enumerate(input_format_plugins()):
|
||||
sraw = sec_templ.format(ip.name)
|
||||
toc[ip.name] = 'ebook-convert-%d'%i
|
||||
for op in output_format_plugins():
|
||||
title = ip.name + ' to ' + op.name
|
||||
parser, plumber = create_option_parser(['ebook-convert',
|
||||
'dummyi.'+list(ip.file_types)[0],
|
||||
'dummyo.'+op.file_type, '-h'], default_log)
|
||||
cmd = 'ebook-convert '+list(ip.file_types)[0]+' '+op.file_type
|
||||
'dummyi.mobi', 'dummyo.epub', '-h'], default_log)
|
||||
groups = [(None, None, parser.option_list)]
|
||||
for grp in parser.option_groups:
|
||||
groups.append((grp.title, grp.description, grp.option_list))
|
||||
options = '\n'.join(render_options(cmd, groups, False))
|
||||
sraw += title+'\n------------------------------------------------------\n\n'
|
||||
sraw += options + '\n\n'
|
||||
update_cli_doc(os.path.join('cli', toc[ip.name]+'.rst'), sraw, info)
|
||||
if grp.title not in {'INPUT OPTIONS', 'OUTPUT OPTIONS'}:
|
||||
groups.append((grp.title.title(), grp.description, grp.option_list))
|
||||
options = '\n'.join(render_options('ebook-convert', groups, False))
|
||||
|
||||
raw += '\n\n.. contents::\n :local:'
|
||||
|
||||
raw += '\n\n' + options
|
||||
for pl in sorted(input_format_plugins(), key=lambda x:x.name):
|
||||
parser, plumber = create_option_parser(['ebook-convert',
|
||||
'dummyi.'+list(pl.file_types)[0], 'dummyo.epub', '-h'], default_log)
|
||||
groups = [(pl.name+ ' Options', '', g.option_list) for g in
|
||||
parser.option_groups if g.title == "INPUT OPTIONS"]
|
||||
prog = 'ebook-convert-'+(pl.name.lower().replace(' ', '-'))
|
||||
raw += '\n\n' + '\n'.join(render_options(prog, groups, False, True))
|
||||
for pl in sorted(output_format_plugins(), key=lambda x: x.name):
|
||||
parser, plumber = create_option_parser(['ebook-convert', 'd.epub',
|
||||
'dummyi.'+pl.file_type, '-h'], default_log)
|
||||
groups = [(pl.name+ ' Options', '', g.option_list) for g in
|
||||
parser.option_groups if g.title == "OUTPUT OPTIONS"]
|
||||
prog = 'ebook-convert-'+(pl.name.lower().replace(' ', '-'))
|
||||
raw += '\n\n' + '\n'.join(render_options(prog, groups, False, True))
|
||||
|
||||
toct = '\n\n.. toctree::\n :maxdepth: 2\n\n'
|
||||
for ip in sorted(toc):
|
||||
toct += ' ' + toc[ip]+'\n'
|
||||
|
||||
raw += toct+'\n\n'
|
||||
update_cli_doc(os.path.join('cli', 'ebook-convert.rst'), raw, info)
|
||||
|
||||
def update_cli_doc(path, raw, info):
|
@ -30,6 +30,7 @@ Environment variables
|
||||
* ``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)
|
||||
* ``CALIBRE_NO_NATIVE_FILEDIALOGS`` - Causes calibre to not use native file dialogs for selecting files/directories.
|
||||
* ``SYSFS_PATH`` - Use if sysfs is mounted somewhere other than /sys
|
||||
* ``http_proxy`` - Used on linux to specify an HTTP proxy
|
||||
|
||||
@ -39,7 +40,7 @@ Tweaks
|
||||
Tweaks are small changes that you can specify to control various aspects of |app|'s behavior. You can change them by going to Preferences->Advanced->Tweaks.
|
||||
The default values for the tweaks are reproduced below
|
||||
|
||||
.. literalinclude:: ../../../resources/default_tweaks.py
|
||||
.. literalinclude:: ../resources/default_tweaks.py
|
||||
|
||||
|
||||
Overriding icons, templates, et cetera
|
@ -45,6 +45,16 @@ All the |app| python code is in the ``calibre`` package. This package contains t
|
||||
The format independent code is all in ebooks.oeb and the format dependent code is in ebooks.format_name.
|
||||
|
||||
* Metadata reading, writing, and downloading is all in ebooks.metadata
|
||||
* Conversion happens in a pipeline, for the structure of the pipeline,
|
||||
see :ref:`conversion-introduction`. The pipeline consists of an input
|
||||
plugin, various transforms and an output plugin. The code constructs
|
||||
and drives the pipeline is in plumber.py. The pipeline works on a
|
||||
representation of an ebook that is like an unzipped epub, with
|
||||
manifest, spine, toc, guide, html content, etc. The
|
||||
class that manages this representation is OEBBook in oeb/base.py. The
|
||||
various transformations that are applied to the book during
|
||||
conversions live in `oeb/transforms/*.py`. And the input and output
|
||||
plugins live in `conversion/plugins/*.py`.
|
||||
|
||||
* library - The database back-end and the content server. See library.database2 for the interface to the |app| library. library.server is the |app| Content Server.
|
||||
* gui2 - The Graphical User Interface. GUI initialization happens in gui2.main and gui2.ui. The ebook-viewer is in gui2.viewer.
|
@ -69,6 +69,22 @@ If you have a hand edited TOC in the input document, you can use the TOC detecti
|
||||
|
||||
Finally, I encourage you to ditch the content TOC and only have a metadata TOC in your ebooks. Metadata TOCs will give the people reading your ebooks a much superior navigation experience (except on the Kindle, where they are essentially the same as a content TOC).
|
||||
|
||||
The covers for my MOBI files have stopped showing up in Kindle for PC/Kindle for Android/etc.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This is caused by a bug in the Amazon software. You can work around it by going
|
||||
to Preferences->Output Options->MOBI output and setting the "Enable sharing
|
||||
of book content" option. If you are reconverting a previously converted book,
|
||||
you will also have to enable the option in the conversion dialog for that
|
||||
individual book (as per book conversion settings are saved and take
|
||||
precedence).
|
||||
|
||||
Note that doing this will mean that the generated MOBI will show up under
|
||||
personal documents instead of Books on the Kindle Fire and Amazon whispersync
|
||||
will not work, but the covers will. It's your choice which functionality is
|
||||
more important to you. I encourage you to contact Amazon and ask them to fix
|
||||
this bug.
|
||||
|
||||
How do I convert a collection of HTML files in a specific order?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
In order to convert a collection of HTML files in a specific oder, you have to create a table of contents file. That is, another HTML file that contains links to all the other files in the desired order. Such a file looks like::
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
BIN
manual/images/added_books.png
Normal file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 662 B After Width: | Height: | Size: 662 B |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 724 B |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
@ -17,7 +17,7 @@ To get started with more advanced usage, you should read about the :ref:`Graphic
|
||||
|
||||
.. only:: online
|
||||
|
||||
**An ebook version of this user manual is available in** `EPUB format <calibre.epub>`_.
|
||||
**An ebook version of this user manual is available in** `EPUB format <calibre.epub>`_ and `AZW3 (Kindle Fire) format <calibre.azw3>`_.
|
||||
|
||||
Sections
|
||||
------------
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@ -245,7 +245,7 @@ The following functions are available in addition to those described in single-f
|
||||
* ``current_library_name() -- `` return the last name on the path to the current calibre library. This function can be called in template program mode using the template ``{:'current_library_name()'}``.
|
||||
* ``days_between(date1, date2)`` -- return the number of days between ``date1`` and ``date2``. The number is positive if ``date1`` is greater than ``date2``, otherwise negative. If either ``date1`` or ``date2`` are not dates, the function returns the empty string.
|
||||
* ``divide(x, y)`` -- returns x / y. Throws an exception if either x or y are not numbers.
|
||||
* ``eval(string)`` -- evaluates the string as a program, passing the local variables (those ``assign`` ed to). This permits using the template processor to construct complex results from local variables. Because the `{` and `}` characters are special, you must use `[[` for the `{` character and `]]` for the '}' character; they are converted automatically. Note also that prefixes and suffixes (the "|prefix|suffix" syntax) cannot be used in the argument to this function when using template program mode.
|
||||
* ``eval(string)`` -- evaluates the string as a program, passing the local variables (those ``assign`` ed to). This permits using the template processor to construct complex results from local variables. Because the `{` and `}` characters are special, you must use `[[` for the `{` character and `]]` for the '}' character; they are converted automatically. Note also that prefixes and suffixes (the `|prefix|suffix` syntax) cannot be used in the argument to this function when using template program mode.
|
||||
* ``field(name)`` -- returns the metadata field named by ``name``.
|
||||
* ``first_non_empty(value, value, ...)`` -- returns the first value that is not empty. If all values are empty, then the empty value is returned. You can have as many values as you want.
|
||||
* ``format_date(x, date_format)`` -- format_date(val, format_string) -- format the value, which must be a date field, using the format_string, returning a string. The formatting codes are::
|
||||
@ -306,7 +306,7 @@ The following functions are available in addition to those described in single-f
|
||||
* ``substr(str, start, end)`` -- returns the ``start``'th through the ``end``'th characters of ``str``. The first character in ``str`` is the zero'th character. If end is negative, then it indicates that many characters counting from the right. If end is zero, then it indicates the last character. For example, ``substr('12345', 1, 0)`` returns ``'2345'``, and ``substr('12345', 1, -1)`` returns ``'234'``.
|
||||
* ``subtract(x, y)`` -- returns x - y. Throws an exception if either x or y are not numbers.
|
||||
* ``today()`` -- return a date string for today. This value is designed for use in format_date or days_between, but can be manipulated like any other string. The date is in ISO format.
|
||||
* ``template(x)`` -- evaluates x as a template. The evaluation is done in its own context, meaning that variables are not shared between the caller and the template evaluation. Because the `{` and `}` characters are special, you must use `[[` for the `{` character and `]]` for the '}' character; they are converted automatically. For example, ``template('[[title_sort]]') will evaluate the template ``{title_sort}`` and return its value. Note also that prefixes and suffixes (the "|prefix|suffix" syntax) cannot be used in the argument to this function when using template program mode.
|
||||
* ``template(x)`` -- evaluates x as a template. The evaluation is done in its own context, meaning that variables are not shared between the caller and the template evaluation. Because the `{` and `}` characters are special, you must use `[[` for the `{` character and `]]` for the '}' character; they are converted automatically. For example, ``template('[[title_sort]]') will evaluate the template ``{title_sort}`` and return its value. Note also that prefixes and suffixes (the `|prefix|suffix` syntax) cannot be used in the argument to this function when using template program mode.
|
||||
|
||||
.. _template_functions_reference:
|
||||
|
@ -55,7 +55,7 @@ The python implementation of the template functions is passed in a Metadata obje
|
||||
|
||||
The set of standard metadata fields.
|
||||
|
||||
.. literalinclude:: ../ebooks/metadata/book/__init__.py
|
||||
.. literalinclude:: ../src/calibre/ebooks/metadata/book/__init__.py
|
||||
:lines: 7-
|
||||
'''
|
||||
|
@ -1,6 +1,7 @@
|
||||
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2009-2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
__copyright__ = '2009-2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
|
||||
'''
|
||||
24sata.rs
|
||||
@ -21,26 +22,29 @@ class Ser24Sata(BasicNewsRecipe):
|
||||
encoding = 'utf-8'
|
||||
use_embedded_content = False
|
||||
language = 'sr'
|
||||
publication_type = 'newspaper'
|
||||
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: serif1, serif}'
|
||||
publication_type = 'newsportal'
|
||||
extra_css = """
|
||||
@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)}
|
||||
body{font-family: serif1, serif}
|
||||
"""
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
, 'tags' : category
|
||||
, 'publisher': publisher
|
||||
, 'language' : language
|
||||
, 'linearize_tables' : True
|
||||
}
|
||||
|
||||
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
|
||||
|
||||
feeds = [(u'Vesti Dana', u'http://www.24sata.rs/rss.php')]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
return self.adeify_images(soup)
|
||||
feeds = [
|
||||
(u'Vesti' , u'http://www.24sata.rs/rss/vesti.xml' ),
|
||||
(u'Sport' , u'http://www.24sata.rs/rss/sport.xml' ),
|
||||
(u'Šou' , u'http://www.24sata.rs/rss/sou.xml' ),
|
||||
(u'Specijal', u'http://www.24sata.rs/rss/specijal.xml'),
|
||||
(u'Novi Sad', u'http://www.24sata.rs/rss/ns.xml' )
|
||||
]
|
||||
|
||||
def print_version(self, url):
|
||||
article = url.partition('#')[0]
|
||||
article_id = article.partition('id=')[2]
|
||||
return 'http://www.24sata.rs/_print.php?id=' + article_id
|
||||
|
||||
dpart, spart, apart = url.rpartition('/')
|
||||
return dpart + '/print/' + apart
|
||||
|
@ -1,5 +1,5 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
__copyright__ = '2010-2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
abc.com.py
|
||||
'''
|
||||
@ -7,7 +7,7 @@ abc.com.py
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class ABC_py(BasicNewsRecipe):
|
||||
title = 'ABC digital'
|
||||
title = 'ABC Color'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'Noticias de Paraguay y el resto del mundo'
|
||||
publisher = 'ABC'
|
||||
@ -15,12 +15,16 @@ class ABC_py(BasicNewsRecipe):
|
||||
oldest_article = 2
|
||||
max_articles_per_feed = 200
|
||||
no_stylesheets = True
|
||||
encoding = 'cp1252'
|
||||
encoding = 'utf8'
|
||||
use_embedded_content = False
|
||||
language = 'es_PY'
|
||||
remove_empty_feeds = True
|
||||
masthead_url = 'http://www.abc.com.py/plantillas/img/abc-logo.png'
|
||||
publication_type = 'newspaper'
|
||||
extra_css = ' body{font-family: Arial,Helvetica,sans-serif } img{margin-bottom: 0.4em} '
|
||||
extra_css = """
|
||||
body{font-family: UnitSlabProMedium,"Times New Roman",serif }
|
||||
img{margin-bottom: 0.4em; display: block;}
|
||||
"""
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
@ -29,21 +33,19 @@ class ABC_py(BasicNewsRecipe):
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
remove_tags = [dict(name=['form','iframe','embed','object','link','base','table']),dict(attrs={'class':'toolbox'})]
|
||||
remove_tags_after = dict(attrs={'class':'date'})
|
||||
keep_only_tags = [dict(attrs={'class':'zcontent'})]
|
||||
remove_tags = [
|
||||
dict(name=['form','iframe','embed','object','link','base','table']),
|
||||
dict(attrs={'class':['es-carousel-wrapper']}),
|
||||
dict(attrs={'id':['tools','article-banner-1']})
|
||||
]
|
||||
keep_only_tags = [dict(attrs={'id':'article'})]
|
||||
|
||||
|
||||
feeds = [
|
||||
(u'Ultimo momento' , u'http://www.abc.com.py/ultimo-momento.xml' )
|
||||
,(u'Nacionales' , u'http://www.abc.com.py/nacionales.xml' )
|
||||
,(u'Internacionales' , u'http://www.abc.com.py/internacionales.xml' )
|
||||
,(u'Deportes' , u'http://www.abc.com.py/deportes.xml' )
|
||||
,(u'Espectaculos' , u'http://www.abc.com.py/espectaculos.xml' )
|
||||
,(u'Ciencia y Tecnologia', u'http://www.abc.com.py/ciencia-y-tecnologia.xml')
|
||||
(u'Ultimo momento', u'http://www.abc.com.py/rss.xml' )
|
||||
,(u'Nacionales' , u'http://www.abc.com.py/nacionales/rss.xml' )
|
||||
,(u'Mundo' , u'http://www.abc.com.py/internacionales/rss.xml')
|
||||
,(u'Deportes' , u'http://www.abc.com.py/deportes/rss.xml' )
|
||||
,(u'Espectaculos' , u'http://www.abc.com.py/espectaculos/rss.xml' )
|
||||
,(u'TecnoCiencia' , u'http://www.abc.com.py/ciencia/rss.xml' )
|
||||
]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
return soup
|
||||
|
26
recipes/ads_of_the_world.recipe
Normal file
@ -0,0 +1,26 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class AdvancedUserRecipe1336986047(BasicNewsRecipe):
|
||||
title = u'Ads of the World'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
auto_cleanup = False
|
||||
description = 'The best international advertising campaigns'
|
||||
language = 'en'
|
||||
__author__ = 'faber1971'
|
||||
|
||||
no_stylesheets = True
|
||||
keep_only_tags = [
|
||||
dict(name='div', attrs={'id':'primary'})
|
||||
]
|
||||
|
||||
remove_tags = [
|
||||
dict(name='ul', attrs={'class':'links inline'})
|
||||
,dict(name='div', attrs={'class':'form-item'})
|
||||
,dict(name='div', attrs={'id':['options', 'comments']})
|
||||
,dict(name='ul', attrs={'id':'nodePager'})
|
||||
]
|
||||
|
||||
reverse_article_order = True
|
||||
masthead_url = 'http://bigcatgroup.co.uk/files/2011/01/05-ads-of-the-world.png'
|
||||
feeds = [(u'Ads of the world', u'http://feeds.feedburner.com/adsoftheworld-latest')]
|
@ -1,5 +1,5 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2009-2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
__copyright__ = '2009-2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
www.adventuregamers.com
|
||||
'''
|
||||
@ -14,24 +14,24 @@ class AdventureGamers(BasicNewsRecipe):
|
||||
publisher = 'Adventure Gamers'
|
||||
category = 'news, games, adventure, technology'
|
||||
oldest_article = 10
|
||||
delay = 10
|
||||
#delay = 10
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
encoding = 'cp1252'
|
||||
encoding = 'utf8'
|
||||
remove_javascript = True
|
||||
use_embedded_content = False
|
||||
INDEX = u'http://www.adventuregamers.com'
|
||||
extra_css = """
|
||||
.pageheader_type{font-size: x-large; font-weight: bold; color: #828D74}
|
||||
.pageheader_title{font-size: xx-large; color: #394128}
|
||||
.pageheader_title,.page_title{font-size: xx-large; color: #394128}
|
||||
.pageheader_byline{font-size: small; font-weight: bold; color: #394128}
|
||||
.score_bg {display: inline; width: 100%; margin-bottom: 2em}
|
||||
.score_column_1{ padding-left: 10px; font-size: small; width: 50%}
|
||||
.score_column_2{ padding-left: 10px; font-size: small; width: 50%}
|
||||
.score_column_3{ padding-left: 10px; font-size: small; width: 50%}
|
||||
.score_header{font-size: large; color: #50544A}
|
||||
.bodytext{display: block}
|
||||
body{font-family: Helvetica,Arial,sans-serif}
|
||||
img{margin-bottom: 1em;}
|
||||
body{font-family: 'Open Sans',Helvetica,Arial,sans-serif}
|
||||
"""
|
||||
|
||||
conversion_options = {
|
||||
@ -41,27 +41,29 @@ class AdventureGamers(BasicNewsRecipe):
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
keep_only_tags = [
|
||||
dict(name='div', attrs={'class':'content_middle'})
|
||||
]
|
||||
|
||||
keep_only_tags = [dict(name='div', attrs={'class':'cleft_inn'})]
|
||||
remove_tags = [
|
||||
dict(name=['object','link','embed','form'])
|
||||
,dict(name='div', attrs={'class':['related-stories','article_leadout','prev','next','both']})
|
||||
dict(name=['object','link','embed','form','iframe','meta'])
|
||||
,dict(name='a', attrs={'href':'http://www.adventuregamers.com/about/scoring'})
|
||||
,dict(name='a', attrs={'href':'http://www.adventuregamers.com/about/policies'})
|
||||
]
|
||||
|
||||
remove_tags_after = [dict(name='div', attrs={'class':'toolbar_fat'})]
|
||||
remove_tags_after = [dict(name='div', attrs={'class':'bodytext'})]
|
||||
remove_attributes = ['width','height']
|
||||
|
||||
feeds = [(u'Articles', u'http://feeds2.feedburner.com/AdventureGamers')]
|
||||
feeds = [(u'Articles', u'http://www.adventuregamers.com/rss/')]
|
||||
|
||||
def get_article_url(self, article):
|
||||
return article.get('guid', None)
|
||||
url = BasicNewsRecipe.get_article_url(self, article)
|
||||
if '/videos/' in url or '/hypeometer/' in url:
|
||||
return None
|
||||
return url
|
||||
|
||||
def append_page(self, soup, appendtag, position):
|
||||
pager = soup.find('div',attrs={'class':'toolbar_fat_next'})
|
||||
pager = soup.find('div', attrs={'class':'pagination_big'})
|
||||
if pager:
|
||||
nexturl = self.INDEX + pager.a['href']
|
||||
nextpage = soup.find('a', attrs={'class':'next-page'})
|
||||
if nextpage:
|
||||
nexturl = nextpage['href']
|
||||
soup2 = self.index_to_soup(nexturl)
|
||||
texttag = soup2.find('div', attrs={'class':'bodytext'})
|
||||
for it in texttag.findAll(style=True):
|
||||
@ -69,6 +71,7 @@ class AdventureGamers(BasicNewsRecipe):
|
||||
newpos = len(texttag.contents)
|
||||
self.append_page(soup2,texttag,newpos)
|
||||
texttag.extract()
|
||||
pager.extract()
|
||||
appendtag.insert(position,texttag)
|
||||
|
||||
|
||||
@ -78,7 +81,7 @@ class AdventureGamers(BasicNewsRecipe):
|
||||
for item in soup.findAll('div', attrs={'class':'floatright'}):
|
||||
item.extract()
|
||||
self.append_page(soup, soup.body, 3)
|
||||
pager = soup.find('div',attrs={'class':'toolbar_fat'})
|
||||
pager = soup.find('div',attrs={'class':'pagination_big'})
|
||||
if pager:
|
||||
pager.extract()
|
||||
return self.adeify_images(soup)
|
||||
|