Metadata-Version: 2.4
Name: abnormal-hieratic-indexer
Version: 1.1.2
Summary: Index annotations from the Abnormal Hieratic Global Portal in Elasticsearch
Project-URL: Documentation, https://github.com/LeidenUniversityLibrary/abnormal-hieratic-indexer#readme
Project-URL: Issues, https://github.com/LeidenUniversityLibrary/abnormal-hieratic-indexer/issues
Project-URL: Source, https://github.com/LeidenUniversityLibrary/abnormal-hieratic-indexer
Author-email: Ben Companjen <ben@companjen.name>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.9
Requires-Dist: beautifulsoup4~=4.12.3
Requires-Dist: requests~=2.32.3
Description-Content-Type: text/markdown

# Abnormal Hieratic Indexer

Script that indexes annotations in the [Abnormal Hieratic Global Portal][ahgp].
This script is specifically tailored towards the annotations created for the AHGP.

Annotations in the AHGP are stored in a [Simple Annotation Server][sas],
but for search we use [Elasticsearch][es].

[ahgp]: https://lab.library.universiteitleiden.nl/abnormalhieratic/
[sas]: https://github.com/glenrobson/SimpleAnnotationServer
[es]: https://www.elastic.co/guide/en/elasticsearch/

## Installation

This script was developed with Python 3.9. It may run on other versions, but tests are very limited.

To install, run `pip install abnormal-hieratic-indexer` in your environment.

## Usage

```
$ abhier-indexer -h
usage: abhier-indexer [-h] [--canvas-uri-prefix CANVAS_URI_PREFIX] [--index INDEX] source target

positional arguments:
  source                Base URL for the Simple Annotation Server
  target                Base URL for ElasticSearch (default: http://localhost:9200)

optional arguments:
  -h, --help            show this help message and exit
  --canvas-uri-prefix CANVAS_URI_PREFIX
                        Index only annotations targeting canvases whose URIs start with this prefix (default:
                        https://lab.library.universiteitleiden.nl/manifests/external/louvre/)
  --index INDEX         URI path to the ElasticSearch index (default: /annotations/)
```

To enable periodic indexing, you can set up a cronjob or Systemd timer.

# Author and license

Abnormal Hieratic Indexer was created by Ben Companjen at the Centre for Digital Scholarship.

© 2024 Leiden University Libraries

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
