Rewriting noark5-parser in Python
Ole Aamot
ole at aamotsoftware.com
Wed Nov 14 22:48:46 CET 2018
I made new progress with noark5-parser written in Python. It is
available from https://github.com/oleaamot/noark5-parser.git and
https://www.arkivarium.no/~ole/noark5-parser/noark5-parser
It shall connect to the REST API of a Noark 5 service to export,
import or verify Noark 5 archive files, but at the moment it can
authenticate with https://arkivarium.no/noark5v4/ and dump a few
relations from the Noark 5 Core server setup documented earlier
in https://github.com/arkivarium/book/blob/master/book.xml
You are welcome to create a login account on
http://arkivarium.no/login.html and test the
data from the noark5-parser git repo in Python.
$ git clone https://github.com/oleaamot/noark5-parser.git
If you downloaded the noark5-parser directory, cd into the
directory with
$ cd noark5-parser
and run the following commands after you have created arkiv, arkivdel,
saksmappe, journalpost, dokumentbeskrivelse og dokumentobjekt with the
Arkivarium account you create from http://www.arkivarium.no/login.html
Export Noark 5 structure from network to disk
./noark5-export --baseurl https://arkivarium.no/noark5v4/ --filename
arkivstruktur.xml --username admin at localhost --password password
At the moment I only connect and dump the result from the endpoint,
but I plan to structure the dump according to the Noark 5 standards
and based on the earlier PHP export function.
Here is a text dump from the endpoint:
https://www.arkivarium.no/~ole/noark5-parser/noark5-parser.txt
Any idea how to create a XML structure based on the text dump?
You can see source code of the Python parser online at
https://www.arkivarium.no/~ole/noark5-parser/noark5-parser
Happy hacking,
Ole
More information about the nikita-noark
mailing list