Hi all,
OK, I've been using PDF as my ebook format until now. I read a bit and decided to start using ePub from now on.
I name ALL my ebooks :
Author - Title (year).pdf
Is there anyway to generate the metadata from the file?
For example, I had written this little script to do this with my PDF's :
Code:
// Get the current filename
var fullName = this.documentFileName;
// Extract author, title and year
var author = fullName.slice(0,fullName.indexOf(" - "));
var title = fullName.slice(fullName.indexOf(" - ")+3, fullName.indexOf(" ("));
var year = fullName.slice(fullName.indexOf(" (")+2, fullName.indexOf(").pdf"));
// Insert metadata
this.info.Author = author;
this.info.Title = title;
In case there is no such tool, I played a bit with the files and realized they are actually ZIP file. After extracting them, I found the content.opf file which is actually an XML file.
I should be able to write me a little script that changes the metadata for me, I just want confirmation from the more experienced users about this :
- Is content.opf the only file to edit?
- Is all the metadata contained in the <metadata> tag?
- I am under the impression that the only "standard" tags are the ones starting with <dc:...> and everything else is editor specific. Please confirm?
- Is there always a cover.jpg inside the files?
Thanks for any and all help!
Simo