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.1.tar.gz
(17.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codesec-0.2.1.tar.gz.
File metadata
- Download URL: codesec-0.2.1.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.26.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
292145c856564e10a1b305653860d3819c876522f7b03860c83d189b667ad516
|
|
| MD5 |
af55e3c79b5e89557da93b14500575cc
|
|
| BLAKE2b-256 |
8e7af8f6617212f636994b4b0d70b770da3c9b9b2ce9caa2e8680318d1376a58
|
File details
Details for the file codesec-0.2.1-py2.py3-none-any.whl.
File metadata
- Download URL: codesec-0.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.26.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f21feff29feed83d715b77cc0221115c5ec097655fabcba347bf22140a817338
|
|
| MD5 |
7279f3f095e7208127a4917833254a52
|
|
| BLAKE2b-256 |
2452c44afb85ba53ccc3507c60826853d94a75ee6cb90fda94fd578bf0d7589d
|