yuuushio / Md-Tree

🌳 Convert markdown-style lists into the unix `tree` command. 🌳

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Convert list to directory tree.



Md-Tree is a Python program that takes in a markdown-style list from a file and generates a tree, similar to the tree command on Unix. It's a useful tool for visualizing and planning the structure of your directory or project, ahead of time, in an easy-to-read format.

Features

  • Ouputs markdown-style lists as a tree
  • Supports multiple file formats, including .md, .txt, and more

Usage

python main.py --file ~/path/to/file.txt

Important Notes

  • For the input list, it is recommended to use tabs for indentation, and - to indicate the beginning of an list-item.
  • Make sure the list in the input file doesn't have any blank lines; this includes making sure the file doesn't end with one either.

TODO

  • Make it efficient (runs in O(n^2) atm) and remove redundant checks/conditions.
  • Check if all the .is_last checks are in the right order.

About

🌳 Convert markdown-style lists into the unix `tree` command. 🌳

License:MIT License


Languages

Language:Python 99.2%Language:Shell 0.8%