cpitclaudel / biblio.el

Browse and import bibliographic references from CrossRef, DBLP, HAL, arXiv, Dissemin, and doi.org from Emacs
GNU General Public License v3.0
180 stars 14 forks source link

Add backend to IACR Cryptoeprint #40

Open lzmartinico opened 3 years ago

lzmartinico commented 3 years ago

This PR adds a new backend to the IACR Cryptology ePrint. This is my first non-trivial elisp, so any stylistic feedback would be appreciated! This eprint service does not have a nice API like some of the other backends, so the HTML code is quite brittle for now.

cpitclaudel commented 3 years ago

:tada: :+1: Thanks for the contribution! A quick thought: if here's no clean API from IACR, maybe this would be best maintained as a separate MELPA package? In any case I will have a detailed look.

lzmartinico commented 3 years ago

Thanks for all the comments! I have pushed some more commits to address these

lzmartinico commented 3 years ago

While testing, I have also noted that the IACR search page fails if the year is one of the search terms (spaces are counted as ANDs, but the search string is never checked against the year). Would it make sense to correct this, or should the library try not to be as opinionated and keep to the original API? For me it's pretty normal to search for "Author year" as a pattern

cpitclaudel commented 3 years ago

While testing, I have also noted that the IACR search page fails if the year is one of the search terms (spaces are counted as ANDs, but the search string is never checked against the year). Would it make sense to correct this, or should the library try not to be as opinionated and keep to the original API? For me it's pretty normal to search for "Author year" as a pattern

What would be the normal way to search for an author and year on the website?

lzmartinico commented 3 years ago

While testing, I have also noted that the IACR search page fails if the year is one of the search terms (spaces are counted as ANDs, but the search string is never checked against the year). Would it make sense to correct this, or should the library try not to be as opinionated and keep to the original API? For me it's pretty normal to search for "Author year" as a pattern

What would be the normal way to search for an author and year on the website?

There is only an optional lastmonths parameter to limit search results to the last N months, but it doesn't seem to work, as it still returns all the results for the matching keywords.

cpitclaudel commented 3 years ago

There is only an optional lastmonths parameter to limit search results to the last N months, but it doesn't seem to work, as it still returns all the results for the matching keywords.

I see. I think we should stick with exposing the raw website's functionality. But it definitely wouldn't hurt to write the maintainers of the archive to ask them for a proper API, for the long run :)

lzmartinico commented 3 years ago

Thanks! I think it makes more sense to include this within biblio, I think it's a bit too small to be meaningful as a full package. I'll have a look at the test file to see how the other backends are being tested - or is there any further specific test you'd like to see?

cpitclaudel commented 3 years ago

Nope, same style as the others is perfect. Let me know if you need help (in the past the testing framework moved quickly and that caused breakage; if you see similar breakage let me know and I'll fix the tests ^^)

lzmartinico commented 3 years ago

Hi, I just pushed some tests for the new module, let me know if you think anything is missing!