Script for automatic capturing and converting single pages to CHM?

Author Message
Rado 10/23/2012 11:23 pm

Is it possible to make a list of URLs in a text file and then let OE read this list and automatically capture all these pages (not the whole site for each URL, just the pages on the list ), and then afterwards convert each page to CHM and put them in a folder?

Oleg Chernavin 10/26/2012 09:20 am
You would need to start Offline Explorer Pro from command line using these parameters:

oe.exe "/new=url=http://www.server.com/file.htm,url=Additional=DeleteProjectFiles;DeleteProjectSettings;AutoExport=c:\export\;1014000000,run=true,level=0"

This creates a new Project, loads it, makes export to CHM file to c:\Export\ folder. Then the Project and downloaded files are removed.

You would only have to make a script to take URLs from a text file and make the above command line.

Perhaps, the following .bat file may do this:

FOR /F %%URL IN (c:\path\URLs.txt) DO oe.exe "/new=url=%%URL ,url=Additional=DeleteProjectFiles;DeleteProjectSettings;AutoExport=c:\export\;1014000000,run=true,level=0"

You may read more about .BAT files FOR command here:

http://ss64.com/nt/for_f.html

Best regards,
Oleg Chernavin
MP Staff
Rado 10/31/2012 04:28 am

Thank you, this is exactly what I meant!

I have a couple of questions/suggestions though:

1. The title bar in the Windows CHM viewer shows the URL of the captured page (plus part of the command line, is this intended?). Same thing with the file name. For example:

daz3d.comshopdaz-originalsair-car-jumperAdditionalDeleteProjectF.chm

Would it be possible to make an option for instead showing just the title of the captured page in the title bar and the file name, just like Inquiry does?

2. Would it be possible (again, like Inquiry does) to display the additional pictures on this page which pops up when you click the thumnails, so you can view these in the CHM as well?

http://www.daz3d.com/shop/daz-originals/air-car-jumper

As far as I can see, Inquiry doesn't save the pictures but just downloads them from the site and shows them on a subpage, but in the CHM files made with OE the pop up viewer actually pops up though it doesn't display the pictures.

Oleg Chernavin 11/01/2012 06:33 am
1. Sorry, this is impossible. But you may specify the title yourself in the command line:

oe.exe "/new=url=http://www.server.com/file.htm,url=Additional=DeleteProjectFiles;DeleteProjectSettings;AutoExport=c:\export\;1014000000,run=true,level=0,caption=CHM File Title"

2. To allow the images you need to download links to them. You may change the level=0 to level=1, but this will cause all other links from this page to be downloaded.

It is possible to set filters to exclude unwanted links, but it is much more complex from command line.

Oleg.
Rado 11/06/2012 04:03 pm
Thanks, it looks like I can make it work the way I want with a little programming then.

BTW, what does the number1014000000 do? Can't find any references to it in the Help file.
Oleg Chernavin 11/07/2012 04:11 am
Please open the Help file - FAQ - How to export or print Project automatically after downloading?

This section describes this number in detail.

Oleg.