Commit Graph
100 Commits
Author SHA1 Message Date
Sharif Haason 1310b1d19e Adjust color function to not take character_table as arg 2023-12-11 13:33:44 -05:00
Sharif Haason a56b3b0c46 Adjust color function to not include character_table 2023-12-11 13:32:46 -05:00
Sharif Haason 7ca00279ed Correct docs 2023-12-10 13:21:23 -05:00
Sharif Haason dfb5d57ee7 Remove block coloring option for refactor 2023-12-10 13:21:23 -05:00
Sharif Haason a0a7d6761f Refactor color components into new module 2023-12-10 13:21:23 -05:00
Sharif Haason 7ef8e5aae4 Add test for code page 437 2023-12-10 13:21:23 -05:00
Sharif Haason 8d5b355b76 Correct asterisk colorization 2023-12-10 13:21:23 -05:00
Sharif Haason 19f325a691 Implement block character table 2023-12-10 13:21:23 -05:00
Sharif Haason 10ddbbad7d Use U+FB00 LATIN SMALL LIGATURE FF (ff) for FFh 2023-12-10 13:21:23 -05:00
Sharif Haason 58c8c06317 Clarify use of ␀ 2023-12-10 13:21:23 -05:00
Sharif Haason 9362c2313a Attribute original author of CP437 2023-12-10 13:21:23 -05:00
Sharif Haason e363f2fdc4 Remove old as_char implementation 2023-12-10 13:21:23 -05:00
Sharif Haason 29e3350e69 Rename CharTable to CharacterTable 2023-12-10 13:21:23 -05:00
Sharif Haason 0c192e979b Make CharTable non-exhaustive 2023-12-10 13:21:23 -05:00
Sharif Haason c4f91959ef Add default value for character table 2023-12-10 13:21:23 -05:00
Sharif Haason 4e66357618 Use hyphens instead of underscores 2023-12-10 13:21:23 -05:00
Sharif Haason 6a230d34a4 Implement character table control and codepage 437 option 2023-12-10 13:21:23 -05:00
Sharif Haason dfad7b3faf Refactor to avoid code duplication 2023-06-20 10:55:07 -04:00
Sharif Haason ef9b530d6a Finish comment 2023-06-20 10:46:48 -04:00
Sharif Haason a3268b8791 Correctly handle discontinuous input i.e. stdin 2023-06-20 10:45:13 -04:00
Sharif Haason cf8e7ec079 Revert default color option to always 2022-12-07 16:48:20 -05:00
Sharif Haason faa9866d11 Change group_bytes to satisfy merge conflict 2022-12-07 16:44:11 -05:00
Sharif Haason b2f0e75ed2 Satisfy clippy 2022-12-06 13:22:34 -05:00
Sharif Haason 4fc0c1f1b0 Replace anstyle with owo-colors 2022-12-06 11:27:16 -05:00
Sharif Haason 4ce6e9d799 Remove now unnecessary byte_char_panel_g 2022-12-06 11:26:19 -05:00
Sharif Haason 5bd76fd11b Replace is-terminal with supports-color and make auto default for color 2022-12-06 11:24:53 -05:00
Sharif Haason 571312dd6e Replace libc with rustix 2022-12-04 21:48:10 -05:00
Sharif Haason fcd09fffac Relax anstyle version 2022-12-04 21:43:03 -05:00
Sharif Haason 188e753675 Replace atty with is-terminal 2022-12-04 21:42:44 -05:00
Sharif Haason 030235afb7 Improve help text for --base 2022-12-04 21:36:42 -05:00
Sharif Haason 7847e8cd33 Remove debug statement 2022-11-27 19:45:33 -05:00
Sharif Haason 32f4ce9987 cargo fmt 2022-11-27 17:52:29 -05:00
Sharif Haason 2a4b17a162 Add tests for alternate base 2022-11-27 17:32:18 -05:00
Sharif Haason 5e3c49f933 cargo fmt 2022-11-27 17:19:48 -05:00
Sharif Haason fc794b290c Account for new panel arguments 2022-11-27 17:19:33 -05:00
Sharif Haason e6000a56f4 Parse -b argument 2022-11-27 17:18:38 -05:00
Sharif Haason 2861cd51ac Adjust panel calculation to account for base and group 2022-11-27 17:17:52 -05:00
Sharif Haason a8cffbb6df Move group_bytes so it can be used for panels 2022-11-27 17:17:25 -05:00
Sharif Haason 7bb6343d2a Add --base/-b argument 2022-11-27 17:16:48 -05:00
Sharif Haason 7de17c4f35 Adjust spaces on empty lines 2022-11-27 17:15:26 -05:00
Sharif Haason ec61c2a789 Print header only if non-empty 2022-11-27 17:14:30 -05:00
Sharif Haason 7f7b88a914 Adjust tests 2022-11-27 17:13:36 -05:00
Sharif Haason 85fa75ba67 Differentiate format on base 2022-11-27 17:11:55 -05:00
Sharif Haason d5d645fc48 Add Base to Printer 2022-11-27 17:11:21 -05:00
Sharif Haason 252b4e84c3 Merge branch 'master' into anstyle 2022-11-27 10:03:53 -05:00
Sharif Haason 3dc118d0ad cargo update 2022-11-27 09:47:38 -05:00
Sharif Haason fb2500d7d6 Include Cargo.lock 2022-11-19 11:40:03 -05:00
Sharif Haason ad9ecda952 Remove once_cell dependency 2022-11-19 11:04:59 -05:00
Sharif Haason c43effefd6 cargo fmt 2022-11-19 11:04:13 -05:00
Sharif Haason 0b6454ed9d Use Vec of enums for color instead of HashMap 2022-11-19 10:50:31 -05:00
Sharif Haason 557ae66ed5 Update Cargo.lock 2022-11-18 16:15:49 -05:00
Sharif Haason df1afdc73f Merge branch 'anstyle' of https://github.com/sharifhsn/hexyl into anstyle 2022-11-18 16:15:12 -05:00
Sharif Haason 9106b899b2 Bump MSRV 2022-11-18 19:22:24 +01:00
Sharif Haason df1c36e5a7 Satisfy clippy 2022-11-18 19:22:24 +01:00
Sharif Haason ac610f7bad Add get_one and fix ordering 2022-11-18 19:22:24 +01:00
Sharif Haason 767740865f Update predicate for default_value_if 2022-11-18 19:22:24 +01:00
Sharif Haason 1fb324f411 Use ArgAction for flags 2022-11-18 19:22:24 +01:00
Sharif Haason 3d0bc3d0eb Replace 'value_of with get_one::<String>` 2022-11-18 19:22:24 +01:00
Sharif Haason 8a52261a50 Replace possible_values with value_parser 2022-11-18 19:22:24 +01:00
Sharif Haason ccc4fb9ba9 Replace takes_value with num_args 2022-11-18 19:22:24 +01:00
Sharif Haason 0baa22f152 DeriveDisplayOrder now default 2022-11-18 19:22:24 +01:00
Sharif Haason 165ced9307 Update to clap 4.0 2022-11-18 19:22:24 +01:00
Sharif Haason 3888a20dfe Bump MSRV 2022-11-18 11:06:18 -05:00
Sharif Haason 75b37fa125 Use compatible lockfile 2022-11-18 11:01:39 -05:00
Sharif Haason 794e1935e3 Prerender color strings for better performance 2022-11-18 10:39:54 -05:00
Sharif Haason c49aa079b4 Add color only when needed 2022-11-18 08:19:13 -05:00
Sharif Haason 675ef6d4a8 Remove calls to ansi_term 2022-11-17 22:33:49 -05:00
Sharif Haason eade38c94a Explicitly paint with style formatting 2022-11-17 22:33:03 -05:00
Sharif Haason 98ceec18cd Replace colors with ANSI styles 2022-11-17 22:15:53 -05:00
Sharif Haason a49f295acc Replace deprecated ansi_term with anstyle 2022-11-17 22:12:00 -05:00
Sharif Haason 0caab15255 Document the main loop 2022-11-13 22:15:41 +01:00
Sharif Haason 828fb210ce Use repeat byte when discovering squeeze 2022-11-13 22:15:41 +01:00
Sharif Haason 1e43783616 Clean up flags for ergonomics 2022-11-13 22:15:41 +01:00
Sharif Haason 6b7cfefec6 Use repeated byte optimization on nonzero bytes 2022-11-13 22:15:41 +01:00
Sharif Haason 5f82942f98 Add second check if read fails unexpectedly 2022-11-13 22:15:41 +01:00
Sharif Haason f6a1c4e8e3 Add unit tests for new implementation of squeeze 2022-11-13 22:15:41 +01:00
Sharif Haason b4fb1b079c Print last line only when squeezed 2022-11-13 22:15:41 +01:00
Sharif Haason f9f59d653d Print asterisk when no position panel 2022-11-13 22:15:41 +01:00
Sharif Haason c82695f0a9 Fix incomplete line ending when squeezed 2022-11-13 22:15:41 +01:00
Sharif Haason 9d938b11ed Remove unnecessary ending case (covered by next) 2022-11-13 22:15:41 +01:00
Sharif Haason d5982c0eb0 Optimize line check when squeezing zero bytes 2022-11-13 22:15:41 +01:00
Sharif Haason 1502419ad4 Document byte_hex_panel_g 2022-11-13 22:15:41 +01:00
Sharif Haason f5be845d70 Satisfy clippy 2022-11-13 22:15:41 +01:00
Sharif Haason 664025477b Alter when position panel is called 2022-11-13 22:15:41 +01:00
Sharif Haason 074bc791c2 Fix incomplete line ending 2022-11-13 22:15:41 +01:00
Sharif Haason 77a4ad25f1 Remove unnecessary import 2022-11-13 22:15:41 +01:00
Sharif Haason ca31d466ba Keep newline consistent 2022-11-13 22:15:41 +01:00
Sharif Haason 945e7a3472 Remove unnecessary squeezer module 2022-11-13 22:15:41 +01:00
Sharif Haason 75d612ff11 Alter newline usage 2022-11-13 22:15:41 +01:00
Sharif Haason 15e8abfc9a Complete architectural rewrite (intentionally fails) 2022-11-13 22:15:41 +01:00
Sharif Haason b36d74ed9d Track squeeze_byte correctly 2022-11-13 22:15:41 +01:00
Sharif Haason 094bf63f02 Eliminate unnecessary call to active 2022-11-13 22:15:41 +01:00
Sharif Haason e0e870de27 Store squeezed byte instead of pushing to vector 2022-11-13 22:15:41 +01:00
Sharif Haason 966421c522 Undo inlining to satisfy MSRV 2022-11-13 22:15:41 +01:00
Sharif Haason 166c2cc46b Inline StdoutLock variable 2022-11-13 22:15:41 +01:00
Sharif Haason 74a5e4bc84 Print first line always 2022-11-13 22:15:41 +01:00
Sharif Haason 363ea0a586 Undo perf regression on squeezer 2022-11-13 22:15:41 +01:00
Sharif Haason 1c4c7ed9a5 Satisfy clippy 2022-11-13 22:15:41 +01:00
Sharif Haason b5c224c119 Fix for no position panel 2022-11-13 22:15:41 +01:00
Sharif Haason d6e34d9dd2 Fix issues with hello_world_elf64 2022-11-13 22:15:41 +01:00