Giter Club home page Giter Club logo

yml2dot's Introduction

yml2dot

License: CC BY-SA 4.0

This tool parses a nested YAML file into a dotgraph and renders it to a PNG image. It can be used for visualizing any nested YAML content, like todo lists, config files, etc. I use it as part of a CTF/Pentest writeups automation framework, svachal.

Usage:

$ python3 ./yml2dot.py -h
usage: yml2dot.py [-h] -y YAML [-r] [-l] [-c] [-d]

yml2dot (v0.1)

optional arguments:
  -h, --help            show this help message and exit
  -y YAML, --yaml YAML  yaml file to visualize
  -r, --addrootnode     add a root node to dotgraph
  -l, --rankdirlr       use left to right direction for child nodes
  -c, --randomnodecolor
                        use random colors for nodes
  -d, --d3dot           create a d3 html of dotgraph

Here's a sample YAML for reference:

$ cat test1.yml

Daily Routine:
  Beast 🏋 -> Zen 🧘 -> Recover 💤 -> 🔁:
    a123:
    b234:
    c345:
      - llknlknl
      - hjjkk:
          - lkjlknlkjnl
          - lmlkmnnljlnhlk:
              - 
Life Goal:
  - 🏋 🧘
  - Warrior Monk
  - "    {{ tooltip data here }}"
Learn:
  TESTING:
    - "[label](url){{tooltip}}"
    - "[](url){{tooltip}}"
    - "[label]{{tooltip}}"
    - "(url){{tooltip}}"
    - "[label ]( url){{ tooltip} }  "
  Physics:
    "First Principles | Undeniable Truths":
      - "[Elon Musk](https://twitter.com/elonmusk)"
  Fitness:
    Health and Fitness (sprinting/jumping/swimming/climbing):
      - "[Joe Rogan](https://twitter.com/joerogan)"
      - "[Sol Brah](https://twitter.com/solbrah)"
      - abc:
          pqr:
            - hkjj
            - kjbkbj
          okpoko: |
            [hjbvmhvmhvmhvjvj](nkjn;n;knklnlj)

Here's the commandline to visualize this file:

$ python3 ./yml2dot.py -rcy test1.yml

Here's the visualized image for this file: Dummy Notes

Here are a few more images for reference: Writeup for HackTheBox machine Archetype

Writeup for VulnHub machine BSides Vancouver: 2018 (Workshop)

yml2dot's People

Contributors

7h3ram avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.