Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support YAML #4

Open
and1truong opened this issue Feb 17, 2015 · 1 comment
Open

Support YAML #4

and1truong opened this issue Feb 17, 2015 · 1 comment

Comments

@and1truong
Copy link

We write faster in YAML format, can you support this format?

@trauber
Copy link

trauber commented Apr 16, 2015

andytruong,

I've played with myword a little and if you just want a work around this'll work. Here's some myword-ready yaml.

authorname: "Elmer Fudd"
title: "Kill the Rabbit"
when: Thu, 16 Apr 2015 15:26:39 -0400
flMarkdown: true
subs:
    - |
        Your markdown here. Note that lists will render better when the items are separated by blank lines.

        - bugs

        - daffy

        - porky

Convert the yaml to json with this one liner (compliments of http://www.commandlinefu.com/commands/view/12218/convert-yaml-to-json).

python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < file.yaml > file.json

Scripting this with bash is very simple and works for me, but I bet you're thinking of a javascript based solution. yaml.org links to https://github.com/nodeca/js-yaml .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants