![]() |
#1 |
Enthusiast
![]() Posts: 28
Karma: 10
Join Date: Feb 2018
Device: PC / iPad
|
batch processing regex search/replace?
When I edit epub ebooks, I try to make them as light as possible by removing all the tags that are not strictly necessary, usually ending up with a stylesheet with anything from 2 to 8 styles at the most for books with 1000s of pages. It can reduce the size of the ebook by half or more.
This is of course repetitive. Is there a way to batch-process a number of search and replace commands all at once instead of having to type them in? I wouldn't be surprised if that has been included, I just haven't found it. These are just a few of a long list that I use with every book I edit. REPLACE <body [^>]*> WITH <body class="calibre"> REPLACE WITH NOTHING id="[^\"]*" <a [^>]*> REPLACE this with that <b [^>]*> <b> <i [^>]*> <i> <em [^>]*> <em> ETC. ETC. Thank you for your time. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,086
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
I make each Find & Replace a Stored Search, then select a group of Stored Searches and do a [Replace All]
It's my habit to put an 'identifier' (e.g. TAG) in the title and arrange the Stored Searches to make it easy to group select them Last edited by phossler; 11-07-2020 at 10:59 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 436
Karma: 3220258
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
When you have a search set up, right-click on it and save it. Then you can run it from "saved searches", or edit it and then run it, and so on. You can select several saved searches and run them all with one click (with due care).
Your examples and those of @phossler look a lot like mine, and other lists I've seen...we all seem to end up dong the same sorts of things, if in slightly different ways. |
![]() |
![]() |
![]() |
#4 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,652
Karma: 163285328
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
As an alternative, you could use Sigil as your editor and use the cssRemoveUnusedSelectors to remove unused items from stylesheets and cssUndefinedClasses to remove unused classes and ids from the html files.
One of the reasons I use both Sigil and calibre's editor. |
![]() |
![]() |
![]() |
#5 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,671
Karma: 58985420
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Calibre editor has that also. The Icon looks like a black square (next to the Tulip)
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,652
Karma: 163285328
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
![]() I was running it from the Tools menu with an icon looking like an eraser. If I enable the Tools toolbar, it's between Smarten punctuation with it's curly closing quote icon (might look like two tulips) and the Reports option |
|
![]() |
![]() |
![]() |
#7 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,671
Karma: 58985420
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,652
Karma: 163285328
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
cssRemoveUndefinedClasses is the plugin that handles that task for Sigil. This is one of the reasons I use both editors since each has strengths. I've attached a sample image after clicking proceed in cssRemoveUndefinedClasses's popup.
|
![]() |
![]() |
![]() |
#9 |
Enthusiast
![]() Posts: 28
Karma: 10
Join Date: Feb 2018
Device: PC / iPad
|
Thank you.
![]() This was indeed new for me and it will be helpful to have this in the editor. I currently keep my list of expressions in a Word-file and have to copy/paste everything. I tried to save a search and the first one <body [^>]*> to <body class="calibre"> saves OK and shows up in new pop-up window. However, with the second expression to remove the IDs [ id="[^\"]*"] I have to leave the 'replace with' field blank. The editor refuses to save that and all the other 'replace-with-nothings' in the list. At least, they don't show in my list. ??? I'll keep experimenting with this, maybe try to include a tag bracket or space that I repeat in the 2nd field to see if it will save then. I have no problem getting rid of unused css. the Calibre editor does that very efficiently. I would love if it could merge with a little bit more ruthless efficiency, e.g. bring ALL the italics rules together in one rule, all the bolds in one rule instead of having like 50 different rules for each when I merge books. |
![]() |
![]() |
![]() |
#10 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,652
Karma: 163285328
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
My issue with cleaning stylesheets with the calibre editor is that at time, it's removal of unused css gets too efficient when someone has gotten too cute with their css. The type of stylesheet where you have to parse multiple entries with a lot of them involving media queries and a love for ::. |
|
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,086
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
I have many 'replace with nothing' saved searches
|
![]() |
![]() |
![]() |
#12 | |
Enthusiast
![]() Posts: 28
Karma: 10
Join Date: Feb 2018
Device: PC / iPad
|
I wasn't aware I had to name each and every one of the saved searches, then click 'done' to save it. That's why the other ones didn't get added. I did finally figure it out and was able to make a small list. Which makes me wonder about the next logical question following retiredbiker's comment, Quote:
Again, Thanks all. This will save me a lot of repetition and will allow me to get more done in a shorter time. |
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,086
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
The Saved Searches list box is really one dimensional. I wish that there was a way to make it into an expandable 'tree' to improve the organization structure.
My workaround is to use a 'Heading' in the title (TAG - ..., DELETE - ..., PROMOTE - ..., etc.) and manually arrange the SS into 'blocks' (like example in post 2) to select multiples and run a bunch at once |
![]() |
![]() |
![]() |
#14 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 77,967
Karma: 142032074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Here's some CSS from a Kindle eBook made with Vellum. It's one of two CSS files. This one is just media queries. It's terrible. Code:
/* * THREE LITTLE PIGS * Stylesheet generated by Vellum */ @media not amzn-mobi { p span.last-word, li span.lastword { -webkit-hyphenate-limit-after: 7; } } @media not amzn-mobi { .element .section-title { font-size: 100%; } } @media not amzn-mobi { span.monospace, span.monospace b { font-family: Courier, monospace; } } @media not amzn-mobi { span.sans-serif, span.sans-serif b { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } } @media screen and (max-width: 420px) { ul, ol { padding-right: 0px; } } @media screen and (max-width: 420px) { blockquote.verse { padding-left: 1.5em; padding-right: 1.5em; } } @media all { span.last-word-with-trailing-em-dash { white-space: nowrap; } } @media not amzn-mobi { a, a * { color: rgb(36, 39, 116); } } @media all{ div a.link-contains-image { text-decoration: none !important; } } @media not amzn-mobi { .element .section-title { margin-top: 1.4em; padding-top: 0.7em; padding-bottom: 0.7em; margin-bottom: 0px; } } @media not amzn-mobi { blockquote p { hyphens: manual; adobe-hyphenate: none; -webkit-hyphens: manual; } } @media screen and (max-width: 420px) { p.blockquote-attribution { margin-left: 0em; } } @media not amzn-mobi { .element-bodymatter .text > .implicit-break { margin-top: 0px; height: 1.4em; margin-bottom: 1.4em; clear: both; } } @media not amzn-mobi { blockquote.prose.keep-lines-on-same-page p, blockquote.verse.keep-lines-on-same-page .stanza, blockquote.keep-lines-on-same-page .paragraph-and-attribution, div.alignment-block.keep-lines-on-same-page .text-block, ul.keep-lines-on-same-page, ol.keep-lines-on-same-page { page-break-inside: avoid; } } @media not amzn-mobi { .alignment-block, blockquote, .ornamental-break, .section-title .endnotes { clear: both; } } @media not amzn-mobi { img.low-res { display: none; } } @media screen and (max-height: 580px) { .element-type-dedication.element-without-heading { margin-top: 7em; } } @media screen and (max-height: 580px) { .element-type-epigraph.element-without-heading { margin-top: 7em; } } @media not amzn-mobi { .element-container-single.element-type-dedication p, .element-container-single.element-type-epigraph p { hyphens: manual; adobe-hyphenate: none; -webkit-hyphens: manual; } } @media not amzn-mobi { .element-container-single.element-type-also-by .heading { min-height: inherit; } } @media not amzn-mobi { .element-container-single.element-type-also-by .heading .title-subtitle-block, .element-container-single.element-type-also-by .heading .title-subtitle-block .title-block, .element-container-single.element-type-also-by .heading .title-subtitle-block .element-number-block { padding-top: 0px; } } @media not amzn-mobi { .element-container-single.element-type-also-by .heading .heading-contents { padding-top: 2em; } } @media not amzn-mobi { .element-container-single.element-type-blurbs .heading { min-height: inherit; } } @media not amzn-mobi { .element-container-single.element-type-blurbs .heading .title-subtitle-block, .element-container-single.element-type-blurbs .heading .title-subtitle-block .title-block, .element-container-single.element-type-blurbs .heading .title-subtitle-block .element-number-block { padding-top: 0px; } } @media not amzn-mobi { .element-container-single.element-type-blurbs .heading .heading-contents { padding-top: 2em; } } @media not amzn-mobi { .element-container-single.element-type-endnotes .heading { min-height: inherit; } } @media not amzn-mobi { .element-container-single.element-type-endnotes .heading .title-subtitle-block, .element-container-single.element-type-endnotes .heading .title-subtitle-block .title-block, .element-container-single.element-type-endnotes .heading .title-subtitle-block .element-number-block { padding-top: 0px; } } @media not amzn-mobi { .element-container-single.element-type-endnotes .heading .heading-contents { padding-top: 2em; } } @media not amzn-mobi { .element-container-single.element-type-also-by .heading .title-block, .element-container-single.element-type-blurbs .heading .title-block { font-size: 90%; } } @media not amzn-mobi { .element-container-single.element-type-also-by .subhead { text-align: center; } } @media screen and (max-height: 580px) { p.also-by-content { margin-bottom: 0.25em; } } @media not amzn-mobi { .element-type-blurbs blockquote { page-break-inside: avoid; } } @media not amzn-mobi { .element-type-toc .toc-contents { padding-left: 5%; padding-right: 5%; } } @media screen and (max-width: 420px) { .element-type-toc .toc-contents { padding-left: 0%; padding-right: 0%; } } @media not amzn-mobi { .element-type-toc div.toc-heading { margin-left: 6%; margin-right: 6%; } } @media not amzn-mobi { .element-type-toc h1.toc-title { margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; } } @media not amzn-mobi { .element-type-toc p { text-align: left; hyphens: none; adobe-hyphenate: none; -webkit-hyphens: none; } } @media not amzn-mobi { .element-type-toc .toc-item { page-break-inside: avoid; } } @media not amzn-mobi { .element-type-toc .item-number { font-size: 80%; padding-right: 0.3em; text-indent: 0px; padding-left: 0px; } } @media not amzn-mobi { .element-type-toc .toc-item-element-type-part .item-number { font-size: 70%; } } @media not amzn-mobi { .element-type-toc .item-children { margin-left: 1.5rem; margin-bottom: 0.5em; } } @media not amzn-mobi { .element-type-toc .toc-item.has-no-children .item-title { text-indent: -1.5rem; padding-left: 1.5rem; } } @media not amzn-mobi { .element-type-toc .toc-frontmatter-group { margin-bottom: 0.75em; } } @media not amzn-mobi { .element-type-toc .toc-backmatter-group { margin-top: 0.75em; } } @media not amzn-mobi { .element-type-toc .toc-item-element-type-volume.has-children { margin-top: 0.75em; } } @media not amzn-mobi { .element-type-toc .toc-item.has-author { margin-bottom: 0.5em; } } @media not amzn-mobi { .element-type-toc p { font-size: 90%; } } @media not amzn-mobi { .element-type-toc .item-author, .element-type-toc .item-subtitle { font-size: 75%; margin-top: 0.1em; } } @media not amzn-mobi { .element-type-toc .toc-item.has-leading-number .item-author, .element-type-toc .toc-item.has-leading-number .item-subtitle { margin-left: 1.5rem; } } @media not amzn-mobi { .element-type-toc .item-subtitle { font-style: italic; } } @media not amzn-mobi { .element-container-single.element-type-about-author .heading { min-height: 6em; } } @media not amzn-mobi { .element-container-single.element-type-about-author .heading .title-subtitle-block, .element-container-single.element-type-about-author .heading .title-subtitle-block .title-block, .element-container-single.element-type-about-author .heading .title-subtitle-block .element-number-block { padding-top: 0px; } } @media not amzn-mobi { .element-container-single.element-type-about-author .heading .heading-contents { padding-top: 3em; } } @media screen and (max-height: 580px) { .element-container-single.element-type-about-author .heading { min-height: 4em; } } @media screen and (max-height: 580px) { .element-container-single.element-type-about-author .heading .title-subtitle-block, .element-container-single.element-type-about-author .heading .title-subtitle-block .title-block, .element-container-single.element-type-about-author .heading .title-subtitle-block .element-number-block { padding-top: 0px; } } @media screen and (max-height: 580px) { .element-container-single.element-type-about-author .heading .heading-contents { padding-top: 1.25em; } } @media not amzn-mobi { .element-container-single.element-type-about-author .heading-without-image .title-subtitle-block { min-height: 0px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; } } @media not amzn-mobi { .element-container-single.element-type-about-author p, .element-container-single.element-type-about-author li { font-size: 90%; } } @media not amzn-mobi { .social-media-profiles .social-profile a { text-decoration: none !important; } } @media not amzn-mobi { .social-media-profiles .social-profile .social-profile-image { height: auto; } } @media not amzn-mobi { .social-media-profiles .social-profile .social-profile-image { width: 1.8em; } } @media not amzn-mobi { .social-media-profiles.as-icons .social-profile { display: inline; padding-left: 0.05em; padding-right: 0.05em; } } @media all{ .social-media-profiles.as-icons .social-profile { padding-left: 0.15em; padding-right: 0.15em; } } @media not amzn-mobi { .element-type-copyright ul { margin-top: 0.5em; } } @media not amzn-mobi { .element-container-single.element-type-copyright .heading { min-height: inherit; } } @media not amzn-mobi { .element-container-single.element-type-copyright .heading .title-subtitle-block, .element-container-single.element-type-copyright .heading .title-subtitle-block .title-block, .element-container-single.element-type-copyright .heading .title-subtitle-block .element-number-block { padding-top: 0px; } } @media not amzn-mobi { .element-container-single.element-type-copyright .heading .heading-contents { padding-top: 2em; } } @media screen and (max-height: 580px) { .element-type-copyright.element-without-heading { margin-top: 1em; } } @media not amzn-mobi { .element-type-copyright .created-with-vellum { padding-top: 0.5em; } } @media not amzn-mobi { .element-type-copyright .created-with-vellum a { text-decoration: none !important; } } @media not amzn-mobi { .element-type-copyright .created-with-vellum-text { font-size: 80%; } } @media not amzn-mobi { .element-type-copyright .created-with-vellum-text { color: rgb(51, 51, 51); } } @media not amzn-mobi { div.title-page .title-page-title-subtitle-block, section.title-page .title-page-title-subtitle-block { margin-left: 6%; margin-right: 6%; } } @media screen and (min-height: 720px) { div.title-page-contributor-block { margin-bottom: 3em; } } @media screen and (min-height: 720px) { .titlepage-several-secondary-contributors div.title-page-contributor-block { margin-bottom: 2em; } } @media screen and (max-height: 640px) { div.title-page-title-subtitle-block { min-height: 100px; margin-top: 80px; } } @media screen and (max-height: 640px) { div.title-page-contributor-block { min-height: 60px; } } @media screen and (max-height: 580px) { div.title-page-title-subtitle-block { min-height: 80px; margin-top: 80px; } } @media screen and (max-height: 580px) { div.title-page-contributor-block { min-height: 3em; } } @media screen and (max-height: 420px) { div.title-page-title-subtitle-block { min-height: 2em; margin-top: 2em; } } @media not amzn-mobi { .titlepage-several-primary-contributors .title-page-contributor { font-size: 90%; } } @media not amzn-mobi { .titlepage-several-primary-contributors .title-page-contributor-without-introduction { display: inline-block; padding-left: 0.5em; padding-right: 0.5em; } } @media not amzn-mobi { .titlepage-several-secondary-contributors span.title-page-contributor-introduction { display: inline; } } @media not amzn-mobi { img.title-page-publisher-logo-image { width: 100%; height: auto; vertical-align: middle; } } @media screen and (max-height: 580px), screen and (max-width: 420px) { h1.title-page-title { font-size: 110%; } } @media screen and (max-height: 580px), screen and (max-width: 420px) { h2.title-page-subtitle { font-size: 90%; } } @media screen and (max-height: 580px), screen and (max-width: 420px) { h2.title-page-contributor-primary { font-size: 100%; } } @media screen and (max-height: 580px), screen and (max-width: 420px) { h2.title-page-contributor-secondary { font-size: 90%; } } @media screen and (max-height: 580px), screen and (max-width: 420px) { .titlepage-several-primary-contributors .title-page-contributor { font-size: 80%; } } @media screen and (max-height: 580px), screen and (max-width: 420px) { .titlepage-several-primary-contributors .title-page-contributor-without-introduction { padding-left: 0.4em; padding-right: 0.4em; } } @media screen and (max-height: 580px), screen and (max-width: 420px) { h2.title-page-publisher { font-size: 70%; } } @media not amzn-mobi { div.title-page, section.title-page { margin-right: 2%; margin-left: 2%; } } @media not amzn-mobi { div.title-page-publisher-logo-block.title-page-publisher-logo-aspect-wide { width: 32%; } } @media not amzn-mobi { div.title-page-publisher-logo-block.title-page-publisher-logo-aspect-square { width: 36.5%; } } @media not amzn-mobi { div.title-page-publisher-logo-block.title-page-publisher-logo-aspect-tall { width: 48%; } } @media not amzn-mobi { .element .section-title { font-family: Quicksand, sans-serif; font-weight: 400; } } @media not amzn-mobi { .element-container-group .heading { margin-bottom: 3em; } } @media screen and (max-height: 580px) { .element-container-group .heading { margin-bottom: 2em; } } @media not amzn-mobi { .element-container-group .heading { min-height: 15em; } } @media not amzn-mobi { .element-container-group .heading .heading-contents { padding-top: 4em; } } @media screen and (max-height: 580px) { .element-container-group .heading { min-height: 11em; } } @media screen and (max-height: 580px) { .element-container-group .heading .heading-contents { padding-top: 3em; } } @media not amzn-mobi { img.heading-image-image { width: 100%; height: auto; } } @media not amzn-mobi { .element-container-group .heading { margin-left: 6%; margin-right: 6%; text-align: center; } } @media not amzn-mobi { .element-container-group .heading .title { font-size: 150%; text-align: center; } } @media not amzn-mobi { .element-container-group .heading .element-number { font-size: 130%; text-align: center; } } @media not amzn-mobi { .element-container-group .heading .subtitle { margin-top: 1.3em; margin-bottom: 1.5em; font-size: 100%; text-align: center; } } @media not amzn-mobi { .element-container-group .heading .author { margin-top: 1.3em; margin-bottom: 1.5em; font-size: 120%; text-align: center; text-transform: uppercase; } } @media screen and (max-height: 580px), screen and (max-width: 420px) { .element-container-group .heading .title { font-size: 110%; } } @media screen and (max-height: 580px), screen and (max-width: 420px) { .element-container-group .heading .element-number { font-size: 100%; } } @media screen and (max-height: 580px), screen and (max-width: 420px) { .element-container-group .heading .subtitle { font-size: 90%; } } @media screen and (max-height: 580px), screen and (max-width: 420px) { .element-container-group .heading .author { font-size: 100%; } } @media not amzn-mobi { .element-container-group .heading-image-block { display: block; text-align: center; } } @media not amzn-mobi { .element-container-group .heading-image-block-before-heading-number { margin-bottom: 2em; } } @media not amzn-mobi { .element-container-group .heading-image-block-after-heading-number { margin-top: 1.5em; margin-bottom: 1.3em; } } @media not amzn-mobi { .element-container-group .heading-image-block-after-title-and-subtitle { margin-top: 1.5em; } } @media not amzn-mobi { .element-container-single .heading { text-align: center; margin-left: 6%; margin-right: 6%; } } @media not amzn-mobi { .element-container-single .heading h1.title, .element-container-single .heading div.element-number, .element-container-single .heading h1.number-and-title, .element-container-single .heading h2.subtitle, .element-container-single .heading h2.author { text-align: center; } } @media not amzn-mobi { .element-container-single .heading { min-height: 12em; } } @media not amzn-mobi { .element-container-single .heading-without-image .heading-contents { padding-top: 5em; } } @media not amzn-mobi { .element-container-single .heading-with-image .heading-contents { padding-top: 2em; } } @media screen and (max-height: 580px) { .element-container-single .heading { min-height: 10em; } } @media screen and (max-height: 580px) { .element-container-single .heading-without-image .heading-contents { padding-top: 2.5em; } } @media screen and (max-height: 580px) { .element-container-single .heading-with-image .heading-contents { padding-top: 1em; } } @media not amzn-mobi { .element-container-single .heading-image-block { display: block; text-align: center; } } @media not amzn-mobi { .element-container-single .heading-image-block-before-element-number { margin-bottom: 2em; } } @media not amzn-mobi { .element-container-single .heading-image-block-after-element-number { margin-top: 1.5em; margin-bottom: 1.3em; } } @media not amzn-mobi { .element-container-single .heading-image-block-after-title-and-subtitle { margin-top: 1.5em; } } @media screen and (max-height: 580px) { .element-container-single .heading-without-image .heading-contents { padding-top: 3em; } } @media screen and (max-height: 580px) { .element-container-single .heading-with-image .heading-contents { padding-top: 1em; } } @media not amzn-mobi { .element .heading .element-number, .element .heading .title, .element .heading .number-and-title, .element .heading .subtitle, .element .heading .author { font-family: Quicksand, sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; } } @media not amzn-mobi { .element-container-single .heading .subtitle { font-size: 80%; } } @media not amzn-mobi { .element-container-single .heading .author { font-size: 90%; margin-top: 1.25em; } } @media not amzn-mobi { .element-container-group .heading .title { letter-spacing: 0.05em; margin-top: 0.4em; } } @media not amzn-mobi { .element-container-group .heading .subtitle { margin-top: 1em; margin-bottom: 1.5em; } } @media not amzn-mobi { .element-container-group .heading .author { margin-top: 0.75em; } } @media not amzn-mobi { .element-type-volume .heading .element-number, .element-type-volume .heading .title-block-title-is-element-number .title, .element-type-volume .heading .title-block-without-element-number .title { padding-bottom: 0.5em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-bottom-style: solid; } } @media not amzn-mobi { .element-type-volume .heading .element-number, .element-type-volume .heading .title-block-title-is-element-number .title, .element-type-volume .heading .title-block-without-element-number .title { border-top-color: rgb(102, 102, 102); border-right-color: rgb(102, 102, 102); border-bottom-color: rgb(102, 102, 102); border-left-color: rgb(102, 102, 102); } } @media not amzn-mobi { .element-bodymatter .heading .element-number-block, .element-type-foreword .heading .element-number-block, .element-type-introduction .heading .element-number-block, .element-type-preface .heading .element-number-block, .element-type-afterword .heading .element-number-block, .element-type-acknowledgments .heading .element-number-block, .element-type-none .heading .element-number-block { min-height: 1.5em; } } @media not amzn-mobi { .element-container-single .heading .element-number { font-size: 90%; } } @media not amzn-mobi { .element-container-single .heading .title { font-size: 110%; } } @media not amzn-mobi { .element-container-single .heading .subtitle { margin-top: 0.75em; } } @media not amzn-mobi { .element-container-single .heading-image-block-after-element-number { margin-top: 0.5em; } } @media not amzn-mobi { .element-container-single.element-bodymatter p.first-in-chapter::first-line, .element-container-single.element-bodymatter p.first-in-chapter span.first-phrase { font-variant-numeric: normal; font-variant: small-caps; font-variant-alternates: normal; font-variant-position: normal; font-variant-east-asian: normal; letter-spacing: 0.04em; font-variant-ligatures: none; hyphens: none; adobe-hyphenate: none; -webkit-hyphens: none; } } @media not amzn-mobi { .element-container-single.element-bodymatter p.first-in-section span.first-phrase { font-family: Quicksand, sans-serif; font-weight: 400; text-transform: uppercase; font-size: 97%; letter-spacing: 0.03em; hyphens: none; adobe-hyphenate: none; -webkit-hyphens: none; } } @media not amzn-mobi { div.ornamental-break-block { width: 11.2em; } } @media not amzn-mobi { img.ornamental-break-image { width: 100%; height: auto; vertical-align: top; } } @media not amzn-mobi { p.ornamental-break-as-text { display: none; } } @media not amzn-mobi { .publisher-logo-width-500 { width: 50%; } } @media not amzn-mobi { .ornamental-break-width-563 { width: 56.3%; } } |
|
![]() |
![]() |
![]() |
#15 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 436
Karma: 3220258
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
Quote:
I think a problem is, especially for regex searches, they can be dangerous. I may save one, knowing I can safely run it on this book, but it will destroy that book. Or I may expect to edit a search every time I need it, but someone else may not realise that, and it will fail. |
|
![]() |
![]() |
![]() |
Tags |
batch-process commands, editor |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple Search/Replace as a batch process | idf560 | Library Management | 7 | 05-22-2020 01:30 AM |
Bug? No --search-replace processing in Windows | TechnoCat | Conversion | 3 | 06-12-2017 12:28 PM |
Regex in search problems (NOT Search&Replace; the search bar) | lairdb | Calibre | 3 | 03-15-2017 08:10 PM |
Regex: Search and Replace | Thomas_AR | Calibre | 2 | 03-31-2016 07:23 PM |
need regex help search and replace | schuster | Calibre | 4 | 01-10-2011 10:00 AM |