Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upsupport other CRAN mirrors #1552
Conversation
katrinleinweber
added some commits
Feb 8, 2018
This comment has been minimized.
This comment has been minimized.
Generally happy with this & extending it to other mirrors. Note you'll have to bump the timestamp for updates to propagate (Scaffold, which we recommend, would do that automatically) |
adam3smith
reviewed
Feb 8, 2018
@@ -2,7 +2,7 @@ | |||
"translatorID": "24a10ebf-ada1-4b8d-8f76-5a29e24d3e78", | |||
"label": "R-Packages", | |||
"creator": "Sebastian Karcher", | |||
"target": "r-project\\.org/web/packages/(.+/index\\.html|available_packages_by_(name|date)\\.html)", | |||
"target": "(r-project\\.org|rstudio\\.com)/web/packages/(.+(/index\\.html)?|available_packages_by_(name|date)\\.html)", |
This comment has been minimized.
This comment has been minimized.
adam3smith
Feb 8, 2018
Collaborator
once you make index.html optional, you can just delete the entire regex after packages: .+(/index\\.html)?
literally matches anything.
This comment has been minimized.
This comment has been minimized.
What's the form of the other mirrors? I thought we already covered those? |
This comment has been minimized.
This comment has been minimized.
Oh! That was an unwarranted assumption it seems. I was thinking of https://www.r-pkg.org/pkg/ggplot2 but they seem to have an entirely different site structure. |
katrinleinweber
added some commits
Feb 8, 2018
This comment has been minimized.
This comment has been minimized.
I used https://duckduckgo.com/?q=cran+web+packages and https://www.google.de/search?q=cran+web+packages to find other popular mirrors. https://mran.microsoft.com/ & https://www.r-pkg.org/ are out-of-scope for me currently. |
katrinleinweber
changed the title
expand to CRAN mirror
support other CRAN mirrors
Feb 8, 2018
This comment has been minimized.
This comment has been minimized.
I feel bad duplicating the test code so much. Does Scaffold support extracting multiple URLs and comparing each result against the same |
This comment has been minimized.
This comment has been minimized.
Don't worry about it -- we only very rarely test different sites with the same expected result, so not worth implementing dedicated functionality for that scenario, and the size of these tests is just completely negligible (and it's not like it's code that actually needs to be updated/maintained by humans) |
This comment has been minimized.
This comment has been minimized.
I delivered it with my bare hands, but it's good to know I don't have to take care of it. |
This comment has been minimized.
This comment has been minimized.
related to force11/force11-sciwg#9 |
This comment has been minimized.
This comment has been minimized.
I rewrote it w/o the FW and update some things. Please have a look. Should be fine for merge. |
This comment has been minimized.
This comment has been minimized.
Manual test imports look fine for me (Zotero 5.0.35.1 & Firefox 52.6.0). Thank you :-) |
adam3smith
reviewed
Feb 27, 2018
"creatorType": "author" | ||
}, | ||
{ | ||
"firstName": "R. Core", |
This comment has been minimized.
This comment has been minimized.
adam3smith
Feb 27, 2018
Collaborator
we should recognize the R Core Team and turn it into an institutional author. Presumably that'll show up on a fair number of packages, so should be worth it.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thank you :-) |
zuphilip
merged commit 24a2462
into
zotero:master
Feb 27, 2018
1 check passed
This comment has been minimized.
This comment has been minimized.
Okay, it is merged now. Thank you all for the contributions here! |
This comment has been minimized.
This comment has been minimized.
@katrinleinweber Can we close the corresponding issue or is there something still open? (I haven't followed the conversion there closely.) |
This comment has been minimized.
This comment has been minimized.
#1487 is "related", because it deals with CRAN iFrames. It's not completely corresponding to this PR, so it should IMHO stay open. |
katrinleinweber commentedFeb 8, 2018
Hi!
Since CRAN.RStudio.com is a very popular mirror, please consider expanding the translator to it. Related to #1487.
Also, would a minimal reg-ex to cover even other mirrors be advisable?
cran\..+/web/packages
might work.Cheers :-)