Generates code headers for your text files
Project description
codesec
Installation
$ pip install codesec
Dependencies
Python dependencies included during pip install:
pyperclip
No other dependencies on Windows and Mac OS.
Other systems may need to install xclip
or xsel
packages
Usage
usage: codesec [-h] [-s] [--symbols] [--reset] [title]
Create pretty printed section title for your code
positional arguments:
title title of your section
optional arguments:
-h, --help show this help message and exit
-s , --set configure settings: length, outer_corners, inner_corners,
outer_edges, inner_edges, center_fill, comment
--symbols prints out common ascii symbols for decoration
--reset reset config
Example:
$ codesec --set delimiter
Default delimiter: "# h "
Current delimiter: "# h "
Enter setting: "# !h "
$ codesec src tests example.py
Found 4 files
Editing src/app.py
Editing src/utils.py
Editing tests/test_func.py
Editing example.py
Before:
# app.py
# !h Boring Functions
def bar():
pass
# !h Cool Functions
def foo():
print("Somthing cool")
def main():
foo()
After:
# app.py
# +------------╔══════════════════╗------------+ #
# |::::::::::::║ Boring Functions ║::::::::::::| #
# +------------╚══════════════════╝------------+ #
def bar():
pass
# +-------------╔════════════════╗-------------+ #
# |:::::::::::::║ Cool Functions ║:::::::::::::| #
# +-------------╚════════════════╝-------------+ #
def foo():
print("Somthing cool")
def main():
foo()
Generate and copy individual sections
$ codesec --set length
Default length: 80
Current length: 80
Enter setting: 50
Preview:
# +--------------╔===============╗-------------+ #
# |::::::::::::::║ Section Title ║:::::::::::::| #
# +--------------╚===============╝-------------+ #
$ codesec --set inner_edges
Default inner_edges: =,=,║,║
Current inner_edges: =,=,║,║
Enter setting: ≡+,≡+,►,◄
Preview:
# +--------------╔≡+≡+≡+≡+≡+≡+≡+≡╗-------------+ #
# |::::::::::::::► Section Title ◄:::::::::::::| #
# +--------------╚≡+≡+≡+≡+≡+≡+≡+≡╝-------------+ #
$ codesec -t "My Section"
Copied:
# +---------------╔≡+≡+≡+≡+≡+≡+╗---------------+ #
# |:::::::::::::::► My Section ◄:::::::::::::::| #
# +---------------╚≡+≡+≡+≡+≡+≡+╝---------------+ #
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
codesec-0.2.0.tar.gz
(17.6 kB
view hashes)
Built Distribution
Close
Hashes for codesec-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db5d51a8663d548f5dd16c636fdf7b51ebee47c2858c1e1749abc4c55a6b9d8c |
|
MD5 | f276c62fb71918071afe95b86afd727b |
|
BLAKE2b-256 | 1d4ec8ff9c995e1808d0a2d789a8192e76f038ce89c420a36bd9b2172a845b9d |