Shorthand for creating files and folders.
Project description
#tree (sharpshooter)
#WARNING - probs don't use this until about 0.0.5... just setting up and adding poc
Shorthand templates for creating (or destroying) file-systems.
tree could be written for any language.
pip install sharpshooter
##syntax
To create a plain empty file just type a word i.e.
file
to create or access a dir use +
+dir
To create a file inside a dir use a 4 spaces (or tab)
+dir
file
putting it all together…
+dir
file
+plugins
+mail
+vendor
index.html
+something
file.py
file.py
##usage
from sharpshooter import tree
tree('''
+dir
file < some text
+plugins
+mail
+vendor
index.html
+something
file.py
file.py
''')
tree doesn't wait to be told. Your files are now there.
for future feature goals see TODO.md
NOTES:
came up with the idea while mucking around with a lexer.
so am using this to do it.
- remember it executes from where your python thinks is the current dir
- if you're unsure set it first. i.e.
import os os.chdir(os.path.dirname(os.path.abspath(file)))
WARNING
DON'T leave trailing negative space on lines. I use space to change dirs.
uses 4 spaces not tabs. (I've not tested with tabs as my editor converts them to 4 spaces). will sort later.
this is a work in progress. it creates files on your hard drive. so be careful.
if using a comment. don't leave space before the #
Project details
Release history Release notifications | RSS feed
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 sharpshooter-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81360e1fc4ca10eef278d09e6641492a9a27fa3af35b358a6c96bb20cc7788ce |
|
MD5 | 8de7ab16c0a694a58e997923c7ecf7cb |
|
BLAKE2b-256 | 34939473e60a78c29c78cdbeb94aeaafbdd0b19e45735e87b92a72aa7537e4c6 |