mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge from trunk
This commit is contained in:
commit
584b8bfa29
114
Changelog.yaml
114
Changelog.yaml
@ -4,6 +4,120 @@
|
||||
# for important features/bug fixes.
|
||||
# Also, each release can have new and improved recipes.
|
||||
|
||||
- version: 0.7.40
|
||||
date: 2011-01-14
|
||||
|
||||
new features:
|
||||
- title: "A new 'highlight matches' search mode"
|
||||
description: >
|
||||
"There is now a checkbox next to the search bar named 'Highlight'. If you check it, searching will highlight
|
||||
all matched books instead of filtering the book list to all matched books."
|
||||
|
||||
- title: "RTF Input: Improved support for conversion of images. The bug where some images were shrunk should no longer happen"
|
||||
|
||||
- title: "Template language: Allow you to create your own formatting functions. Accessible via Preferences->Advanced->Template functions"
|
||||
|
||||
- title: "News download: Convert various HTML 5 tags into <div> to support readers that cannot handle HTML 5 tags"
|
||||
|
||||
- title: "RTF metadata: Add support for publisher and tags."
|
||||
tickets: [6657]
|
||||
|
||||
- title: "BibTeX catalog: Add support for custom columns"
|
||||
|
||||
- title: "TXT Input: Support for textile markup"
|
||||
|
||||
- title: "Various minor tweaks to improve usability of Preferences->Plugins"
|
||||
|
||||
- title: "TXT Output: Convert <hr> to scene break marker."
|
||||
|
||||
- title: "Support for the Archos 70"
|
||||
|
||||
- title: "SONY Driver: Add an option to automatically refresh the covers on every connect. Accessible via: Preferences->Plugins->Device interface plugins"
|
||||
|
||||
- title: "Add access to the larger template editor from plugboards via context menu."
|
||||
|
||||
- title: "Speed improvement when connecting a large library to a device"
|
||||
|
||||
- title: "Speedup when searching on multiple words in a large library"
|
||||
|
||||
- title: "TXT Input: Add a heauristic formatting processor"
|
||||
|
||||
|
||||
bug fixes:
|
||||
- title: "Fix bug that caused automatic news removal to remove any book that has a tag that contains the word 'news' instead of only books that have the tag News"
|
||||
|
||||
- title: "Refactor the downloading social metadata message box to allow canceling."
|
||||
tickets: [8234]
|
||||
|
||||
- title: "Kobo drive does not deal with Null value in DateCreated column"
|
||||
tickets: [8308]
|
||||
|
||||
- title: "MOBI Input: Fix regression that caused images placed inside svg tags to be discarded"
|
||||
|
||||
- title: "Fix selecting Tablet output profile would actually select the Samsung Galaxy S profile"
|
||||
|
||||
- title: "Catalog generation: Fix a condition that could cause TOCs to not be properly generated in MOBI format catalogs"
|
||||
tickets: [8295]
|
||||
|
||||
- title: "Zip file reading: Be more tolerant when a zip file has a damaged file directory"
|
||||
|
||||
- title: "RTF Input: Various code cleanups. Go back to trying to handle unicode mappings without pre-processing. This will mean that some RTF files that used to convert, won't anymore. Please open tickets and attach them."
|
||||
tickets: [8171]
|
||||
|
||||
- title: "ImageMagick: When identifying an image don't read the entire image"
|
||||
|
||||
- title: "FB2 Output: Add cover to FB2 metadata."
|
||||
|
||||
- title: "Fix inability to customize builting recipe when more than one recipe has the same name"
|
||||
tickets: [8281]
|
||||
|
||||
- title: "RTF Input: Fix regression that broke the Preprocess HTML option"
|
||||
|
||||
- title: "Fix XSS vulnerability in content server."
|
||||
tickets: [7980]
|
||||
|
||||
- title: "TXT Output: Clean up and produce consistant output. Spacing around headings. Headings are not indented when using the remove paragraph spacing option."
|
||||
|
||||
- title: "Catalog generation: Handle invalid covers gracefully"
|
||||
|
||||
- title: "Email settings: Before displaying the email test dialog warn the user that it will expose their email password"
|
||||
|
||||
- title: "PDB Output: Fix regression that caused some PDB files to not work with other software"
|
||||
tickets: [8231]
|
||||
|
||||
improved recipes:
|
||||
- Financial Times UK
|
||||
- Globe and Mail
|
||||
- Wired Daily
|
||||
- MIT Technology Review
|
||||
- MSNBC
|
||||
- expansion.com
|
||||
- New York Times
|
||||
- Heraldo de Aragon
|
||||
- Exiled online
|
||||
|
||||
new recipes:
|
||||
- title: "Yakima Herald and Tri-City Herald"
|
||||
author: "Laura Gjovaag"
|
||||
|
||||
- title: "Wichita Eagle"
|
||||
author: "Jason Cameron"
|
||||
|
||||
- title: "Pressthink and Zero Hedge"
|
||||
author: "Darko Miletic"
|
||||
|
||||
- title: "tyzden"
|
||||
author: "zemiak"
|
||||
|
||||
- title: "El Correo"
|
||||
author: "desUBIKado"
|
||||
|
||||
- title: "Cicero"
|
||||
author: "mad"
|
||||
|
||||
- title: "El Publico"
|
||||
author: "Gerardo Diez"
|
||||
|
||||
- version: 0.7.38
|
||||
date: 2011-01-07
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
__copyright__ = '2010-2011, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
ft.com
|
||||
'''
|
||||
@ -52,22 +52,38 @@ class FinancialTimes(BasicNewsRecipe):
|
||||
.copyright{font-size: x-small}
|
||||
"""
|
||||
|
||||
def parse_index(self):
|
||||
def get_artlinks(self, elem):
|
||||
articles = []
|
||||
for item in elem.findAll('a',href=True):
|
||||
url = self.PREFIX + item['href']
|
||||
title = self.tag_to_string(item)
|
||||
date = strftime(self.timefmt)
|
||||
articles.append({
|
||||
'title' :title
|
||||
,'date' :date
|
||||
,'url' :url
|
||||
,'description':''
|
||||
})
|
||||
return articles
|
||||
|
||||
def parse_index(self):
|
||||
feeds = []
|
||||
soup = self.index_to_soup(self.INDEX)
|
||||
wide = soup.find('div',attrs={'class':'wide'})
|
||||
if wide:
|
||||
for item in wide.findAll('a',href=True):
|
||||
url = self.PREFIX + item['href']
|
||||
title = self.tag_to_string(item)
|
||||
date = strftime(self.timefmt)
|
||||
articles.append({
|
||||
'title' :title
|
||||
,'date' :date
|
||||
,'url' :url
|
||||
,'description':''
|
||||
})
|
||||
return [('FT UK edition',articles)]
|
||||
if not wide:
|
||||
return feeds
|
||||
strest = wide.findAll('h3', attrs={'class':'section'})
|
||||
if not strest:
|
||||
return feeds
|
||||
st = wide.find('h4',attrs={'class':'section-no-arrow'})
|
||||
if st:
|
||||
strest.insert(0,st)
|
||||
for item in strest:
|
||||
ftitle = self.tag_to_string(item)
|
||||
self.report_progress(0, _('Fetching feed')+' %s...'%(ftitle))
|
||||
feedarts = self.get_artlinks(item.parent.ul)
|
||||
feeds.append((ftitle,feedarts))
|
||||
return feeds
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
return self.adeify_images(soup)
|
||||
|
@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
import os, re, cStringIO, base64, httplib, subprocess, hashlib, shutil
|
||||
import os, re, cStringIO, base64, httplib, subprocess, hashlib, shutil, time
|
||||
from subprocess import check_call
|
||||
from tempfile import NamedTemporaryFile, mkdtemp
|
||||
|
||||
@ -160,7 +160,7 @@ class UploadToGoogleCode(Command):
|
||||
|
||||
return 'multipart/form-data; boundary=%s' % BOUNDARY, CRLF.join(body)
|
||||
|
||||
def upload(self, fname, desc, labels=[]):
|
||||
def upload(self, fname, desc, labels=[], retry=0):
|
||||
form_fields = [('summary', desc)]
|
||||
form_fields.extend([('label', l.strip()) for l in labels])
|
||||
|
||||
@ -183,6 +183,10 @@ class UploadToGoogleCode(Command):
|
||||
|
||||
print 'Failed to upload with code %d and reason: %s'%(resp.status,
|
||||
resp.reason)
|
||||
if retry < 1:
|
||||
print 'Retrying in 5 seconds....'
|
||||
time.sleep(5)
|
||||
return self.upload(fname, desc, labels=labels, retry=retry+1)
|
||||
raise Exception('Failed to upload '+fname)
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
__appname__ = 'calibre'
|
||||
__version__ = '0.7.38'
|
||||
__version__ = '0.7.40'
|
||||
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
||||
|
||||
import re
|
||||
|
@ -99,7 +99,7 @@ class EditMetadataAction(InterfaceAction):
|
||||
x = _('social metadata')
|
||||
else:
|
||||
x = _('covers') if covers and not set_metadata else _('metadata')
|
||||
title = _('Downloading %s for %d book(s)')%(x, len(ids))
|
||||
title = _('Downloading {0} for {1} book(s)').format(x, len(ids))
|
||||
self._download_book_metadata = DoDownload(self.gui, title, db, ids,
|
||||
get_covers=covers, set_metadata=set_metadata,
|
||||
get_social_metadata=get_social_metadata)
|
||||
|
@ -92,7 +92,12 @@ class ViewAction(InterfaceAction):
|
||||
formats = [list(f.upper().split(',')) if f else None for f in formats]
|
||||
all_fmts = set([])
|
||||
for x in formats:
|
||||
for f in x: all_fmts.add(f)
|
||||
if x:
|
||||
for f in x: all_fmts.add(f)
|
||||
if not all_fmts:
|
||||
error_dialog(self.gui, _('Format unavailable'),
|
||||
_('Selected books have no formats'), show=True)
|
||||
return
|
||||
d = ChooseFormatDialog(self.gui, _('Choose the format to view'),
|
||||
list(sorted(all_fmts)))
|
||||
if d.exec_() == d.Accepted:
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>650</width>
|
||||
<height>582</height>
|
||||
<height>596</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -41,41 +41,54 @@
|
||||
<string>Included sections</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="generate_titles">
|
||||
<property name="text">
|
||||
<string>Books by &Title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="generate_series">
|
||||
<property name="text">
|
||||
<string>Books by &Series</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QCheckBox" name="generate_recently_added">
|
||||
<property name="text">
|
||||
<string>Recently &Added</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="generate_genres">
|
||||
<property name="text">
|
||||
<string>Books by &Genre</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="generate_recently_added">
|
||||
<property name="text">
|
||||
<string>Recently &Added</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="generate_descriptions">
|
||||
<property name="text">
|
||||
<string>&Descriptions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="generate_series">
|
||||
<property name="text">
|
||||
<string>Books by &Series</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="generate_titles">
|
||||
<property name="text">
|
||||
<string>Books by &Title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="generate_authors">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Books by Author</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -94,14 +107,10 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Default pattern </p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';">\[.+\]</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">excludes tags of the form [<span style=" font-family:'Courier New,courier';">tag</span>], </p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">e.g., [Project Gutenberg]</p></body></html></string>
|
||||
<string><p>Default pattern
|
||||
\[.+\]
|
||||
excludes tags of the form [tag],
|
||||
e.g., [Project Gutenberg]</p></string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Excluded genres</string>
|
||||
@ -239,12 +248,8 @@ p, li { white-space: pre-wrap; }
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Comma-separated list of tags to exclude.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Default:</span><span style=" font-family:'Courier New,courier'; font-size:12pt;"> ~,Catalog</span></p></body></html></string>
|
||||
<string><p>Comma-separated list of tags to exclude.
|
||||
Default: ~,Catalog</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -332,7 +337,7 @@ p, li { white-space: pre-wrap; }
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Matching books will be displayed with ✓</string>
|
||||
<string>Matching books will be displayed with a check mark</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Read books</string>
|
||||
@ -471,7 +476,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="QLineEdit" name="wishlist_tag">
|
||||
<property name="toolTip">
|
||||
<string>Books tagged as Wishlist items will be displayed with ✕</string>
|
||||
<string>Books tagged as Wishlist items will be displayed with an X</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -62,6 +62,7 @@ class SocialMetadata(QDialog):
|
||||
return
|
||||
if not self.worker.is_alive():
|
||||
self.accept()
|
||||
return
|
||||
QTimer.singleShot(50, self.update)
|
||||
|
||||
def accept(self):
|
||||
|
@ -103,7 +103,7 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="replace_button">
|
||||
<property name="text">
|
||||
<string>Replace</string>
|
||||
<string>&Replace</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -599,8 +599,16 @@ class EPUB_MOBI(CatalogPlugin):
|
||||
default=('~,'+_('Catalog')),
|
||||
dest='exclude_tags',
|
||||
action = None,
|
||||
help=_("Comma-separated list of tag words indicating book should be excluded from output. Case-insensitive.\n"
|
||||
"--exclude-tags=skip will match 'skip this book' and 'Skip will like this'.\n"
|
||||
help=_("Comma-separated list of tag words indicating book should be excluded from output."
|
||||
"For example: 'skip' will match 'skip this book' and 'Skip will like this'."
|
||||
"Default: '%default'\n"
|
||||
"Applies to: ePub, MOBI output formats")),
|
||||
Option('--generate-authors',
|
||||
default=True,
|
||||
dest='generate_authors',
|
||||
action = 'store_true',
|
||||
help=_("Include 'Authors' section in catalog."
|
||||
"This switch is ignored - Books By Author section is always generated."
|
||||
"Default: '%default'\n"
|
||||
"Applies to: ePub, MOBI output formats")),
|
||||
Option('--generate-descriptions',
|
||||
@ -1602,11 +1610,12 @@ class EPUB_MOBI(CatalogPlugin):
|
||||
if author != current_author and i:
|
||||
# Warn, exit if friendly matches previous, but sort doesn't
|
||||
if author[0] == current_author[0]:
|
||||
error_msg = _("\nWarning: inconsistent Author Sort values for Author '%s', ") % author[0]
|
||||
error_msg += _("unable to continue building catalog.\n")
|
||||
error_msg += _("Select all books by '%s', apply same Author Sort value in Edit Metadata dialog, ") % author[0]
|
||||
error_msg += _("then rebuild the catalog.\n")
|
||||
error_msg += _("Terminating catalog generation.\n")
|
||||
error_msg = _('''
|
||||
\n*** Metadata error ***
|
||||
Inconsistent Author Sort values for Author '{0}', unable to continue building catalog.
|
||||
Select all books by '{0}', apply correct Author Sort value in Edit Metadata dialog,
|
||||
then rebuild the catalog.
|
||||
*** Terminating catalog generation ***\n''').format(author[0])
|
||||
|
||||
self.opts.log.warn(error_msg)
|
||||
return False
|
||||
@ -4971,12 +4980,16 @@ class EPUB_MOBI(CatalogPlugin):
|
||||
build_log.append(" book count: %d" % len(opts_dict['ids']))
|
||||
|
||||
sections_list = ['Authors']
|
||||
'''
|
||||
if opts.generate_authors:
|
||||
sections_list.append('Authors')
|
||||
'''
|
||||
if opts.generate_titles:
|
||||
sections_list.append('Titles')
|
||||
if opts.generate_recently_added:
|
||||
sections_list.append('Recently Added')
|
||||
if opts.generate_genres:
|
||||
sections_list.append('Genres')
|
||||
if opts.generate_recently_added:
|
||||
sections_list.append('Recently Added')
|
||||
if opts.generate_descriptions:
|
||||
sections_list.append('Descriptions')
|
||||
|
||||
|
@ -986,8 +986,8 @@ def command_restore_database(args, dbpath):
|
||||
return 1
|
||||
|
||||
if not opts.really_do_it:
|
||||
prints(_('You must provide the --really-do-it option to do a'
|
||||
' recovery'), end='\n\n')
|
||||
prints(_('You must provide the %s option to do a'
|
||||
' recovery')%'--really-do-it', end='\n\n')
|
||||
parser.print_help()
|
||||
return 1
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -83,7 +83,10 @@ class BuiltinFormatterFunction(FormatterFunction):
|
||||
formatter_functions.register_builtin(self)
|
||||
eval_func = inspect.getmembers(self.__class__,
|
||||
lambda x: inspect.ismethod(x) and x.__name__ == 'evaluate')
|
||||
lines = [l[4:] for l in inspect.getsourcelines(eval_func[0][1])[0]]
|
||||
try:
|
||||
lines = [l[4:] for l in inspect.getsourcelines(eval_func[0][1])[0]]
|
||||
except:
|
||||
lines = []
|
||||
self.program_text = ''.join(lines)
|
||||
|
||||
class BuiltinStrcmp(BuiltinFormatterFunction):
|
||||
|
@ -493,7 +493,7 @@ def option_parser(usage=_('%prog URL\n\nWhere URL is for example http://google.c
|
||||
parser.add_option('--match-regexp', default=[], action='append', dest='match_regexps',
|
||||
help=_('Only links that match this regular expression will be followed. This option can be specified multiple times, in which case as long as a link matches any one regexp, it will be followed. By default all links are followed.'))
|
||||
parser.add_option('--filter-regexp', default=[], action='append', dest='filter_regexps',
|
||||
help=_('Any link that matches this regular expression will be ignored. This option can be specified multiple times, in which case as long as any regexp matches a link, it will be ignored.By default, no links are ignored. If both --filter-regexp and --match-regexp are specified, then --filter-regexp is applied first.'))
|
||||
help=_('Any link that matches this regular expression will be ignored. This option can be specified multiple times, in which case as long as any regexp matches a link, it will be ignored.By default, no links are ignored. If both filter regexp and match regexp are specified, then filter regexp is applied first.'))
|
||||
parser.add_option('--dont-download-stylesheets', action='store_true', default=False,
|
||||
help=_('Do not download CSS stylesheets.'), dest='no_stylesheets')
|
||||
parser.add_option('--verbose', help=_('Show detailed output information. Useful for debugging'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user