Menu

Tree [6f18b8] default tip /
 History

Read Only access


File Date Author Commit
 _test 2020-11-30 Anthon van der Neut Anthon van der Neut [dc9773] added --width option to rt subcommand
 .hgtags 2021-06-09 Anthon van der Neut Anthon van der Neut [6f18b8] Added tag 0.5.7 for changeset 26d64a3b38da
 LICENSE 2021-06-09 Anthon van der Neut Anthon van der Neut [26d64a] removed support for 2.7 as per ruamel.yaml
 README.rst 2017-07-12 Anthon van der Neut Anthon van der Neut [5428cf] add option to smarten multiline strings and quotes
 __init__.py 2021-06-09 Anthon van der Neut Anthon van der Neut [26d64a] removed support for 2.7 as per ruamel.yaml
 __main__.py 2020-11-30 Anthon van der Neut Anthon van der Neut [dc9773] added --width option to rt subcommand
 setup.py 2020-11-30 Anthon van der Neut Anthon van der Neut [dc9773] added --width option to rt subcommand
 tox.ini 2021-06-09 Anthon van der Neut Anthon van der Neut [26d64a] removed support for 2.7 as per ruamel.yaml
 yaml_cmd.py 2021-06-09 Anthon van der Neut Anthon van der Neut [26d64a] removed support for 2.7 as per ruamel.yaml

Read Me

ruamel.yaml.cmd

This package provides the yaml commandline utlity for converting to/from YAML and for manipulating YAML files

Basic usage:

  • yaml round-trip <file_name> for basic roundtrip testing of YAML files

  • yaml json <file_name> for conversion of JSON file(s) to a single YAML block style document

  • yaml json --write <file_name> to convert JSON files to individual .yaml files. This is essential for being able to comparing otherwise unreadable JSON files (e.g. single line metadata.json files in .whl distributions)

  • yaml ini <file_name> for conversion of an INI/config file (ConfigObj comment and nested sections supported) to a YAML block style document. This requires configobj to be installed (pip install ruamel.yaml.cmd[configobj])

  • yaml from-csv <file_name> for conversion CSV to a YAML file to a a table in an HTML file.

  • yaml htmltable <file_name> for conversion of the basic structure in a YAML file to a a table in an HTML file. The YAML file:

    title:
    - fruit
    - legume
    local:
    - apple
    - sprouts
    import:
    - orange
    - broccoli
    

    is converted into the table:

    title fruit legume
    local apple sprouts
    import orange broccoli
  • yaml merge-expand <input> <output> expand merges in input YAML file (use - for stdin/out)

See yaml --help for more information on the availble commands

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.