Giter Club home page Giter Club logo

ambercli's Introduction

AmberCLI

A small command-line interface for exploring AmberDB.

Usage

Given a blob id you can look up the work and copies path that references it:

amber> blob nla.blob-80901
Work nla.obj-7614582 [Work]
  Work nla.obj-7617702 [Page]
    Copy nla.obj-7617728 [m]: nla.blob-80901

You can view the properties of works and copies:

amber> info nla.obj-7617728
copyRole: m
copyType: d
currentVersion: Yes
materialType: Unknown
type: Copy

You can display the work/copy tree structure from a root work down:

amber> tree nla.obj-7614582
Work nla.obj-7614582 [Work]
  Work nla.obj-7617702 [Page]
    Copy nla.obj-7617728 [m]: nla.blob-80901
  Work nla.obj-7616804 [Page]
    Copy nla.obj-7616820 [m]: nla.blob-80871
  ...

Finally you can drop into a JavaScript shell which lets you call any method you like on the database:

amber> js
js> x = db.findWork("nla.obj-7617824")
vertex id:761782 {bibId:1299, bibLevel:Part, digitalStatusDate:Mon Nov 17 10:46:35 EST 2014, copyrightPolicy:Out of Copyright, form:Book, accessConditions:Unrestricted, subType:page, collection:nla.map, title:Zum Thema Sprache und Logik : Ergebnisse einer interdisziplinaren Diskussion, digitalStatus:Digitised, type:Page}-761813 start:761865 end:0
js> x.countCopies()
1
js> x.parent.objId
nla.obj-7614582

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.