mirror of
https://github.com/ilri/csv-metadata-quality-web.git
synced 2025-07-04 05:23:28 +02:00
Compare commits
8 Commits
f292a4902f
...
2fcfc76ea5
Author | SHA1 | Date | |
---|---|---|---|
2fcfc76ea5
|
|||
78f58b459c
|
|||
863a540225
|
|||
cc203b2842
|
|||
de0703ceb2
|
|||
2a852c9ed3
|
|||
edd651317b
|
|||
6f396f392f |
2
Procfile
2
Procfile
@ -1 +1 @@
|
|||||||
web: gunicorn main:app --log-file -
|
web: gunicorn csv_metadata_quality_web.main --log-file -
|
||||||
|
0
csv_metadata_quality_web/__init__.py
Normal file
0
csv_metadata_quality_web/__init__.py
Normal file
@ -15,7 +15,7 @@ from flask import (
|
|||||||
)
|
)
|
||||||
from werkzeug.utils import secure_filename
|
from werkzeug.utils import secure_filename
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = application = Flask(__name__)
|
||||||
app.config["MAX_CONTENT_LENGTH"] = 1024 * 1024
|
app.config["MAX_CONTENT_LENGTH"] = 1024 * 1024
|
||||||
app.config["UPLOAD_EXTENSIONS"] = [".csv"]
|
app.config["UPLOAD_EXTENSIONS"] = [".csv"]
|
||||||
# the only place we can write to on Google App Engine is /tmp
|
# the only place we can write to on Google App Engine is /tmp
|
||||||
@ -127,7 +127,3 @@ def result_download(base64slug):
|
|||||||
filename = secure_filename(os.path.splitext(filename)[0] + "-cleaned.csv")
|
filename = secure_filename(os.path.splitext(filename)[0] + "-cleaned.csv")
|
||||||
|
|
||||||
return send_from_directory(app.config["UPLOAD_PATH"], filename, as_attachment=True)
|
return send_from_directory(app.config["UPLOAD_PATH"], filename, as_attachment=True)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
app.run(host="127.0.0.1", port=8080, debug=True)
|
|
@ -4,5 +4,5 @@
|
|||||||
<meta name="description" content="Simple web interface for the DSpace CSV Metadata Quality tool.">
|
<meta name="description" content="Simple web interface for the DSpace CSV Metadata Quality tool.">
|
||||||
<meta name="author" content="Alan Orth">
|
<meta name="author" content="Alan Orth">
|
||||||
<title>DSpace CSV Metadata Quality Checker</title>
|
<title>DSpace CSV Metadata Quality Checker</title>
|
||||||
<link href="{{ url_for('static', filename='css/v1/style.min.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', filename='css/style.min.css') }}" rel="stylesheet">
|
||||||
</head>
|
</head>
|
@ -24,14 +24,14 @@
|
|||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<div class="input-group-text">
|
<div class="input-group-text">
|
||||||
Validate field(s) against AGROVOC
|
Validate field(s) against AGROVOC
|
||||||
<input class="form-check-input" type="checkbox" id="agrovocFieldsCheckbox" name="agrovocCheckbox" aria-label="Checkbox for following text input">
|
<input class="form-check-input" type="checkbox" checked="true" id="agrovocFieldsCheckbox" name="agrovocCheckbox" aria-label="Checkbox for following text input">
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" placeholder="dcterms.subject" id="agrovocFieldsText" name="agrovocText" aria-label="Text input with checkbox">
|
<input type="text" class="form-control" value="dcterms.subject" id="agrovocFieldsText" name="agrovocText" aria-label="Text input with checkbox">
|
||||||
<div id="agrovocHelp" class="form-text">Optionally indicate fields to validate against <a href="https://agrovoc.uniroma2.it/agrovoc/agrovoc/en/" title="AGROVOC Multilingual Thesaurus">AGROVOC</a>. Separate multiple fields with a comma, for example: <code>dcterms.subject,cg.coverage.country</code>. 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.</div>
|
<div id="agrovocHelp" class="form-text">Optionally indicate fields to validate against <a href="https://agrovoc.uniroma2.it/agrovoc/agrovoc/en/" title="AGROVOC Multilingual Thesaurus">AGROVOC</a>. Separate multiple fields with a comma, for example: <code>dcterms.subject,cg.coverage.country</code>. 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.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3 form-check form-switch">
|
<div class="mb-3 form-check form-switch">
|
||||||
<input class="form-check-input" type="checkbox" id="unsafeCheckbox" name="unsafe">
|
<input class="form-check-input" type="checkbox" checked="true" id="unsafeCheckbox" name="unsafe">
|
||||||
<label class="form-check-label" for="unsafeCheckbox" aria-describedby="unsafeHelp">Enable unsafe fixes</label>
|
<label class="form-check-label" for="unsafeCheckbox" aria-describedby="unsafeHelp">Enable unsafe fixes</label>
|
||||||
<div id="unsafeHelp" class="form-text">This will remove newlines and perform <a href="https://withblue.ink/2019/03/11/why-you-need-to-normalize-unicode-strings.html" title='When "Zoë" !== "Zoë". Or why you need to normalize Unicode strings'>normalization of Unicode characters</a>. Read more about these <a href="https://github.com/ilri/csv-metadata-quality#unsafe-fixes">unsafe fixes</a>.</div>
|
<div id="unsafeHelp" class="form-text">This will remove newlines and perform <a href="https://withblue.ink/2019/03/11/why-you-need-to-normalize-unicode-strings.html" title='When "Zoë" !== "Zoë". Or why you need to normalize Unicode strings'>normalization of Unicode characters</a>. Read more about these <a href="https://github.com/ilri/csv-metadata-quality#unsafe-fixes">unsafe fixes</a>.</div>
|
||||||
</div>
|
</div>
|
@ -10,8 +10,8 @@
|
|||||||
"sass": "^1.32.7"
|
"sass": "^1.32.7"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:css": "sass --style expanded source/scss/style.scss static/css/v1/style.css.tmp && cleancss --level 1 static/css/v1/style.css.tmp -o static/css/v1/style.min.css",
|
"build:css": "sass --style expanded source/scss/style.scss static/css/style.css.tmp && cleancss --level 1 static/css/style.css.tmp -o static/css/style.min.css",
|
||||||
"build": "npm run build:css && npm run clean",
|
"build": "npm run build:css && npm run clean",
|
||||||
"clean": "rm static/css/v1/style.css.tmp static/css/v1/style.css.tmp.map"
|
"clean": "rm static/css/style.css.tmp static/css/style.css.tmp.map"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
poetry.lock
generated
12
poetry.lock
generated
@ -107,8 +107,8 @@ xlrd = "^1.2.0"
|
|||||||
[package.source]
|
[package.source]
|
||||||
type = "git"
|
type = "git"
|
||||||
url = "https://github.com/ilri/csv-metadata-quality.git"
|
url = "https://github.com/ilri/csv-metadata-quality.git"
|
||||||
reference = "0e9176f0a6f694e85d38bf15c6b80708402bfa8b"
|
reference = "10612cf8911f289f140f51fa7186ae4eed4e602f"
|
||||||
resolved_reference = "0e9176f0a6f694e85d38bf15c6b80708402bfa8b"
|
resolved_reference = "10612cf8911f289f140f51fa7186ae4eed4e602f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "decorator"
|
name = "decorator"
|
||||||
@ -175,7 +175,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "importlib-metadata"
|
name = "importlib-metadata"
|
||||||
version = "3.7.2"
|
version = "3.7.3"
|
||||||
description = "Read metadata from Python packages"
|
description = "Read metadata from Python packages"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -606,7 +606,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "1.1"
|
lock-version = "1.1"
|
||||||
python-versions = "^3.7.1"
|
python-versions = "^3.7.1"
|
||||||
content-hash = "d1dabfe5cad9e7218ce3f5b45ce39b4823d2262aca7228045af5e5ae6654c7aa"
|
content-hash = "179deeadc57404afabd0792cd5e6963d7b3aaf4b3f6a6b4500feb3f4862100c9"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
ansi2html = [
|
ansi2html = [
|
||||||
@ -666,8 +666,8 @@ idna = [
|
|||||||
{file = "idna-2.10.tar.gz", hash = "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"},
|
{file = "idna-2.10.tar.gz", hash = "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"},
|
||||||
]
|
]
|
||||||
importlib-metadata = [
|
importlib-metadata = [
|
||||||
{file = "importlib_metadata-3.7.2-py3-none-any.whl", hash = "sha256:407d13f55dc6f2a844e62325d18ad7019a436c4bfcaee34cda35f2be6e7c3e34"},
|
{file = "importlib_metadata-3.7.3-py3-none-any.whl", hash = "sha256:b74159469b464a99cb8cc3e21973e4d96e05d3024d337313fedb618a6e86e6f4"},
|
||||||
{file = "importlib_metadata-3.7.2.tar.gz", hash = "sha256:18d5ff601069f98d5d605b6a4b50c18a34811d655c55548adc833e687289acde"},
|
{file = "importlib_metadata-3.7.3.tar.gz", hash = "sha256:742add720a20d0467df2f444ae41704000f50e1234f46174b51f9c6031a1bd71"},
|
||||||
]
|
]
|
||||||
ipython = [
|
ipython = [
|
||||||
{file = "ipython-7.21.0-py3-none-any.whl", hash = "sha256:34207ffb2f653bced2bc8e3756c1db86e7d93e44ed049daae9814fed66d408ec"},
|
{file = "ipython-7.21.0-py3-none-any.whl", hash = "sha256:34207ffb2f653bced2bc8e3756c1db86e7d93e44ed049daae9814fed66d408ec"},
|
||||||
|
@ -7,7 +7,7 @@ license = "AGPL-3.0-only"
|
|||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.7.1"
|
python = "^3.7.1"
|
||||||
csv-metadata-quality = {git = "https://github.com/ilri/csv-metadata-quality.git", rev = "0e9176f0a6f694e85d38bf15c6b80708402bfa8b"}
|
csv-metadata-quality = {git = "https://github.com/ilri/csv-metadata-quality.git", rev = "10612cf8911f289f140f51fa7186ae4eed4e602f"}
|
||||||
Flask = "^1.1.2"
|
Flask = "^1.1.2"
|
||||||
ansi2html = "^1.6.0"
|
ansi2html = "^1.6.0"
|
||||||
gunicorn = "^20.0.4"
|
gunicorn = "^20.0.4"
|
||||||
|
@ -7,13 +7,13 @@ certifi==2020.12.5; python_full_version >= "3.7.1" and python_full_version < "4.
|
|||||||
chardet==4.0.0; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
chardet==4.0.0; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
||||||
click==7.1.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
|
click==7.1.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
|
||||||
colorama==0.4.4; python_full_version >= "3.7.1" and python_full_version < "4.0.0" and (python_version >= "3.7" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.7" and python_full_version >= "3.5.0")
|
colorama==0.4.4; python_full_version >= "3.7.1" and python_full_version < "4.0.0" and (python_version >= "3.7" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.7" and python_full_version >= "3.5.0")
|
||||||
csv-metadata-quality @ git+https://github.com/ilri/csv-metadata-quality.git@0e9176f0a6f694e85d38bf15c6b80708402bfa8b ; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
csv-metadata-quality @ git+https://github.com/ilri/csv-metadata-quality.git@10612cf8911f289f140f51fa7186ae4eed4e602f ; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
||||||
decorator==4.4.2; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.2.0" and python_version >= "3.7"
|
decorator==4.4.2; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.2.0" and python_version >= "3.7"
|
||||||
flake8==3.8.4; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0")
|
flake8==3.8.4; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0")
|
||||||
flask==1.1.2; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
|
flask==1.1.2; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
|
||||||
gunicorn==20.0.4; python_version >= "3.4"
|
gunicorn==20.0.4; python_version >= "3.4"
|
||||||
idna==2.10; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
idna==2.10; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
||||||
importlib-metadata==3.7.2; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.4.0" and python_version < "3.8" and python_version >= "3.6"
|
importlib-metadata==3.7.3; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.4.0" and python_version < "3.8" and python_version >= "3.6"
|
||||||
ipython-genutils==0.2.0; python_version >= "3.7"
|
ipython-genutils==0.2.0; python_version >= "3.7"
|
||||||
ipython==7.21.0; python_version >= "3.7"
|
ipython==7.21.0; python_version >= "3.7"
|
||||||
isort==5.7.0; python_version >= "3.6" and python_version < "4.0"
|
isort==5.7.0; python_version >= "3.6" and python_version < "4.0"
|
||||||
|
@ -3,7 +3,7 @@ certifi==2020.12.5; python_full_version >= "3.7.1" and python_full_version < "4.
|
|||||||
chardet==4.0.0; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
chardet==4.0.0; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
||||||
click==7.1.2; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
click==7.1.2; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||||
colorama==0.4.4; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
colorama==0.4.4; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
||||||
csv-metadata-quality @ git+https://github.com/ilri/csv-metadata-quality.git@0e9176f0a6f694e85d38bf15c6b80708402bfa8b ; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
csv-metadata-quality @ git+https://github.com/ilri/csv-metadata-quality.git@10612cf8911f289f140f51fa7186ae4eed4e602f ; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
||||||
flask==1.1.2; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
|
flask==1.1.2; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
|
||||||
gunicorn==20.0.4; python_version >= "3.4"
|
gunicorn==20.0.4; python_version >= "3.4"
|
||||||
idna==2.10; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
idna==2.10; python_full_version >= "3.7.1" and python_full_version < "4.0.0"
|
||||||
|
Reference in New Issue
Block a user