04-21-2009, 03:50 PM | #16 |
Member
Posts: 21
Karma: 272
Join Date: Dec 2007
Location: Romania
Device: ebookwise 1150
|
In that part of the form the script takes the output from the word2imp.js script so it is an error raised by windows scripting host.
To look what is wrong i suggest to run the jscript from a command screen like this word2imp.js "doc_file" author title category 2 what happens? |
04-21-2009, 04:02 PM | #17 |
Member
Posts: 21
Karma: 272
Join Date: Dec 2007
Location: Romania
Device: ebookwise 1150
|
maybe windows scripting engine is broken
You can try also to reinstall the scripting engine from here
http://www.microsoft.com/downloads/d...6-524e7e844d81 Hope it helps. |
Advert | |
|
04-21-2009, 04:06 PM | #18 |
Member
Posts: 21
Karma: 272
Join Date: Dec 2007
Location: Romania
Device: ebookwise 1150
|
or maybe it is enough to locate the file %windir%\inf\wsh.inf (inf is a hidden folder), right click, select "Install".
|
04-21-2009, 04:15 PM | #19 | |
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 still get an error, as per the below picture: |
|
04-21-2009, 04:18 PM | #20 | |
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:
|
|
Advert | |
|
04-21-2009, 04:29 PM | #21 |
Member
Posts: 21
Karma: 272
Join Date: Dec 2007
Location: Romania
Device: ebookwise 1150
|
cscript
You can see in the source that I'm using the cscript.exe to run the jscript so you can try to place in the front of the command line the cscript executable like i did in my autoit script.
Anyway thank you for your interest, sorry I must go to sleep now, tomorrow a busy day at work. By |
04-21-2009, 05:22 PM | #22 | |
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:
My fault for trying to run this deep inside subdirectories, as I noticed the Windows (default) environment space gets exhausted if the "command.com /c cscript ScriptDir\word2imp.js OpenFileName Title Author Category BuildTarget" is too long. Code:
D:\REB\NEWFOL~1\NE3CF9~1\WORD2I~1>command.com /c cscript "D:\REB\New Folder\New Folder (10)\word2imp-source\word2imp.js" Joke.doc T A C 2 Microsoft (R) Windows Script Host Version 5.7 Copyright (C) Microsoft Corporation. All rights reserved. Converting... Please wait Project file saved Conversion completed D:\REB\NEWFOL~1\NE3CF9~1\WORD2I~1>command.com /c cscript "D:\REB\New Folder\New Folder (10)\word2imp-source\word2imp.js" Joke.doc MyTitle MyAuthor MyCategory 2 Program too big to fit in memory However, upon further testing, it appears that the REAL culprit is that @ScriptDir breaks this command when the fullpath directory name (but not $OpenedFileName directory or filename) contains spaces!!! Can you just substitute $ScrFile where it can be defined as a global at the start of the script? i.e. Code:
Global $ScrFile=@ScriptDir & "\word2imp.js" Last edited by nrapallo; 04-21-2009 at 07:17 PM. Reason: added possible enhancements |
|
04-23-2009, 05:25 AM | #23 | |
Member
Posts: 21
Karma: 272
Join Date: Dec 2007
Location: Romania
Device: ebookwise 1150
|
problems fixed (I hope), enhancements added
Hi
Here there is the fixed an enhanced version of my gui wrapper for the jscript written by =X=. It was my fault to omit quoting the directory where the script resides so I corrected this issue and now the gui is working properly. nrapallo suggested this: Quote:
So, I changed a little bit the javascript code and now you can produce imp file from doc, rtf, html, txt, ppt, and pps documents and I have decided to change the name of the program to any2IMP. I attached the new version bellow: first the exe compiled with autoit and the modified javascript second the sources If you are concerned about the false positives raised by some antivir or antimalware products please take only the source and, you can download AutoIt and you can compile the exe by yourself. The false positives issue it is a known problem, you can read about it on autoit forum (see one of my previous post). |
|
04-23-2009, 09:01 AM | #24 | |
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'm going to be happy to enhance this further, and to start with, in any2IMP.au3, try replacing line 44 with: Code:
$OpenedFileName = FileOpenDialog("Choose file...", $LastDir, "MS Word .doc files (*.doc)|MS Word .rtf files (*.rtf)|MS PPT .ppt files (*.ppt;*.pps)|HTML .htm files (*.htm*)|TEXT .txt files (*.txt)|All Files (*.*)")
.
Check out my new Any2IMP IE v6 screenshots added here showing more planned input types to be supported. Next to add my mobi2imp.pl and Lit2sp.pl Perl scripts, but first they will need to be converted to jscript... Last edited by nrapallo; 04-23-2009 at 12:53 PM. Reason: enhanced my enhancement |
|
04-23-2009, 01:57 PM | #25 |
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
|
allow .opf conversions to .imp in any2IMP
OK, let the enhancements begin!
I changed line 83 in any2IMP.js to: Code:
project.CSS = 2; I added another "convert from" if statement before line 40 in any2IMP.js, namely: Code:
if (szBaseNameExt == ".opf"){ WScript.StdOut.WriteLine("Converting... Please wait"); oBuilder.BuildFromProject( sDirName + "\\" + fileName); WScript.StdOut.WriteLine("Conversion completed"); WScript.Quit(); } Oh, by the way, with the above ability to convert directly from .opf to .imp, you will need to tweak in any2IMP.au3 line 44 again to be: Code:
$OpenedFileName = FileOpenDialog("Choose file...", $LastDir, "MS Word .doc files (*.doc)|MS Word .rtf files (*.rtf)|MS PPT .ppt files (*.ppt;*.pps)|HTML .htm files (*.htm*)|TEXT .txt files (*.txt)|OPF .opf files (*.opf)|All Files (*.*)")
.
Last edited by nrapallo; 04-23-2009 at 04:28 PM. |
04-23-2009, 02:49 PM | #26 | |
Member
Posts: 21
Karma: 272
Join Date: Dec 2007
Location: Romania
Device: ebookwise 1150
|
Thank you for this suggestions, they are very useful, it's a shame but I completely forgotten about filters in the open dialog. That's more better now.
About the perl script that you mentione in your post, I must say, sorry but I don't know perl so I can not follow your sugestion. Even with the javascript I had to tell I was in trouble because I'm new also in java scripting. Anyway for lit converting I find a program called "clit" at http://www.convertlit.com/ and seems to be interesting, it converts lit to OEBPS. I made some testing and it is working fast but the .opf project that is saved seems to be not compatible with Ebook Publisher's own .opf . Please detail me a little because I don't understood very well what you want to say with: Quote:
|
|
04-23-2009, 03:10 PM | #27 | |||
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:
I too lack the necessary Perl to Javascript coding knowledge, but with your help and previously =X='s, I think we can manage to get something working. We can take small steps and see how far it will get us... Quote:
First, .opf files "hold" or specify everything that the ebook creation software needs to know, be it eBook Publisher or MobiPocket Creator. Each program uses a bit different setup, but the general coding remains the same. Now a .opf is also the cornerstone of .epub files, being a roadmap of its structure and where metadata is stored. They are very useful files to have!!!! OK, now more on the .tmp files. Examine a .opf file leftover and even load it (by double-clicking it) into eBook Publisher after the ebook has been created. You'll notice that the .tmp holding the .html code is "missing" as are any images referred therein. Now, if you look inside the ETI .epub (open it up with winzip or my preference being winrar), you will see the .opf above and THAT .tmp (html) file missing above. That file is what I want to have access to and most definitely would post-process it using many desirable text substiutions. However, that file and any images only existing in the temp directory created by eBook Publisher (and then deleted BEFORE I can get to it). I tried creating a .oeb using any2IMP, but it appears broken in that it doesn't include the underlying base (html) .tmp file and any images. It used to work with v2.2.5 (before .epub support was added). This is my current "mission", to get access to these .tmp files. Wish me luck! Last edited by nrapallo; 04-23-2009 at 03:26 PM. Reason: typo |
|||
04-23-2009, 03:57 PM | #28 | ||
Member
Posts: 21
Karma: 272
Join Date: Dec 2007
Location: Romania
Device: ebookwise 1150
|
Hi
Quote:
Quote:
|
||
04-24-2009, 10:32 AM | #29 |
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
|
any2IMP v0.1
OK, I finally got it to save the images within .epub files. It's a kludge/hack but works for now.
The .oeb that gets created allows the .epub to include the extracted images and hence produces a usable .epub. TO DO: Need to see if I can Extract OEBFF from within OnBuildStart. I can't say the same for the .oeb that gets created though. eBook Publisher can't even open the .oeb file it creates, so there is no easy way to extract the .oeb to get at the source files! Use the ETI .epub Build target if you want/need to tweak the conversion and change the source files (just unzip the .epub)!!!! Note: for text .txt file conversions to .imp, I had to re-edit the .tmp (html) file produced to remove the line-ending <BR>'s as without them it reflows better!!! The eBook Publisher inserted <p> ... </p> during the conversion do work well! A few modifications:
Last edited by nrapallo; 04-24-2009 at 10:57 AM. Reason: typo |
04-25-2009, 08:35 AM | #30 | ||
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:
Code:
Content-Type: application/xhtml+xml Code:
Content-Type: text/x-oeb1-document Next, I'm going to see what OnSourceStart and OnSourceDone can yield by way of access to the source files for the intent and purpose of changing it before the .imp gets created. |
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
eBookwise: IMP vs. RB files | Jack B Nimble | IMP | 10 | 11-05-2008 09:22 AM |
rb files and imp files | Wordcrasher | IMP | 2 | 10-20-2008 06:37 PM |
Use two fonts in imp files? | Moonraker | IMP | 3 | 04-10-2008 06:46 PM |
Anyone know how to convert IMP files | jckatz | Sony Reader | 1 | 01-23-2008 12:19 PM |
how to read imp files? | roquet | Reading and Management | 6 | 11-10-2007 03:27 AM |