ddnet/scripts/languages/find_unchanged.py
heinrich5991 41d0f86b12 Use __file__ instead of sys.argv[0]
Thanks to @bojidar-bg for the hint.
2018-07-25 09:17:10 +02:00

17 lines
336 B
Python
Executable file

#!/usr/bin/env python3
import os
import sys
import twlang
os.chdir(os.path.dirname(__file__) + "/../..")
if len(sys.argv) < 2:
print("usage: python find_unchanged.py <file>")
sys.exit()
infile = sys.argv[1]
trans = twlang.translations(infile)
for tran, (_, expr, _) in trans.items():
if tran == expr:
print(tran)