Commit Graph

32 Commits

Author SHA1 Message Date
Alan Orth a1928cd53a
Don't use ALL CAPS in CSVs
Convert to lower case and update scripts.

Closes #13
2022-04-16 18:44:20 +03:00
Alan Orth 3c507ddacf
Use lowercase "mandatory"
Closes #12
2022-04-16 18:20:06 +03:00
Marie-Angélique Laporte f053147361 changed namespaces for domain and range 2022-02-16 14:35:36 +01:00
Marie-Angélique Laporte ce67fef73c fixing python version 2022-02-16 09:29:51 +01:00
Marie-Angélique Laporte 2590cfc9cd updating url of vocabularies 2022-02-16 09:28:14 +01:00
Marie-Angélique Laporte 78e3dce29e cleaning code to generate rdf 2022-02-16 09:10:54 +01:00
Alan Orth 6216144070
util/generate-hugo-content.py: controlled vocabularies
We are planning to remove the controlled vocabularies from the CSV
files so we should not expect that this column will exist. Instead,
check if there is a controlled vocabulary in the data directory.

The controlled vocabularies were already exported once using the
util/export-controlled-vocabularies.py script so we don't actually
need them in the CSVs anymore.
2022-01-30 20:04:28 +03:00
Alan Orth fe36c5c25b util/*.py: run isort
Sorts and organizes the Python imports.
2022-01-30 13:29:07 +03:00
Alan Orth 0ebe3bd751
util/create-schema-dspace.py: update comment 2022-01-11 20:57:42 +02:00
Alan Orth d0093722ec
util/create-schema-dspace.py: update logic
Detect actual HTTP return codes for various situations:

- HTTP 500 means the schema or field already exists
- HTTP 415 means we are posting some invalid data
- HTTP 404 means the parent schema does not exist
2022-01-11 20:55:34 +02:00
Alan Orth b0ef411f62
util/create-schema-dspace.py: fix error in POST
The missing "headers=headers" was causing an HTTP 415 that took me
over an hour to fix. Sigh.
2022-01-11 20:54:19 +02:00
Alan Orth 0fca6bbc90
util/create-schema-dspace.py: clean up output
Minor nitpick after staring at this while debugging for an hour. I
think the period at the end of these lines is ugly.
2022-01-11 20:53:55 +02:00
Alan Orth 57cc35c839
Add util/create-schema-dspace.py
Script to read the ISEAL Core and FSC metadata CSVs and create the
appropriate schemas and metadata fields in a DSpace 6.x repository.
2022-01-09 10:10:00 +02:00
Alan Orth d629a1ab17 Add util/export-controlled-vocabularies.py
This script is only used to export the controlled vocabularies from
the schema CSV files. Eventually we will remove them from there and
it won't be needed anymore.
2022-01-06 12:40:20 +02:00
Alan Orth 75076124a5 util/generate-hugo-content.py: use dspace field name
Now all elements have DSpace field names so we can use that as the
unique identifier for each element.
2022-01-06 12:40:20 +02:00
Alan Orth d37bfc453f util/generate-hugo-content.py: add support for fsc.csv
Currently the only difference is the name of the module column and
that there are no mandatory fields so we need to be careful there.
2021-12-21 19:07:16 +02:00
Alan Orth baf534efd5
Update references to shema-fields.csv 2021-12-20 12:04:11 +02:00
Alan Orth c106cf2cc3
util/create-rdf.py: add execute bit
So we can run it directly without calling Python.
2021-12-18 22:40:08 +02:00
Alan Orth 8440637eaa
Rename util/rdf_creation.py to util/create-rdf.py
Use imperative mood and a dash instead of underscore.
2021-12-18 22:38:57 +02:00
Marie-Angélique Laporte ac308fb1db adding fsc rdf 2021-12-16 12:58:15 +01:00
Marie-Angélique Laporte 355fa3a56f Update rdf_creation.py 2021-12-16 09:58:51 +01:00
Marie-Angélique Laporte 6f62b97b53 rdf regenerate 2021-12-13 14:20:13 +01:00
Alan Orth c5eca3cc12
util/generate-hugo-content.py: re-work vocabularies
Read vocabularies from the data/controlled-vocabularies directory
instead of exporting them from the schema itself. Also, I use the
name vocabulary.txt for all of them on the site since they are in
each field's directory already.
2021-12-13 15:03:20 +02:00
Alan Orth 747837d14b
util/generate-hugo-content.py: update comment 2021-12-13 13:31:29 +02:00
Alan Orth 14edfab18b
util/generate-hugo-content.py: minor re-org
We get the cluster first since clusters encompass modules.
2021-12-13 13:20:09 +02:00
Alan Orth fd3be3163f
util/generate-hugo-content.py: don't split element name on dash
We don't need to do this anymore since we adopted the new clusters
and cleaned up the element name field.
2021-12-13 13:17:03 +02:00
Alan Orth 0265e97a2b
util/generate-hugo-content.py: read schema from CSV
Read the schema fields from CSV instead of Excel now that there is
a copy here in the repository.
2021-12-07 22:57:09 +02:00
Alan Orth 2b27a79840
util/generate-hugo-content.py: update for clusters and modules
Peter re-worked the schema to incorporate the concept of clusters
and modules.
2021-11-26 11:58:06 +02:00
Alan Orth 99d9c7cd94
util/generate-hugo-content.py: Update header 2021-11-17 17:16:22 +02:00
Alan Orth a5aad2d9a9
util/generate-hugo-content.py: write module to content
We need to write the IDSS module to the site content.
2021-11-11 15:05:18 +02:00
Alan Orth 4e65813180
Rename util/generate_docs.py to util/generate-hugo-content.py
This script doesn't generate the docs itself. It actually only does
the schema parsing to generate the metadata term content and vocabs.
The docs site is generated by Hugo after running this.
2021-11-01 09:04:57 +02:00
Alan Orth 30310e6db6
Add util/generate-docs.py
This script parses the Excel schema file to produce term metadata
and extract controlled vocabularies to the site content directory.
After running this we can generate the site using Hugo.
2021-11-01 08:21:50 +02:00