Created
January 17, 2019 23:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
with open(sys.argv[2], 'w') as tgt: | |
with open(sys.argv[1]) as src: | |
for line in src.readlines(): | |
if line.startswith('TI -') or line.startswith('TI-'): | |
tgt.write('TY - JOUR\n') | |
elif line.startswith('TM'): | |
line = 'N1' + line[2:] | |
tgt.write(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment