Is there any posibillity to run a .jsx script with file path as parameter, outside of indesign (inactive indesign, inactive document) to export this indesign document to html files?
Thnaks in advance!
What's the operating system?
You could run your script from a trusted folder with a #target statement for a specific version of InDesign with a double-click:
On Windows 10 a trusted folder is the Adobe Scripts folder in the user's Documents folder. If it does not exist create it.
( ACP )
yes. But a user would be greeted with a security message and question when you double-click the script file somewhere on the hard disk. Run from a trusted folder like the one I described, InDesign would be started and the code executed without a message up front…
( ACP )
Take a look at Peter Kahrel's batch convert script in the link below, you'll need to thoroughly read through the documentation to see if it meets your needs.
I think Peter Kahrel's batch convert script in the link above would suit the requirement.
If not elaborate the point which OP wants...
You'd need to write your own .indd file parser, and I think that would be very difficult. I don't think the .indd format is open source.
However, if you could save your documents as .idml, it should be possible. The IDML specification is open source and human-readable. Not saying it's easy, but definitely possible,
Xristophor wants to run a jsx script outside of InDesign, so my batch converter won't do because it needs InDesign.
As Ariel mentioned, you'd have to parse the indd, which is virtually impossible. Parsing IDML is possible, but not easy.
@Χριστόφορος5F85 wants to convert InDesign file to HTML without the need for InDesign installation, in such a case as mentioned the only feasible and viable option is to start with IDML file rather than an INDD file. The next step would be reading up the IDML specification(readily available), identify which files within the IDML package would contain the information you would need to create your HTML file, then use something like XSL tranformations to parse and transform the source data into the final format.
Thank you all for your replies.
I am not willing to create an .indd parser nor an .idml parser.
The only reason I want to run .jsx outside of indesign is to automate the procedure (No need to open indesign file in order to export the file, just click on a button on my custom node.js program).
> I am not willing to create an .indd parser nor an .idml parser.
In that case you'll have to open InDesign or not run your script.