GithubHelp home page GithubHelp logo

slub / addid Goto Github PK

View Code? Open in Web Editor NEW
2.0 7.0 2.0 9 KB

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

License: Apache License 2.0

Python 100.00%
json line-delimited-json finc-solr-schema base64 command-line-tool cli

addid's Introduction

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")

addid's People

Contributors

zazi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

zazi seanpm2001

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.