author action for executing commands/scripts
Post here questions and problems related to oXygen frameworks/document types.
author action for executing commands/scripts
Hi,
I wonder whether it is possible (and how) to execute a shell script and/or a command using an author action?
Greetings,
Stefan
I wonder whether it is possible (and how) to execute a shell script and/or a command using an author action?
Greetings,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
Re: author action for executing commands/scripts
Hi Stefan,
Oxygen 18.1 (Autumn this year) will come with a default author operation called ExecuteCommandLineOperation.
In the meantime maybe you can use a JSOperation with the following script which calls the Java Runtime API to start a process with a certain command line:
Regards,
Radu
Oxygen 18.1 (Autumn this year) will come with a default author operation called ExecuteCommandLineOperation.
In the meantime maybe you can use a JSOperation with the following script which calls the Java Runtime API to start a process with a certain command line:
Code: Select all
function doOperation(){
Packages.java.lang.Runtime.getRuntime().exec("notepad.exe");
}
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: author action for executing commands/scripts
Hi Radu,
awesome This is a cool workaround, thanks a lot!
Glad to head, that <oXygen/> again evolves as I expect it to be.
Greetings,
Stefan
awesome This is a cool workaround, thanks a lot!
Glad to head, that <oXygen/> again evolves as I expect it to be.
Greetings,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
Re: author action for executing commands/scripts
Hi Radu,
for the new author operation, it would be nice, if you also could pass some variables, like ${pd} to call a command in a specific directory.
Greetings,
Stefan
for the new author operation, it would be nice, if you also could pass some variables, like ${pd} to call a command in a specific directory.
Greetings,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
Re: author action for executing commands/scripts
Hi Stefan,
Yes, the operation will have 4 params: a name, a working directory, a command line and a flag which can be set if you want to see the console output in the Oxygen console view. And all params will accept editor variables.
The JSOperation equivalent is this one:
Regards,
Radu
Yes, the operation will have 4 params: a name, a working directory, a command line and a flag which can be set if you want to see the console output in the Oxygen console view. And all params will accept editor variables.
The JSOperation equivalent is this one:
Code: Select all
function doOperation(){
//Execute a command line which opens the Notepad application
Packages.java.lang.Runtime.getRuntime().exec("notepad.exe", null, new Packages.java.io.File(new Packages.java.net.URL("${pdu}").toURI()));
}
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 402
- Joined: Mon May 09, 2016 9:37 am
Re: author action for executing commands/scripts
Post by sorin_carbunaru »
Hello,
I am glad to confirm that, just as Radu already announced, the newly released oXygen 18.1 comes with a default Author operation called ExecuteCommandLineOperation, that can be used to run command lines. More information about the operation can be found at: https://www.oxygenxml.com/doc/versions/ ... tions.html.
All the best wishes,
Sorin Carbunaru
oXygen XML
I am glad to confirm that, just as Radu already announced, the newly released oXygen 18.1 comes with a default Author operation called ExecuteCommandLineOperation, that can be used to run command lines. More information about the operation can be found at: https://www.oxygenxml.com/doc/versions/ ... tions.html.
All the best wishes,
Sorin Carbunaru
oXygen XML
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service