Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 22 lines (18 sloc) 506 Bytes
#!/usr/bin/python3
import sys
import os
#bibPath = os.path.expanduser("~/Documents/bib")
#os.chdir(bibPath)
for root, dirs, files in os.walk("."):
for f in files:
if f.endswith(".pdf"):
pdf = root+'/'+f
bib = root+'/'+f[:-3]+'bib'
bibContent = ''
try:
bibContent = open(bib, 'r').read()
except:
pass
#print('Failed to read bibliography entry for "'+pdf+'"')
if any(arg in bibContent.lower() for arg in sys.argv[1:]):
print(pdf)