tooling: add unu.py

FossilOrigin-Name: b7a37204e6be19c38dc8203a813c0be6b6eb99326304a270e05363b57d44d714
This commit is contained in:
crc 2020-09-21 13:58:02 +00:00
parent 6d2102e725
commit 23ed4082cf

11
tools/unu.py Normal file
View file

@ -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())