Skip to content

Little command line utility for modifiying YAML files

License

Notifications You must be signed in to change notification settings

bugthesystem/ymal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YMal

YMal — The command line utility for modifiying YAML files

Build Status Coverage Status npm version

Install

npm i ymal -g

Usage

  Usage: ymal [options] [command]

  Commands:

    help  Display help

  Options:

    -C, --classes-to-remove          List of classes to remove
    -f, --file                       YAML file path
    -h, --help                       Output usage information
    -P, --pattern-to-remove-classes  Remove classes by pattern o_O!
    -s, --set-value                  Set property value form: `property=value`
    -v, --version                    Output the version number

Sample

Sample file

name: Martin D'vloper
job: Developer
skill: Elite
employed: true
classes:
  foods:
    - Apple
  'languages::list':
    java: Elite
    python: Elite
    js: Elite
  education: |
    4 GCSEs
    BSc in the Internet of Things
  tst_asd: |
    4 GCSEs
    3 A-Levels
    BSc in the Internet of Things

Sample commands

# Removes classes starts with `tst_` and 
# sets `classes.languages::list.python` property value to `Silver`

# Short form
ymal -f sample.yaml  -s 'classes.languages::list.python=Silver' -P '^tst_'

# Long form
ymal --file=sample.yaml  --set-value='classes.languages::list.python=Silver' \
                         --pattern-to-remove-classes='^tst_'

Contribute

Fork this repository to your own GitHub account and then clone it to your local device

Credits

  • Licensed under MIT.

About

Little command line utility for modifiying YAML files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published