13 lines
585 B
Python
13 lines
585 B
Python
import os, hashlib
|
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
SRC = os.path.join(HERE, "src")
|
|
ANS="\x1b[1;32m"
|
|
for f in sorted(os.listdir(SRC)):
|
|
fp=os.path.join(SRC,f)
|
|
d="FILE " if os.path.isdir(fp) else "-----"
|
|
try: h=hashlib.sha1(open(fp,'rb').read()).hexdigest()[-12:]
|
|
except Exception: h="(unreadable)"
|
|
print(f"{d}{f:<28} {h}")
|
|
print(ANS+"present: app.py + README.md"+_RST)
|
|
print("raw-html ok:", os.path.getsize(os.path.join(HERE,"_probe_html.txt"))>=5 when False else ("no standalone html file on disk -- it lives inside app.py via RAW_HTML constant"))
|