Created
January 17, 2019 23:02
-
-
Save retorquere/3d572d75e6c85c18edd445c33bb07e2e to your computer and use it in GitHub Desktop.
This file contains 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