Linked to js-yaml online parser.

It's faster than the pyyaml one, and is what BOSS's online tools use.
This commit is contained in:
WrinklyNinja
2013-10-26 23:21:57 +01:00
parent c82c7c2ec3
commit c47fa32b2e
+2 -2
View File
@@ -108,7 +108,7 @@ h3{
<li>BOSS's support for YAML syntax is incomplete. A list of known limitations can be found <a href="https://github.com/WrinklyNinja/yaml-cpp/issues?labels=bug&state=open">here</a>. The only major missing piece is support for merge keys (<code>&lt;&lt;:</code>).
<li>Child data nodes should be indented two spaces from their parents. This isn't a strict requirement, but is the best trade-off between compactness and readability.
<li>Strings are case-sensitive, apart from file paths, regular expressions and checksums.
<li>Strings should be enclosed in single quotes if they contain any of the following characters: <code>-?:,[]{}#&amp;*!|&gt;"%@`</code>, unless they also contain any single quotes, in which case the string should be enclosed in double quotes instead. This isn't always strictly necessary, but it's better to err on the side of caution. If you really want to only quote strings when absolutely necessary, be sure to check what you write by copy/pasting the whole data structure the string appears into a YAML parser such as <a href="http://yaml-online-parser.appspot.com/">this one</a> and making sure that what it outputs is correct.
<li>Strings should be enclosed in single quotes if they contain any of the following characters: <code>-?:,[]{}#&amp;*!|&gt;"%@`</code>, unless they also contain any single quotes, in which case the string should be enclosed in double quotes instead. This isn't always strictly necessary, but it's better to err on the side of caution. If you really want to only quote strings when absolutely necessary, be sure to check what you write by copy/pasting the whole data structure the string appears into a YAML parser such as <a href="http://nodeca.github.io/js-yaml/">this one</a> and making sure that what it outputs is correct.
<li>In a double-quoted string, any backslashes and double quotes (excluding those quoting the whole string) need to be escaped with a backlash, ie. <code>"</code> &#x2192; <code>\"</code> and <code>\</code> &#x2192; <code>\\</code>. It's best to avoid using backslashes (except for the purpose of escaping) wherever possible, due to its double meaning. In file paths, a forwardslash can be used instead.
<p>For example, the following condition nodes are all equivalent:
<ul>
@@ -128,7 +128,7 @@ h3{
<li>Regular expression file paths must be written in the <a href="http://www.boost.org/doc/libs/1_54_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html">Perl</a> syntax.
<li>Only the filename of a regex file path may contain non-literal regex syntax, ie. if the filename part of the regex file path is removed, the remainder must be an exact folder path (though with the regex syntax special characters escaped). For example, given the regex file path <code>Meshes\\Resources(1|2)\\(upperclass)?table.nif</code>, BOSS will look for a file named <code>table.nif</code> or <code>upperclasstable.nif</code> in the <code>Meshes\Resources(1|2)</code> folder, rather than looking in the <code>Meshes\Resources1</code> and <code>Meshes\Resources2</code> folders.
</ul>
<p>Please test any changes you make before uploading them. One way of doing this is to run BOSS, another is to copy/paste what you've changed into an online parser such as <a href="https://yaml-online-parser.appspot.com/">this one</a>, though it won't catch condition syntax errors or non-syntax errors such as having the same file both required and incompatible.
<p>Please test any changes you make before uploading them. One way of doing this is to run BOSS, another is to copy/paste what you've changed into an online parser such as <a href="http://nodeca.github.io/js-yaml/">this one</a>, though it won't catch condition syntax errors or non-syntax errors such as having the same file both required and incompatible.
<h2 id="filestruct">Metadata File Contents</h2>
<p>The root of a metadata file is a key-value map. BOSS will recognise the following keys, none of which are required: