Code Monkey home page Code Monkey logo

indexing-client's Introduction

indexing-client

Index iRODS system metadata and AVUS under a $ROOT_COLLECTION

Purpose

To generate the JSON content, or Bash commands, necessary to index all objects under a root collection.

This is accomplished using iRODS clients instead of through the normal policy mechanisms of the iRODS Indexing Plugin.

The python-irodsclient is required for best results. v1.1.5 was used during test, although pre-v1.0 versions should work as well.

Commands

Do the following to generate records of catalog objects complete with system metadata and AVU's:

ROOT_COLLECTION="/tempZone/home/rods/v1"
{ bash get_objects.sh c "$ROOT_COLLECTION"; bash get_objects.sh d "$ROOT_COLLECTION" ; } | tee objs
python3 add_avus.py < objs | tee objs_with_avus

Then, either:

python3 metadata_as_json.py -f '{ID} {JSON}' < objs_with_avus | while read id json; do [...] ; done

which would generate custom-formatted records with the object ID in the ICAT db, followed by the literal JSON for the index request, and pipe that through custom processing via the variables $id and $json in a Bash loop.

Or (even better) to output as a batch file of curl commands compatible with sh/Bash and gnu parallel:

python3 metadata_as_json.py -H [host] -P [port] -N [index-name] < objs_with_avus > curl_commands

indexing-client's People

Contributors

d-w-moore avatar

Watchers

 avatar

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.