This is the Mirador IIIF Viewer packaged as a desktop app with an embedded annotation endpoint that saves annotations to a local sqlite database.
This is a proof of concept, slightly usable at the moment. A lot of things are missing:
- annotation api: create
- annotation api: update and delete
- UI: a page listing all manifests and relative annotations
- export (and import) of annotations
- builds for linux (AppImage) and Windows
- share annotations (maybe using DAT)
Clone
git clone https://github.com/atomotic/iiif-annotation-studio
cd iiif-annotation-studio
Install go-bindata
go get github.com/jteeuwen/go-bindata/...
go get github.com/elazarl/go-bindata-assetfs/...
Install modules (requires dep)
dep ensure
Package static assets
go-bindata-assetfs static/...
— Build for macos
go build -o "build/macos/IIIF Annotation Studio.app/Contents/MacOS/IIIF Annotation Studio.app"
Run IIIF Annotation Studio.app
from build/macos
(if you trust me there is a ready made build in releases)
— Build for linux. GTK3 and GtkWebkit2 required, not yet tested.
go build
./iiif-annotation-studio
The first run creates the sqlite database $HOME/.annotations/annotations.db
if not existing. Just backup this file.
➜ ~ sqlite3 ~/.annotations/annotations.db .schema
CREATE TABLE annotations (
id INTEGER PRIMARY KEY,
annoid VARCHAR,
created_at DATETIME,
target VARCHAR,
manifest VARCHAR,
body TEXT);
CREATE UNIQUE INDEX annotation_id ON annotations (annoid);
Is this another Electron app? NO, is made in golang with zserge/webview.
Mirador Desktop: Electron based, annotations on LocalStorage
demetsiiify by Johannes Baiter contains an extremely simple annotation server that is probably the best piece of code to learn how Mirador interacts with annotations stores.