From ed21b74fc83e8cf79c334db09fed150cd866f5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Sun, 1 Nov 2020 16:18:00 +0100 Subject: [PATCH] Use saved crossref data for publications --- content/dataset.html | 17 +- content/publications.html | 7 +- layouts/partials/head_custom.html | 1 - .../10/1021/acs/jctc/0c00227/metadata.json | 213 +++++++++++++++++ .../10/1021/acs/jctc/8b00406/metadata.json | 216 ++++++++++++++++++ .../10/1021/acs/jctc/8b01205/metadata.json | 208 +++++++++++++++++ .../10/1021/acs/jctc/9b01216/metadata.json | 215 +++++++++++++++++ .../10/1021/acs/jpclett/0c00014/metadata.json | 182 +++++++++++++++ .../10/1021/acs/jpclett/9b03652/metadata.json | 177 ++++++++++++++ static/js/DOICache.js | 52 ----- static/js/PubliData.js | 44 ++++ static/js/createPubliUI.js | 19 +- static/js/indexDB.js | 2 +- tools/{pubimport.py => pubImport.py} | 16 +- 14 files changed, 1286 insertions(+), 83 deletions(-) create mode 100644 static/data/publis/10/1021/acs/jctc/0c00227/metadata.json create mode 100644 static/data/publis/10/1021/acs/jctc/8b00406/metadata.json create mode 100644 static/data/publis/10/1021/acs/jctc/8b01205/metadata.json create mode 100644 static/data/publis/10/1021/acs/jctc/9b01216/metadata.json create mode 100644 static/data/publis/10/1021/acs/jpclett/0c00014/metadata.json create mode 100644 static/data/publis/10/1021/acs/jpclett/9b03652/metadata.json delete mode 100644 static/js/DOICache.js create mode 100644 static/js/PubliData.js rename tools/{pubimport.py => pubImport.py} (63%) mode change 100644 => 100755 diff --git a/content/dataset.html b/content/dataset.html index b13ae47a..08b978cf 100644 --- a/content/dataset.html +++ b/content/dataset.html @@ -16,7 +16,7 @@ draft: false - + @@ -97,7 +97,7 @@ draft: false delete (cbextl) delete (extl) delete (vertkindtl) - window.doiCache = new DOICache() + window.publiCache = new Map() await loadFiles() } async function loadFiles() { @@ -460,7 +460,7 @@ draft: false allowUnknow:$("#cb_nHUnknow").is(':checked') } } - window.doiCache.clear() + window.publiCache.clear() processingIndicator.isActive = true window.filtData = window.dats //Filter with select @@ -494,7 +494,10 @@ draft: false var exSets = new uniq(window.filtData.map((d) => d.set)) var mols = new Set(window.filtData.map((d) => d.molecule)) for (const exSet of exSets) { - await doiCache.tryAdd(await exSet.getDOIAsync()) + const DOI= await exSet.getDOIAsync() + if (DOI!=null) { + publiCache.set(DOI,await PubliData.loadAsync(DOI)) + } const setName = exSet.name window.T1ref.set(setName, new Map()) for (const mol of mols) { @@ -570,9 +573,9 @@ draft: false $("

").text(CurrentsetName).appendTo(div) } var doi= await exSet.getDOIAsync() - if (doiCache.has(doi)) { - const doiDat = doiCache.get(doi).format('data', { format: 'object' })[0] - $("

").append($("",{href:doiDat.URL,target:"_blank"}).text(doiDat.title)).appendTo(div) + if (publiCache.has(doi)) { + const publiDat = publiCache.get(doi) + $("

").append($("",{href:publiDat.URL,target:"_blank"}).text(publiDat.title)).appendTo(div) } var table = $("").addClass("datatable").appendTo(div) var head = $("") diff --git a/content/publications.html b/content/publications.html index 10238291..22c490b9 100644 --- a/content/publications.html +++ b/content/publications.html @@ -14,6 +14,7 @@ draft: false + @@ -26,8 +27,7 @@ draft: false var myDB = await indexDB.loadAsync() const sets = myDB.sets for (const [setName,publis] of sets) { - const publiscite = await Cite.async(publis) - const uopublis = publiscite.format('data', { format: 'object' }) + const uopublis = await PubliData.loadManyAsync(publis) if (uopublis.length !== 0) { const mySetSec = $('
').addClass('publiSet').attr("data-setName", setName).attr("id",setName).appendTo(setsSec) $("

").text(setName).appendTo(mySetSec) @@ -39,8 +39,7 @@ draft: false } } const odois = myDB.others - const opubliscite = await Cite.async(odois) - const uoopublis = opubliscite.format('data', { format: 'object' }) + const uoopublis = await PubliData.loadManyAsync(odois) const opublis = uoopublis.sort((puba, pubb) => pubUtils.getIssuedDate(puba) - pubUtils.getIssuedDate(pubb)) for (const publi of opublis) { art = await createPubliUI(publi, true, true) diff --git a/layouts/partials/head_custom.html b/layouts/partials/head_custom.html index 7a467654..58c7c777 100644 --- a/layouts/partials/head_custom.html +++ b/layouts/partials/head_custom.html @@ -18,7 +18,6 @@ MathJax.Hub.Config({ - diff --git a/static/data/publis/10/1021/acs/jctc/0c00227/metadata.json b/static/data/publis/10/1021/acs/jctc/0c00227/metadata.json new file mode 100644 index 00000000..8583c178 --- /dev/null +++ b/static/data/publis/10/1021/acs/jctc/0c00227/metadata.json @@ -0,0 +1,213 @@ +{ + "indexed": { + "date-parts": [ + [ + 2020, + 8, + 12 + ] + ], + "date-time": "2020-08-12T11:47:20Z", + "timestamp": 1597232840029 + }, + "reference-count": 179, + "publisher": "American Chemical Society (ACS)", + "issue": "6", + "funder": [ + { + "DOI": "10.13039/501100001665", + "name": "Agence Nationale de la Recherche", + "doi-asserted-by": "publisher", + "award": [ + "ANR-11-EQPX-0004" + ] + }, + { + "DOI": "10.13039/501100004794", + "name": "Centre National de la Recherche Scientifique", + "doi-asserted-by": "publisher", + "award": [] + }, + { + "name": "Centre de Calcul Intensif des Pays de la Loire", + "award": [] + }, + { + "name": "GENCI-TGCC", + "award": [ + "2019-A0060801738" + ] + }, + { + "name": "CALMIP", + "award": [] + } + ], + "content-domain": { + "domain": [], + "crossmark-restriction": false + }, + "short-container-title": [ + "J. Chem. Theory Comput." + ], + "published-print": { + "date-parts": [ + [ + 2020, + 6, + 9 + ] + ] + }, + "DOI": "10.1021/acs.jctc.0c00227", + "type": "journal-article", + "created": { + "date-parts": [ + [ + 2020, + 5, + 7 + ] + ], + "date-time": "2020-05-07T19:09:20Z", + "timestamp": 1588878560000 + }, + "page": "3720-3736", + "source": "Crossref", + "is-referenced-by-count": 2, + "title": [ + "Mountaineering Strategy to Excited States: Highly Accurate Energies and Benchmarks for Exotic Molecules and Radicals" + ], + "prefix": "10.1021", + "volume": "16", + "author": [ + { + "ORCID": "http://orcid.org/0000-0003-0598-7425", + "authenticated-orcid": true, + "given": "Pierre-Fran\u00e7ois", + "family": "Loos", + "sequence": "first", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, CNRS, UPS, Universit\u00e9 de Toulouse, 31000 Toulouse, France" + } + ] + }, + { + "given": "Anthony", + "family": "Scemama", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, CNRS, UPS, Universit\u00e9 de Toulouse, 31000 Toulouse, France" + } + ] + }, + { + "ORCID": "http://orcid.org/0000-0001-6684-5223", + "authenticated-orcid": true, + "given": "Martial", + "family": "Boggio-Pasqua", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, CNRS, UPS, Universit\u00e9 de Toulouse, 31000 Toulouse, France" + } + ] + }, + { + "ORCID": "http://orcid.org/0000-0002-4217-0708", + "authenticated-orcid": true, + "given": "Denis", + "family": "Jacquemin", + "sequence": "additional", + "affiliation": [ + { + "name": "CEISAM UMR 6230, CNRS, Universit\u00e9 de Nantes, F-44000 Nantes, France" + } + ] + } + ], + "member": "316", + "published-online": { + "date-parts": [ + [ + 2020, + 5, + 7 + ] + ] + }, + "container-title": [ + "Journal of Chemical Theory and Computation" + ], + "original-title": [], + "language": "en", + "link": [ + { + "URL": "https://pubs.acs.org/doi/pdf/10.1021/acs.jctc.0c00227", + "content-type": "unspecified", + "content-version": "vor", + "intended-application": "similarity-checking" + } + ], + "deposited": { + "date-parts": [ + [ + 2020, + 6, + 9 + ] + ], + "date-time": "2020-06-09T08:08:10Z", + "timestamp": 1591690090000 + }, + "score": 1.0, + "subtitle": [], + "short-title": [], + "issued": { + "date-parts": [ + [ + 2020, + 5, + 7 + ] + ] + }, + "references-count": 179, + "journal-issue": { + "published-print": { + "date-parts": [ + [ + 2020, + 6, + 9 + ] + ] + }, + "issue": "6" + }, + "alternative-id": [ + "10.1021/acs.jctc.0c00227" + ], + "URL": "http://dx.doi.org/10.1021/acs.jctc.0c00227", + "relation": {}, + "ISSN": [ + "1549-9618", + "1549-9626" + ], + "issn-type": [ + { + "value": "1549-9618", + "type": "print" + }, + { + "value": "1549-9626", + "type": "electronic" + } + ], + "subject": [ + "Physical and Theoretical Chemistry", + "Computer Science Applications" + ] +} \ No newline at end of file diff --git a/static/data/publis/10/1021/acs/jctc/8b00406/metadata.json b/static/data/publis/10/1021/acs/jctc/8b00406/metadata.json new file mode 100644 index 00000000..2a5a6097 --- /dev/null +++ b/static/data/publis/10/1021/acs/jctc/8b00406/metadata.json @@ -0,0 +1,216 @@ +{ + "indexed": { + "date-parts": [ + [ + 2020, + 10, + 16 + ] + ], + "date-time": "2020-10-16T15:03:35Z", + "timestamp": 1602860615923 + }, + "reference-count": 170, + "publisher": "American Chemical Society (ACS)", + "issue": "8", + "funder": [ + { + "name": "R?gion des Pays de la Loire", + "award": [] + } + ], + "content-domain": { + "domain": [], + "crossmark-restriction": false + }, + "short-container-title": [ + "J. Chem. Theory Comput." + ], + "published-print": { + "date-parts": [ + [ + 2018, + 8, + 14 + ] + ] + }, + "DOI": "10.1021/acs.jctc.8b00406", + "type": "journal-article", + "created": { + "date-parts": [ + [ + 2018, + 7, + 2 + ] + ], + "date-time": "2018-07-02T22:35:43Z", + "timestamp": 1530570943000 + }, + "page": "4360-4379", + "source": "Crossref", + "is-referenced-by-count": 76, + "title": [ + "A Mountaineering Strategy to Excited States: Highly Accurate Reference Energies and Benchmarks" + ], + "prefix": "10.1021", + "volume": "14", + "author": [ + { + "ORCID": "http://orcid.org/0000-0003-0598-7425", + "authenticated-orcid": true, + "given": "Pierre-Fran\u00e7ois", + "family": "Loos", + "sequence": "first", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, Universit\u00e9 de Toulouse, CNRS, UPS, 31013 Toulouse Cedex 6, France" + } + ] + }, + { + "given": "Anthony", + "family": "Scemama", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, Universit\u00e9 de Toulouse, CNRS, UPS, 31013 Toulouse Cedex 6, France" + } + ] + }, + { + "given": "Aymeric", + "family": "Blondel", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire CEISAM - UMR CNRS 6230, Universit\u00e9 de Nantes, 2 Rue de la Houssini\u00e8re, BP 92208, 44322 Nantes Cedex 3, France" + } + ] + }, + { + "given": "Yann", + "family": "Garniron", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, Universit\u00e9 de Toulouse, CNRS, UPS, 31013 Toulouse Cedex 6, France" + } + ] + }, + { + "given": "Michel", + "family": "Caffarel", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, Universit\u00e9 de Toulouse, CNRS, UPS, 31013 Toulouse Cedex 6, France" + } + ] + }, + { + "ORCID": "http://orcid.org/0000-0002-4217-0708", + "authenticated-orcid": true, + "given": "Denis", + "family": "Jacquemin", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire CEISAM - UMR CNRS 6230, Universit\u00e9 de Nantes, 2 Rue de la Houssini\u00e8re, BP 92208, 44322 Nantes Cedex 3, France" + } + ] + } + ], + "member": "316", + "published-online": { + "date-parts": [ + [ + 2018, + 7, + 2 + ] + ] + }, + "container-title": [ + "Journal of Chemical Theory and Computation" + ], + "original-title": [], + "language": "en", + "link": [ + { + "URL": "https://pubs.acs.org/doi/pdf/10.1021/acs.jctc.8b00406", + "content-type": "unspecified", + "content-version": "vor", + "intended-application": "similarity-checking" + } + ], + "deposited": { + "date-parts": [ + [ + 2020, + 4, + 8 + ] + ], + "date-time": "2020-04-08T22:36:43Z", + "timestamp": 1586385403000 + }, + "score": 1.0, + "subtitle": [], + "short-title": [], + "issued": { + "date-parts": [ + [ + 2018, + 7, + 2 + ] + ] + }, + "references-count": 170, + "journal-issue": { + "published-online": { + "date-parts": [ + [ + 2018, + 6, + 15 + ] + ] + }, + "published-print": { + "date-parts": [ + [ + 2018, + 8, + 14 + ] + ] + }, + "issue": "8" + }, + "alternative-id": [ + "10.1021/acs.jctc.8b00406" + ], + "URL": "http://dx.doi.org/10.1021/acs.jctc.8b00406", + "relation": {}, + "ISSN": [ + "1549-9618", + "1549-9626" + ], + "issn-type": [ + { + "value": "1549-9618", + "type": "print" + }, + { + "value": "1549-9626", + "type": "electronic" + } + ], + "subject": [ + "Physical and Theoretical Chemistry", + "Computer Science Applications" + ] +} \ No newline at end of file diff --git a/static/data/publis/10/1021/acs/jctc/8b01205/metadata.json b/static/data/publis/10/1021/acs/jctc/8b01205/metadata.json new file mode 100644 index 00000000..76eed127 --- /dev/null +++ b/static/data/publis/10/1021/acs/jctc/8b01205/metadata.json @@ -0,0 +1,208 @@ +{ + "indexed": { + "date-parts": [ + [ + 2020, + 10, + 16 + ] + ], + "date-time": "2020-10-16T15:03:35Z", + "timestamp": 1602860615930 + }, + "reference-count": 257, + "publisher": "American Chemical Society (ACS)", + "issue": "3", + "funder": [ + { + "name": "Region des Pays de la Loire", + "award": [] + } + ], + "content-domain": { + "domain": [], + "crossmark-restriction": false + }, + "short-container-title": [ + "J. Chem. Theory Comput." + ], + "published-print": { + "date-parts": [ + [ + 2019, + 3, + 12 + ] + ] + }, + "DOI": "10.1021/acs.jctc.8b01205", + "type": "journal-article", + "created": { + "date-parts": [ + [ + 2019, + 1, + 29 + ] + ], + "date-time": "2019-01-29T03:40:39Z", + "timestamp": 1548733239000 + }, + "page": "1939-1956", + "source": "Crossref", + "is-referenced-by-count": 32, + "title": [ + "Reference Energies for Double Excitations" + ], + "prefix": "10.1021", + "volume": "15", + "author": [ + { + "ORCID": "http://orcid.org/0000-0003-0598-7425", + "authenticated-orcid": true, + "given": "Pierre-Fran\u00e7ois", + "family": "Loos", + "sequence": "first", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques (UMR 5626), Universit\u00e9 de Toulouse, CNRS, UPS, 31062 Toulouse, France" + } + ] + }, + { + "ORCID": "http://orcid.org/0000-0001-6684-5223", + "authenticated-orcid": true, + "given": "Martial", + "family": "Boggio-Pasqua", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques (UMR 5626), Universit\u00e9 de Toulouse, CNRS, UPS, 31062 Toulouse, France" + } + ] + }, + { + "given": "Anthony", + "family": "Scemama", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques (UMR 5626), Universit\u00e9 de Toulouse, CNRS, UPS, 31062 Toulouse, France" + } + ] + }, + { + "given": "Michel", + "family": "Caffarel", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques (UMR 5626), Universit\u00e9 de Toulouse, CNRS, UPS, 31062 Toulouse, France" + } + ] + }, + { + "ORCID": "http://orcid.org/0000-0002-4217-0708", + "authenticated-orcid": true, + "given": "Denis", + "family": "Jacquemin", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire CEISAM (UMR 6230), CNRS, Universit\u00e9 de Nantes, 44399 Cedex 3 Nantes, France" + } + ] + } + ], + "member": "316", + "published-online": { + "date-parts": [ + [ + 2019, + 1, + 28 + ] + ] + }, + "container-title": [ + "Journal of Chemical Theory and Computation" + ], + "original-title": [], + "language": "en", + "link": [ + { + "URL": "https://pubs.acs.org/doi/pdf/10.1021/acs.jctc.8b01205", + "content-type": "unspecified", + "content-version": "vor", + "intended-application": "similarity-checking" + } + ], + "deposited": { + "date-parts": [ + [ + 2020, + 4, + 10 + ] + ], + "date-time": "2020-04-10T00:12:42Z", + "timestamp": 1586477562000 + }, + "score": 1.0, + "subtitle": [], + "short-title": [], + "issued": { + "date-parts": [ + [ + 2019, + 1, + 28 + ] + ] + }, + "references-count": 257, + "journal-issue": { + "published-online": { + "date-parts": [ + [ + 2019, + 1, + 28 + ] + ] + }, + "published-print": { + "date-parts": [ + [ + 2019, + 3, + 12 + ] + ] + }, + "issue": "3" + }, + "alternative-id": [ + "10.1021/acs.jctc.8b01205" + ], + "URL": "http://dx.doi.org/10.1021/acs.jctc.8b01205", + "relation": {}, + "ISSN": [ + "1549-9618", + "1549-9626" + ], + "issn-type": [ + { + "value": "1549-9618", + "type": "print" + }, + { + "value": "1549-9626", + "type": "electronic" + } + ], + "subject": [ + "Physical and Theoretical Chemistry", + "Computer Science Applications" + ] +} \ No newline at end of file diff --git a/static/data/publis/10/1021/acs/jctc/9b01216/metadata.json b/static/data/publis/10/1021/acs/jctc/9b01216/metadata.json new file mode 100644 index 00000000..45e54c67 --- /dev/null +++ b/static/data/publis/10/1021/acs/jctc/9b01216/metadata.json @@ -0,0 +1,215 @@ +{ + "indexed": { + "date-parts": [ + [ + 2020, + 10, + 16 + ] + ], + "date-time": "2020-10-16T15:03:35Z", + "timestamp": 1602860615929 + }, + "reference-count": 254, + "publisher": "American Chemical Society (ACS)", + "issue": "3", + "funder": [ + { + "DOI": "10.13039/501100001665", + "name": "Agence Nationale de la Recherche", + "doi-asserted-by": "publisher", + "award": [ + "ANR-17-EURE-0009" + ] + }, + { + "DOI": "10.13039/501100004794", + "name": "Centre National de la Recherche Scientifique", + "doi-asserted-by": "publisher", + "award": [] + }, + { + "name": "R?gion des Pays de la Loire", + "award": [] + } + ], + "content-domain": { + "domain": [], + "crossmark-restriction": false + }, + "short-container-title": [ + "J. Chem. Theory Comput." + ], + "published-print": { + "date-parts": [ + [ + 2020, + 3, + 10 + ] + ] + }, + "DOI": "10.1021/acs.jctc.9b01216", + "type": "journal-article", + "created": { + "date-parts": [ + [ + 2020, + 1, + 27 + ] + ], + "date-time": "2020-01-27T21:41:36Z", + "timestamp": 1580161296000 + }, + "page": "1711-1741", + "source": "Crossref", + "is-referenced-by-count": 15, + "title": [ + "A Mountaineering Strategy to Excited States: Highly Accurate Energies and Benchmarks for Medium Sized Molecules" + ], + "prefix": "10.1021", + "volume": "16", + "author": [ + { + "ORCID": "http://orcid.org/0000-0003-0598-7425", + "authenticated-orcid": true, + "given": "Pierre-Fran\u00e7ois", + "family": "Loos", + "sequence": "first", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, CNRS et Universit\u00e9 Toulouse III - Paul Sabatier, 118 route de Narbonne, 31062 Toulouse, France" + } + ] + }, + { + "ORCID": "http://orcid.org/0000-0002-4947-3912", + "authenticated-orcid": true, + "given": "Filippo", + "family": "Lipparini", + "sequence": "additional", + "affiliation": [ + { + "name": "Dipartimento di Chimica e Chimica Industriale, University of Pisa, Via Moruzzi 3, 56124 Pisa, Italy" + } + ] + }, + { + "ORCID": "http://orcid.org/0000-0001-6684-5223", + "authenticated-orcid": true, + "given": "Martial", + "family": "Boggio-Pasqua", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, CNRS et Universit\u00e9 Toulouse III - Paul Sabatier, 118 route de Narbonne, 31062 Toulouse, France" + } + ] + }, + { + "given": "Anthony", + "family": "Scemama", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, CNRS et Universit\u00e9 Toulouse III - Paul Sabatier, 118 route de Narbonne, 31062 Toulouse, France" + } + ] + }, + { + "ORCID": "http://orcid.org/0000-0002-4217-0708", + "authenticated-orcid": true, + "given": "Denis", + "family": "Jacquemin", + "sequence": "additional", + "affiliation": [ + { + "name": "CEISAM Lab, UMR 6230, Universit\u00e9 de Nantes, CNRS, F-44000 Nantes, France" + } + ] + } + ], + "member": "316", + "published-online": { + "date-parts": [ + [ + 2020, + 1, + 27 + ] + ] + }, + "container-title": [ + "Journal of Chemical Theory and Computation" + ], + "original-title": [], + "language": "en", + "link": [ + { + "URL": "https://pubs.acs.org/doi/pdf/10.1021/acs.jctc.9b01216", + "content-type": "unspecified", + "content-version": "vor", + "intended-application": "similarity-checking" + } + ], + "deposited": { + "date-parts": [ + [ + 2020, + 4, + 6 + ] + ], + "date-time": "2020-04-06T22:40:19Z", + "timestamp": 1586212819000 + }, + "score": 1.0, + "subtitle": [], + "short-title": [], + "issued": { + "date-parts": [ + [ + 2020, + 1, + 27 + ] + ] + }, + "references-count": 254, + "journal-issue": { + "published-print": { + "date-parts": [ + [ + 2020, + 3, + 10 + ] + ] + }, + "issue": "3" + }, + "alternative-id": [ + "10.1021/acs.jctc.9b01216" + ], + "URL": "http://dx.doi.org/10.1021/acs.jctc.9b01216", + "relation": {}, + "ISSN": [ + "1549-9618", + "1549-9626" + ], + "issn-type": [ + { + "value": "1549-9618", + "type": "print" + }, + { + "value": "1549-9626", + "type": "electronic" + } + ], + "subject": [ + "Physical and Theoretical Chemistry", + "Computer Science Applications" + ] +} \ No newline at end of file diff --git a/static/data/publis/10/1021/acs/jpclett/0c00014/metadata.json b/static/data/publis/10/1021/acs/jpclett/0c00014/metadata.json new file mode 100644 index 00000000..2ad1522d --- /dev/null +++ b/static/data/publis/10/1021/acs/jpclett/0c00014/metadata.json @@ -0,0 +1,182 @@ +{ + "indexed": { + "date-parts": [ + [ + 2020, + 10, + 16 + ] + ], + "date-time": "2020-10-16T15:03:35Z", + "timestamp": 1602860615926 + }, + "reference-count": 114, + "publisher": "American Chemical Society (ACS)", + "issue": "6", + "funder": [ + { + "DOI": "10.13039/501100004794", + "name": "Centre National de la Recherche Scientifique", + "doi-asserted-by": "publisher", + "award": [] + }, + { + "name": "R?gion des Pays de la Loire", + "award": [] + } + ], + "content-domain": { + "domain": [], + "crossmark-restriction": false + }, + "short-container-title": [ + "J. Phys. Chem. Lett." + ], + "published-print": { + "date-parts": [ + [ + 2020, + 3, + 19 + ] + ] + }, + "DOI": "10.1021/acs.jpclett.0c00014", + "type": "journal-article", + "created": { + "date-parts": [ + [ + 2020, + 3, + 3 + ] + ], + "date-time": "2020-03-03T19:29:26Z", + "timestamp": 1583263766000 + }, + "page": "2374-2383", + "source": "Crossref", + "is-referenced-by-count": 10, + "title": [ + "The Quest for Highly Accurate Excitation Energies: A Computational Perspective" + ], + "prefix": "10.1021", + "volume": "11", + "author": [ + { + "ORCID": "http://orcid.org/0000-0003-0598-7425", + "authenticated-orcid": true, + "given": "Pierre-Fran\u00e7ois", + "family": "Loos", + "sequence": "first", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, Universit\u00e9 de Toulouse, CNRS, UPS, 31062 Toulouse, France" + } + ] + }, + { + "given": "Anthony", + "family": "Scemama", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques, Universit\u00e9 de Toulouse, CNRS, UPS, 31062 Toulouse, France" + } + ] + }, + { + "ORCID": "http://orcid.org/0000-0002-4217-0708", + "authenticated-orcid": true, + "given": "Denis", + "family": "Jacquemin", + "sequence": "additional", + "affiliation": [ + { + "name": "Universit\u00e9 de Nantes, CNRS, CEISAM UMR 6230, F-44000 Nantes, France" + } + ] + } + ], + "member": "316", + "published-online": { + "date-parts": [ + [ + 2020, + 3, + 3 + ] + ] + }, + "container-title": [ + "The Journal of Physical Chemistry Letters" + ], + "original-title": [], + "language": "en", + "link": [ + { + "URL": "https://pubs.acs.org/doi/pdf/10.1021/acs.jpclett.0c00014", + "content-type": "unspecified", + "content-version": "vor", + "intended-application": "similarity-checking" + } + ], + "deposited": { + "date-parts": [ + [ + 2020, + 4, + 6 + ] + ], + "date-time": "2020-04-06T18:58:24Z", + "timestamp": 1586199504000 + }, + "score": 1.0, + "subtitle": [], + "short-title": [], + "issued": { + "date-parts": [ + [ + 2020, + 3, + 3 + ] + ] + }, + "references-count": 114, + "journal-issue": { + "published-print": { + "date-parts": [ + [ + 2020, + 3, + 19 + ] + ] + }, + "issue": "6" + }, + "alternative-id": [ + "10.1021/acs.jpclett.0c00014" + ], + "URL": "http://dx.doi.org/10.1021/acs.jpclett.0c00014", + "relation": {}, + "ISSN": [ + "1948-7185", + "1948-7185" + ], + "issn-type": [ + { + "value": "1948-7185", + "type": "print" + }, + { + "value": "1948-7185", + "type": "electronic" + } + ], + "subject": [ + "General Materials Science" + ] +} \ No newline at end of file diff --git a/static/data/publis/10/1021/acs/jpclett/9b03652/metadata.json b/static/data/publis/10/1021/acs/jpclett/9b03652/metadata.json new file mode 100644 index 00000000..3d46cf59 --- /dev/null +++ b/static/data/publis/10/1021/acs/jpclett/9b03652/metadata.json @@ -0,0 +1,177 @@ +{ + "indexed": { + "date-parts": [ + [ + 2020, + 5, + 20 + ] + ], + "date-time": "2020-05-20T11:06:57Z", + "timestamp": 1589972817879 + }, + "reference-count": 54, + "publisher": "American Chemical Society (ACS)", + "issue": "3", + "funder": [ + { + "DOI": "10.13039/501100004794", + "name": "Centre National de la Recherche Scientifique", + "doi-asserted-by": "publisher", + "award": [] + } + ], + "content-domain": { + "domain": [], + "crossmark-restriction": false + }, + "short-container-title": [ + "J. Phys. Chem. Lett." + ], + "published-print": { + "date-parts": [ + [ + 2020, + 2, + 6 + ] + ] + }, + "DOI": "10.1021/acs.jpclett.9b03652", + "type": "journal-article", + "created": { + "date-parts": [ + [ + 2020, + 1, + 8 + ] + ], + "date-time": "2020-01-08T20:22:46Z", + "timestamp": 1578514966000 + }, + "page": "974-980", + "source": "Crossref", + "is-referenced-by-count": 2, + "title": [ + "Is ADC(3) as Accurate as CC3 for Valence and Rydberg Transition Energies?" + ], + "prefix": "10.1021", + "volume": "11", + "author": [ + { + "ORCID": "http://orcid.org/0000-0003-0598-7425", + "authenticated-orcid": true, + "given": "Pierre-Fran\u00e7ois", + "family": "Loos", + "sequence": "first", + "affiliation": [ + { + "name": "Laboratoire de Chimie et Physique Quantiques (UMR 5626), CNRS, Universit\u00e9 de Toulouse, 31077 Toulouse, France" + } + ] + }, + { + "ORCID": "http://orcid.org/0000-0002-4217-0708", + "authenticated-orcid": true, + "given": "Denis", + "family": "Jacquemin", + "sequence": "additional", + "affiliation": [ + { + "name": "Laboratoire CEISAM UMR UN-CNRS 6230, Universit\u00e9 de Nantes, F-44000 Nantes, France" + } + ] + } + ], + "member": "316", + "published-online": { + "date-parts": [ + [ + 2020, + 1, + 8 + ] + ] + }, + "container-title": [ + "The Journal of Physical Chemistry Letters" + ], + "original-title": [], + "language": "en", + "link": [ + { + "URL": "https://pubs.acs.org/doi/pdf/10.1021/acs.jpclett.9b03652", + "content-type": "unspecified", + "content-version": "vor", + "intended-application": "similarity-checking" + } + ], + "deposited": { + "date-parts": [ + [ + 2020, + 4, + 7 + ] + ], + "date-time": "2020-04-07T11:10:13Z", + "timestamp": 1586257813000 + }, + "score": 1.0, + "subtitle": [], + "short-title": [], + "issued": { + "date-parts": [ + [ + 2020, + 1, + 8 + ] + ] + }, + "references-count": 54, + "journal-issue": { + "published-online": { + "date-parts": [ + [ + 2020, + 1, + 14 + ] + ] + }, + "published-print": { + "date-parts": [ + [ + 2020, + 2, + 6 + ] + ] + }, + "issue": "3" + }, + "alternative-id": [ + "10.1021/acs.jpclett.9b03652" + ], + "URL": "http://dx.doi.org/10.1021/acs.jpclett.9b03652", + "relation": {}, + "ISSN": [ + "1948-7185", + "1948-7185" + ], + "issn-type": [ + { + "value": "1948-7185", + "type": "print" + }, + { + "value": "1948-7185", + "type": "electronic" + } + ], + "subject": [ + "General Materials Science" + ] +} \ No newline at end of file diff --git a/static/js/DOICache.js b/static/js/DOICache.js deleted file mode 100644 index 6e2b98e3..00000000 --- a/static/js/DOICache.js +++ /dev/null @@ -1,52 +0,0 @@ -class DOICache{ - constructor(){ - this._doimap=new Map() - this._Cite=require("citation-js") - } - clear(){ - this._doimap.clear() - } - delete(article){ - return this._doimap.delete(doi) - } - forEach(callbackfn, thisArg=None){ - return this._doimap.forEach(callbackfn,thisArg) - } - get(doi){ - return this._doimap.get(doi) - } - has(doi){ - return this._doimap.has(doi) - } - async add(doi){ - if(!this.has(doi)){ - const publi=await this._Cite.async(doi) - this._doimap.set(doi,publi) - } - } - async tryAdd(doi){ - const publi = await this._Cite.async(doi) - if (publi.data.length === 0) { - return false - } - this._doimap.set(doi,publi) - return true - } - async addRange(dois){ - const set=new Set(dois) - for(const doi of set){ - await this.add(doi) - } - } - async tryAddRange(dois){ - const set = new Set(dois) - return Promise.all(Array.from(set).map(doi=>this.tryAdd(doi))) - } - get size(){ - return this._doimap.size() - } - keys() { return this._doimap.keys()} - values() { return this._doimap.values()} - entries() { return this._doimap.entries()} - [Symbol.iterator]() { return this.values()} -} \ No newline at end of file diff --git a/static/js/PubliData.js b/static/js/PubliData.js new file mode 100644 index 00000000..f5f8b285 --- /dev/null +++ b/static/js/PubliData.js @@ -0,0 +1,44 @@ +class PubliData{ + static async loadAsync(DOI){ + const path = PubliData.GetPathForDOI(DOI) + var me = JSON.parse(await getTextFromFileUrlAsync(`${path}/metadata.json`)) + Reflect.setPrototypeOf(me,PubliData.prototype) + return me + } + static async loadManyAsync(DOIs){ + var data = [] + for (const DOI of DOIs) { + if (DOI!=null) { + data.push(await PubliData.loadAsync(DOI)) + } + } + return data + } + get Path(){ + return PubliData.GetPathForDOI(this.DOI) + } + get PictureURL(){ + return PubliData.GetPictureURLForDOI(this.DOI) + } + get AbstractURL(){ + return PubliData.GetAbstractURLForDOI(this.DOI) + } + async getAbstractTextAsync(){ + return await PubliData.getAbstractTexForDOIAsync(this.DOI) + } + + static GetPathForDOI(DOI){ + return `/data/publis/${DOI.replaceAll(".","/")}` + } + static GetAbstractURLForDOI(DOI){ + return `${PubliData.GetPathForDOI(DOI)}/abstract.html` + } + + static GetPictureURLForDOI(DOI){ + return `${PubliData.GetPathForDOI(DOI)}/picture.jpeg` + } + + static async getAbstractTexForDOIAsync(DOI){ + return await getTextFromFileUrlAsync(PubliData.GetAbstractURLForDOI(DOI)) + } +} \ No newline at end of file diff --git a/static/js/createPubliUI.js b/static/js/createPubliUI.js index 15f6d799..5a0215a0 100644 --- a/static/js/createPubliUI.js +++ b/static/js/createPubliUI.js @@ -1,14 +1,10 @@ -function getPubliSubDir(DOI) { - return DOI.split(".").join("/") -} - async function createPubliUI(publi,toolTips=false,abstract=false) { const art = $("
").addClass("publi") art.className = "publi" $("", { href: publi.URL, target: "_blank" - }).html($("

").text(publi.title)).appendTo(art) + }).html($("

").text(publi.title[0])).appendTo(art) const authors = publi.author const ulauthors = $("
    ").addClass("authors-list").appendTo(art) for (const author of authors) { @@ -35,18 +31,18 @@ async function createPubliUI(publi,toolTips=false,abstract=false) { ulauthors.append(liauth) } journaldiv = $("
    ").appendTo(art) - if ("container-title-short" in publi) { - var title_short = $("").text(publi["container-title-short"]) + if ("container-title-short" in publi && publi["container-title-short"].length>0) { + var title_short = $("").text(publi["container-title-short"][0]) journaldiv.append(title_short) if (toolTips) { tippy(title_short[0], { - content: publi["container-title"], + content: publi["container-title"][0], theme: 'light', }); } } else { - $("").text(publi["container-title"]).appendTo(journaldiv) + $("").text(publi["container-title"][0]).appendTo(journaldiv) } var date = pubUtils.getIssuedDate(publi) journaldiv.append(" ") @@ -70,12 +66,11 @@ async function createPubliUI(publi,toolTips=false,abstract=false) { year: "numeric" }))).appendTo(art) if (abstract) { - const dir = "/data/publis/"+getPubliSubDir(publi.DOI) var ab = $("
    ",{id: "abstract",}).addClass("well").addClass("abstract") var abfig =$("
    ").addClass("picture") abfig.appendTo(ab) - $("",{src:dir+"/picture.jpeg"}).appendTo(abfig) - var htmltxt =await getTextFromFileUrlAsync(dir+"/abstract.html") + $("",{src:publi.PictureURL}).appendTo(abfig) + var htmltxt = await publi.getAbstractTextAsync() abtxt=$("

    ").html(htmltxt) abtxt.appendTo(ab) art.append(ab) diff --git a/static/js/indexDB.js b/static/js/indexDB.js index a8417441..1a72477e 100644 --- a/static/js/indexDB.js +++ b/static/js/indexDB.js @@ -4,7 +4,7 @@ class indexDB { const text = await getTextFromFileUrlAsync("/data/index.yaml") const myYaml = jsyaml.load(text); db.sets = ((myYaml.sets === null) ? new Map() : new Map(Object.entries(myYaml.sets))); - db.others = ((myYaml.others === null) ? new Map() : new Map(Object.entries(myYaml.others))); + db.others = ((myYaml.others === null) ? [] : Array.from(myYaml.others)); return db } } \ No newline at end of file diff --git a/tools/pubimport.py b/tools/pubImport.py old mode 100644 new mode 100755 similarity index 63% rename from tools/pubimport.py rename to tools/pubImport.py index 39e63e10..7a8229cd --- a/tools/pubimport.py +++ b/tools/pubImport.py @@ -8,9 +8,9 @@ from pathlib import Path from shutil import copyfile import crossref_commons.retrieval parser = argparse.ArgumentParser() -parser.add_argument("--DOI",type=str) -parser.add_argument('--abstract', type=Path,help="The html abstract text") -parser.add_argument('--picture', type=Path,help="The picture for the graphical abstact") +parser.add_argument("--DOI",type=str,required=True) +parser.add_argument('--abstract', type=Path,help="The html abstract text file",required=False) +parser.add_argument('--picture', type=Path,help="The jpeg picture for the graphical abstact",required=False) args=parser.parse_args() scriptpath=Path(sys.argv[0]).resolve() publipath=scriptpath.parents[1]/"static"/"data"/"publis" @@ -22,6 +22,10 @@ picture=mydir/"picture.jpeg" if not mydir.exists(): os.makedirs(str(mydir)) with open(str(metadata),"w") as f: - json.dump(result,f) -copyfile(args.abstract,abstract) -copyfile(args.picture,picture") \ No newline at end of file + json.dump(result,f, indent=2) +if args.abstract!=None: + abstract=mydir/"abstract.html" + copyfile(args.abstract,abstract) +if args.picture!=None: + picture=mydir/"picture.html" + copyfile(args.picture,picture) \ No newline at end of file