Skip to content

Commit

Permalink
use description from schema
Browse files Browse the repository at this point in the history
  • Loading branch information
adam3smith committed May 1, 2023
1 parent 3800bc5 commit 8256c84
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dataverse.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-04-25 02:19:30"
"lastUpdated": "2023-05-01 12:09:04"
}

/*
Expand Down Expand Up @@ -86,6 +86,7 @@ async function scrape(doc, url = doc.location.href) {
// Z.debug(jsonLD)
let schema = JSON.parse(jsonLD);
let license = schema.license;
let abstract = schema.description;
// License can be stored as a string or an object (should be a string)
if (typeof (license) == "object") {
license = schema.license.text;
Expand All @@ -105,6 +106,9 @@ async function scrape(doc, url = doc.location.href) {
if (license) {
item.rights = ZU.cleanTags(license).trim();
}
if (abstract) {
item.abstractNote = abstract;
}
if (version && version > 1) item.versionNumber = version;
item.complete();
});
Expand Down Expand Up @@ -230,7 +234,6 @@ var testCases = [
{
"type": "web",
"url": "https://www.sodha.be/dataset.xhtml?persistentId=doi:10.34934/DVN/HEABHJ",
"detectedItemType": "dataset",
"items": [
{
"itemType": "dataset",
Expand All @@ -244,7 +247,7 @@ var testCases = [
],
"date": "2021-07-30",
"DOI": "10.34934/DVN/HEABHJ",
"abstractNote": "The series is designed to enable a crossnational comparison of values and norms on a wide variety of topics and to monitor changes in values and at...",
"abstractNote": "The series is designed to enable a crossnational comparison of values and norms on a wide variety of topics and to monitor changes in values and attitudes across the world in 1981.",
"extra": "Type: dataset",
"language": "en",
"libraryCatalog": "Social Sciences and Digital Humanities Archive – SODHA",
Expand Down

0 comments on commit 8256c84

Please sign in to comment.