2009-01-21 22:18:36 UTC
It is also quite easy to script what you want, using perl or a shell script - but it will not give you proper citations. A citation is *more* than just an author, a date and a title... e.g. there's the journal, volume and page numbers...
Also, first you claimed your file names were of the format
author - 'title'.pdf
now, suddenly they look like
Author_xx 'This is the paper title'.pdf
which is **NOT** the same.
I am assuming that the "xx" in this entry is a two-digit year...
If the 2nd format you gave is indeed correct, using a bash shell under GNU/linux, e.g. this would do it:
for i in *.pdf; do echo "$i" | sed 's/^/@Article{,\nauthor ={/; s/_/},\nyear = {/; s/'\''/},\ntitle={/; s/'\''.pdf/}\n}/'; done > newbib.bib
This filename: -rw-r--r-- 1 k k 1 Jan 21 15:50 Author_xx 'This is the paper title'.pdf
hence becomes this bibtex entry, with an empty keyword:
------------snip-----------
@Article{,
author ={Author},
year = {xx },
title={This is the paper title}
}
------------snap-----------
jabref can read this entry and using the magic wand on it and saving the file leads to:
------------snip-----------
% This file was created with JabRef 2.3.1.
% Encoding: ISO8859_1
@ARTICLE{authorx,
author = {Author},
title = {This is the paper title},
year = {xx }
}
------------snap-----------
As I mentioned - these entries are still very incomplete - for one thing you have improper 2-digit year entries, also page number and volume are still missing and of course I'm supposing all your pdfs are articles which some of them might not be...
The same could be done with a very short perl script (www.perl.org) - or any other scripting language for that matter.
Because of uselessness of the created incomplete entries, I would think that this will never be a feature in JabRef, though.
K.