Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/chehsuan/markdown-tree

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/chehsuan/markdown-tree

  • v0.0.0-20220709143742-38573ce4e478
  • Source
  • Go
  • Socket score

Version published
Created
Source

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

FAQs

Package last updated on 09 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc