Repository navigation
Releases
Releases · miku/oaimi
oaimi 0.2.10
oaimi 0.2.9
- only use compression for files greater than 1k
From this release on, empty responses won't be compressed. It is save to truncate the empty gzip files, which take up 23 bytes, with truncate:
$ find $HOME/.oaimicache/ -type f -size 23c -exec truncate --size 0 {} \;
oaimi 0.2.8
- fix bugs introduced in 0.2.7 in oaimi-sync
oaimi 0.2.7
oaimi 0.2.6
- add another limit - number of token requests in streaming client will err after 4k requests
oaimi 0.2.5
oaimi-sync accepts optional format:
$ cat file.tsv
http://arno.unimaas.nl/oai/dare.cgi
http://www.mdpi.com:8080/oai/oai2.php oai_agris
http://bibdigital.sid.inpe.br/col/iconet.com.br/banon/2003/11.21.21.08/doc/oai.cgi xrefer
http://kramerius.nkp.cz/kramerius/oai cz_nkp_periodical
http://arno.uvt.nl/oai/scr.uvt.nl.cgi nl_didl
http://dare.uva.nl/cgi/arno/oai/aup
http://dare.uva.nl/cgi/arno/oai/dprn nl_didl
http://dare.uva.nl/cgi/arno/oai/naturalis nl_didl
http://edoc.hu-berlin.de/OAI-2.0 oai_xmetadiss
$ cat file.tsv | oaimi-sync -verbose -w 64 > /dev/null
...
oaimi 0.2.4
oaimi 0.2.3
oaimi 0.2.2
Add experimental oaimi-sync command.
$ oaimi-sync -w 64 -verbose < sites.tsv
oaimi 0.2.1
Refactoring.
New tool, working title: oaimi-id - makes parallel ID requests to OAI endpoints from stdin or file.
$ oaimi-id -w 64 -verbose < sites.tsv > sites.ldj
oaimi can now more easily be used as a library.
Separation of request and various clients:
oaimi.Clientwill execute a single requestoaimi.BatchingClientmight make multiple HTTP calls,
but this is transparent to the useroaimi.WriterClientwrites XML to a given writeroaimi.CachingClientcaches responses on disk using writers
There are call signatures:
client.Do(request) (Response, error)client.Do(request) errorfor streaming
Examples
A simple identity request:
client := oaimi.NewClient()
req := Request{Verb: "Identify", Endpoint: "http://example.com/oai"})
resp, err := client.Do(req)
...
Streaming a whole repository to stdout:
client := oaimi.NewCachingClient(os.Stdout)
req := Request{Verb: "ListRecords", Endpoint: "http://example.com/oai"})
err := client.Do(req)