From b36d1aa9566fc4859314527b0628986760a1fee3 Mon Sep 17 00:00:00 2001 From: Martin Sekera Date: Sun, 31 Mar 2019 00:13:24 +0100 Subject: [PATCH] skip lines if the content is the same --- over-hex.py | 3 ++- version.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/over-hex.py b/over-hex.py index bc52e6f..b845cc9 100755 --- a/over-hex.py +++ b/over-hex.py @@ -32,6 +32,7 @@ if __name__ == "__main__": main.add_option("width", "How many bytes per line of output to show.", int, [32], count=1, abbr="o") main.add_option("seek", "Byte number at which output starts.", int, [0], count=1, abbr="s") main.add_option("to", "Byte number where output ends. Use 0<.> to read the whole file but keep in mind that it has to fit in memory.", int, [10240], count=1, abbr="t") + main.add_option("skip", "Skip lines of output that are identical.", bool, [True], abbr="S") main.add_doc("Description", ["A much less painful alternative to hexdump(1)."]) main.setup() @@ -41,4 +42,4 @@ if __name__ == "__main__": f.seek(main.cfg.seek) data = f.read(main.cfg.to - main.cfg.seek) - over.misc.hexdump(data, width=main.cfg.width, show_header=main.cfg.header, show_offsets=main.cfg.offsets, show_ascii=main.cfg.ascii, use_colors=main.cfg.color, initial_offset=main.cfg.seek) + over.misc.hexdump(data, width=main.cfg.width, show_header=main.cfg.header, show_offsets=main.cfg.offsets, show_ascii=main.cfg.ascii, use_colors=main.cfg.color, initial_offset=main.cfg.seek, skip_same=main.cfg.skip) diff --git a/version.py b/version.py index cf56243..0214e39 100644 --- a/version.py +++ b/version.py @@ -4,5 +4,5 @@ major = 0 # VERSION_MAJOR_IDENTIFIER minor = 1 # VERSION_MINOR_IDENTIFIER # VERSION_LAST_MM 0.1 -patch = 3 # VERSION_PATCH_IDENTIFIER -str = "0.1.3" # VERSION_STRING_IDENTIFIER +patch = 4 # VERSION_PATCH_IDENTIFIER +str = "0.1.4" # VERSION_STRING_IDENTIFIER