![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
impmake: automated creation of IMP books via the command line
NOTE: impmake has now been renamed to ebookutils, and is hosted at http://gitorious.org/projects/ebookutils using Git, which should easily allow other developers to make changes. I plan to merge impserve, impmake, 2 new python utilities which replace ebw1150+rebcomm and pdfread under this umbrella.
This is impmake, a utility for creating ebooks for the 1100/1150/1200 from HTML source files. It requires the installation of eBook Publisher. In case this is not installed, you may get an error: Code:
Execution failed at src/impmake.c:159 while attempting to execute dhCreateObject(L"SBPublisher.Project", NULL, &impProject) Code:
Usage: impmake [-OPTIONS] FILES [...]
-h, --help Show this help message.
-s, --save Specify the project to save as.
-a, --author Specify the book's author.
-t, --title Specify the book's title.
-c, --category Specify the book's category.
-d, --out-dir Specify the output directory.
-n, --name Specify the book name.
--isbn Specify the book's ISBN
--pubdate Specify the book's publishing date
--publisher Specify the book's publisher
--language Specify the language for the book.
--1100, --1150, --1200, --oeb
Specify the target device to use for book creation.
--zoom-small, --zoom-large, --zoom-both
Specify the zoom states to be supported in the book
--no-underline Specify that links should not be underlined.
--no-img-conv Specify that image auto conversion to JPG should be disabled.
--no-img-scale Specify that image pre scaling should be disabled.
--compress Specify that the compression is to be used.
--keep-anchors Specify that link anchors should be kept in output.
Changes in 0.2: - convert relative to absolute paths when referring to files/directories - add a --log option which generate a log from the publisher itself (can be useful for debugging errors) Changes in ebookutils-0.3: - impmake: add an -f option to specify the files to be included, with one file per line - impserve: handle paging of booklist requests - impserve: handle downloading of IMP books which are sent as an attachment (direct download of IMP from mobileread works) - impserve: implement a plugin system and provide 2 default plugins to change the URL/content before being sent to the device. - impserve: refactored the code heavily, please run impserve/run.py from python. To get it working in WINE, you'll need to perform the following:
Last edited by ashkulz; 08-30-2008 at 08:00 PM. Reason: add ebookutils-0.3 |
![]() |
![]() |
![]() |
#2 |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
Great effort!
I used to use rbmake with my REB1100 all the time because of its simplicity and power. You seem to have duplicated that with impmake. I tried compiling it under Cygwin (what I have installed right now in WinXP) and got an error since I don't have "tchar.h". I know it's in "/usr/include/mingw" and it's not a good idea to mix these two installations, BUT is there a workaround to using tchar.h for the moment? I don't feel like installing mingw right now as I finally have my Cygwin implementation setup again. Do you know the full Cygwin installation downloaded over a GIG of stuff and took several hours to complete? ![]() Let me play with this a bit later today before asking any more questions... ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Quote:
I plan to work on PDFRead in the next few weeks, and one of the first things I will do is use this instead of directly using COM from Python -- which should reduce the installation size quite a bit. I think you can take a similiar approach for the html2mobi which is done in Perl, I think... |
|
![]() |
![]() |
![]() |
#4 |
Hi There!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,473
Karma: 2930523
Join Date: Feb 2008
Location: Ft Lauderdale
Device: iPad
|
Thank you! I haven't the foggiest idea what to do with it, but I'm grateful for everything you and Nick are doing to keep IMP format alive so that we can continue using our beloved EB=1150's.
![]() |
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Hi There!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,473
Karma: 2930523
Join Date: Feb 2008
Location: Ft Lauderdale
Device: iPad
|
|
![]() |
![]() |
![]() |
#7 | ||||
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
Quote:
![]() ![]() Quote:
Quote:
We (actually Ret) just got the EBW1150 proxy browser working (check here) so I hope this will aid in your proxy browser/librarian effort! We may need a "Developer's Corner" sub-forum in the Fictionwise forum now... Thanks for all your help keeping the .imp format alive!!! |
||||
![]() |
![]() |
![]() |
#8 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Made a new release (impmake-0.2) with the following changes:
- convert relative to absolute paths when referring to files/directories - add a --log option which generate a log from the publisher itself (can be useful for debugging errors) Note that 0.2 doesn't work in Wine yet, it fails at ValidateManifest. I am still investigating that. |
![]() |
![]() |
![]() |
#9 |
Jack O' Apes
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 227
Karma: 1939
Join Date: Dec 2007
Location: Oklahoma
Device: Ebookwise 1150, Nokia N810, EZ-Reader, HTC Droid Incredible, Archos 70
|
I am getting the same sort of error with wine but with version .01 I think. Downloaded it yesterday.
Code:
Execution failed at src/impmake.c:191 while attempting to execute dhCallMethod(impBuilder, L".ValidateManifest(%o)", impProject) Ok looked back at the first post where the files are and it is .01 that have as .02 is labeled .02. Brain isn't working today. Last edited by derrell; 08-27-2008 at 07:55 AM. Reason: Slow mental processes |
![]() |
![]() |
![]() |
#10 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 120
Karma: 726
Join Date: Dec 2007
Location: US
Device: Sony PRS-350, Astak PocketPro, iPhone, Asus eee Pad Transformer
|
Wonderful.
It works like a charm as far as I have been able to go -- and FAST, too. It could be that I'm not crossing my fingers as I proceed, but images don't show up in the resulting .imp file regardless of whether they're in the directory with the html file or not. Apparently there's something I've overlooked. The log file indicates: Error: A link to a non-existent anchor ("\H:\HTML2imp\images\Illus_1.jpg") was found. Ignoring link ... Could it be the beginning backslash that it inserts into the search path? Thanks for your work on this. Gene Last edited by GeneS; 08-27-2008 at 10:46 AM. Reason: added line from logfile |
![]() |
![]() |
![]() |
#11 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Quote:
And yes, both versions don't work in WINE (but eBook Publisher does). Apparently, it is something to do with the path-translation WINE does which causes the COM functions to return an E_FAIL (generic error) -- at least, that's what I think for now. |
|
![]() |
![]() |
![]() |
#12 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
I asked about co-author in the DEV HUB and it is already implemented according to Alex.
The person who creates the project (the "owner") can give other people (who must be registered on the dev hub) full access to the project's repository. He needs to go to Admin -> Subversion Access. |
![]() |
![]() |
![]() |
#13 | |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
|
|
![]() |
![]() |
![]() |
#14 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
![]() |
![]() |
![]() |
#15 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Quote:
Now you can try running wine impmake.exe <other-params> |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
<Command Line> Add multiple books in multiple formats | himitsu | Calibre | 8 | 09-25-2010 11:07 PM |
adding books via command line in msdos batch | FlaKate | Calibre | 1 | 12-25-2009 01:12 AM |
Where are the command line tools? | PaulChernoch | Calibre | 17 | 10-23-2009 12:08 PM |
Adding books from the command line | edembowski | Calibre | 1 | 08-29-2009 11:18 AM |
Why use the command line? | slantybard | Calibre | 6 | 07-22-2009 12:17 PM |