View Single Post
Old 01-19-2010, 12:40 PM   #7
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Exclamation

Quote:
Originally Posted by kovidgoyal View Post
ebook-meta doesn't set metadata in OPF files.
I noticed something else as well: I a directory contains an OPF file then ebook-meta does not work properly.

I noticed while debugging the following code:

Code:
	    ebook-meta						\
		....							\
		"${File_Name:r:t}.epub"				;
              
	    ebook-meta						\
		--to-opf="${File_Name:r:t}.opf"			\
		"${File_Name:r:t}.epub"				;
	    calibredb set_metadata "${ID}" "${File_Name:r:t}.opf"
It works the first time - but because I forgot to delete the OPF file it won't work the 2nd time. That is: the first ebook-meta won't work as the old content of the opf file take priority.

Martin

PS: Windows users: calibredb set_metadata might rename the directory - so you should not cd into the directory.
krischik is offline   Reply With Quote