Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-26-2023, 10:20 PM   #1
Axius27
Junior Member
Axius27 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2023
Device: Android Phone
How do I use HTML headings as a source for metadata

A while ago, I made an archive of a website that I needed to use offline. On this website are around 700 articles stored in individual HTML files that are full of useful info that I now want to load into my eReader app. However, I have hit an issue with importing them directly, as the title on the webpage isn't the name of the article, it's the website itself. An unedited import leads to 700 identical entries. However, the actual titles of the articles are stored within the HTML files under the headings tags (specifically,
Code:
<h1>
for the title, and
Code:
<h2>
for the author's name).

Is there any way to get Calibre to automatically extract these headings and use them for metadata entries, or at least change the title to the name of the article?
Axius27 is offline   Reply With Quote
Old 07-26-2023, 10:48 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,342
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Write a script that uses the calibredb command to import them. You can specify the title as part of calling calibredb.
kovidgoyal is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I know which Metadata Source Plugin was called from fetch-ebook-metadata? eryMpexI Library Management 6 04-22-2023 08:58 AM
Read a book's metadata in a Metadata source plugin? J-H Development 2 03-30-2021 09:08 AM
How to format from a tricky html source SteffenH Workshop 3 02-04-2013 04:32 PM
Update HTML source in Calibre? BearMountainBooks Conversion 28 03-10-2011 10:51 PM
Managing HTML Link Behavior, From TOC to Chapter Headings FlooseMan Dave Calibre 1 03-31-2010 11:55 PM


All times are GMT -4. The time now is 10:05 PM.


MobileRead.com is a privately owned, operated and funded community.