View Single Post
Old 11-25-2024, 07:32 AM   #245
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,369
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I replace all headers on all html files as a matter of course using Sigil’s “Tools/Add Cover” and then regex.

- Add a new cover, this puts the correct header for the type of ePub (version 2 or 3). You can also set a template file (“cover-template2.xhtml” or “cover-template3.xhtml”) with any special coding that you like into Sigil’s preferences folder that will be used by Sigil. (See the users manual)

- I then link the stylesheet to that new cover file.

- I choose to put the title of the book in the <title> tag but it is preferable to put more detailed info to meet accessibility standards - I usually do this as one of the last steps in the production.

- I then use a basic regex to replace all the headers with the one from the new cover page. First, highlight and copy (ctrl-c) the entire header from the beginning to, and including, the </head> tag. Then use the following regex:
Code:
Find: .*?</head>
Replace: paste (ctrl-v) the header you copied here.
Make sure you have regex mode, “All HTML Files”, and “Dot All” selected in the Regex Options.

I set the find code as a clip in Sigil so I don’t have to type it every time. This all takes a couple of seconds for each book.
Turtle91 is offline   Reply With Quote