'generate text tree for a non-existant folder structure

I want to generate a beautiful text rendering of a file system / folder structure that does not exist. Imagine I want to propose a file system layout, I would like to express this in an easy way I can quickly type down. For instance, given an input like this:

another
    folder
    log.txt
final
hi.py
some
    folder
        file.txt

where hierarchy is simply expressed by Tabs. Could be any other encoding though.

I would like to get a beatiful output like tree could generate:

.
├── another
│   ├── folder
│   └── log.txt
├── final
├── hi.py
└── some
    └── folder
        └── file.txt

The goal here is to avoid typing non-type-able but beautiful characters like └── or ├──. Ideally, a web-version of this tool would be desirable.

There are a bunch of seemingly related SO posts: What tool to use to draw file tree diagram or Representing Directory & File Structure in Markdown Syntax. However, all of them need an existing folder structure.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source