Some progress on noark5-parser into ny-mappe and ny-registrering endpoints
Ole Aamot
oka at oka.no
Fri Jun 9 23:26:51 CEST 2017
Congratulations on today's release of Nikita Noark 5 Core 0.1.1,
Thomas and Petter!
<URL:https://github.com/HiOA-ABI/nikita-noark5-core/blob/master/NEWS.md>
The free Noark 5 import tool noark5-parser for importing Noark 5 XML
archive files into the free Nikita Noark 5 Core (see
<URL:https://github.com/HiOA-ABI/nikita-noark5-core/>) is now slowly
improving.
The software is licensed under MIT license and it is now able to parse
the file arkivstruktur.xml from
<URL:https://raw.githubusercontent.com/KDRS-SA/noark5-validator/master/src/resources/test-uttrekk/uttrekk1/n5uttrekk/arkivstruktur.xml>
and to perform HTTP Basic Authentication in POST requests with JSON
data as Content-Type: application/vnd.noark5-v4+json to the Noark 5 v4
ny-mappe and ny-registrering endpoints.
Except from the code:
$mapperesult = upload($baseurl, $token, $mappe,
"hateoas-api/arkivstruktur/arkivdel/" . $arkivdeldata->systemID .
"/ny-mappe");
$registreringresult = upload($baseurl, $token, $mappe,
"hateoas-api/arkivstruktur/mappe/" . $mappedata->systemID .
"/ny-registrering");
You can view the full source code at
<URL:https://github.com/oleaamot/noark5-parser/blob/master/noark5-parser.php>
To test the tool, launch it in a Unix-based Terminal:
git clone https://github.com/oleaamot/noark5-parser.git
cd noark5-parser/
./runparser
Happy hacking,
Ole Aamot
More information about the nikita-noark
mailing list