2

I am looking for a Windows program with which I could draw a hierarchical list with some dotted lines that indicates the hierarchical structure, as some file browsers show:

enter image description here

(I don't want any icon, just text + dotted lines any other visual indicator showing the hierarchical structure)

I don't want to use any graphics editor: it should be as easy / convenient as making a bullet list in a text editor (Microsoft Word/LibreOffice/etc).

  • Exactly what do you want to apply this to? A plain text file? File directory? Some other stuff? Is the indent guide in Notepad++ sufficient for you? See if-statement in the middle of this picture: notepad-plus-plus.org/assets/images/scsh/… – holroy Aug 19 '15 at 17:53
  • @holroy I want to apply this to any kind of hierarchical list of strings. Eventually I want to export it as PDF (or at worst take a screenshot of it), to insert it as a figure in some Word or LaTeX document. I am basically trying to make the hierarchical list as visually appealing as possible. – Franck Dernoncourt Aug 19 '15 at 20:00
2

Well, that immediately made me think of the Linux tree command and got me to wondering if there is a Windows port of it.

While googling, I stumbled across http://www.fixedbyvonnie.com/2013/07/5-command-prompt-hacks-you-probably-dont-know/

Take a look at number 3: Dos itself has a tree command and the output looks like this:

enter image description here

Is that what you wanted, or did I somehow miss the point?

  • thanks, I'm looking for something that restricted to file/folder but any kind of bullet list – Franck Dernoncourt Aug 20 '15 at 18:05
1

I would like to suggest ascii-treeA node module for generating a text tree in ASCII.

An input and output example using this npm module:

Input:
  #root node
  ##node1
  ###node11
  ##node2

Output:
  root node
  ├─ node1
  │  └─ node11
  └─ node2

If you take your text line input, and do a simple replace in the start to replace leading spaces with a correct number of # characters, this script should provide the wanted output.

The module is based upon freetree and can possibly be extended/modified/configured into handling text using leading space as indentation directly. If the drawing characters are not already in unicode, you might want to look into that as well.

  • Another variant over this theme could be found at acooke.org/cute/PythonCode0.html – holroy Aug 20 '15 at 8:16
  • Nice, thanks! I'm not especially looking for ASCII-only but that can be definitely very useful for some situations. – Franck Dernoncourt Aug 20 '15 at 18:06
  • @FranckDernoncourt, I don't think it is restricted to ascii, the included example is using unicode characters, and I guess python is unicode safe as well. – holroy Aug 20 '15 at 18:25
  • The other variant is also some general code which could be used if you are up for a little programming... :-) – holroy Aug 20 '15 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.