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


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.1.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

treescriptify_text-0.3.1-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file treescriptify_text-0.3.1.tar.gz.

File metadata

  • Download URL: treescriptify_text-0.3.1.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for treescriptify_text-0.3.1.tar.gz
Algorithm Hash digest
SHA256 04cb97df7998898443c055af08056a56f77edd5d4178da9c344ad0585db5c572
MD5 d14b1eaf96a354d29f191dd9ebba77c1
BLAKE2b-256 fae867e8340a7226c153589dff46b89c86ffa7fb9cd7fe7d1bd64af54d19e5ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for treescriptify_text-0.3.1.tar.gz:

Publisher: publish.yml on DK96-OS/treescriptify-text

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file treescriptify_text-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for treescriptify_text-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4821e48eed9a533d79374851264c020eaa72ec7496b4a4721fde5c58c25ae5e2
MD5 b673bcd077212997d05f23b76a6512ba
BLAKE2b-256 115615eebb44f4cb284dcfc04aabdda6ebb98e04841218e2d15137eb05fba0fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for treescriptify_text-0.3.1-py3-none-any.whl:

Publisher: publish.yml on DK96-OS/treescriptify-text

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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