Skip to content
/ addid Public

adds (url-safe) base64 encoded ids (without padding) to given finc Solr schema conform line-delimited JSON

License

Notifications You must be signed in to change notification settings

slub/addid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

addid

adds (url-safe) base64 encoded ids (without padding) to given finc Solr schema conform line-delimited JSON

adds "id" field to given finc Solr schema conform line delimited JSON, whereby the ID will be constructed with following pattern:

[PREFIX]-[SOURCE ID]-[RECORD ID]
  • PREFIX will be taken from the parameter "-prefix"
  • SOURCE ID will be taken from field "source_id" of the JSON record
  • RECOURD ID will be taken from field "record_id" of the JSON record

requirements

install requirements

  1. (optionally) install pip for Python 3.x:

    sudo apt-get install python3-pip

  2. install requirements with pip:

    sudo -H pip3 install -r requirements.txt

usage

addid.py -prefix [PREFIX] < [INPUT FINC SOLR SCHEMA CONFORM LINE-DELIMITED JSON] > [OUTPUT ENHANCED FINC SOLR SCHEMA CONFORM LINE-DELIMITED JSON]

(default prefix is "dswarm")

About

adds (url-safe) base64 encoded ids (without padding) to given finc Solr schema conform line-delimited JSON

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages