|
Miscellaneous scripts
This repository contains miscellaneous scripts that does not fit in one repository, yet I will use them sometimes for my personal use. Note that some of the scripts might contain hardcoded paths and opinionated presets, and you are advised to inspect them before actually using.
|
Functions | |
| fmt (msg) | |
| text (raw) | |
Variables | |
| data = json.loads(src.read_text(encoding="utf-8")) | |
| dst = Path(sys.argv[2] if len(sys.argv) > 2 else src.with_suffix(".txt")) | |
| encoding | |
| lines = list(filter(None, map(fmt, data["messages"]))) | |
| dict | MEDIA |
| src = Path(sys.argv[1] if len(sys.argv) > 1 else "result.json") | |
| telegram.fmt | ( | msg | ) |
Definition at line 21 of file telegram.json2txt.py.
References text().

| telegram.text | ( | raw | ) |
Definition at line 15 of file telegram.json2txt.py.
Referenced by fmt().

| telegram.data = json.loads(src.read_text(encoding="utf-8")) |
Definition at line 41 of file telegram.json2txt.py.
| telegram.dst = Path(sys.argv[2] if len(sys.argv) > 2 else src.with_suffix(".txt")) |
Definition at line 39 of file telegram.json2txt.py.
| telegram.encoding |
Definition at line 43 of file telegram.json2txt.py.
Definition at line 42 of file telegram.json2txt.py.
| dict telegram.MEDIA |
Definition at line 5 of file telegram.json2txt.py.
| telegram.src = Path(sys.argv[1] if len(sys.argv) > 1 else "result.json") |
Definition at line 38 of file telegram.json2txt.py.