Module write_script

Source
Expand description

Write various kinds of script files to files in a Process folder, based on the “Command” lines in that process’s EBML file.

General workflow, most of which occurs outside of this module:

  • User composes a process in an EBML file, with one or more “Command” lines
  • A call to stanhope to “scriptify” a process invokes the read_ebml module to collect the Command lines
  • Functions in this module know how to write scripts to the filesystem in various languages

NOTE: this module doesn’t help the user compose their “Command” lines in proper syntax, nor do any of these functions convert “Command” lines from one language to another. As far as these functions are concerned, it is assumed that “Command” line text is already in proper syntax for the script file type selected when running stanhope to scriptify.

Functions§

bash_file_from_commands
Apply Born-Again SHell (BASH) formatting to the Command lines in a process
powershell_file_from_commands
Apply PowerShell formatting to the Command lines in a process
python_file_from_commands
Apply Python3 formatting to the Command lines in a process
write_script
Write all script lines to a file in the Process’s folder.