View Single Post
Old 04-27-2009, 03:24 PM   #31
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
access to temporary files

Hi
I made a little research and testing this days and I came up with a solution to access those "vanishing" temporary files created by the time .imp is building.
Quote:
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).
My solution (maybe not the best anyway):
- passing 2 more arguments to any2imp jscript from the any2imp autoit script, $UserTmpDir holding the user temporary files path and $DocTmpDir holding the actual path to document that will be converted
- two more lines in jscript
Code:
        oFSO.CopyFile ( userTmpDir + "\\" + "wrd*.tmp",docTmpDir);
	oFSO.CopyFolder (userTmpDir + "\\images",docTmpDir + "\\images" );
placed in OnBuildStartEvent after saving the .opf file

Like you see i made it only for .doc converting but (if it is working good) it can be done for the other file type conversion.
For testing here are the source files

P.S. Copy back the tmp's to their original location, double click on the saved .opf and done. (or edit the opf for the new paths) to do
Attached Files
File Type: zip any2imp.zip (3.3 KB, 794 views)
ancalex is offline   Reply With Quote