Preview goes here.

Group: CiteULike-discussion - Forum Thread

Topic: Feature requests

[UNDER REVIEW] Add filename to BibTex

Hi, it seems that the Bibtex export does not contain the filenames of PDFs. Would it be possible to add that? Would be useful for offline use. Thanks!

Posted by StephanMatthiesen on 2012-10-19 09:36:17.

11 replies.    Login or join this group to post to this thread.

Can you give a use-case here (incl. when there are multiple attachments)?

Posted by fergus on 2012-10-19 22:11:17.

How about:

1. Main paper: LastAuthorYearFirstWord

2. Image attachment (when png): LastAuthorYearFirstWord[PNG]

3. PDF attachment: LastAuthorYearFirstWord[PDF2]

4. Txt attachment: LastAuthorYearFirstWord[txt]

etc.?

Posted by Zephyrus on 2012-10-20 04:18:59.

Sorry, may not have been very clear. I just want the filename from CiteULike in the bibtex. I use refmaster on an Android tablet and if it gets fields in the bibtex of the form file = {filename} it can open the local copy (I keep copies of the PDFs with the same filename as on CUL). I think Jabref does the same. I don't actually care much how that field is named or formatted because I can modify it with a simple perl script, as long as the actual filename is present somewhere in the input.

I'm not sure about multiple attachments. I would be happy if each attachment gets its own file={} field.

Posted by StephanMatthiesen on 2012-10-21 00:41:40.

If there's 2 PDFs (say), the auto-generated filenames are the same (though the full URLs are different).

Posted by fergus on 2012-10-21 09:19:45.

I don't understand your comment, and I'm really not sure what the problem is or why it would be so difficult to do. If multiple attachments are a problem, then why not something like:

citeulike-attachment-1 = {/path1/filename1}

citeulike-attachment-2 = {/path1/filename2}

As I said, I'm happy as long as there is *some* field that contains the filename, so that I can convert it into file={filename} with a trivial Perl script. At the moment, that info is just not in the Bibtex file.

If that was possible, it would be really great. Thanks!

Posted by StephanMatthiesen on 2012-10-22 00:29:21.

If you're going the Perl route, why not use the JSON which already has this info.

Posted by fergus on 2012-10-21 13:29:20.

Because then I would have to write a lengthy Perl programm to convert JSON into Bibtex, with all the intricacies of the different types of literature and all fields etc. That would just be overkill for my purposes. I just mentioned Perl to make it easier for you, to say that I'm not bothered about the formatting of this particular field.

Posted by StephanMatthiesen on 2012-10-22 00:20:02.

Sorry, perhaps one important point wasn't clear. I mentioned Refmaster and jabref: the point is that these need bibtex as input files. So the JSON doesn't help me, because I can't read it into anything. I could of course extract the filenames but then I have no way to tell Refmaster about them if they are not in the bibtex.

Posted by StephanMatthiesen on 2012-10-22 00:32:52.

Ok, I've written something now that extracts the file names from the JSON, then finds the corresponding entry in the BibTex and adds it there again. No need for you to do anything, unless there are other users who need that feature.

Posted by StephanMatthiesen on 2012-10-26 10:44:53.

I had almost finished something - I was just struggling to find the right format to shoehorn into BibTeX (I thought it best to include the SHA1 Hash etc too).

Posted by fergus on 2012-10-26 11:12:32.

Oh, I would still like it if you can finish that. My solution is rather "quick and dirty" (more dirty than quick). If you can add it to the Bibtex, it would save me from having to download both the JSON and the Bibtex export.

Posted by StephanMatthiesen on 2012-10-26 15:38:36.

Privacy Statement | Terms & Conditions
CiteULike organises scholarly (or academic) papers or literature and provides bibliographic (which means it makes bibliographies) for universities and higher education establishments. It helps undergraduates and postgraduates. People studying for PhDs or in postdoctoral (postdoc) positions. The service is similar in scope to EndNote or RefWorks or any other reference manager like BibTeX, but it is a social bookmarking service for scientists and humanities researchers.