Skip to main content

SOCH Download CLI lets you do multithreaded batch downloads of Swedish Open Cultural Heritage(K-samsök) records for offline processing and analytics.

Project description

SOCH Download CLI

screenshot

SOCH Download CLI lets you do multithreaded batch downloads of Swedish Open Cultural Heritage (K-samsök) records for offline processing and analytics.

Prerequirements

  • Python >=3.4 and PIP

Installing

pip install soch-download

Usage Examples

Heads up: This program might use all the systems available CPUs.

Download records based on a SOCH search query (Text, CQL, indexes, etc):

soch-download --action=query --query=thumbnailExists=j --outdir=path/to/target/directory

Download records from an specific institution:

soch-download --action=institution --institution=raa --outdir=path/to/target/directory

Download records using a predefined action/query:

soch-download --action=all --outdir=path/to/target/directory
soch-download --action=geodata-exists --outdir=path/to/target/directory

Unpacking

The download actions by default downloads large XML files containing up to 500 RDFs each, after such a download you can use the unpack argument to convert all those files into individual RDF files:

soch-download --unpack=path/to/xml/files --outdir=path/to/target/directory

Misc

List all available parameters and actions:

soch-download --help

Target a custom SOCH API endpoint:

soch-download --action=query --query=itemKeyWord=hus --outdir=path/to/target/directory --endpoint=http://lx-ra-ksam2.raa.se:8080/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soch-download-1.0.3.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

soch_download-1.0.3-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page