dyaml/README.rst

139 lines
5.6 KiB
ReStructuredText
Raw Normal View History

2011-08-16 12:53:13 +00:00
==========
2014-08-01 00:45:34 +00:00
D:YAML 0.5
2011-08-16 12:53:13 +00:00
==========
2016-11-06 18:42:00 +00:00
This is a fork of the D:YAML library by kiith-sa (https://github.com/kiith-sa/D-YAML).
The intent of this fork is to provide an version suitable for use by dlang-tour, until
fixes are accepted upstream.
2014-12-31 14:33:57 +00:00
.. image:: https://travis-ci.org/kiith-sa/D-YAML.svg?branch=master
2014-12-30 19:08:34 +00:00
.. image:: https://raw.githubusercontent.com/kiith-sa/D-YAML/master/code.dlang.org-shield.png
2014-12-30 19:07:07 +00:00
:target: http://code.dlang.org
2014-08-01 00:45:34 +00:00
**Note**: D:YAML 0.5 brings some **breaking changes**. See the
`changelog <https://github.com/kiith-sa/D-YAML/blob/master/CHANGES.rst>`_.
2011-08-16 12:53:13 +00:00
------------
2014-08-01 00:45:34 +00:00
Introduction
2011-08-16 12:53:13 +00:00
------------
D:YAML is an open source YAML parser and emitter library for the D programming
2014-08-01 00:45:34 +00:00
language. It is
(`almost <https://github.com/kiith-sa/D-YAML/wiki/Differences-between-D:YAML-and-the-YAML-specification>`_)
compliant to the YAML 1.1 specification. D:YAML is based on
2014-08-06 14:15:45 +00:00
`PyYAML <http://www.pyyaml.org>`_ created by Kirill Simonov.
2011-08-16 12:53:13 +00:00
2014-08-01 00:45:34 +00:00
D:YAML is designed to be easy to use while supporting the full feature set of
YAML. To start using it in your project, see the
`Getting Started <https://github.com/kiith-sa/D-YAML/wiki/Getting-Started>`_
2014-08-06 16:06:42 +00:00
tutorial and the `documentation <http://defenestrate.eu/docs/dyaml/>`_.
2014-08-01 00:45:34 +00:00
D:YAML is still a work in progress. Its API is not stable and there might be
compatibility breaking changes.
2011-08-16 12:53:13 +00:00
--------
Features
--------
2011-11-16 19:41:21 +00:00
* Easy to use, high level API and detailed debugging messages.
2011-08-16 12:53:13 +00:00
* Detailed API documentation and tutorials.
2011-11-16 19:41:21 +00:00
* Code examples.
2011-08-16 12:53:13 +00:00
* Supports all YAML 1.1 constructs. All examples from the YAML 1.1 specification
are parsed correctly.
* Reads from and writes from/to YAML files or in-memory buffers.
2014-08-01 00:45:34 +00:00
* UTF-8, UTF-16 and UTF-32 encodings are supported, both big and little endian
2011-08-16 12:53:13 +00:00
(plain ASCII also works as it is a subset of UTF-8).
2014-08-01 00:45:34 +00:00
* Support for both block (Python-like, based on indentation) and flow
2011-08-16 12:53:13 +00:00
(JSON-like, based on bracing) constructs.
* Support for YAML anchors and aliases.
* Support for default values in mappings.
2014-08-01 00:45:34 +00:00
* Support for custom tags (data types), and implicit tag resolution for custom
scalar tags.
2014-08-01 00:45:34 +00:00
* All tags (data types) described at http://yaml.org/type/ are supported, with
2011-08-16 12:53:13 +00:00
the exception of ``tag:yaml.org,2002:yaml``, which is used to represent YAML
code in YAML.
2011-11-16 19:41:21 +00:00
* Remembers YAML style information between loading and dumping if possible.
2014-08-01 00:45:34 +00:00
* Reuses input memory and uses slices to minimize memory allocations.
* There is no support for recursive data structures.
2011-08-16 12:53:13 +00:00
There are no plans to implement this at the moment.
-------------------
Directory structure
-------------------
=============== =======================================================================
2011-08-16 12:53:13 +00:00
Directory Contents
=============== =======================================================================
2014-08-06 14:15:45 +00:00
``./`` This README, utility scripts.
2011-08-16 12:53:13 +00:00
``./doc`` Documentation.
``./docsrc`` Documentation sources.
2014-08-06 14:15:45 +00:00
``./source`` Source code.
``./examples/`` Example projects using D:YAML.
``./test`` Unittest data.
=============== =======================================================================
2011-08-16 12:53:13 +00:00
-----------------------
Installing and tutorial
-----------------------
2014-08-01 00:45:34 +00:00
See the
`Getting Started <https://github.com/kiith-sa/D-YAML/wiki/Getting-Started>`_
tutorial and other tutorials that can be found at the
`GitHub wiki <https://github.com/kiith-sa/D-YAML/wiki>`_
and in the ``doc/html/tutorials/`` directory in the package.
2014-08-06 16:06:42 +00:00
For advanced usage, see the `documentation <http://defenestrate.eu/docs/dyaml/>`_.
2011-08-16 12:53:13 +00:00
-------
License
-------
2014-08-01 00:45:34 +00:00
D:YAML is released under the terms of the
2011-08-16 12:53:13 +00:00
`Boost Software License 1.0 <http://www.boost.org/LICENSE_1_0.txt>`_.
This license allows you to use the source code in your own projects, open source
2014-08-01 00:45:34 +00:00
or proprietary, and to modify it to suit your needs. However, in source
distributions, you have to preserve the license headers in the source code and
2011-08-16 12:53:13 +00:00
the accompanying license file.
Full text of the license can be found in file ``LICENSE_1_0.txt`` and is also
displayed here::
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-------
Credits
-------
D:YAML was created by Ferdinand Majerech aka Kiith-Sa kiithsacmp[AT]gmail.com .
Parts of code based on `PyYAML <http://www.pyyaml.org>`_ created by Kirill Simonov.
2014-08-06 14:15:45 +00:00
D:YAML was created using Vim and DMD on Debian, Ubuntu and Linux Mint as a YAML parsing
2012-01-23 17:40:05 +00:00
library for the `D programming language <http://www.dlang.org>`_.