- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register




Search:

Listing Commands...

 View All

Found 1 match.
Nameyaml
Syntax - yaml [create]/[load:<file> (fix_formatting)]/[loadtext:<text> (fix_formatting)]/[unload]/[savefile:<file>]/[set <key>([<#>])(:<action>):<value>] [id:<name>]
Short DescriptionEdits a YAML configuration file.
Full DescriptionEdits a YAML configuration file.
This can be used for interacting with other plugins' configuration files.
It can also be used for storing your own script's data.
TODO: Document Command Details
When loading a script, optionally add 'fix_formatting' to run the file through
Denizen's built in script preparser to correct common YAML errors,
such as tabs instead of spaces or comments inside braced blocks.
Use holdable syntax ("- ~yaml load:...") with load or savefile actions to avoid locking up the server during file IO.

For loading and saving, the starting path is within 'plugins/Denizen'.
Note that the '.yml' extension is not automatically appended, and you will have to include that in filenames.


Related Tags<yaml[<idname>].contains[<path>]>
<yaml[<idname>].read[<path>]>
<yaml[<idname>].read[<path>].as_list>
<yaml[<idname>].list_keys[<path>]>

Usages

» Use to create a new YAML file.
- yaml create id:myfile


» Use to load a YAML file from disk.
- yaml load:myfile.yml id:myfile


» Use to modify a YAML file similarly to a flag.
- yaml id:myfile set my.key:HelloWorld


» Use to save a YAML file to disk.
- yaml savefile:myfile.yml id:myfile


» Use to unload a YAML file from memory.
- yaml unload id:myfile


» Use to modify a YAML file similarly to a flag.
- yaml id:myfile set my.key:+:2


» Use to modify a YAML file similarly to a flag.
- yaml id:myfile set my.key[2]:hello
Groupcore