I would like to find a better way of naming publications which I store on my local computer as PDFs. So far I have been doing something like this:
Albano R., Sole A., Adamowski J., Mancusi L. (2014) - A GIS-based model to estimate flood consequences and the degree of accessibility and operability of strategic emergency response structures in urban areas.pdf
This presents a couple of disadvantages:
- Titles can be extremely long. This causes problems in certain operating systems or software such as OneDrive. You can only have so many characters in a filename...
- Not all publications can follow this format. The above is OK for journal papers and theses, but not so much for books or other kinds of publications.
I would like to have a consistent way to manage such a database. I thought of keeping the publication metadata such as authors, date of publication, type of publication and type in a separate text or excel file and naming the PDF files by ID, like
2.pdf, etc. This could work, but it would require referring to and managing a spreadsheet which would contain all the meta data.
Is there a simple method or perhaps lightweight software that I can use which can help me with this sort of task?
I didn't really like the way @Jonas Stein's script is set up, though I do owe him the inspiration and indication to use JabRef. Here's my alternative script:
import bibtexparser import os from shutil import copyfile filename = 'db.bib' out_folder = 'out' with open(filename) as bibtex_file: db = bibtexparser.load(bibtex_file) for entry in db.entries: print(entry['file']) id = entry['ID'] file = entry['file'].split(':') copyfile(file, os.path.join(out_folder, id)+'.pdf') print('done')
It's much more compact and does the job.