From e7dd8d1421f0bbaa479e527299b626bf2e96fe11 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sat, 13 Mar 2021 23:49:24 +0200 Subject: [PATCH] Add AGROVOC lookup support This works locally, but I don't think it will work on App Engine because csv-metadata-quality uses requests-cache and creates the agrovoc-response-cache.sqlite file in the current working directory. --- main.py | 5 +++++ templates/index.html | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/main.py b/main.py index 0125a99..8bf8ff1 100644 --- a/main.py +++ b/main.py @@ -57,6 +57,11 @@ def process(): args.append("-x") args.append(request.form["excludeText"]) + if "agrovocCheckbox" in request.form: + if "agrovocText" in request.form: + args.append("-a") + args.append(request.form["agrovocText"]) + if "unsafe" in request.form: args.append("-u") diff --git a/templates/index.html b/templates/index.html index ad9aff1..4bb5c8a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -21,6 +21,15 @@
Optionally indicate fields to skip during analysis. Separate multiple fields with a comma, for example: dcterms.issued,dcterms.subject.
+
+
+ Validate field(s) against AGROVOC  + +
+ +
Optionally indicate fields to validate against AGROVOC. Separate multiple fields with a comma, for example: dcterms.subject,cg.coverage.country. Note: this can take an extra minute or more depending on your data. If you have a problem please try again and it will generally be faster the second time.
+
+