Concordance checker web interface for imports to museum-digital
===============================================================

This repository contains a very small web app enabling users
to upload a list of terms (separated by a newline) and compare
them to the concordance lists used during imports to md.
Entries that are not yet matched to any value of md's controlled
lists can henceforth be matched using the web UI. The tool will
finally generate the necessary lines of code to register the
relevant terms in the concordance lists.

Good to know
------------

### Handling table-based imports

If all entries of a given type are currently in a table column
- e.g. of a CSV file - just open the file in a spreadsheet editor
and select the column contents to copy and paste them over to
the text area of the concordance checker.

### XML-based imports

Here, [XPath](https://en.wikipedia.org/wiki/XPath) may be helpful.
Different programs support the use of XPath from the command line.
A useful one-liner to select the value of all elements of the name
`OkuFunktionS` using [xmlstarlet](https://en.wikipedia.org/wiki/XMLStarlet)
and filter out duplicate entries is, e.g.:

```
xmlstarlet sel -t -v "//OkuFunktionS" Obj_Kuenstler.xml   | sort | awk '!seen[$0]++'
```

See also
--------

- [Repository for concordance lists](https://gitea.armuli.eu/museum-digital/MDImporterConcordanceLists)
- [Repository for museum-digital's controlled lists](https://gitea.armuli.eu/museum-digital/MDAllowedValueSets)
- [md:quality: Quality checker built upon museum-digital's import tools. Unmatched entries will stop the quality checks.](https://quality.museum-digital.org/)

TO-DO
-----

- [ ] Provide API description
