lobsters / lobsters

Computing-focused community centered around link aggregation and discussion
https://lobste.rs
Other
4.05k stars 812 forks source link

Normalize and provide automatic metadata for arXiv links #1165

Open NattyNarwhal opened 1 year ago

NattyNarwhal commented 1 year ago

If I post an arXiv link, there's some concerns:

I propose special-case handling for arXiv. arXiv exposes an API. We can extract the ID from the link, and generate a query URL that returns the metadata in a structured form (i.e. http://export.arxiv.org/api/query?id_list=2303.05498&max_results=1 from the original URL https://arxiv.org/pdf/2303.05498.pdf). It outputs slightly spicy Atom. We can use that to extract the summary for a PDF link, include a link to the summary in the article body, add a year in the title if the paper isn't from the current year, and link the PDF.

pushcx commented 1 year ago

Sounds like a great quality-of-life feature, we get a lot of links to arXiv.

Whoever picks this up - start from StoriesController. the fetch_url_attributes action. It's the endpoint powering the Fetch Title button.

Huh. That has me wondering if the Fetch Title button works for users with js disabled. From a glance at the action, probably not. That'd be a nice improvement as part of this, and off the top of my head it might be as easy as having that button submit to the preview action.

pushcx commented 7 months ago

Recognizing duplicate/alternate links was handled in #965 / 9041e3df. These other features would still be nice improvements!