/
opt
/
dedrads
/
python
/
/opt/dedrads/python
mkdir
upload
Name
Size
Mode
Actions
__pycache__/
-
0555
rm
audit_dns.py
5367
0555
edit
dl
rm
header.py
460
0555
edit
dl
rm
humanize.py
4988
0555
edit
dl
rm
sampledata.json
15854
0555
edit
dl
rm
__init__.py
0
0555
edit
dl
rm
Edit:
/opt/dedrads/python/header.py
(460B)
#!/usr/lib/rads/venv/bin/python3 """Prints a header in blue with the header block being a string""" import sys from rads.color import blue def print_header(string, char='~'): if isinstance(string, str) and isinstance(char, str): holder = 80 - len(string) spacer = int(holder / 2 / (len(char))) * char header = f"{spacer} {string} {spacer}\n" blue(header) else: sys.exit('Usage: header.print_header("Header")')
Save
cmd:
run