Commit Graph

16 Commits

Author SHA1 Message Date
edd651317b
templates/index.html: Change default selections
Enable AGROVOC lookup on dcterms.subject as well as the "unsafe"
fixes. For the AGROVOC lookup I just think that it  might not be
obvious to non-technical users that you have to check the box AND
enter a field name, despite the placeholder value. In any case, it
doesn't hurt to enable AGROVOC lookup by default because it won't
fail if the default dcterms.subject field is not present in the
user's CSV.
2021-03-14 20:54:50 +02:00
36b43a06b9
templates/index.html: Add link to test.csv
Offer the user to test with this file.
2021-03-14 11:34:55 +02:00
e7dd8d1421
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.
2021-03-13 23:49:24 +02:00
9aab2ae83f
templates/index.html: Remove basic and experimental labels 2021-03-13 23:34:34 +02:00
6c3804d55b
Add support for skipping fields ("-x") 2021-03-13 23:34:11 +02:00
122d9fd53c
Add support for experimental checks ("-e") 2021-03-13 23:01:11 +02:00
198acdb1a7
Major refactor
Re-work upload and file processing so they are in the same Python
function. Now I will start exposing other command line options in
the form, like unsafe fixes, excluding fields, etc. Now I see tha
t it is easier to save the POSTed file and process it in the same
function so I don't have to pass around the other POSTed form val
ues as URL query parameters.

Now, as a result of changing the flow above, I also had to make a
change to the way I show the results page. Instead of processing
the file and returning the rendered results to the user directly,
I process the file, save the rendered results to /tmp, and return
a redirect to the user to the results page.
2021-03-13 22:11:26 +02:00
f79be86361
templates/index.html: Use Bootstrap form components 2021-03-13 13:50:46 +02:00
e13d63bf6b
Major refactor
Refactor the templates to include a header, use csv-metadata-quality
in a subshell instead of trying to import and pass args to it (which
I actually managed to do, but then trying to capture the output was
an issue), and use ansi2html to prepare the CLI output as the HTML.
2021-03-12 19:14:49 +02:00
1a92b99c68
templates: Reduce top margin 2021-03-11 22:54:46 +02:00
207d5af64a
Split index.html template into header, index, and footer 2021-03-11 22:41:22 +02:00
ee54096561
templates/index.html: Improve layout
Based on the Bootstrap v5.0-beta2 sticky footer example.

See: https://getbootstrap.com/docs/5.0/examples/sticky-footer/
2021-03-11 20:28:42 +02:00
0a8096788d
templates/index.html: More boilerplate 2021-03-11 17:59:51 +02:00
5086ea2376
templates/index.html: Use url_for to get CSS
This is apparently the way you do it in Flask.
2021-03-11 17:55:19 +02:00
b11296cb9c
Add style
This is just to see how it works on in Flask and Google App Engine,
later I'll do a proper layout.
2021-03-11 16:28:48 +02:00
81b5206e97
Add simple HTML template with file upload
Code taken from the following blog posts:
  - https://pythonbasics.org/flask-upload-file
  - https://blog.miguelgrinberg.com/post/handling-file-uploads-with-flask
2021-03-11 15:55:58 +02:00