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.
This commit is contained in:
Alan Orth 2022-01-30 20:02:30 +03:00
parent 812c9241bd
commit 6216144070
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ def parseSchema(schema_df):
cardinality = row["element options"].capitalize()
prop_type = row["element type"].capitalize()
if row["element controlled values or terms"]:
if os.path.isfile(f"data/controlled-vocabularies/{element_name_safe}.txt"):
controlled_vocab = True
controlled_vocabulary_src = (