tooling: add unu.py
FossilOrigin-Name: b7a37204e6be19c38dc8203a813c0be6b6eb99326304a270e05363b57d44d714
This commit is contained in:
parent
6d2102e725
commit
23ed4082cf
1 changed files with 11 additions and 0 deletions
11
tools/unu.py
Normal file
11
tools/unu.py
Normal 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())
|
Loading…
Reference in a new issue