Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export attachment urls #97

Open
noctux opened this issue Mar 13, 2019 · 1 comment
Open

Export attachment urls #97

noctux opened this issue Mar 13, 2019 · 1 comment

Comments

@noctux
Copy link

noctux commented Mar 13, 2019

Hello,

thank you for the really useful project! However, I noticed that translation-server does not export all data available to zotero in the /web endpoint. The filtered item-fields can be found here:

if(field === "complete" || field === "itemID" || field === "attachments"

I'm specifically missing the attachment field. The attached patch (include-attachments.patch.txt, modeled similar to the handling of notes as explicit items) will export the data, for instance:

$ ./translate_url 'http://drops.dagstuhl.de/opus/frontdoor.php?source_opus=10246'
[{
  "key": "P5KKCZHW",
  "version": 0,
  "itemType": "conferencePaper",
  "creators": [
   {
    "firstName": "Spyros",
    "lastName": "Angelopoulos",
    "creatorType": "author"
   },
   ...
  ],
  "tags": [...],
  "title": "Best-Of-Two-Worlds Analysis of Online Search",
  ...,
  "accessDate": "2019-03-13T09:46:39Z"
 },
 {
  "itemType": "attachment",
  "parentItem": "P5KKCZHW",
  "title": "Snapshot",
  "mimeType": "text\/html",
  "url": "http:\/\/drops.dagstuhl.de\/opus\/frontdoor.php?source_opus=10246"
 },
 {
  "itemType": "attachment",
  "parentItem": "P5KKCZHW",
  "title": "Full Text PDF",
  "mimeType": "application\/pdf",
  "url": "http:\/\/drops.dagstuhl.de\/opus\/volltexte\/2019\/10246\/pdf\/LIPIcs-STACS-2019-7.pdf"
}]

So I wonder whether this was a conscious decision to remove attachments (especially those kinds that simply carry an url field) or whether those could be included into the output. Please note that I'm not really familiar with the codebase or javascript, so the patch might do quite stupid things :D

Thank you for your work and consideration.

@nikcaryo
Copy link

Any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants