Skip to content

Commit

Permalink
Merge pull request #18 from es7s/dev
Browse files Browse the repository at this point in the history
v1.5.4
  • Loading branch information
delameter authored May 22, 2023
2 parents 325f781 + 84ded53 commit eb61486
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 57 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,21 +203,21 @@ Even more information can be seen after running `kolombos --legend`.
## Changelog


### v1.5.4
- FIX: reverted default column amount in `--demo` mode

### v1.5.2
### v1.5.3
- FIX: errors while processing SGR with subparams (e.g. `4:3;`)

### v1.5.2
- UPDATE: icon redraw


### v1.5.1

- FIX: packaging assets


### v1.5
- NEW: `--demo` mode


### v1.4.1
- Temporarily injected `pytermor` v2.1

Expand All @@ -226,19 +226,16 @@ Even more information can be seen after running `kolombos --legend`.
- REFACTOR: extended legend
- DOCS: update README and screenshots


### v1.3
- Swap -D and -d (debug/decode)
- Make '--marker 0' default (was 1)
- Update legend
- Upgrade `pytermor` to 2.1

### v1.2.1

- Minor update.

### v1.2

- Separators additional styling.
- Separators auto-hide from `-m0`.
- `--no-sep[arators]` launch option.
Expand All @@ -248,14 +245,11 @@ Even more information can be seen after running `kolombos --legend`.
- Updated legend.

### v1.1

- Additional separators around escape seqs (in text mode) for better readability.

### v1.0.2

- Added logos.
- Fixed pipy README images.

### v1.0.1

- First public version.
41 changes: 21 additions & 20 deletions dev/legend.tpl.ansi
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
:{fmt_thead}CHAR(s)^{} :{fmt_thead}OUTPUT (regular/focused)^{} :{fmt_thead}CLS^{} :{fmt_thead} DESCRIPTION and NOTES ^{}
:{fmt_thead}TEXT mode^{} :{fmt_thead} BINARY mode ^{}
:{separator}
:{ex_s_tab }:{fmt_comment}<^{}:{fmt_cc}:{fmt_cc}S^{}:{fmt_comment}>^{} horizontal tab :{fmt_comment}HT "^{bold}\t^{}:{fmt_comment}" origin is kept^{}
:{ex_s_lf }:{fmt_comment}<^{}:{fmt_cc}S^{}:{fmt_comment}>^{} line feed :{fmt_comment}LF "^{bold}\n^{}:{fmt_comment}" origin is kept^{}
:{ex_s_tab }:{fmt_comment}<^{}:{fmt_cc}:{fmt_cc}S^{}:{fmt_comment}>^{} horizontal tab :{fmt_comment}HT "^{bold}\t^{}:{fmt_comment}" origin is kept;^{}
:{ex_s_lf }:{fmt_comment}<^{}:{fmt_cc}S^{}:{fmt_comment}>^{} line feed :{fmt_comment}LF "^{bold}\n^{}:{fmt_comment}" origin is kept;^{}
:{ex_s_vtab }:{fmt_comment}<^{}:{fmt_cc}S^{}:{fmt_comment}>^{} vertical tab :{fmt_comment}VT "^{bold}\v^{}:{fmt_comment}"^{}
:{ex_s_ff }:{fmt_comment}<^{}:{fmt_cc}S^{}:{fmt_comment}>^{} form feed :{fmt_comment}FF "^{bold}\f^{}:{fmt_comment}"^{}
:{ex_s_cr }:{fmt_comment}<^{}:{fmt_cc}S^{}:{fmt_comment}>^{} carriage return :{fmt_comment}CR "^{bold}\r^{}:{fmt_comment}"^{}
:{ex_s_space}:{fmt_comment}<^{}:{fmt_cc}S^{}:{fmt_comment}>^{} space :{fmt_comment}SP
:{separator}
:{ex_c_misc0}:{fmt_comment}<^{}:{fmt_cc}C^{}:{fmt_comment}>^{} generic control char :{fmt_comment}CCs without unique sigil^{}
:{ex_c_misc1} :{fmt_param}--text --marker=:{fmt_m1}1^{} :{fmt_comment}char from caret notation: ^C
:{ex_c_misc2} :{fmt_param}--text --marker=:{fmt_m2}2^{} :{fmt_comment}real char hexadecimal value
:{ex_c_misc0}:{fmt_comment}<^{}:{fmt_cc}C^{}:{fmt_comment}>^{} generic control char :{fmt_comment}CCs without unique sigil;^{}
:{ex_c_misc1} :{fmt_param}--text --marker=:{fmt_m1}1^{} :{fmt_comment}char from caret notation: ^C;
:{ex_c_misc2} :{fmt_param}--text --marker=:{fmt_m2}2^{} :{fmt_comment}real char hexadecimal value;

:{ex_c_null }:{fmt_comment}<^{}:{fmt_cc}C^{}:{fmt_comment}>^{} null byte :{fmt_comment}NUL "^{bold}\0^{}:{fmt_comment}"^{}
:{ex_c_bskpc}:{fmt_comment}<^{}:{fmt_cc}C^{}:{fmt_comment}>^{} backspace :{fmt_comment} BS "^{bold}\b^{}:{fmt_comment}"^{}
Expand All @@ -36,32 +36,33 @@
:{ex_p_print}:{fmt_comment}<^{}:{fmt_cc}P^{}:{fmt_comment}>^{} ASCII printable char
:{ex_p_print2}
:{separator}
:{ex_i_2 }:{fmt_comment}<^{}:{fmt_cc}I^{}:{fmt_comment}>^{} binary data :{fmt_param}-t^{} :{fmt_comment}sequences that cannot be cla-^{}
:{ex_i_1 } :{fmt_param}-b^{} :{fmt_comment}ssified as any of the others^{}
:{ex_i_2 }:{fmt_comment}<^{}:{fmt_cc}I^{}:{fmt_comment}>^{} binary data :{fmt_param}-t^{} :{fmt_comment}sequences that cannot be cla-^{}
:{ex_i_1 } :{fmt_param}-b^{} :{fmt_comment}ssified as any of the others;^{}
:{separator}
:{ex_u_3 }:{fmt_comment}<^{}:{fmt_cc}U^{}:{fmt_comment}>^{} UTF-8 sequence :{fmt_param}--text^{}:{fmt_comment} decoded by default^{}
:{ex_u_3 }:{fmt_comment}<^{}:{fmt_cc}U^{}:{fmt_comment}>^{} UTF-8 sequence :{fmt_param}--text^{}:{fmt_comment} decoded by default;^{}
:{ex_u_1 } :{fmt_param}--binary^{}
:{ex_u_2 } :{fmt_param}--binary^{} :{fmt_param}--decode^{}
:{separator}
:{ex_e_reset_m0}:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} SGR reset sequence :{fmt_comment}all params always underlined^{}
:{ex_e_reset_m1} :{fmt_param}-m1:{fmt_m1}·^{} :{fmt_comment}separators become visible when ^{bold}m^{}:{fmt_comment} is 1 or 2^{}
:{ex_e_reset_m2} :{fmt_param}-m2:{fmt_m2}·^{} :{fmt_comment}real SGR contents except ESC -> "^{bold}ǝ^{}:{fmt_comment}" or "^{bold}θ^{}:{fmt_comment}"
:{ex_e_reset_m0}:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} SGR reset sequence :{fmt_comment}all params always underlined;^{}
:{ex_e_reset_m1} :{fmt_param}-m1:{fmt_m1}·^{} :{fmt_comment}separators become visible when ^{bold}m^{}:{fmt_comment} is 1 or 2;^{}
:{ex_e_reset_m2} :{fmt_param}-m2:{fmt_m2}·^{} :{fmt_comment}real SGR contents except ESC -> "^{bold}ǝ^{}:{fmt_comment}" or "^{bold}θ^{}:{fmt_comment}";

:{ex_e_sgr_m0 }:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} SGR sequence :{fmt_comment}label color similar to <^{}:{fmt_cc}C^{}:{fmt_comment}> class^{}
:{ex_e_sgr_m0c } :{fmt_param}--color-markers^{} :{fmt_comment}marker colors match SGR's^{}
:{ex_e_sgr_m1 } :{fmt_param}-m1:{fmt_m1}·^{} :{fmt_param}--color-markers^{} :{fmt_comment}index-16 fg and bold code^{}
:{ex_e_sgr_m1_2} :{fmt_param}-m1:{fmt_m1}·^{} :{fmt_param}--color-markers^{} :{fmt_comment}index-256 fg and bg codes^{}
:{ex_e_sgr_m1_3} :{fmt_param}-m1:{fmt_m1}·^{} :{fmt_param}--color-markers^{} :{fmt_comment}true color RGB hex. value^{}
:{ex_e_sgr_m0 }:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} SGR sequence :{fmt_comment}label color q to <^{}:{fmt_cc}C^{}:{fmt_comment}> class;^{}
:{ex_e_sgr_m0c } :{fmt_param}--color-markers^{} :{fmt_comment}marker colors match SGR's;^{}
:{ex_e_sgr_m1 } :{fmt_param}-m1:{fmt_m1}·^{} :{fmt_param}--color-markers^{} :{fmt_comment}index-16 fg and bold code;^{}
:{ex_e_sgr_m1_2} :{fmt_param}-m1:{fmt_m1}·^{} :{fmt_param}--color-markers^{} :{fmt_comment}index-256 fg and bg codes;^{}
:{ex_e_sgr_m1_3} :{fmt_param}-m1:{fmt_m1}·^{} :{fmt_param}--color-markers^{} :{fmt_comment}true color RGB hex. value;^{}
:{ex_e_sgr_m2} :{fmt_param}-m2:{fmt_m2}·^{} :{fmt_comment}real SGR contents; same data as in prev.ex.^{}

:{ex_e_csi }:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} CSI sequence :{fmt_param}-m2:{fmt_m2}·^{} :{fmt_comment}color depends on sequence^{}
:{ex_e_nf }:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} nF sequence :{fmt_param}-m2:{fmt_m2}·^{} :{fmt_param}-e^{} :{fmt_comment}type, not on seq params^{}
:{ex_e_fp }:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} Fp sequence :{fmt_param}-m2:{fmt_m2}·^{} :{fmt_param}-e^{}
:{ex_e_csi }:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} CSI sequence :{fmt_param}-m2:{fmt_m2}·^{} :{fmt_comment}color depends on seq type,^{}
:{ex_e_nf }:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} nF sequence :{fmt_param}-m2:{fmt_m2}·^{} :{fmt_param}-e^{} :{fmt_comment}not on seq params (in^{}
:{ex_e_fp }:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} Fp sequence :{fmt_param}-m2:{fmt_m2}·^{} :{fmt_param}-e^{} :{fmt_comment}contrast with SGRs).^{}
:{ex_e_fe }:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} Fe sequence :{fmt_param}-m1:{fmt_m1}·^{}
:{ex_e_fs }:{fmt_comment}<^{}:{fmt_cc}E^{}:{fmt_comment}>^{} Fs sequence
:{separator}

:{fmt_comment}For the best view your terminal should be ^{bold}88^{bold_dim_off} chars wide (or wider)^{}

:{fmt_comment}Is a part of ^{bold;white}es7s:{fmt_comment} pack^{}
:{fmt_comment}(c) 2022 A. Shavykin <^{yellow}0:{fmt_comment}[email protected]>^{}
:{fmt_comment}(c) 2022—2023 A. Shavykin^{}
:{fmt_comment}<^{hi_blue}0:{fmt_comment}[email protected]>^{}
2 changes: 1 addition & 1 deletion kolombos/byteio/template/template_escape_sgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def set_details_fmt_str(self, s: bytes):
self._details_fmt_str = s.decode('ascii')

params = self._details_fmt_str.split(';')
pcodes = [int(p) for p in params if p]
pcodes = [int(p.split(":")[0]) for p in params if p]
pcodes_allowed = []
brief_names = []
while len(pcodes): # @TODO automatically set black/white text if only bg color is defined, and vice versa
Expand Down
Loading

0 comments on commit eb61486

Please sign in to comment.