View Single Post
Old 01-09-2023, 11:54 PM   #49
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,368
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
find replace would do it.

Code:
find: <title>.*?</title>(.*?)<h1>(.*?)</h1>
replace: <title>/2</title>/1<h1>/2</h1>

Although, I wouldn't worry about doing this for each html file. Most readers/apps don't really care about that, if at all. So I put the title of the book at the top of the page, not the title of the chapters. I actually replace the entire header portion with a simplified version to clean up a lot of the fluff people put in the header:

Code:
find:
  .*?</head>

replace: 
  <?xml version="1.0" encoding="utf-8"?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

  <html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Title of the Book</title>
    <link href="../Styles/styles.css" type="text/css" rel="stylesheet"/>
  </head>

Last edited by Turtle91; 01-10-2023 at 12:01 AM.
Turtle91 is offline   Reply With Quote