Skip to content

Commit

Permalink
silencing a few debug() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
madturtles committed Dec 6, 2023
1 parent 79a4021 commit 13e063b
Showing 1 changed file with 75 additions and 48 deletions.
123 changes: 75 additions & 48 deletions Zenodo.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2023-12-06 17:04:30"
"lastUpdated": "2023-12-06 17:08:33"
}

/*
Expand Down Expand Up @@ -44,7 +44,6 @@ function detectWeb(doc, url) {
var collections = ZU.xpath(doc, '//span[@aria-label="Resource type"]');
for (var i = 0; i < collections.length; i++) {
var type = collections[i].textContent.toLowerCase().trim();
Z.debug(type);
switch (type) {
case "software":
return "computerProgram";
Expand Down Expand Up @@ -131,9 +130,7 @@ async function scrape(doc, url) {
var doi = ZU.xpathText(doc, '//meta[@name="citation_doi"]/@content');
var pdfURL = ZU.xpathText(doc, '//meta[@name="citation_pdf_url"]/@content');
var tags = ZU.xpath(doc, '//meta[@name="citation_keywords"]');
Z.debug(url);
var cslURL = url.replace(/#.+/, "").replace(/\?.+/, "").replace(/\/export\/.+/, "") + "/export/csl";
Z.debug(cslURL);
// use CSL JSON translator
var text = await requestText(cslURL);
text = text.replace(/publisher_place/, "publisher-place");
Expand Down Expand Up @@ -220,8 +217,7 @@ async function scrape(doc, url) {
var testCases = [
{
"type": "web",
"url": "https://zenodo.org/record/54766?ln=en#.ZEAfIMQpAUE",
"detectedItemType": "thesis",
"url": "https://zenodo.org/records/54766#.ZEAfIMQpAUE",
"items": [
{
"itemType": "thesis",
Expand All @@ -238,7 +234,7 @@ var testCases = [
"archive": "Zenodo",
"extra": "DOI: 10.5281/zenodo.54766",
"libraryCatalog": "Zenodo",
"url": "https://zenodo.org/record/54766?ln=en",
"url": "https://zenodo.org/records/54766",
"attachments": [
{
"title": "Zenodo Full Text PDF",
Expand All @@ -257,7 +253,7 @@ var testCases = [
},
{
"type": "web",
"url": "https://zenodo.org/record/54747",
"url": "https://zenodo.org/records/54747",
"items": [
{
"itemType": "presentation",
Expand All @@ -272,28 +268,42 @@ var testCases = [
"date": "2015-09-17",
"abstractNote": "Guides you through important steps in developing relevant visualizations by showcasing the work of PASTEUR4OA to develop visualizations from ROARMAP.",
"extra": "DOI: 10.5281/zenodo.54747",
"url": "https://zenodo.org/record/54747",
"url": "https://zenodo.org/records/54747",
"attachments": [
{
"title": "Zenodo Snapshot",
"mimeType": "text/html"
}
],
"tags": [
"Data visualisation",
"Open Access",
"Open Access policy",
"PASTEUR4OA",
"ROARMAP"
{
"tag": "Data visualisation"
},
{
"tag": "Open Access"
},
{
"tag": "Open Access policy"
},
{
"tag": "PASTEUR4OA"
},
{
"tag": "ROARMAP"
}
],
"notes": [
{
"note": "Funding by European Commission ROR 00k4n6c32."
}
],
"notes": [],
"seeAlso": []
}
]
},
{
"type": "web",
"url": "https://zenodo.org/record/14837?ln=en",
"url": "https://zenodo.org/records/14837",
"items": [
{
"itemType": "artwork",
Expand All @@ -315,36 +325,50 @@ var testCases = [
"extra": "DOI: 10.5281/zenodo.14837",
"libraryCatalog": "Zenodo",
"shortTitle": "Figures 8-11 in A new Savignia from Cretan caves (Araneae",
"url": "https://zenodo.org/record/14837?ln=en",
"url": "https://zenodo.org/records/14837",
"attachments": [
{
"title": "Zenodo Snapshot",
"mimeType": "text/html"
}
],
"tags": [
"Arachnida",
"Araneae",
"Crete",
"Greece",
"Linyphiidae",
"Savignia",
"cave",
"new species",
"troglobiont"
],
"notes": [
{
"note": "Figure uploaded by Plazi"
"tag": "Arachnida"
},
{
"tag": "Araneae"
},
{
"tag": "Crete"
},
{
"tag": "Greece"
},
{
"tag": "Linyphiidae"
},
{
"tag": "Savignia"
},
{
"tag": "cave"
},
{
"tag": "new species"
},
{
"tag": "troglobiont"
}
],
"notes": [],
"seeAlso": []
}
]
},
{
"type": "web",
"url": "https://zenodo.org/record/11879?ln=en",
"url": "https://zenodo.org/records/11879",
"items": [
{
"itemType": "book",
Expand All @@ -363,18 +387,26 @@ var testCases = [
"libraryCatalog": "Zenodo",
"place": "Düsseldorf",
"publisher": "Düsseldorf University Press",
"url": "https://zenodo.org/record/11879?ln=en",
"url": "https://zenodo.org/records/11879",
"attachments": [
{
"title": "Zenodo Full Text PDF",
"mimeType": "application/pdf"
}
],
"tags": [
"computational linguistics",
"historical linguistics",
"phonetic alignment",
"sequence comparison"
{
"tag": "computational linguistics"
},
{
"tag": "historical linguistics"
},
{
"tag": "phonetic alignment"
},
{
"tag": "sequence comparison"
}
],
"notes": [],
"seeAlso": []
Expand All @@ -383,8 +415,7 @@ var testCases = [
},
{
"type": "web",
"url": "https://zenodo.org/record/45756?ln=en#.ZEAe1sQpAUE",
"detectedItemType": "dataset",
"url": "https://zenodo.org/records/45756#.ZEAe1sQpAUE",
"items": [
{
"itemType": "dataset",
Expand Down Expand Up @@ -426,7 +457,7 @@ var testCases = [
"abstractNote": "This submission includes a tar archive of bzipped diffraction images recorded with the ADSC Q315r detector at the Advanced Photon Source of Argonne National Laboratory, Structural Biology Center beam line 19-ID. Relevant meta data can be found in the headers of those diffraction images. Please find below the content of an input file XDS.INP for the program XDS (Kabsch, 2010), which may be used for data reduction. The \"NAME_TEMPLATE_OF_DATA_FRAMES=\" item inside XDS.INP may need to be edited to point to the location of the downloaded and untarred images. !!! Paste lines below in to a file named XDS.INP DETECTOR=ADSC  MINIMUM_VALID_PIXEL_VALUE=1  OVERLOAD= 65000 DIRECTION_OF_DETECTOR_X-AXIS= 1.0 0.0 0.0 DIRECTION_OF_DETECTOR_Y-AXIS= 0.0 1.0 0.0 TRUSTED_REGION=0.0 1.05 MAXIMUM_NUMBER_OF_JOBS=10 ORGX=   1582.82  ORGY=   1485.54 DETECTOR_DISTANCE= 150 ROTATION_AXIS= -1.0 0.0 0.0 OSCILLATION_RANGE=1 X-RAY_WAVELENGTH= 1.2821511 INCIDENT_BEAM_DIRECTION=0.0 0.0 1.0 FRACTION_OF_POLARIZATION=0.90 POLARIZATION_PLANE_NORMAL= 0.0 1.0 0.0 SPACE_GROUP_NUMBER=20 UNIT_CELL_CONSTANTS= 100.030   121.697    56.554    90.000    90.000    90.000 DATA_RANGE=1  180 BACKGROUND_RANGE=1 6 SPOT_RANGE=1 3 SPOT_RANGE=31 33 MAX_CELL_AXIS_ERROR=0.03 MAX_CELL_ANGLE_ERROR=2.0 TEST_RESOLUTION_RANGE=8.0 3.8 MIN_RFL_Rmeas= 50 MAX_FAC_Rmeas=2.0 VALUE_RANGE_FOR_TRUSTED_DETECTOR_PIXELS= 6000 30000 INCLUDE_RESOLUTION_RANGE=50.0 1.7 FRIEDEL'S_LAW= FALSE STARTING_ANGLE= -100      STARTING_FRAME=1 NAME_TEMPLATE_OF_DATA_FRAMES= ../x247398/t1.0???.img !!! End of XDS.INP",
"libraryCatalog": "Zenodo",
"repository": "Zenodo",
"url": "https://zenodo.org/record/45756?ln=en",
"url": "https://zenodo.org/records/45756",
"attachments": [
{
"title": "Zenodo Snapshot",
Expand All @@ -447,24 +478,20 @@ var testCases = [
"tag": "protein structure"
}
],
"notes": [
{
"note": "Argonne is operated by UChicago Argonne, LLC, for the U.S. Department of Energy, Office of Biological and Environmental Research under contract DE-AC02-06CH11357. The SGC is a registered charity (number 1097737) that receives funds from AbbVie, Bayer Pharma AG, Boehringer Ingelheim, Canada Foundation for Innovation, Eshelman Institute for Innovation, Genome Canada through Ontario Genomics Institute, Innovative Medicines Initiative (EU/EFPIA) [ULTRA-DD grant no. 115766], Janssen, Merck & Co., Novartis Pharma AG, Ontario Ministry of Economic Development and Innovation, Pfizer, São Paulo Research Foundation-FAPESP, Takeda, and the Wellcome Trust."
}
],
"notes": [],
"seeAlso": []
}
]
},
{
"type": "web",
"defer": true,
"url": "https://zenodo.org/search?page=1&size=20&q=&type=video",
"defer": true,
"items": "multiple"
},
{
"type": "web",
"url": "https://zenodo.org/record/569323",
"url": "https://zenodo.org/records/569323",
"items": [
{
"itemType": "journalArticle",
Expand All @@ -483,7 +510,7 @@ var testCases = [
"libraryCatalog": "Zenodo",
"pages": "52-56",
"publicationTitle": "Qualitative & Multi-Method Research",
"url": "https://zenodo.org/record/569323",
"url": "https://zenodo.org/records/569323",
"volume": "14",
"attachments": [
{
Expand Down Expand Up @@ -556,7 +583,7 @@ var testCases = [
},
{
"type": "web",
"url": "https://zenodo.org/record/8092340",
"url": "https://zenodo.org/records/8092340",
"items": [
{
"itemType": "preprint",
Expand All @@ -579,7 +606,7 @@ var testCases = [
"libraryCatalog": "Zenodo",
"repository": "Zenodo",
"shortTitle": "Creating Virtuous Cycles for DNA Barcoding",
"url": "https://zenodo.org/record/8092340",
"url": "https://zenodo.org/records/8092340",
"attachments": [
{
"title": "Zenodo Full Text PDF",
Expand Down

0 comments on commit 13e063b

Please sign in to comment.