Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-02-2010, 12:03 AM   #1
Lethe
Junior Member
Lethe began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Apr 2010
Device: Kindle
Recognition of author and title from html files/reading metadata from a seperate file

Hello, i'm rather new to all this, so apologies if my question is stupid, or if it has been explained elsewhere. I've looked on the wiki and here, but with no success.

Background: I've got a lot of books in html format, with a title and contents page as one file that links individual chapters as seperate files.

Problem1: I'm ok with adding the main files, and all of the stories appear fine. I've even managed to get the chapters to detect as i'd like them to, but calibre won't detect the author unfortunately. All of the main files have the author set as a h2 tag with a class attached, so my question is whether it is possible to edit the way calibre detects the author and writes it to metadata, and if so, how I would go about doing so.

Problem2: Also, I also have an excel spreadsheet (which I could easily turn into a text file with different tags if that would be easier) containing titles, authors, summaries, reviews, and tags for each of my books. Is there anyway I could get calibre to read metadata from this file instead of downloading it off the internet?

I'm not too hot at python or html code, but I think I can muddle something together if I have some hints on where to look!

Thankyou in advance for any help you can provide!
Lethe is offline   Reply With Quote
Old 04-02-2010, 12:38 AM   #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: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre is very easy to run from source (explained in the user manual). html metadata is defined in the file src/calibre/ebooks/metadata/html.py

You can change it to do whatever you want.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-02-2010, 08:23 AM   #3
Lethe
Junior Member
Lethe began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Apr 2010
Device: Kindle
Thankyou so much!

After a few false starts i've managed to get the Authors detecting properly, now for the metadata!

Again, thankyou, especially for producing such a wonderful program!
Lethe is offline   Reply With Quote
Old 04-02-2010, 07:21 PM   #4
Lethe
Junior Member
Lethe began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Apr 2010
Device: Kindle
Once again thankyou for all of the help!

I've managed to get all of the metadata to appear correctly, and everything looks good in the calibre directory!

I saw that n Preferences - Conversion - Structure detection there is an option to display metadata as a cover page, which is really useful.

My last question (hopefully) is to ask whether it is possible to edit the layout/contents of this this metadata cover, and if so, could someone please point me in the right direction to where it would be in the code?

Once again, many thanks in advance to anyone who replies!
Lethe is offline   Reply With Quote
Old 04-03-2010, 12:39 AM   #5
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: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
look for the file transforms/jacket.py
kovidgoyal is offline   Reply With Quote
Advert
Old 04-03-2010, 09:35 AM   #6
Lethe
Junior Member
Lethe began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Apr 2010
Device: Kindle
Thanks again for the help! All sorted now!
Lethe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How To: Getting summary metadata and images, not tags, author, title Starson17 Calibre 21 01-10-2011 10:51 AM
Calibre doesnt remember (Title.Author,Series,Metadata) changes?! Rafaelo4 Calibre 9 08-19-2010 08:23 AM
jetBook reads metadata with FB2 for title & author tselling Ectaco jetBook 0 01-07-2010 10:54 PM
when importing file title metadata screwed up dschiri1 Calibre 1 07-25-2009 12:24 PM
HTML author / title tags ? romi Bookeen 0 05-11-2009 08:47 AM


All times are GMT -4. The time now is 12:04 PM.


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