Appendix : Legacy Presto components : Mashables and Mashups : Mashups in EMML : Mashup Utilities : Publishing and Managing Macros from the Command Line
Publishing and Managing Macros from the Command Line
You can publish individual EMML macros in the Mashup Editor or from the command line. You can also publish macros in bulk, list macros or macro domains or update, rename or delete macros from the command line.
To perform any of these actions from the command line, macros must be defined in macro libraries. See Create a Reusable Macro Library for more information.
To publish macros from a command line
1. Open a command window and move to the MashZoneNG-install/prestocli/bin folder.
2. Enter the macropub command in this form:
macropub -u user-name -p password [-url presto-url] action-options
where the options for specific actions can be:
Action
List macro domains
-l
Lists the names of all macro domains.
List macros
-l (-g | -dm domain-name)
Lists the names of all macros in the global domain (-g) or in the domain (-dm) specified.
Publish a macro library
-lib -f macro-library [-g]
Publishes all the macros defined in the specific macro library file. If the -g option is set, these are published to the global domain. Otherwise, they are published to the domain specified in the macro library file.
Republish a macro library
-lib -repub -f macro-library [-g]
Republishes all the macros defined in the specific macro library file. If the -g option is set, these are published to the global domain. Otherwise, they are published to the domain specified in the macro library file.
Publish a single macro
-a -f macro-library -n macro-name (-g | -dm domain-name)
Publishes the macro specified by name from the macro library specified to either the global domain (-g) or to the domain (-dm) specified.
Update a macro
-m -f macro-library -n macro-name (-g | -dm domain-name)
Modifies the macro specified by name from the macro library specified to either the global domain (-g) or to the domain (-dm) specified.
Rename a macro
-r -n new-macro-name -o existing-macro-name(-g | -dm domain-name)
Changes the name of an existing macro in either the global (-g) domain or in the domain (-dm) specified.
Delete a macro
-d -n macro-name (-g | -dm domain-name)
Deletes the specified macro from the global (-g) domain or the specified (-dm) domain.
The URL is optional. It defaults to http://localhost:app-server-port/mashzone/edge/api where app-server-port is the port you defined during installation.
Use the -url option, if you need to publish macros to a remote server or the default host or port is incorrect.
With the file option (-f), you may wish to put a copy of the macro library in the same directory as the command to simplify paths.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback