unitaryfund / metriq-app

Web app for Metriq
https://metriq.info
Apache License 2.0
27 stars 19 forks source link

As a member, I want to add a submission URL as either an arXiv or GitHub link and have the title and description auto-populate. #167

Closed vprusso closed 2 years ago

vprusso commented 3 years ago

Task:

If an arXiv or GitHub link is provided via the submission page, we should automatically scrape the title and description from their respective APIs.

User Story (User <-> System (Web app))

User System (Web app)
1. (Authenticated user on `AddSubmission/` view) 1. (Displaying "add submission" page)
2. User puts a link in "Content URL" textbox with `https://arxiv.org/` prefix OR with `https://github.com/` prefix. 2.
3. 3. Content in "Submission Name" and "Description" text boxes auto-populate.
4. User deletes the content in the "Content URL" textbox. 4.
5. 5. Any text that was dynamically populated from step 3. is removed from both "Submission Name" and "Description".
6. (Successful call) 6. (Successful response)

Here are the relevant links for the GitHub and arXiv REST APIs, respectively:

nathanshammah commented 2 years ago

+1 on this. As a step toward this, the order of the submission fields could already be swapped, between arxiv link and title.

vprusso commented 2 years ago

@nathanshammah you brought up a good point though in our meeting. This might not be as straightforward as using their own APIs. As you mentioned, even when sharing an arXiv link, the image associated with that link is just the arXiv logo itself and not anything visual contained within the article.

If this is an issue that arXiv itself has in extracting for one reason or another, we might come up against the same issue. We can also look into the PWC approach for this and see if that might be worth looking into as an alternative for image grabbing from the arXiv link.

cometta commented 2 years ago

PR :

https://github.com/unitaryfund/metriq-api/pull/193 https://github.com/unitaryfund/metriq-app/pull/590

nathanshammah commented 2 years ago

Thanks @cometta!

WrathfulSpatula commented 2 years ago

Thanks @cometta!