teraflik / yaml-parser

A custom parser for YAML files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YAML Parser

This script parses the !include directive in YAML files. Included file doesn't have to be in the same directory, relative paths also work.

Requirements

  • Python 3.8 and above
  • pyyaml

Usage

python3 -m pip install pyyaml
./yaml_parser <input_file>

Example

$ cat main.yaml
numbers: !include numbers.yml

$ cat numbers.yaml
- 1
- 2
- 3

$ ./yaml_parser.py main.yaml
numbers:
  - 1
  - 2
  - 3

About

A custom parser for YAML files


Languages

Language:Python 100.0%