Jump to content
kgrube

Script function documentation/reference and utilities

Recommended Posts

@DarrenWhite99 and I were poking around in the exported script XMLs and I ended up making this library to handle decoding the XML.   That library will turn an xml into json and back.  It will also add each step's function definition and function text output, e.g. function 1, param1=1 turns into LTCommand: Update Agent. As part of this process, Darren suggested making a function document that contains every script function, it's parameters and associated function text. 

The live version of this reference document is available here: https://github.com/mspgeek/labtech-script-decode/blob/master/DOC.md 

 This repository will be updated as needed as changes are made to the live version of Automate. 

 

  • Like 2

Share this post


Link to post
Share on other sites

The motivation for this document was to help newer scripters read other people’s scripts. Often the way a function appears in the editor and what it’s actually called are between slightly to completely different. Unless you have seen and memorized every function, this document can let you search for what you see in the editor and learn which function is actually behind it. 

Share this post


Link to post
Share on other sites
Posted (edited)

Are there any plans to have an export format that would be GitHub-friendly for tracking script changes (versioning)?

Edited by BlueToast

Share this post


Link to post
Share on other sites

I have a backup script that exports scripts, scriptlets, internal monitors, etc. It uses powershell to unbundle the items to individual files.
Once the XML is sitting there, another tool could parse it and output to text, for simple tracking. Right now I don't know of a simple portable way to chain my script dumps into the JavaScript based decoder.... The various pieces exist, it would just take someone to put them all together.

Share this post


Link to post
Share on other sites
On 6/20/2019 at 2:22 AM, BlueToast said:

Are there any plans to have an export format that would be GitHub-friendly for tracking script changes (versioning)?

I'm working on something that does this.   Working on automatically pushing changes to a private repo through cmd line using deploy keys at the moment.   I'll post an update when I have something for you to test. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...