Quote:
Originally Posted by BKh
I have about 150 search and replace pairs and I'm trying to put them into the sigil_searches.ini file manually.
|
You'll need to replace all accented characters with hexadecimal Unicode codes:
Code:
ā \x101
ī \x12b
ū \x16b
ḷ \x1e37
ṇ \x1e47
For example to replace
Krishna with
Kṛṣṇa you'd use:
Code:
1\Name=Krishna
1\Find=Krishna
1\Replace=K\x1e5b\x1e63\x1e47\x61
(For some odd reason the last "a" also needed to be encoded as a hexadecimal character. Maybe
@KevinH or
@DiapDealer can shed some light on this.)
Quote:
Originally Posted by theducks
A Import / Export plugin please
|
The problem with this idea is that Calibre saves additional information with each entry (
case_sensitive, mode, dot_all) that would be lost if you converted it to the Sigil Saved Searches format.
For example, the above search looks like this in
tweak_book_gui.json:
Code:
{
"searches": [
{
"case_sensitive": false,
"dot_all": false,
"find": "Krishna",
"mode": "normal",
"name": "Krishna",
"replace": "Kṛṣṇa"
}
],
"version": 1}
Importing Sigil seaved searches into Calibre Editor should be relatively easy for a
Calibre programmer.
@kovidgoyal might even add this as a feature to Calibre Editor if enough users ask for it.