Skip to content

Commit

Permalink
update apha parser
Browse files Browse the repository at this point in the history
  • Loading branch information
nthu31 committed Aug 26, 2024
1 parent 6cd7599 commit 3058884
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions apha/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ module.exports = new Parser(function analyseEC(parsedUrl, ec) {
// https://pharmacylibrary.com/doi/epub/10.21019/9781582122861
result.rtype = 'BOOK';
result.mime = 'EPUB';
result.doi = `${match[1]}/${match[2]}`;
result.unitid = `${match[1]}/${match[2]}`;
} else if ((match = /^\/doi\/epdf\/([0-9.]+)\/([0-9]+)$/i.exec(path)) !== null) {
// https://pharmacylibrary.com/doi/epdf/10.21019/9781582121444
result.rtype = 'BOOK';
result.mime = 'PDF';
result.doi = `${match[1]}/${match[2]}`;
result.unitid = `${match[1]}/${match[2]}`;
}
return result;
Expand Down
6 changes: 3 additions & 3 deletions apha/test/apha.2024-08-09.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
out-title_id;out-doi;out-unitid;out-rtype;out-mime;in-url
;10.21019/9781582122861;10.21019/9781582122861;BOOK;EPUB;https://pharmacylibrary.com/doi/epub/10.21019/9781582122861
;10.21019/9781582121444;10.21019/9781582121444;BOOK;PDF;https://pharmacylibrary.com/doi/epdf/10.21019/9781582121444
;10.21019/9781582122168;10.21019/9781582122168;BOOK;EPUB;https://pharmacylibrary.com/doi/epub/10.21019/9781582122168
;;10.21019/9781582122861;BOOK;EPUB;https://pharmacylibrary.com/doi/epub/10.21019/9781582122861
;;10.21019/9781582121444;BOOK;PDF;https://pharmacylibrary.com/doi/epdf/10.21019/9781582121444
;;10.21019/9781582122168;BOOK;EPUB;https://pharmacylibrary.com/doi/epub/10.21019/9781582122168
ALE.2000.1;;10.21019/ALE.2000.1;BOOK;HTML;https://pharmacylibrary.com/doi/10.21019/ALE.2000.1
culturaltoolkit-diverse.cross-cultural_communication;;10.21019/culturaltoolkit-diverse.cross-cultural_communication;BOOK;HTML;https://pharmacylibrary.com/doi/full/10.21019/culturaltoolkit-diverse.cross-cultural_communication
culturaltoolkit-healthdisp.define_health-disp;;10.21019/culturaltoolkit-healthdisp.define_health-disp;BOOK;HTML;https://pharmacylibrary.com/doi/10.21019/culturaltoolkit-healthdisp.define_health-disp
Expand Down

0 comments on commit 3058884

Please sign in to comment.