Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 05-29-2024, 05:25 PM   #1
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,331
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
parsing calibre metadata

I'm writing a SAX json parser for "metadata.calibre" files, intended for devices with not enough ram to decode the entire file at once.

I have a couple of those metadata files. In both of them the fields for each book in the array are 1) same fields and 2) in the same order.

Quote:
local all_fields = {
"publisher",
"title_sort",
"author_sort",
"link_maps",
"identifiers",
"mobi-asin",
"cover",
"db_id",
"book_producer",
"pubdate",
"series",
"thumbnail",
"lpath",
"author_sort_map",
"application_id",
"series_index",
"authors",
"comments",
"rating",
"rights",
"publication_type",
"mime",
"languages",
"size",
"tags",
"timestamp",
"uuid",
"last_modified",
"user_categories",
"user_metadata",
"title",
}
Can I assume this holds true for every metadata file generated by calibre? Does the order might differ on some cases?

I wish this is true because I'm lazy as hell
pazos is offline   Reply With Quote
Old 05-29-2024, 11:18 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: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You cant assume order will always be the same, sorry. You can assume that the fields wont change as they have been stable for a decade + though in principle new fields might be added in the future.
kovidgoyal is online now   Reply With Quote
Old 05-31-2024, 09:18 AM   #3
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,331
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
Good to know

Thanks for your time, Mr Goyal.
pazos is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
replace calibre metadata with epub or mobi metadata gteague Library Management 8 11-17-2017 10:40 PM
Fully Automated ebook file parsing, ISBN extraction, Titel Extraction and metadata isbnread Reading and Management 0 02-20-2017 11:20 AM
Calibre fills automatically title and author metadata in books without any metadata? thosedays Library Management 5 10-28-2016 04:33 PM
Issue importing html zip archives and metadata parsing KevinH Calibre 20 12-26-2010 12:57 AM
Calibre Author/Title parsing sglinert Calibre 1 05-23-2008 11:18 AM


All times are GMT -4. The time now is 02:41 AM.


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