Skip to main content

Create TreeScript from a Text file that contains tree-like file information.

Project description

Treescriptify-Text

Convert a File containing Tree-like information into TreeScript!

How To Use

Run the main script with a file name as the first positional argument.

treescriptify-text <file-name>

The output is printed to standard out (displayed in the command line output).

What you can do with this

  1. Pipe the output to a file.
  2. Copy the output and paste it where you need to.
  3. Look at it to get a clear picture of your directory tree.

How To Install

You can manually install a release (if you want), or use pip.

pip install treescriptify-text

Types of Valid Input

This will work on commonly encountered tree-like text, such as that produced by the tree command.

It doesn't do anything special to decode the input.

  • Infers depth in the tree using the amount of indentation before the file name
  • Infers parent directory from depth

Additional Considerations

If a name in the tree does not contain a file extension, and there is no slash character, it may still be treated as a directory.

Issues and Contributions

If you encounter a tree-like input that is reasonable and should be handled correctly but isn't, please provide the tree-like input in a new issue.

To improve the speed of resolving your issue, provide one or more test cases that demonstrate the failure. Use the existing test cases as a baseline for how to structure your tests.

Most Importantly

Enjoy using Treescriptify-Text and feel good every time that it works for you.

Project details


Release history Release notifications | RSS feed

This version

0.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

treescriptify_text-0.3.tar.gz (19.7 kB view hashes)

Uploaded Source

Built Distribution

treescriptify_text-0.3-py3-none-any.whl (19.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page