01-26-2008, 08:35 PM | #1 |
Member
Posts: 13
Karma: 10
Join Date: Dec 2007
Location: Chicago
Device: EB-1150, Motorola Atrix 4G, Dell Streak 7
|
SBPubX Builder
This query is a little more arcane than is customary on this forum but I really don't know where else to ask.
Has anyone done much with SBPubX Lib 1.0? It is (essentially) a COM API representing all of the functionality of eBook Technologies eBook Publisher (eBP). I have written a couple of programs that manipulate OPF files and can successfully write an OEB file ... but I'm deuced if I can publish an IMP! After having played with the API for a few days now I'm 99.9% certain that this is the base code for the Breen Librarian ... and for the online content server. And you could say with a reasonable degree of rectitude that I'm writing my own Librarian (although that was never my initial goal). Since both eBP and the Librarian successfully write IMP files then the Builder must work ... but nothing I've tried has worked yet. Anyone meet with more success? Tom. |
01-30-2008, 04:30 AM | #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
|
Example perl scripts using SBPubX
Over the past month, I have been experimenting with command-line based perl scripts to create .IMP files directly from .htm source file(s).
The resulting .IMP appears identical to that produced by the eBook Publisher software; as it should as the SBPubX interface calls are being used. In particular, I have adapted three perl scripts as listed in "SBPubX.doc" (installed by the eBook Publisher software) and have attached them below along with a sample .htm input file. First, the perl script 'buildIMP.pl' has been "hard-coded" with the input file 'Crtso.htm' and produces a .IMP file in REB 1200 format as it stands. The output format can easily be changed to GEB/EBW 1150 or REB 1100 by editing this perl script and only uncommenting the {BuildTarget} line for the required output format. In addition, the ebook metadata as well as input .htm file can easily be changed by editing the 'buildIMP.pl' script. Executing the buildIMP.pl script will also create/save a .opf project file that will be used by the other two perl scripts provided below. Second, the perl script 'examineOPF.pl' again takes its input from a "hard-coded" entry (I am just learning perl and will hopefully soon make these scripts more universal and useful!). It prints out to stdout metadata details about the .opf project file. Third, the perl script 'validateOPF.pl' takes the same input as above and prints out raw warning/error messages encountered; again just like eBook Publisher! My aim here is to show how easy it is to produce .IMP/.OPF files using SBPubX interface calls via command-line scripts/batch files and not to provide working full-featured scripts. By the way, I am in the process of automating the conversion of the Blackmask DVD v1 (with approx. 11,000 ebooks) into REB 1200 .IMP and GEB/EBW 1150 .IMP formats with a better title page and "fixes" for pet peeves of mine regarding lack of margins, messy TOC and hard to read font size. I am basically using a batch file created from 'buildIMP.pl' using pl2bat.bat and deploying my "fixes" therein. I am striving to properly retain the ebook's metadata i.e. title, author and category in the resulting .IMP! Hope this helps with your exploration of SBPubX. -Nick |
Advert | |
|
01-30-2008, 10:08 AM | #3 |
Member
Posts: 13
Karma: 10
Join Date: Dec 2007
Location: Chicago
Device: EB-1150, Motorola Atrix 4G, Dell Streak 7
|
With some outside help I tracked down what was wrong: I was instantiating the Project at startup and setting the BuildTarget at the same time. Later, just before processing the metadata and manifest items I did a ClearAll ... thus blowing away my target device setting.
Builder chokes on a Project with no target. |
01-30-2008, 11:40 AM | #4 |
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
|
What format is the BlackMask DVD in?
This could be a universal translator possibly. It turns out that mobi and lit files are also OPF based although the standard is a bit shaky. Check "Open eBook" in the wiki. Thanks for taking this on. Dale |
01-30-2008, 01:04 PM | #5 |
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
|
Dale:
The Blackmask DVD v1 that was produced several years ago contains a directory with all ebooks in .zip files (one for each ebook). Another directory on my DVD contains all ebooks in .LIT format. Within the .zip file, normally there will be the main .htm, a separate TOC .htm, and the Blackmask index.htm using frames to display the ebook. This .zip file is probably the file used by www.munseys.com ( previously www.blackmask.com ) when choosing the 'Zipped' download option. I had previously converted almost all 11,000 ebooks from .LIT to .IMP using the program lit2sb available in the files section of the REB 1200 Yahoo group. I have posted there detailed instructions along with sample results. HOWEVER, the .IMP files produced were based on the corresponding .LIT and I had no control over title page selection (or not), font size and TOC positioning. Also, the author, title and category metadata was not always filled in fully. I wasn't 100% visually satisfied with this conversion. So, I changed tactics and wanted to use the .zip files instead as my source, but that required much more setup. I'm now about half way through converting the Blackmask DVD v1 to .IMP formats (GEB/EBW 1150 and REB 1200) using a variant of the 'buildIMP.pl' perl script mentioned in my previous post. I attach sample conversions with each sample having two .IMP files; the one ending in '_1150' is for the GEB/EBW 1150 and the one ending in '_1200' for the REB 1200. I have taken to heart your stated views on font sizes for the GEB/EBW 1150 and have allowed in my conversion the use of the 'small' font size for the 1150 as well as 'x-small' as used by www.munseys.com . This is just the tip of the iceberg... -Nick p.s. as an aside, I have always enjoyed reading your posts. You have unique insights into our beloved ebook readers (I have all three) and have contributed greatly to 'our' community. Hopefully, I can help with command-line conversions using perl scripts. While I am proficient in the use of eBook Publisher, it is just too time-consuming 'fixing' poorly written .htm/.opf files and would like to use perl scripts to accomplish same! Last edited by nrapallo; 01-30-2008 at 02:21 PM. Reason: fixing typos... |
Advert | |
|
01-30-2008, 02:26 PM | #6 |
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
|
Thanks for the clarification. There is an eBook upload area of the site for IMP books and they are, so far, all 1150 I believe. It would be great if you could upload a few. I do like the small as the default (an so does the latest version of eBook Publisher).
Dale |
01-30-2008, 03:08 PM | #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
|
Uploads...
I have a lot of REB 1200 .IMP that I have created for my own use/enjoyment. Many severally tax the REB 1200 with many hyperlinks and upwards to 10,000 pages. Most are between 10MB to 30MB files. Many were created after downloading web content locally with 'HTTrack Website Copier'. I would like to share these, but I have two nagging issues: First, I don't know how copyrights would affect my posting (for free obviously) web content created by others. Second, how do I upload REB 1200 .IMP files and have them differentiated from GEB/EBW 1150 .IMP files. I have been personally using suffixes '_1200.imp' and '_1150.imp' respectively, but since the vast majority of users here use the 1150, I do not want to confuse them with an 'incompatible' .IMP file. The 'Bulk Convert' program installed by the eBook Publisher software uses the suffixes '.1.imp" and '.2.imp' respectively for the ETI-1 (REB 1200) and ETI-2 (EBW 1150). This is not as visually telling of the type of .IMP format supported and could lead to ambiguities depending on the file naming used. I do prefer my naming convention (would you expect any different?) so maybe I will upload a few REB 1200 .IMP along with their EBW 1150 .IMP counterpart as a test. That brings up another issue, in that for truly large .IMP files, the EBW 1150 cannot 'keep up' with the number of hyperlinks or file size used and refuses to 'follow' hyperlinks. This renders the .IMP unusable! It exhausts an internal resource, but the REB 1200 does not. As a result, only REB 1200 versions will be posted for these cases. I note that you may not have a REB 1200, but can still use the 'ebook viewer.exe' installed by the eBook Publisher software to view the REB 1200 .IMP on a computer. Any thoughts on this issue? -Nick |
01-30-2008, 03:29 PM | #8 |
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
|
Your conventions seem fine although 1150 is assumed if not stated so you may only need to mark 1200. All the posts must be copyright free or have permission of the author/translator. Creative common license is ok. I am not sure what the biggest 1150 size is. I prefer things below about 2Meg but that may be just me. I generally find images sets the file size but then I don't normally see books with 10,000 pages. Images can be tuned to work well on the 1150 but the 1200 can use nice color ones and bigger also so the image processing might want to be unique.
The battery life of the 1200 was the killer for me. Dale |
01-30-2008, 04:32 PM | #9 |
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
|
I like your suggested naming convention: '.IMP' for EBW/GEB 1150 and '_1200.IMP' for REB 1200 for posts to the E-Books uploads section here.
Now to find one below 10MB and copyright-free! By the way, on the REB 1200, I find that I get about 50% of the battery life of the EBW 1150. I can live with this as I rarely get 5-6 straight hours 'down time'. The real killer though is the weight. It is not easy to hold the REB 1200 for prolonged periods and most of the times I either prop it up on table/sofa or set it on my crossed leg. To me that is its ONLY downside. The weight of the 1150, however, is 'just right'! -Nick |
02-18-2008, 07:18 PM | #10 | |
Mad translator
Posts: 99
Karma: 684
Join Date: Jan 2008
Location: Gradignan près Bordeaux, France
Device: eBookwise 1150 reader, Samsung E60 reader, SAMSUNG N150 netbook
|
Quote:
|
|
02-18-2008, 07:30 PM | #11 | |
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 |
|
02-22-2008, 10:15 AM | #12 | |
Member
Posts: 13
Karma: 10
Join Date: Dec 2007
Location: Chicago
Device: EB-1150, Motorola Atrix 4G, Dell Streak 7
|
Quote:
Blackmask.DVD: The copy I have has 10,000+ books in two formats -- LIT and HTML (the ZIP files). Choosing your starting format is a matter of personal choice. The HTML files are suitable for conversion by the online content server and/or the eBookwise/GEB Librarian, and there are several paths from LIT to IMP. Bottom.Line: If you have some programming expertise you can churn out EB-1150 eBooks with whatever tweaks you desire (fonts, margins, justification, ...). Tom. |
|
02-22-2008, 11:03 AM | #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:
Have you been able to use any other method in SBPubX.doc like 'BuildFromHtmlFile', 'BuildFromTextFile', 'BuildFromWordDoc' or 'BuildFromOEBFF' and make it work? There are no coding examples for these and I don't get any results using them like I do when I use the 'Build' method. Do you have any perl scripts that could help manipulate .IMP files? I am thinking about doing a 'imp2imp' that would work like 'mobi2mobi' wherein a DRM-free file's metadata (Author, Title, Category) could be 'edited' and re-saved. Presently, I use GEBLibrarian for this, and while it works, I prefer a perl script to do this. |
|
02-24-2008, 09:39 PM | #14 | |
Member
Posts: 13
Karma: 10
Join Date: Dec 2007
Location: Chicago
Device: EB-1150, Motorola Atrix 4G, Dell Streak 7
|
Quote:
Publisher has a few rough edges, but it handles all these formats ... oh, and related to your x-small font fix, if you have a good HEX editor you can edit the DLL file directly and change the default font selection inside the DLL for Publisher and/or Book Designer. Tom. |
|
02-24-2008, 10:14 PM | #15 | |
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:
I have taken a .IMP file originally in 'small' font size and after directly hex editing the 'Styl' record ('14 00 00 00 03' changed to '14 00 00 00 02'), I have been able to get it to display in 'x-small' font size. Unfortunately, the other way round doesn't work as you can't easily make the text wrap around if it gets bigger. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-500 Hack Builder! | Nogg | Sony Reader Dev Corner | 205 | 05-19-2011 08:08 PM |
Bart's PE Builder - Run WinXP from CD! | Colin Dunstan | Lounge | 2 | 03-29-2010 11:57 AM |
Collection Builder | pepak | Sony Reader Dev Corner | 37 | 02-03-2010 02:14 AM |
PRS-500 Newbie ??? Using HACK Builder properly | gardenstate | Sony Reader Dev Corner | 3 | 10-04-2007 08:09 PM |