This commit is contained in:
decoded
2022-02-21 16:49:47 -06:00
parent 64457efc5c
commit 7509104ca3
2 changed files with 251 additions and 129 deletions

View File

@@ -33,13 +33,14 @@ MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNs. -hMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMdyymMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
```
```
cp437 ansi parsing - this will be integrated into bots like krylon/maple/g1mp when finished.
dr1p4ns1 v1.2 - cp437 ansi parsing - this logic will be rolled into bots like krylon/maple/g1mp
```
## prerequisites
- `apt install python3`
## usage - main file
```
running 'python3 dr1p4ns1.py' will batch process all the {ans,asc} files in the ansiscii directory
running 'python3 dr1p4ns1.py /path/to/ansi/files' will load all the .ans files in that directory
```
## test data and debugging
- running `python3 test.py` will present table data and create an ansi file for testing
@@ -47,18 +48,11 @@ running 'python3 dr1p4ns1.py' will batch process all the {ans,asc} files in the
```d=dr1p4ns1(ansifile=_FILE_,width=80,debug=False)```
## files overview
```
/access.log - after usage the files laded or with error are logged into this file
/dr1p4ns1.py - main file, reads 'work.ans' and attempts to parse and display
/ansiscii/ - storing the ansi and ascii graphics in this subdirectory while testing
/test.py - used to generate test ansi file and presents table data
/test.ans - thie file is created after running test.py to contain controlled test data
/ansiscii/ - storing the ansi and ascii graphics in this subdirectory while testing
/ansiscii/work.ans - this ansi file is loaded by 'dr1p4ns1.py', this is the logic testing
/ansiscii/work.asc - escape codes/colors stripped in text for test referencing
```
## main files of interest
- dr1p4ns1.py
- work.ans
- work.asc
- test.py
- test.ans
```