Skip to content

Instantly share code, notes, and snippets.

View peci1's full-sized avatar

Martin Pecka peci1

  • Czech Technical University in Prague
  • Czech republic
View GitHub Profile
@peci1
peci1 / Abbreviate Journal Names in Bibtex Database.py
Last active January 28, 2021 07:22 — forked from FilipDominec/Abbreviate Journal Names in Bibtex Database.py
Using the translation table from the Jabref program, finds and replaces all scientific journal names to their standardized abbreviated form. First argument is the file to be processed; outputs safely to 'abbreviated.bib'
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import sys, os
import re
try: bibtexdb = open(sys.argv[1]).read()
except: print "Error: specify the file to be processed!"
if not os.path.isfile('journalList.txt'):