View Single Post
Old 04-07-2009, 05:29 PM   #19
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by shighfield View Post
I am using windows now so a windows .exe is the best for me. Syntax doesn't matter at all, I'm learning some python and am determined to find a way to hack this stuff into Calibre. Hence why I need commandline tools for everything.

I know it won't be part of the main calibre tree but I'm hopful I can get it working enough for Windows users to be able to muck with.
Ooohhhh, calibre hacking...

Here is a quick and dirty attempt at a .imp metadata edit program called impmeta. It is based on ebook.pl from EBook-Tools by Zed Pobre. The readme for it is as follows:
Code:
impmeta - Set specific metadata values in an ETI .imp file.

Usage:
impmeta filename.imp [Options]

Options:
--input filename.imp | -i filename.imp 
Specify the input filename. This can also be specified as the first argument, in which case the -i option will be ignored.

--output modified.imp | -o modified.imp 
Specify the output filename. If not specified, the input file will be overwritten.

--identifier 
Specify the identifier metadata.

--category | --cat | --c
Specify the category metadata.

--subcategory | --subcat 
Specify the subcategory metadata.

--title | --t
Specify the title metadata.

--lastname 
Specify the author last name metadata.

--middlename 
Specify the author middle name metadata.

--firstname | --author | --a
Specify the author first name metadata. Note that IMP files commonly place the full name in this component, and leave the middlename and lastname entries blank.

Examples
 impmeta mybook.imp --title 'Fixed Title' --author 'John Q. Brandy'
 impmeta -i mybook.imp -o fixed.imp --title 'Fixed Title' --cat "To Read"
Try it out first on some backups, and then when you sure it works for you, go live...

Anything you can think of that's missing or you want added?
Attached Files
File Type: zip impmeta.zip (2.03 MB, 1065 views)

Last edited by nrapallo; 04-07-2009 at 07:40 PM. Reason: typo
nrapallo is offline   Reply With Quote