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.

Structs§

Language
Scriptification requires a set of information describing the basic components of a scripting language. Each field of the Language struct includes sytax information.

Functions§

comment_to_file 🔒
Standardize how to write a comment line, given the text to comment, and the language in which to comment
learn
“Learn” a script language from user input (which language), simply by populating a Language struct
print_to_stdout 🔒
Standardize how to print to stdout, given the text to print out, and the language in which to print to stdout
script_file_from_process
Create a script file using the Process struct, interpreted in a specified Language.