YAML

From ENIGMA

Jump to: navigation, search
%YAML 1.2
---
YAML
: YAML Ain't Markup Language

What It Is
: YAML is a human friendly data serialization
  standard for all programming languages.

YAML Resources
:
  YAML 1.2 (3rd Edition)
: http://yaml.org/spec/1.2/spec.html
  YAML 1.1 (2nd Edition)
: http://yaml.org/spec/1.1/
  YAML 1.0 (1st Edition)
: http://yaml.org/spec/1.0/
  YAML Trac Wiki
: http://trac.yaml.org/
  YAML Mailing List
: yaml-core@lists.sourceforge.net
  YAML IRC Channel
: "#yaml on irc.freenode.net"
  YAML Cookbook (Ruby)
: http://yaml4r.sourceforge.net/cookbook/ (local)
  YAML Reference Parser
: http://yaml.org/ypaste/

Projects
:
  C/C++ Libraries
:
 - libyaml       # "C" Fast YAML 1.1
  - Syck          # (dated) "C" YAML 1.0
  - yaml-cpp      # C++ YAML 1.1 implementation
  Ruby
:
 - psych         # libyaml wrapper (in Ruby core for 1.9.2)
  - RbYaml        # YAML 1.1 (PyYaml Port)
  - yaml4r        # YAML 1.0, standard library syck binding
  Python
:
 - PyYaml        # YAML 1.1, pure python and libyaml binding
  - PySyck        # YAML 1.0, syck binding
  Java
:
 - JvYaml        # Java port of RbYaml
  - SnakeYAML     # Java 5 / YAML 1.1
  - YamlBeans     # To/from JavaBeans
  - JYaml         # Original Java Implementation
  Perl Modules
:
 - YAML          # Pure Perl YAML Module
  - YAML::XS      # Binding to libyaml
  - YAML::Syck    # Binding to libsyck
  - YAML::Tiny    # A small YAML subset module
  - PlYaml        # Perl port of PyYaml
  C#/.NET:
  - yaml-net      # YAML 1.1 library
  - yatools.net   # (in-progress) YAML 1.1 implementation
  PHP
:
 - syck          # syck bindings (YAML 1.0)
  - spyc          # yaml loader/dumper (YAML 1.?)
  OCaml
:
 - ocaml-syck    # YAML 1.0 via syck bindings
  Javascript
:
 - JsYaml        # port of PyYaml
  Actionscript
:
 - as3yaml       # port of JvYAML (1.1)
  Haskell
:
 - YamlReference # Haskell 1.2 reference parser
  Others
:
 - yamlvim (src) # YAML dumper/emitter in pure vimscript

Related Projects
:
 - Rx            # Multi-Language Schemata Tool for JSON/YAML
  - Kwalify       # Ruby Schemata Tool for JSON/YAML
  - yaml_vim      # vim syntax files for YAML
  - yatools.net   # Visual Studio editor for YAML
  - JSON          # Official JSON Website
  - Pygments      # Python language Syntax Colorizer /w YAML support

News
:
 - 18-AUG-2010 -- Ruby 1.9.2 includes psych, a libyaml wrapper by Aaron Patterson.
  - 17-AUG-2010 -- vimscript parser/emitter was created by Nikolay Pavlov.
  - 01-OCT-2009 -- YAML 1.2 (3rd Edition) was patched.
  - 21-JUL-2009 -- YAML 1.2 (3rd Edition) was released.
  - 28-APR-2009 -- A new version of SnakeYAML was released.
  - 01-APR-2009 -- The YAML 1.2 spec was planned to be finalized by the end of the month.
  - 07-JAN-2009 -- Andrey Somov releases SnakeYAML, a 1.1 YAML Parser
  - 03-JAN-2009 -- Burt Harris announced YAML for .NET and editor for Visual Studio
  - 02-DEC-2008 -- Jesse Beder released YAML for C++
  - 11-MAY-2008 -- Oren Ben-Kiki has released a new YAML 1.2 spec draft
  - 29-NOV-2007 -- Alexey Zakhlestin has updated his Syck (YAML 1.0) binding for PHP
  - 23-NOV-2007 -- Derek Wischusen has release Action Script 3 YAML 1.1
  - 01-AUG-2006 -- Kirill Simonov has released libyaml, a parser and emitter in "C"
  - 06-JUN-2006 -- Ola Bini is at it again, this time with a Java implementation
  - 03-JUN-2006 -- Christophe Lambrechts and Jonathan Slenders announced a .NET parser
  - 07-MAY-2006 -- Ola Bini released a pure-ruby YAML 1.1 parser and emitter
  - 12-APR-2006 -- Kirill's YAML 1.1 parser for Python is now at PyYaml
  - 05-FEB-2006 -- Spyc YAML for PHP is now at version 0.3
  - 17-DEC-2005 -- Makoto Kuwata has released Kwalify 0.5, YAML/JSON schema validator
  - 14-DEC-2005 -- Toby Ho has released Jyaml, a Java library for YAML based on Rolf Veen's work
  - 30-AUG-2005 -- Kirill Simonov has produce a wonderful Python binding for Syck
  - 08-APR-2005 -- As it turns out, YAML is a superset of the JSON serialization language
  - 18-MAY-2005 -- Why has released version 0.55 of Syck
  - 28-DEC-2004 -- Announcing YAML 1.1 Working Draft
  - 01-OCT-2004 -- YAML for Cocoa was released by Will Thimbley
  - 08-FEB-2004 -- Slaven Rezic announced a new version of his Javascript binding
  - 29-JAN-2004 -- Ingy, Oren, and Clark spent 4 days hacking on the spec in Portland.
  - 10-OCT-2003 -- The Syck implementation with bindings for Ruby, Python,
                   and PHP is now at version .41
  - 26-APR-2003 -- Mike Orr has taken over the Pure Python development.
  - 26-APR-2003 -- Brian Ingerson has created a FIT platform for Wiki-like testing.
  - 24-JAN-2003 -- Updates to specification.
  - 25-JUL-2002 -- Both the Ruby and Python parsers have made significant progress.
                   There is an article about YAML by Kendall Grant Clark at xml.com.
                   There is also a draft XML binding.
  - 02-JUL-2002 -- Brian Ingerson will be giving a 45 minute presentation on YAML at the
                   O'Reilly Open Source Conference in San Diego on July 24th 2002.
  - 01-FEB-2002 -- Brian's Perl implementation YAML.pm, has been updated with new documentation.
                   Included in this release is YSH, a test shell for learning how YAML works.
  - 03-JAN-2002 -- YAML(tm) starts the new year with a new name YAML Ain't Markup Language.
  - 17-MAY-2001 -- YAML now has a mailing list at SourceForge.
  - 15-MAY-2001 -- YAML is started with a first pass specification.
# Maintained by Clark C. Evans
...

Test 1

#   This file is part of PARPG.

#   PARPG is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.

#   PARPG is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.

#   You should have received a copy of the GNU General Public License
#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>.
---
NPC_NAME
: Dig
AVATAR_PATH
: gui/portraits/bouncer.png
START_SECTION
: main_dialog
SECTIONS
:
-   ID
: main_dialog
    SAY
: "What do you want?  Can't you see I'm drinking here?"
    ACTIONS
:
    -   meet
:
       - dig
    RESPONSES
:
    -   REPLY
: "I'm looking for stuff to make beer with."
        CONDITION
: "quest.hasActiveQuest('beer') and not\
           \ quest.hasFinishedQuest('beer') and\
           \ quest['beer'].isGoalValue('beer_instructions')"

        GOTO
: help_beer
       
    -   REPLY
: "Do you know Jacob?"
        GOTO
: explain_jacob
       
    -   REPLY
: "Do you work here?"
        GOTO
: inn_background
       
    -   REPLY
: "Are you going to kick my but?"
        GOTO
: but_kicking
       
    -   REPLY
: "Was Camillia with you in the bar here two nights ago?"
        CONDITION
: "quest['fedex'].isGoalValue('drunkard_evidence')"
        GOTO
: check_alibi
       
    -   REPLY
: "Who are those two women over there?"
        GOTO
: loose_women
       
    -   REPLY
: "Why is Camilla such a bitch?"
        CONDITION
: "pc.met('camilla')"
        GOTO
: explain_camilla
       
    -   REPLY
: "What is up with Synnove?"
        CONDITION
: "pc.met('synnove')"
        GOTO
: explain_synnove
       
    -   REPLY
: "Your boss's booze monopoly is over!!"
        CONDITION
: "quest['beer'].getValue('beer_quality') >= 1"
        GOTO
: ungratitude
       
    -   REPLY
: "I'm looking for Pekko, you seen him?"
        CONDITION
: "quest.hasActiveQuest('fedex') and not\
           \ quest.hasFinishedQuest('fedex') and not\
           \ quest['fedex'].isGoalValue('found_pekko')"

        GOTO
: help_fedex
       
    -   REPLY
: "Hey, back off.  Just making small talk."
        GOTO
: parting_shot
       
-   ID
: explain_camilla
    SAY
: "Well, it's probably because she gets hit on by greasy layabouts all\
       \ hours of the day.  Maybe you should cut her some slack."

    RESPONSES
:
    -   REPLY
: "Hmmm... Can you confirm that she was here all night with you\
           \ two days ago?"

        CONDITION
: "quest['fedex'].isGoalValue('drunkard_evidence')"
        GOTO
: check_alibi
       
    -   REPLY
: "I suppose that's not unreasonable."
        GOTO
: back
       
-   ID
: check_alibi
    SAY
: "Huh?  You're not her boyfriend.  And I'm not her babysitter.  Why do\
       \ you care?"

    RESPONSES
:
    -   REPLY
: "I'm investigating a murder"
        GOTO
: investigate
       
    -   REPLY
: "No reason.  No reason at all."
        GOTO
: main_dialog
       
-   ID
: investigate
    SAY
: "Oh, in that case officer, she was with me the whole time. [rolls\
       \ eyes]"

    RESPONSES
:
    -   REPLY
: "I get the sense that you are not taking this very seriously."
        GOTO
: main_dialog
       
-   ID
: but_kicking
    SAY
: "Not today.  I'm off duty.  But watch yourself all the same."
    RESPONSES
:
    -   REPLY
: "I'll do that."
        GOTO
: back
       
-   ID
: explain_jacob
    SAY
: "I'm Jacob's guy.  You got a problem with him - or his family - you\
       \ got a problem with me.  So do you have a problem?"

    RESPONSES
:
    -   REPLY
: "Nope.  No problem at all."
        GOTO
: back
       
-   ID
: explain_synnove
    SAY
: "OK, she's a little weird.  She was 5 when she saw what those Russians\
       \ bastards did to her mother.  She'd have been next if Jacob and I hadn't\
       \ shown up in time."

    RESPONSES
:
    -   REPLY
: "Oh, I had no idea.  Gruesome."
        GOTO
: back
       
-   ID
: inn_background
    SAY
: "If you call sittin' here and bullshitting `working`.  But I do solve\
       \ problems for Jacob.  You're not a problem, are ya?"

    RESPONSES
:
    -   REPLY
: "No sir, no problem here."
        GOTO
: back
       
-   ID
: help_beer
    SAY
: "Now you are just trying to be funny.  And failing.   Get out of here\
       \ before I decide to throw you out."

    RESPONSES
:
    -   REPLY
: "Yeah, well maybe I'll find my own bouncer, too!"
        GOTO
: parting_shot
       
-   ID
: loose_women
    SAY
: "Buy 'em a drink and find out."
    RESPONSES
:
    -   REPLY
: "I would do that if I could afford the booze in this place."
        GOTO
: back
       
-   ID
: help_fedex
    SAY
: "I dunno.  Dude's in here all the time."
    RESPONSES
:
    -   REPLY
: "Was he here talking to Bart a couple nights ago?"
        CONDITION
: "quest['fedex'].isGoalValue('drunkard_evidence')"
        GOTO
: pekko_check
       
    -   REPLY
: "Lot of help you are."
        GOTO
: parting_shot
       
-   ID
: pekko_check
    SAY
: "Buy 'em a drink and find out."
    RESPONSES
:
    -   REPLY
: "I would do that if I could afford the booze in this place."
        GOTO
: back
       
-   ID
: parting_shot
    SAY
: "Watch yourself, Bub.  I don't want to get out this chair."
    RESPONSES
:
    -   REPLY
: "Ulp."
        GOTO
: end
       
-   ID
: ungratitude
    SAY
: "Oh, a wise guy huh??? [gets out of chair]"
    RESPONSES
:
    -   REPLY
: "I'm out of here!"
        GOTO
: end
       
...

Test 2

--- !clarkevans.com/^invoice
invoice
: 34843
date  
: 2001-01-23
bill-to
: &id001
    given  
: Chris
    family
: Dumars
    address
:
       lines
: |
           458 Walkman Dr.
            Suite #292

        city    
: Royal Oak
        state  
: MI
        postal  
: 48046
ship-to
: *id001
product
:
    - sku        
: BL394D
      quantity    
: 4
      description
: Basketball
      price      
: 450.00
    - sku        
: BL4438H
      quantity    
: 1
      description
: Super Hoop
      price      
: 2392.00
tax  
: 251.42
total
: 4443.52
comments
: >
   Late afternoon is best.
    Backup contact is Nancy
    Billsmer @ 338-4338.
    Chances of failure:
       103% and rising
   
    New paragraph with lead indent

    New paragraph after blank line

  <<
: *id001
  two more
: !!sometype
  one more
: !!type |
    fydhjtbrvstrsrec
  finale
: >
    weeeeeeeeeeee
Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox