1 person found this helpful
If this is too much hassle, you may want to get the new RH9 - it supposedly has ePUB as a SSL option.
thanks for explaining about the 7z and where it needs to reside! Important information. Perhaps a wrong location was the reason for my error. I will test this out and let you know if it resolves the issue.
Jeff, I tried placing the 7za exe in another location, but I am still getting the RoboHelp HTML error saying, rather cryptically: Expected:}
I have no clue where, this } would be missing in the script file. do you think it has anything to do with the fact that I change the script file name from ePubGenerator._jsx.mht (as it downloaded) to ePubGenerator.jsx.
If not, I guess I will have to recommend that we upgrade to RH9.
Yes, it sounds like you are missing something in the script. Try opening it up through RH > Tools > Scripts > New Scripts. On my TCS2.5 install it launches the ExtendScript Toolkit CS5 so you can have a look at the syntax.
City Sue wrote:
First I downloaded the ePubGenerator script. It was called ePubGenerator_jsx.
mht. Why is this? since the RH script explorer would not import it I changed the name to
ePubGenerator.jsx. (just a guess - this should be a step in the instructions Ankur).
This may or may not be a part of the problem. Many years ago Microsoft more or less invented the "Web Archive" file, which is a collection of one or more HTML (and other) files collected into a single file in MIME format; they applied the ".mht" extension to this file.
Apparently, you downloaded this file using Internet Explorer (which, AFAIK, is the only browser that creates this format), and selected "Web Archive" as the "Save As" file type.
IIRC, a "Web Archive" which consists of a single file is nothing more than the file itself, but my recollection is fuzzy on that. If you want to eliminate the possiblity, download the script again, but tell IE to save it as a text file--then you really can remove the extra ".txt" extension and be sure you have the unaltered script file.
Then I downloaded and unzipped 7za.exe. Where was I supposed to put this? Does that matter? Is the example path given in Step 4 the correct format? (I understand the \\ are wrong and should be a single \).
7za.exe is simply a .zip file manager (and a pretty good one at that). As others have explained, just put it wherever you put your collection of other utility programs. The script simply needs to know where to run it from.
The double back slashes are, in fact, not wrong. What 'var str7zipLocation="C:\\etc.' is doing is creating a string variable. Inside literal strings the back slash is an escape character which is used to encode characters that would otherwise be invisible. Because of this, if really want to use a back slash as a back slash, and not a way to encode the following character, you must use two slashes. It should also work if you replaced each double back slash with a single forward slash, e.g. "C:/Program Files/7-Zip/7za.exe"; M$Windows accepts either one.
This may be the cause of your problem, as \r is the code for a carriage return (start a new line) and \[d] (where [d] is a digit) signals the beginning of an octal representation of a character; one of these problems might be causing a syntax error in the script.
I bumbled through and was able to edit the script (so assumed it was the correct file extension) BUT when I tried to run it (I assume, from the Script Explorer), I get a warning "Expected }" and that's it - end of story. I thought I could see where it is missing but no luck.
Should there be something after the = sign? should there be a closing } to pair the opening one on the last line?
Yes, and yes. The script file I downloaded is 551 lines long, and ends with:
if(deleteRootFolder == true) folder.remove();
if(listOfFiles != null) delete listOfFiles;
If this does not match your file, then you probably have a bad download. Start by downloading the script again, as I suggested above. Open it in any text editor and make sure it matches the clues above (551 lines, ending as indicated). Do not make any changes to it, and import it into the Script Explorer pod. Run it as is; you should see a dialog appear asking where to place the output file, then one or more error dialogs, perhaps suggesting that you haven't generated XML output (an undocumented prerequisite) or that it cannot execute 7Za.
You will now know that the script is good. Now edit the script to point to your 7Za location and try again (the script really should allow you to browse for it, but this is, after all, a first attempt). The script still may not behave correctly, but at least you can move forward in resolving your site-specific problems.
My confidence in ePub has plummeted.
As others have suggested, don't blame the format (which was developed by a group independent of Adobe) for what may be a flawed attempt to generate it. And I would strongly suggest you don't use Adobe Digital Editions to view the resulting .epub when you finally get one; Calibre (http://calibre-ebook.com/) is probably the tool you will want to use with .epub files.
Can you please enlighten us on what your reasons are for suggesting that folks avoid using Adobe Digital Editions?
Helpful and Handy Links
Thanks to Jeff and Rick for your responses. I was able to run the script, and am at the point of trying to read the output.
Impressed by you taking the time to make a video for me Rock - that is indeed service!.
But, I have just been laid off along with lots of other beople, so will try and follow the steps in your video for my own curiosity only. Then I will be looking for a new job!!