-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
456 additions
and
479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
all: n4o-collections.pg n4o-databases.pg n4o-databases.nt | ||
all: rdf pg | ||
|
||
n4o-databases.nt: n4o-databases.json | ||
@npm run --silent jsonld2nt -- $< -c context.json > $@ | ||
@wc -l $@ | ||
rdf: n4o-sources.nt n4o-sources.ttl | ||
|
||
n4o-databases.json: n4o-databases.csv | ||
./update.js | ||
|
||
n4o-collections.json: n4o-collections.csv | ||
@node csv2json.js < $< > $@ | ||
|
||
n4o-collections.nt: n4o-collections.json | ||
@npm run --silent jsonld2nt -- $< -c context.json > $@ | ||
n4o-sources.nt: n4o-collections.json n4o-databases.json | ||
@npm run --silent jsonld2rdf -- $^ -c context.json > $@ | ||
@wc -l $@ | ||
|
||
n4o-sources.ttl: n4o-collections.json n4o-databases.json | ||
@npm run --silent jsonld2rdf -- $^ -c context.json -p prefixes.json > $@ | ||
@echo $@ | ||
|
||
pg: n4o-collections.pg n4o-databases.pg | ||
|
||
n4o-databases.pg: n4o-databases.csv | ||
@npm run --silent update | ||
|
||
n4o-collections.pg: n4o-collections.csv | ||
@./pg.py > $@ | ||
@wc -l $@ | ||
|
||
n4o-source.nt: n4o-collections.nt n4o-databases.nt | ||
cat $^ > $@ | ||
n4o-sources-pg.json: n4o-sources.pg | ||
@npm run pgraph -- $< $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import fs from 'fs' | ||
import csv from 'csv-parser' | ||
|
||
const results = [] | ||
process.stdin | ||
.pipe(csv()) | ||
.on('data', (data) => { | ||
for (let key in data) { | ||
if (data[key] === "") delete data[key] | ||
} | ||
if ("id" in data) { | ||
data.id = "http://data.nfdi4objects.net/collection/" + data.id | ||
data.type = ["fabio:Database","dcat:Dataset"] | ||
} else if ("wikidata" in data) { | ||
data.id = "http://www.wikidata.org/entity/" + data.id | ||
// TODO: type | ||
} | ||
results.push(data) | ||
}) | ||
.on('end', () => console.log(JSON.stringify(results, null, 2))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
[ | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/1", | ||
"name": "Ur- und Frühgeschichtliche Sammlung der FAU", | ||
"url": "https://objekte-im-netz.fau.de/projekt/node/22", | ||
"db": "Q124695065", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
}, | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/2", | ||
"name": "Paläontologischen Sammlung der FAU|Geowissenschaftliche Sammlung der FAU", | ||
"url": "https://objekte-im-netz.fau.de/projekt/node/20", | ||
"db": "Q124695065", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
}, | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/3", | ||
"name": "Graphische Sammlung der FAU", | ||
"url": "https://objekte-im-netz.fau.de/projekt/node/17", | ||
"db": "Q124695065", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
}, | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/4", | ||
"name": "Musikinstrumentensammlung der FAU", | ||
"url": "https://objekte-im-netz.fau.de/projekt/node/19", | ||
"db": "Q124695065", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
}, | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/5", | ||
"name": "Medizinische Sammlung der FAU", | ||
"url": "https://objekte-im-netz.fau.de/projekt/node/18", | ||
"db": "Q124695065", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
}, | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/6", | ||
"name": "Schulgeschichtliche Sammlung der FAU und Schulmuseum", | ||
"url": "https://objekte-im-netz.fau.de/projekt/node/21", | ||
"db": "Q124695065", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
}, | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/7", | ||
"name": "KENOM Virtuelles Münzportal", | ||
"url": "http://www.kenom.de/", | ||
"db": "Q21040628", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
}, | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/8", | ||
"name": "Samian Research Database", | ||
"url": "https://rgzm.github.io/samian-lod/", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
}, | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/9", | ||
"name": "Linked Open Ogham", | ||
"url": "https://doi.org/10.5281/zenodo.4765603", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
}, | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/10", | ||
"name": "African Red Slip Ware", | ||
"url": "https://doi.org/10.5281/zenodo.5642751", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
}, | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/11", | ||
"name": "Digitale Sammlungen der Museen der Klassikstiftung Weimar", | ||
"url": "https://ores.klassik-stiftung.de/ords/ksw_internet/r/300/home", | ||
"db": "Q124536091", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
}, | ||
{ | ||
"id": "http://data.nfdi4objects.net/collection/12", | ||
"name": "Graphische Sammlung des Germanisches National Museum", | ||
"url": "https://www.gnm.de/sammlungen/sammlungen-a-z/graphische-sammlung", | ||
"db": "Q478695", | ||
"type": [ | ||
"fabio:Database" | ||
] | ||
} | ||
] |
Oops, something went wrong.