Skip to content

Commit

Permalink
Add support for JMLR
Browse files Browse the repository at this point in the history
  • Loading branch information
fepegar committed Nov 26, 2023
1 parent 8589188 commit 38a8f03
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chrome/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const TARGET_URL_REGEXP_REPLACE = [
[/^.*:\/\/proceedings\.mlr\.press\/(.*?)\/(.*?)(?:\.html)?(\?.*?)?(\#.*?)?$/, "https://proceedings.mlr.press/$1/$2/$2.pdf"],
[/^.*:\/\/openaccess\.thecvf\.com\/(.*?)\/html\/(.*?)\.html(\?.*?)?(\#.*?)?$/, "https://openaccess.thecvf.com/$1/papers/$2.pdf"],
[/^.*:\/\/openaccess\.thecvf\.com\/(.*?)\/papers\/(.*?)\.pdf(\?.*?)?(\#.*?)?$/, "https://openaccess.thecvf.com/$1/html/$2.html"],
[/^.*:\/\/www\.jmlr\.org\/papers\/v(\d+)\/(.*?)\.html(\?.*?)?(\#.*?)?$/, "https://www.jmlr.org/papers/volume$1/$2/$2.pdf"],
[/^.*:\/\/www\.jmlr\.org\/papers\/volume(\d+)\/(.*?)\/(.*?)\.pdf(\?.*?)?(\#.*?)?$/, "https://www.jmlr.org/papers/v$1/$2.html"],
];
// All console logs should start with this prefix.
const LOG_PREFIX = "[arXiv-utils]";
Expand Down
2 changes: 2 additions & 0 deletions firefox/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const TARGET_URL_REGEXP_REPLACE = [
[/^.*:\/\/proceedings\.mlr\.press\/(.*?)\/(.*?)(?:\.html)?(\?.*?)?(\#.*?)?$/, "https://proceedings.mlr.press/$1/$2/$2.pdf"],
[/^.*:\/\/openaccess\.thecvf\.com\/(.*?)\/html\/(.*?)\.html(\?.*?)?(\#.*?)?$/, "https://openaccess.thecvf.com/$1/papers/$2.pdf"],
[/^.*:\/\/openaccess\.thecvf\.com\/(.*?)\/papers\/(.*?)\.pdf(\?.*?)?(\#.*?)?$/, "https://openaccess.thecvf.com/$1/html/$2.html"],
[/^.*:\/\/www\.jmlr\.org\/papers\/v(\d+)\/(.*?)\.html(\?.*?)?(\#.*?)?$/, "https://www.jmlr.org/papers/volume$1/$2/$2.pdf"],
[/^.*:\/\/www\.jmlr\.org\/papers\/volume(\d+)\/(.*?)\/(.*?)\.pdf(\?.*?)?(\#.*?)?$/, "https://www.jmlr.org/papers/v$1/$2.html"],
];
// All console logs should start with this prefix.
const LOG_PREFIX = "[arXiv-utils]";
Expand Down
8 changes: 8 additions & 0 deletions tests/testcases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,14 @@ navigation:
title: "CVPR 2022 Open Access Repository"
url2: https://openaccess.thecvf.com/content/CVPR2022W/VOCVALC/papers/Fu_Coupling_Vision_and_Proprioception_for_Navigation_of_Legged_Robots_CVPRW_2022_paper.pdf
description: CVF abs -> pdf (Workshop with slash)
- url: https://www.jmlr.org/papers/v12/pedregosa11a.html
url2: https://www.jmlr.org/papers/volume12/pedregosa11a/pedregosa11a.pdf
title: "Scikit-learn: Machine Learning in Python"
description: JMLR abs -> pdf
- url: https://www.jmlr.org/papers/volume12/pedregosa11a/pedregosa11a.pdf
url2: https://www.jmlr.org/papers/v12/pedregosa11a.html
title: "Scikit-learn: Machine Learning in Python"
description: JMLR pdf -> abs
# TODO: Test download filenames:
# - Title with colon: https://arxiv.org/abs/2102.07936
# - Title with hash symbol: https://arxiv.org/abs/1611.04717
Expand Down

0 comments on commit 38a8f03

Please sign in to comment.