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

Reuse Zotero's translators? #350

Closed
tobiasdiez opened this issue Nov 16, 2015 · 7 comments
Closed

Reuse Zotero's translators? #350

tobiasdiez opened this issue Nov 16, 2015 · 7 comments

Comments

@tobiasdiez
Copy link
Member

I think the reference manager with the best import functionality is Zotero. Fortunately, their importers are open-source. So it seems to be natural to reuse the code for the import into Jabref, right?

One way would be to set-up a translation-server and speak with it via simple (same-machine) http requests as for example here.

@simonharrer
Copy link
Contributor

Yes, but as far as I understood it they only support importing to and exporting from the Zotero format. So we would always need to do two steps: import to Zotero and export into Bibtex for a single import functionality. The same when doing an export.

@tobiasdiez
Copy link
Member Author

Yes. First you transform the website into a zotero object (json) and then convert this into bib(la)tex. Actually, this works quite well and is the same strategy I used for my firefox addon.
(I don't understand what you mean with "same when doing an export").

@koppor
Copy link
Member

koppor commented Nov 17, 2015

Runs on zotero.jabref.org:1969:

curl -d '{"url":"http://www.tandfonline.com/doi/abs/10.1080/15424060903167229","sessionid":"abc123"}' --header "Content-Type: application/json" zotero.jabref.org:1969/web

Issue: I did not update the code. The current fetchers are from 2013. Don't know whether I should try to update them. Have no test cases running to ensure that everything runs as expected.

@tobiasdiez
Copy link
Member Author

So I would propose (and work on it if you give the ok) the following:

  • modify the server code so that it produces bibtex and uses the most recent translators
  • create the necessary code for JabRef to speak with zotero.jabref.org

@koppor
Copy link
Member

koppor commented Nov 19, 2015

Yeah, go ahead 🚀 I currently don't have a clue how the UI should look like: The firefox addon seems to do the job perfectly?

@tobiasdiez
Copy link
Member Author

I had a look in implementing something. So far it seems like the Zotero server does not return the found pdfs (see #17 in their issue tracker). I think it does not make sense to use the zotero server until this is resolved.

Just for the record the powershell version of the above curl command:

try {
    $body = @{
        #url = "http://www.tandfonline.com/doi/abs/10.1080/15424060903167229"
        url = "http://arxiv.org/abs/1508.01114"
        sessionid = "abc123"
    }        
    $result = curl -Uri http://zotero.jabref.org:1969/web -Method Post -Body (ConvertTo-Json $body) -ContentType application/json
    $result.Content
}
catch {
        $result = $_.Exception.Response.GetResponseStream()
        $reader = New-Object System.IO.StreamReader($result)
        $responseBody = $reader.ReadToEnd();
        $responseBody
}

@koppor
Copy link
Member

koppor commented Jul 26, 2016

We are currently trying to focus on other things. 🔥
We will come back later to this topic, therefore closing adding on-hold label and closing the issue for now.

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

No branches or pull requests

4 participants