hypothesis / h

Annotate with anyone, anywhere.
https://hypothes.is/
BSD 2-Clause "Simplified" License
2.93k stars 427 forks source link

arxiv paper titles not visible on hypothes.is annotations page #7868

Open dbieber opened 1 year ago

dbieber commented 1 year ago

tl;dr It would be great to be able to modify the name of a document/page, since pdfs from arxiv show up with just their id (e.g. 1607.06450v1.pdf)

Hello! I hope this is an OK place for a feature request. I use hypothesis to take notes on pdfs from arxiv.org, but when I review my notes on hypothes.is it's difficult to see what each pdf/page is. The list of pdfs/pages looks like this:

image

As you can see, it just shows the pdf arxiv id, not the paper title! So, my feature request is: can we add a way to modify the title of a document so this notes overview page becomes more readable?

kael commented 1 year ago

You can write a Greasemonkey script which parses the Arxiv PDF links on Hypothesis pages, gathers their ArxivID, queries the Arxiv ATOM API with one HTTP call (using an aggregated list of ArxivIDs as a search parameter) and updates Arxiv PDF links titles on Hypothesis pages.

Example of an API query with multiple ArxivIDs: https://export.arxiv.org/api/query?id_list=2007.12026,1706.03741,1603.00022

dbieber commented 1 year ago

Thanks for the suggestion. With considerable help from GPT-4, I implemented your suggestion as a Tampermonkey script. It works great! Here's the script: https://gist.github.com/dbieber/c3198a1ceeb86fa823df305a76907afa

kael commented 1 year ago

With considerable help from GPT-4, I implemented your suggestion as a Tampermonkey script.

You made my day. :smile: :+1: