Create a directory listing diagram from text file
Project description
dirlisting
Create a directory tree listing diagram from a text file.
Installation
$ pip install dirlisting
Usage
dirlisting
can be used to create a directory tree digram that looks like those created
with the tree
command, but from a text file instead of walking an actual directory
tree.
From code
from dirlisting.dirlisting import Dirlisting
with open("input.yaml") as f:
listing = Dirlisting(f)
listing.print()
From the command line
just use dirlisting <filename>
.
File format
The input file is a yaml file. The contents of a directory are
sequences, files are final strings (- filename
), and directories are mappings (- dirname:
). A listing would look like the following.
:::::{grid} 2 ::::{grid-item-card} YAML File
- topdir:
- subdir1:
- file1.txt
- file2.txt
- subdir2:
- file3.txt
:::: ::::{grid-item-card} Output
topdir
├── emptydir
├── file1.txt
├── file2.txt
└── subdir
└── file3.txt
:::: :::::
Contributing
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
License
dirlisting
was created by Stephan Poole. It is licensed under the terms of the MIT
license.
Credits
dirlisting
was created with
cookiecutter
and the
py-pkgs-cookiecutter
template.
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
Built Distribution
Hashes for dirlisting-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33892e52231c868f818a7956931c4ee07a1e8f33f4ef4285dd933a997e756cc4 |
|
MD5 | c1a7973043d63e2df9109564a4f552a0 |
|
BLAKE2b-256 | 0f9d7500451c3d082bc797a08a6406b569870f4e8f5f0703e2d66e3f1204a8bc |