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
7328653353
@ -37,6 +37,16 @@ class Novosti(BasicNewsRecipe):
|
||||
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
|
||||
|
||||
keep_only_tags = [dict(attrs={'class':['articleTitle','author','articleLead','articleBody']})]
|
||||
remove_tags = [dict(name=['embed','object','iframe','base'])]
|
||||
|
||||
remove_tags = [dict(name=['embed','object','iframe','base','link','meta'])]
|
||||
feeds = [(u'Vesti', u'http://www.novosti.rs/rss/rss-vesti')]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
for item in soup.findAll('span', attrs={'class':'author'}):
|
||||
item.name='p'
|
||||
for item in soup.findAll('img'):
|
||||
if not item.has_key('alt'):
|
||||
item['alt'] = 'image'
|
||||
return soup
|
||||
|
@ -178,18 +178,18 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
||||
self.book_1_text.setObjectName(name)
|
||||
self.gridLayout1.addWidget(w, i+offset, 2, 1, 1)
|
||||
|
||||
self.s_r_heading.setText(
|
||||
self.s_r_heading.setText('<p>'+
|
||||
_('Search and replace in text fields using '
|
||||
'regular expressions. The search text is an '
|
||||
'arbitrary python-compatible regular expression. '
|
||||
'The replacement text can contain backreferences '
|
||||
'to parenthesized expressions in the pattern. '
|
||||
'The search is not anchored, and can match and '
|
||||
'replace times on the same string. See '
|
||||
'replace multiple times on the same string. See '
|
||||
'<a href="http://docs.python.org/library/re.html"> '
|
||||
'http://docs.python.org/library/re.html</a> '
|
||||
'this reference</a> '
|
||||
'for more information, and in particular the \'sub\' '
|
||||
'function. <br>'
|
||||
'function.') + '<p>' + _(
|
||||
'Note: <b>you can destroy your library</b> '
|
||||
'using this feature. Changes are permanent. There '
|
||||
'is no undo function. You are strongly encouraged '
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>572</width>
|
||||
<height>554</height>
|
||||
<height>703</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -295,6 +295,19 @@ Future conversion of these books will use the default settings.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0" colspan="3">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab">
|
||||
@ -327,21 +340,30 @@ Future conversion of these books will use the default settings.</string>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Search field:</string>
|
||||
<string>Search &field:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>search_field</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Search for:</string>
|
||||
<string>&Search for:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>search_for</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Replace with:</string>
|
||||
<string>&Replace with:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>replace_with</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -357,7 +379,10 @@ Future conversion of these books will use the default settings.</string>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_41">
|
||||
<property name="text">
|
||||
<string>Apply function after replace:</string>
|
||||
<string>Apply function &after replace:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>replace_func</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -367,14 +392,20 @@ Future conversion of these books will use the default settings.</string>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Test text</string>
|
||||
<string>Test &text</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>test_text</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Test result</string>
|
||||
<string>Test re&sult</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>test_result</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user