Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature_request(option): Markdown output #21

Open
Kristinita opened this issue Aug 24, 2020 · 1 comment
Open

feature_request(option): Markdown output #21

Kristinita opened this issue Aug 24, 2020 · 1 comment

Comments

@Kristinita
Copy link

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.

@MrRaindrop
Copy link
Owner

Hi,

I don't think this tool should do work other than tree command processing, including converting the generated data into a certain form.

The tree-cli generated data already contains the information to generate the format you need. In theory, you can use this information to make a separate tool for conversion.

But I am sorry that I have no plans or energy to make a separate tool to do this level of conversion.

I can keep this issue open to see if anyone else in the community can help implement this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants