#(zloyx_) About yaml
20 messages · Page 1 of 1 (latest)
(zloyx_) About yaml
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
Also how to disable security setting Error Message: Cannot read from that file path due to security settings in Denizen/config.yml.?
What are you using yaml for?
I want to change a lot of elements in yaml of other plugin
(i want to add model_id to each of the models in ItemsAdder)
file
yaml [create]/[load:<file>]/[loadtext:<text> raw_format]/[unload]/[savefile:<file>]/[copykey:<source_key> <target_key> (to_id:<name>)]/[set <key>([<#>])(:<action>):<value> (data_type:{string}/integer/double/boolean/auto)] [id:<name>]
Edits YAML data, especially for YAML files.
Edits YAML configuration data.
This commands exists primarily for interoperability with pre-existing data files and other plugins.
It should never be used for storing data that only Denizen needs to use. Consider instead using !command flag.
Use waitable syntax ("- ~yaml load:...") with load or savefile actions to avoid locking up the server during file IO.
Refer to !language ~waitable.
For loading and saving, the starting path is within 'plugins/Denizen'.
The file path follows ...
^ starting from the denizen folder
so if you want to read from /plugins/denizen/data/my_file.yml, you'd use data/my_file.yml as input
!c yaml u
file
yaml [create]/[load:<file>]/[loadtext:<text> raw_format]/[unload]/[savefile:<file>]/[copykey:<source_key> <target_key> (to_id:<name>)]/[set <key>([<#>])(:<action>):<value> (data_type:{string}/integer/double/boolean/auto)] [id:<name>]
Edits YAML data, especially for YAML files.
- yaml create id:myfile
- ~yaml load:myfile.yml id:myfile
- yaml id:myfile set my.key:HelloWorld
- ~yaml savefile:myfile.yml id:myfile
- yaml unload id:myfile
... and 4 more.
^ see the examples
Oh okay. I loaded file. But how can i add model_id: <something> to each key in the list?
!pasteyaml
Help us help you by pasting your YAML config file to https://paste.denizenscript.com/New/Other?selected=other-yaml and linking it back here.
@real quest can you post the yaml so we can see how the data structure looks like?