Posts Tagged ‘cite’

May 10, 2014 0

Python script to extract citation keys from latex files

By in latex, python

”’ Created on May 10, 2014 @author: thomas ”’ import fnmatch import os”’ Created on May 10, 2014 @author: thomas ”’ import fnmatch import os import re if __name__ == ‘__main__’: directory = ‘/home/thomas/Ph.D/Projekter/057 2014-03-10 Database paper/latex-version/databasepaper’ matches = [] for root, dirnames, filenames in os.walk(directory): for filename in fnmatch.filter(filenames, ‘*.tex’): matches.append(os.path.join(root, filename)) print(matches) pattern= […]

Tags: , ,