mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-30 23:00:21 -04:00
String changes
This commit is contained in:
parent
52949371c9
commit
a777c8b619
@ -349,7 +349,7 @@ remove all non-breaking-space entities, or may include false positive matches re
|
||||
|
||||
.. _search-replace:
|
||||
|
||||
Search & Replace
|
||||
Search & replace
|
||||
---------------------
|
||||
|
||||
These options are useful primarily for conversion of PDF documents or OCR conversions, though they can
|
||||
|
@ -695,7 +695,7 @@ calibre has several keyboard shortcuts to save you time and mouse movement. Thes
|
||||
* - :kbd:`Alt+Shift+S`
|
||||
- Show books in the same series as current book
|
||||
* - :kbd:`/, Ctrl+F`
|
||||
- Focus the search bar
|
||||
- Focus the Search bar
|
||||
* - :kbd:`Shift+Ctrl+F`
|
||||
- Open the advanced search dialog
|
||||
* - :kbd:`Esc`
|
||||
|
@ -18,9 +18,9 @@ This is, inevitably, going to be somewhat technical- after all, regular expressi
|
||||
Where in calibre can you use regular expressions?
|
||||
---------------------------------------------------
|
||||
|
||||
There are a few places calibre uses regular expressions. There's the Search &
|
||||
Replace in conversion options, metadata detection from filenames in the import
|
||||
settings and Search & Replace when editing the metadata of books in bulk. The
|
||||
There are a few places calibre uses regular expressions. There's the
|
||||
:guilabel:`Search & replace` in conversion options, metadata detection from filenames in the import
|
||||
settings and Search & replace when editing the metadata of books in bulk. The
|
||||
calibre book editor can also use regular expressions in its search and replace
|
||||
feature.
|
||||
|
||||
@ -95,7 +95,7 @@ I think I'm beginning to understand these regular expressions now... how do I us
|
||||
Conversions
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
Let's begin with the conversion settings, which is really neat. In the Search and Replace part, you can input a regexp (short for regular expression) that describes the string that will be replaced during the conversion. The neat part is the wizard. Click on the wizard staff and you get a preview of what calibre "sees" during the conversion process. Scroll down to the string you want to remove, select and copy it, paste it into the regexp field on top of the window. If there are variable parts, like page numbers or so, use sets and quantifiers to cover those, and while you're at it, remember to escape special characters, if there are some. Hit the button labeled :guilabel:`Test` and calibre highlights the parts it would replace were you to use the regexp. Once you're satisfied, hit OK and convert. Be careful if your conversion source has tags like this example::
|
||||
Let's begin with the conversion settings, which is really neat. In the :guilabel:`Search & replace` part, you can input a regexp (short for regular expression) that describes the string that will be replaced during the conversion. The neat part is the wizard. Click on the wizard staff and you get a preview of what calibre "sees" during the conversion process. Scroll down to the string you want to remove, select and copy it, paste it into the regexp field on top of the window. If there are variable parts, like page numbers or so, use sets and quantifiers to cover those, and while you're at it, remember to escape special characters, if there are some. Hit the button labeled :guilabel:`Test` and calibre highlights the parts it would replace were you to use the regexp. Once you're satisfied, hit OK and convert. Be careful if your conversion source has tags like this example::
|
||||
|
||||
Maybe, but the cops feel like you do, Anita. What's one more dead vampire?
|
||||
New laws don't change that. </p>
|
||||
|
@ -93,7 +93,7 @@ class LRFOutput(OutputFormatPlugin):
|
||||
|
||||
options = set([
|
||||
OptionRecommendation(name='enable_autorotation', recommended_value=False,
|
||||
help=_('Enable autorotation of images that are wider than the screen width.')
|
||||
help=_('Enable auto-rotation of images that are wider than the screen width.')
|
||||
),
|
||||
OptionRecommendation(name='wordspace',
|
||||
recommended_value=2.5, level=OptionRecommendation.LOW,
|
||||
@ -194,4 +194,3 @@ class LRFOutput(OutputFormatPlugin):
|
||||
opf = [x for x in os.listdir(tdir) if x.endswith('.opf')][0]
|
||||
from calibre.ebooks.lrf.html.convert_from import process_file
|
||||
process_file(os.path.join(tdir, opf), lrf_opts, self.log)
|
||||
|
||||
|
@ -9,4 +9,3 @@ __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
from html5lib.constants import entities
|
||||
|
||||
html5_entities = {k.replace(';', ''):v for k, v in entities.iteritems()}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="opt_autorotation">
|
||||
<property name="text">
|
||||
<string>Enable &autorotation of wide images</string>
|
||||
<string>Enable &auto-rotation of wide images</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -24,7 +24,7 @@
|
||||
<item row="4" column="0" colspan="4">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>The header and footer removal options have been replaced by the Search & Replace options. Click the Search & Replace category in the bar to the left to use these options. Leave the replace field blank and enter your header/footer removal regexps into the search field.</string>
|
||||
<string>The header and footer removal options have been replaced by the Search & replace options. Click the Search & replace category in the bar to the left to use these options. Leave the replace field blank and enter your header/footer removal regexps into the search field.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
@ -135,7 +135,7 @@
|
||||
<string>This will force an automatic conversion even if the file being added is the same format as the output format. For example, if you set your output format to EPUB and add an EPUB file, an EPUB to EPUB conversion will be run.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>When autoconverting, convert even if the format being added is the &same as the output format</string>
|
||||
<string>When auto-converting, convert even if the format being added is the &same as the output format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -92,21 +92,21 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="enable_all">
|
||||
<property name="text">
|
||||
<string>All</string>
|
||||
<string>&All</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="enable_none">
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
<string>&None</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="enable_invert">
|
||||
<property name="text">
|
||||
<string>Invert</string>
|
||||
<string>&Invert</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -326,8 +326,8 @@ class SearchDialog(QDialog, Ui_Dialog):
|
||||
chooser_config_widget = StoreChooserWidget()
|
||||
search_config_widget = StoreConfigWidget(self.config)
|
||||
|
||||
tab_widget.addTab(chooser_config_widget, _('Choose stores'))
|
||||
tab_widget.addTab(search_config_widget, _('Configure search'))
|
||||
tab_widget.addTab(chooser_config_widget, _('Choose s&tores'))
|
||||
tab_widget.addTab(search_config_widget, _('Configure s&earch'))
|
||||
|
||||
# Restore dialog state.
|
||||
geometry = self.config.get('config_dialog_geometry', None)
|
||||
|
@ -59,7 +59,7 @@ class Prefs:
|
||||
container.appendChild(c)
|
||||
build_list(c, [
|
||||
create_item(_('Colors'), def():self.show_panel('colors');, _('Change the colors of the page and text')),
|
||||
create_item(_('Page Layout'), def():self.show_panel('layout');, _('Change the page margins and number of pages per screen')),
|
||||
create_item(_('Page layout'), def():self.show_panel('layout');, _('Change the page margins and number of pages per screen')),
|
||||
])
|
||||
|
||||
def display_colors(self, container):
|
||||
@ -70,7 +70,7 @@ class Prefs:
|
||||
commit_colors(self.onchange, self.container)
|
||||
|
||||
def display_layout(self, container):
|
||||
document.getElementById(self.title_id).textContent = _('Page Layout')
|
||||
document.getElementById(self.title_id).textContent = _('Page layout')
|
||||
create_layout_panel(container)
|
||||
|
||||
def close_layout(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user