Commits

zzzeek  committed e025510

docs

  • Participants
  • Parent commits dfeb894

Comments (0)

Files changed (1)

 
     pip install http://bitbucket.org/zzzeek/nbt2yaml
 
-Usage
-=====
+Once installed, the ``nbtedit``, ``nbt2yaml``, and ``yaml2nbt`` commands
+should be available, from the same place other Python utilities are installed.
 
-Once installed, the ``nbtedit`` command should be available::
+Commands
+========
 
-    nbtedit --help
+Note that an nbt file is typically in gzip format.  nbt2yaml commands
+will assume gzip format for all nbt files written and read, unless the ``--no-gzip``
+flag is specified.
 
-    nbtedit <file>
+For the ``nbt2yaml`` and ``yaml2nbt`` commands, the filename can be specified as ``-``,
+which indicates the data should be read from standard input.
+
+nbtedit
+--------
+
+Edits an nbt file in-place, allowing Yaml format within the editor.
 
 The script uses the standard ``EDITOR`` environment variable to determine which
 text editor should be invoked.
 
+Synopsis::
 
+    usage: nbtedit [-h] [-n] filename
+
+    Edit an nbt file in-place in Yaml format.
+
+    positional arguments:
+      filename       filename
+
+    optional arguments:
+      -h, --help     show this help message and exit
+      -n, --no-gzip  Don't use gzip
+
+nbt2yaml
+--------
+
+Dumps an nbt file as yaml to standard output::
+
+    usage: nbt2yaml [-h] [-n] filename
+
+    Dump an nbt file or stream to yaml.
+
+    positional arguments:
+      filename       Filename. Specify as '-' to read from stdin.
+
+    optional arguments:
+      -h, --help     show this help message and exit
+      -n, --no-gzip  Don't use gzip
+
+yaml2nbt
+--------
+
+Dumps a yaml file generated by nbt2yaml as nbt to standard output::
+
+    usage: yaml2nbt [-h] [-n] filename
+
+    Dump a yaml file or stream to nbt.
+
+    positional arguments:
+      filename       Filename. Specify as '-' to read from stdin.
+
+    optional arguments:
+      -h, --help     show this help message and exit
+      -n, --no-gzip  Don't use gzip
+