Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-16-2009, 12:29 PM   #1
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Using WindowScript to product IMP files

I ported Nicks command-line based script word2imp.pl (a perl script to Windows script --javscript) to facilitate the conversion of doc directly into .IMP format; bypassing the need for the eBook Publisher GUI.

About the script
Word2IMP.js
Converts MS Word document to IMP
Microsoft windows scripts can be written in VB Script or JavaScript, I wrote this in JavaScript.

RUNNING THE SCRIPT
Two methods
1) Command Line: type
Code:
cscript Word2IMP.js <Your MS Word file name>
2) Drag and Drop:
Drag and Drop your MS Word document on the Word2IMP.js script.


To use the Window Script you need ePublisher

1. You have previously installed the eBook Publisher software from http://www.ebooktechnologies.com/sup...r_download.htm .

No other software is needed since Window scripts have been part of the MS OS since Windows 2000.

Thanks NICK


=X=

PS If folks find this script useful and would like to see NICK's excellent Perl work ported to Window Script* just let me know

WindowScripts can be written in VBScript or JavaScript.
Attached Files
File Type: zip word2imp.zip (1.2 KB, 519 views)
File Type: zip Html2imp.zip (1.8 KB, 513 views)

Last edited by =X=; 01-20-2009 at 01:13 AM. Reason: Clarification
=X= is offline   Reply With Quote
Old 02-12-2009, 04:56 PM   #2
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: 2530531
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 =X= View Post
PS If folks find this script useful and would like to see NICK's excellent Perl work ported to Window Script* just let me know

WindowScripts can be written in VBScript or JavaScript.
OK, =X=, here's asking too much! Sure would like to see you add some simple GUI (in javascript) to select the input file and maybe pass some simple options to the script!

Also, I just released a PowerPoint .ppt to .imp Perl script called PPT2imp.pl. Could you convert that to javascript too?

Thanks for helping me understand the power of javascript built into my OS (WinXP SP3).
nrapallo is offline   Reply With Quote
Old 02-12-2009, 07:40 PM   #3
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
I'll take a look over the weekend and see what I can come up with

=X=

Last edited by =X=; 02-13-2009 at 12:12 AM.
=X= is offline   Reply With Quote
Old 02-19-2009, 05:04 PM   #4
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quick status nick. I've gotten your first request completed. I have the code that will display a "File Open" dialog box. And a simple GUI for the javascript.

The UI is nothing more than a call to IE ActiveX control with hand written HTML.
Since this is test code I've not integrated it with the word2imp script.

OH a FYI. I found some of my old scripts, where I used the Windows Scripting Host (WSH) written in Perl. It provides all the power that VBA and Javascript have but in Perl. The disadvantage is that it requires ActivePerl.

I'll post the finish code here when it's done.
=X=
=X= is offline   Reply With Quote
Old 02-19-2009, 06:21 PM   #5
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: 2530531
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 =X= View Post
Quick status nick. I've gotten your first request completed. I have the code that will display a "File Open" dialog box. And a simple GUI for the javascript.

The UI is nothing more than a call to IE ActiveX control with hand written HTML.
Since this is test code I've not integrated it with the word2imp script.
Thanks for helping out here. I do like using a GUI rather than remembering all the command line switches...

Quote:
OH a FYI. I found some of my old scripts, where I used the Windows Scripting Host (WSH) written in Perl. It provides all the power that VBA and Javascript have but in Perl. The disadvantage is that it requires ActivePerl.

I'll post the finish code here when it's done.
=X=
Oh, I like that!!! I have ActivePerl installed; originally to use with tompe's Mobiperl scripts (I use WinXP) and then for SBPubX OLE/COM interface scripts as well as Mobi2IMP and Lit2sb.

Do you think it would be worthwhile to also have the Microsoft Visual Basic example scripts from the SBPubX.doc posted here as well. I know you've converted the above to javascript, but would there be any benefit to using MS Visual Basic, GUI-wise?
nrapallo is offline   Reply With Quote
Old 02-20-2009, 12:09 PM   #6
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quote:
Originally Posted by nrapallo View Post

Do you think it would be worthwhile to also have the Microsoft Visual Basic example scripts from the SBPubX.doc posted here as well. I know you've converted the above to javascript, but would there be any benefit to using MS Visual Basic, GUI-wise?
Actually that would be the cleanest way to go. Scripts are great when you want to do something quick and dirty. But once you start creating GUI and more sophisticated good development tools are a must.

I quit using it since VB 6. But if you used the Net platform you could easily write a GUI with Basic/C#/JScript... you get my point .

The bad news is I have do not programming experience with the NET framework, which is what MS currently supports.

=X=
=X= is offline   Reply With Quote
Old 02-20-2009, 01:49 PM   #7
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: 2530531
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 =X= View Post
I quit using it since VB 6. But if you used the Net platform you could easily write a GUI with Basic/C#/JScript... you get my point .
Neither do/can I program in VB.

Anyone have VB (with GUI) programming skills?

Quote:
The bad news is I have do not programming experience with the NET framework, which is what MS currently supports.

=X=
Ditto, with .NET (with GUI) programming skills?

Anyone care to help get us started with a simple sample .vbs/.net?

I'll surely hack at it if it doesn't quite do what it should; I just need a something to start with... thanks!
nrapallo is offline   Reply With Quote
Old 02-20-2009, 02:08 PM   #8
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,523
Karma: 11329767
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by nrapallo View Post
Anyone care to help get us started with a simple sample .vbs/.net?
I do .Net dev for my day job. So, if anyone wants help putting together something I would be happy to help. I guess to get started download one of the visual studio express IDEs, they are free. You have to choose VB.Net express or C# Express.

BOb
pilotbob is offline   Reply With Quote
Old 02-20-2009, 03:59 PM   #9
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: 2530531
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 pilotbob View Post
I do .Net dev for my day job. So, if anyone wants help putting together something I would be happy to help.
Thanks for the offer, BOb!

Quote:
I guess to get started download one of the visual studio express IDEs, they are free. You have to choose VB.Net express or C# Express.

BOb
If I download the free VB.Net express, then could you perhaps show us how to GUI-ize =X='s javascript for, say, word2imp.js in post #1 above. In particular, it would be nice to select the MS .doc input file to convert using a File Open Requester here:
Code:
   fileFullPathName = oArgs.item(0);
and perhaps have a GUI screen that includes a browse button for the above and InputBoxes/CheckBoxes to select options, in place of the "Default", for:
Code:
    project.AuthorFirstName = "Default Author";

    project.BookTitle = "Default Title";

    project.Category = "Default Category";
and
Code:
    project.BuildTarget = 2;
where BuildTarget has values of 2=EBW1150 .imp; 1=REB1200 .imp; 0=ETI (nonSony) .epub; 3=REB1100 .rb

That's it! Really would help us get started though...

Last edited by nrapallo; 02-20-2009 at 04:02 PM.
nrapallo is offline   Reply With Quote
Old 04-19-2009, 07:33 AM   #10
ancalex
Member
ancalex has a complete set of Star Wars action figures.ancalex has a complete set of Star Wars action figures.ancalex has a complete set of Star Wars action figures.
 
ancalex's Avatar
 
Posts: 21
Karma: 272
Join Date: Dec 2007
Location: Romania
Device: ebookwise 1150
I have some knowledge in visual basic but my experience with visual basic express 2005 or 2008 was not satisfactory. On my laptop with only 512 MB of RAM visual express is working very, very slow. So I looked for alternatives and I found AutoIT a basic like scripting language. I will post soon a little script that achieve those things asked by nrapallo.
ancalex is offline   Reply With Quote
Old 04-20-2009, 09:33 AM   #11
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: 2530531
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 ancalex View Post
I have some knowledge in visual basic but my experience with visual basic express 2005 or 2008 was not satisfactory. On my laptop with only 512 MB of RAM visual express is working very, very slow. So I looked for alternatives and I found AutoIT a basic like scripting language. I will post soon a little script that achieve those things asked by nrapallo.
That would be terrific! Are you going to use Koda FormDesigner or straight AutoIt code with COM support?

Here is a sample GUI layout I was looking at using before:


And a while back, I was even toying with an Internet Explorer V6 interface, as seen below:
Attached Thumbnails
Click image for larger version

Name:	Any2IMP-IE6-interface.jpg
Views:	416
Size:	55.3 KB
ID:	27824   Click image for larger version

Name:	Any2IMP-input-types.jpg
Views:	412
Size:	56.2 KB
ID:	27969   Click image for larger version

Name:	Any2IMP-output-types.jpg
Views:	451
Size:	58.5 KB
ID:	27970  

Last edited by nrapallo; 04-23-2009 at 09:23 AM. Reason: added more screenshots
nrapallo is offline   Reply With Quote
Old 04-21-2009, 01:50 PM   #12
ancalex
Member
ancalex has a complete set of Star Wars action figures.ancalex has a complete set of Star Wars action figures.ancalex has a complete set of Star Wars action figures.
 
ancalex's Avatar
 
Posts: 21
Karma: 272
Join Date: Dec 2007
Location: Romania
Device: ebookwise 1150
a bit of succes

Hi
Well, AutoIt support operations with COM objects but like you will see it's a little bit tricky to manage that.
First I tried to do everything in a single script but... surprise... when I want to catch the OnBuildStart event using BuildFromWordDoc the result is... nothing. The event is not firing my function in AutoIt for overriding default project settings.
I can catch this event if I use BuildFromHtmlFile but surprise again... the default projects settings are used despite of what I do in my function. I think AutoIt have some problems with some events with some COMs... especially with SBPublisher COM.
So I decided to write only a GUI wrapper for word2imp.js first.
Here are the results.

First the source file (contains the autoit script and the jscript)

Second, the executable (contains the compiled autoit executable and again the jscript)
Attached Files
File Type: zip word2imp-source.zip (2.6 KB, 401 views)
File Type: zip word2imp-exe.zip (298.8 KB, 410 views)
ancalex is offline   Reply With Quote
Old 04-21-2009, 02:24 PM   #13
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: 2530531
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 ancalex View Post
First the source file (contains the autoit script and the jscript)

Second, the executable (contains the compiled autoit executable and again the jscript)
EDIT: This GUI wrapper works just fine as can be seen by this post clarifying why this didn't work for me initially! I recommend you try this with short names or just under the root directory to ensure the directory name contains no spaces and/or the comspec environment space doesn't get exhausted (or just increase it).

I tried to run the executable but got a Spybot false positive detection of malicious code (see attached picture). Spybot then deleted the file.

Is this a known problem?

What did you use to create the .exe. I'll try creating another .exe to see if it does the same thing. Weird.
Attached Thumbnails
Click image for larger version

Name:	Spybot-AutoIt executable error message.jpg
Views:	419
Size:	26.1 KB
ID:	27915  

Last edited by nrapallo; 04-21-2009 at 06:06 PM. Reason: false positve
nrapallo is offline   Reply With Quote
Old 04-21-2009, 02:34 PM   #14
ancalex
Member
ancalex has a complete set of Star Wars action figures.ancalex has a complete set of Star Wars action figures.ancalex has a complete set of Star Wars action figures.
 
ancalex's Avatar
 
Posts: 21
Karma: 272
Join Date: Dec 2007
Location: Romania
Device: ebookwise 1150
false pozitive

Yes, it's a known problem.
Take a look here
http://www.autoitscript.com/forum/in...howtopic=34658
ancalex is offline   Reply With Quote
Old 04-21-2009, 02:40 PM   #15
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: 2530531
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 ancalex View Post
Yes, it's a known problem.
Take a look here
http://www.autoitscript.com/forum/in...howtopic=34658
Thanks for the information.

I did compile the script and got the same (false) Spybot warning.

OK now that we know the .exe is ok, why doesn't it open the .doc file and convert it. I get the error in the second picture below (on a Win XP SP3 system with Word 2003 installed).

Click image for larger version

Name:	AutoIt-GUI1.jpg
Views:	350
Size:	15.7 KB
ID:	27916 Click image for larger version

Name:	AutoIt-GUI2.jpg
Views:	356
Size:	15.8 KB
ID:	27917

Last edited by nrapallo; 08-15-2009 at 08:44 AM.
nrapallo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
eBookwise: IMP vs. RB files Jack B Nimble IMP 10 11-05-2008 08:22 AM
rb files and imp files Wordcrasher IMP 2 10-20-2008 05:37 PM
Use two fonts in imp files? Moonraker IMP 3 04-10-2008 05:46 PM
Anyone know how to convert IMP files jckatz Sony Reader 1 01-23-2008 11:19 AM
how to read imp files? roquet Reading and Management 6 11-10-2007 02:27 AM


All times are GMT -4. The time now is 10:50 AM.


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