Skip to content

feature_request(option): Markdown output  #21

@Kristinita

Description

@Kristinita

1. Summary

It would be nice, if would be possible print output to Markdown format.

2. Example data

Simple tree structure:

KiraTreeCLI/
├── KiraDirectory/
│   └── KiraSecondFile.txt
└── KiraFirstFile.txt

3. Expected result

# KiraTreeCLI

1. KiraFirstFile.txt

## KiraDirectory

1. KiraSecondFile.txt

4. Argumentation

I want to publish my big list of books, so that it can be conveniently referenced. For example, that would be possible show my Astronomy books to other users, I could share link https://kristinita.netlify.app/Special/Полная-библиография#Астрономия; Physics books — https://kristinita.netlify.app/Special/Полная-библиография#Физика and so on.

Yes, I know regular expressions. But currently, I have tree → Markdown conversion difficulties, because I can’t do, that files would be higher than directories in output (KiraFirstFile.txt than KiraDirectory/).

5. Examples of expected behavior

5.1. Markdown format

It would be very nice, if tree-node-cli can print output in Markdown format directly. For example, if I will run command:

tree --markdown

I will get the expected result from section «Expected result»:

# KiraTreeCLI

1. KiraFirstFile.txt

## KiraDirectory

1. KiraSecondFile.txt

5.2. dirs-end

If you are for any reason will not do conversion to Markdown, it would be nice to have at least --dirs-end option. Files in this case will always be located above the directories.

  • Command:
tree --dirs-end
  • Result:
KiraTreeCLI/
├── KiraFirstFile.txt
└── KiraDirectory/
    └── KiraSecondFile.txt

6. Not helped

I couldn’t find in Internet third-party tools for conversion filesystem tree structure to Markdown format.

7. Do not offer

I don’t need to convert filesystem tree structure to Markdown list; please, do not offer it. I need, that directories and subdirectories would be converted to Markdown headers; please, read section «Argumentation».

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions