markdown-tree

command module
v0.0.0-...-61d3821 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 5 Imported by: 0

README

Markdown Tree

This tool extracts the target directory hierarchy and converts it to a markdown file.

Prerequisites

  • Install go first.

Usage

go run ./main.go --input-dir ${input-dir} --output-file ${output-file}

Rules

  • Directories will become to heading lines with level according to its depth of the root dir.
  • Files will become to items of list.
  • Only support 6 levels since markdown only has 6 levels.

Special Case

  • Directories with "-example" suffix will be list items, too.

Example

image-20220420173553278

The directory hierarchy as shown above will be converted to markdown format as bellow.

# test-dir
## dev
- concept.md
### language
#### golang
- dummy.md
- helloworld-example
##### demo
###### in-demo
- in-in-demo
- a.md
## doc
### tutorial

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL