Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Other formats > IMP

Notices

Reply
 
Thread Tools Search this Thread
Old 04-07-2009, 11:40 AM   #16
shighfield
Groupie!? GROUPIE!?!?
shighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enough
 
shighfield's Avatar
 
Posts: 319
Karma: 649
Join Date: Aug 2008
Location: The Dirty Shwa
Device: EBW 1150, Libra Color
Nick: Any work on impedit yet? I'm looking for a way to edit the catagory in an IMP file from the command line.
shighfield is offline   Reply With Quote
Old 04-07-2009, 11:54 AM   #17
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
I haven't written it yet...

But I do remember helping AZed add that capability to EBook-Tools on CPAN (Perl code repository).

I'll see if I can use AZed's code to create a functional 'impedit' command line program, but I know a GUI solution that works quite well, ConvertIMP.

What target program would you prefer to use: Windows executable or Unix/MAC Perl script? Any syntax you would like to see used for the option/parameter switches?

Last edited by nrapallo; 04-07-2009 at 11:59 AM. Reason: added links
nrapallo is offline   Reply With Quote
Advert
Old 04-07-2009, 12:56 PM   #18
shighfield
Groupie!? GROUPIE!?!?
shighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enough
 
shighfield's Avatar
 
Posts: 319
Karma: 649
Join Date: Aug 2008
Location: The Dirty Shwa
Device: EBW 1150, Libra Color
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.
shighfield is offline   Reply With Quote
Old 04-07-2009, 06: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, 1009 views)

Last edited by nrapallo; 04-07-2009 at 08:40 PM. Reason: typo
nrapallo is offline   Reply With Quote
Old 04-07-2009, 08:13 PM   #20
shighfield
Groupie!? GROUPIE!?!?
shighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enough
 
shighfield's Avatar
 
Posts: 319
Karma: 649
Join Date: Aug 2008
Location: The Dirty Shwa
Device: EBW 1150, Libra Color
Nick: That works great! I've only really tested the catagory part, but will beat this up for you as I'm converting a ton of books from LRF to HTML / IMP now.

Additions... What about a way to mass change a directory? ie: impmeta *.imp --cat "Fantasy" would set the whole shebang in the directory?

My end goal is to (under windows for now) click a button and be able to edit fields in IMP's from calibre, convert to IMP within calibre, etc.
shighfield is offline   Reply With Quote
Advert
Old 04-07-2009, 08:49 PM   #21
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
Nick: That works great! I've only really tested the catagory part, but will beat this up for you as I'm converting a ton of books from LRF to HTML / IMP now.

Additions... What about a way to mass change a directory? ie: impmeta *.imp --cat "Fantasy" would set the whole shebang in the directory?

My end goal is to (under windows for now) click a button and be able to edit fields in IMP's from calibre, convert to IMP within calibre, etc.
That's easy, using windows for command, place this in a batch file and pass it parameters --cat "Fantasy" (or %1 %2) etc:
Code:
for %%i in (*.imp)  do impmeta "%%i" --cat "Fantasy"
If you execute this at the dos prompt without batch files, then use single % in place of the double %%.

Oh, and for recursively down into all subdirs, use:
Code:
for /r %%i in (*.imp)  do impmeta "%%i" --cat "Fantasy"
nrapallo is offline   Reply With Quote
Old 04-08-2009, 09:21 AM   #22
shighfield
Groupie!? GROUPIE!?!?
shighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enough
 
shighfield's Avatar
 
Posts: 319
Karma: 649
Join Date: Aug 2008
Location: The Dirty Shwa
Device: EBW 1150, Libra Color
Well then! I always forget about the old command.com tricks. So far I've used it on around 20 books in my real library and all is fine. When I'm out today I'm picking up my first pbook in a long time. Determined to learn python now, it looks easy to work with.
shighfield is offline   Reply With Quote
Old 04-08-2009, 10:33 AM   #23
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
Well then! I always forget about the old command.com tricks. So far I've used it on around 20 books in my real library and all is fine. When I'm out today I'm picking up my first pbook in a long time. Determined to learn python now, it looks easy to work with.
I've got a lot of python self-learn type ebooks in .imp format if you want them. I'll have to check if I have a EBW1150 .imp version as most are in REB1200 .imp format.

Last edited by nrapallo; 04-08-2009 at 10:37 AM.
nrapallo is offline   Reply With Quote
Old 04-09-2009, 11:20 AM   #24
shighfield
Groupie!? GROUPIE!?!?
shighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enoughshighfield will become famous soon enough
 
shighfield's Avatar
 
Posts: 319
Karma: 649
Join Date: Aug 2008
Location: The Dirty Shwa
Device: EBW 1150, Libra Color
Thanks Nick! Apreciated the links and will be giving this a go over! Something new to play with so we'll see if it sticks in my head or makes it hurt like basic does.
shighfield is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
4GB internal memory: how much for books? desertblues Amazon Kindle 11 10-06-2010 10:45 AM
Info Amazon collects about books I didn't buy from them? rangepig Amazon Kindle 1 08-26-2010 02:17 AM
Double Collections with internal and SD books simplyparticular Calibre 3 07-13-2010 11:04 PM
Can I autofetch info about my books? darkmonk Calibre 19 03-19-2009 10:27 PM
Perl only access to imp file info derrell IMP 5 08-29-2008 11:38 AM


All times are GMT -4. The time now is 07:30 PM.


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