From 23ed4082cf1dc77ef714d38e92664e07dab09f2b Mon Sep 17 00:00:00 2001 From: crc Date: Mon, 21 Sep 2020 13:58:02 +0000 Subject: [PATCH] tooling: add unu.py FossilOrigin-Name: b7a37204e6be19c38dc8203a813c0be6b6eb99326304a270e05363b57d44d714 --- tools/unu.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tools/unu.py diff --git a/tools/unu.py b/tools/unu.py new file mode 100644 index 0000000..ed4ec8b --- /dev/null +++ b/tools/unu.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python + +import sys + +if __name__ == "__main__": + f = sys.argv[1] + in_block = False + with open(f, 'r') as source: + for line in source.readlines(): + if line.rstrip() == '~~~': in_block = not in_block + elif in_block: print(line.rstrip())