#(SeorOreo) annotations in yml files

24 messages · Page 1 of 1 (latest)

marsh mirage
#

I have a question about editing a yml file. Is it possible to add annotations to a yml file?
Example:

# If you set this to 'true' this will happen... 
enabled: true

# You must put the name of the material to do this... 
material: "something"```

I don't know if I explained myself correctly, but my idea is to add these annotations when saving a previously created yml.
drowsy treeBOT
#

(SeorOreo) annotations in yml files

drowsy treeBOT
#

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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

quiet kiln
#

don't believe so

#

!xy

shy scaffoldBOT
# quiet kiln !xy
Info: xy

Your question seems to be an XY Problem - you're asking about your attempted solution rather than your original problem.
Read in detail about the XY Problem here: http://xyproblem.info/

For an example of an XY Problem we've seen in Denizen, the question "how do I make an event for when a flag expires" has no answer, but the same question asked with full background detail will be something more like "I have this script: [LINK HERE], which sets a 3 minute cooldown flag on a player for when they use an ability. I want the player to be notified when the cooldown completes - how do I do this?" which we can then answer quite effectively (in this example, all that was needed was a simple wait command, no events or flag-listening or anything).

marsh mirage
#

I mean being able to add a text after the '#' in a yml file

quiet kiln
#

why

#

or more specifically, what are you using this yaml file for

marsh mirage
#

Pretend that I am creating a jobs script that will have a yml file and this script will be public and I would like to add annotations to indicate what each option is for

plucky ether
#

What do you mean by pretend - what are you actually trying to do?

frigid ore
#

you could have a separate dsc file for configs

#

in a data script

marsh mirage
#

sorry, the translator is translating wrong, I mean that I am making a script that takes a yml file.
And my idea is to add those annotations.

marsh mirage
plucky ether
#

If it's a config for a Denizen script then should use a data script ^, you can easily have comments there as well

frigid ore