Skip to content

DSpace client CLI interface #2

Open

Description

@tomdesair

We can add some CLI commands to the DSpace Python client that make it easier to explore and manipulate a DSpace repository via CLI or bash scripts. The initial idea here is to offer similar functionality like the kubectl command to explore a Kubernetes cluster. Some examples of how it could look like:

  • dspace-client login https://api7.dspace.org
    • Login to the specified DSpace instance
  • dspace-client get communities
    • List all communities
  • dspace-client get collections
    • List all collections
  • dspace-client metadata 12345/123
    • Display metadata by handle or uuid
  • dspace-client view item <uuid>
    • Display item related data by uuid
  • dspace-client download bitstream <uuid> -p <path>
    • Download bitstream to the specified path
  • dspace-client community <uuid>
    • Set current active community
  • dspace-client collection <uuid>
    • Set current active collection
  • dspace-client add item -f <path-to-json-file>
    • Add item to current active collection based file path or piping data
  • ...

Of course any of the underlying command implementation can be imported into other Python scripts as well.

I just wrote down things that popped up in my mind. Feel free to add or enhance commands.

Activity

  1. kshepherd commented on Feb 17, 2022

    @kshepherd
    Collaborator

    great idea - the origin of the library was for a single batch operation but we can definitely allow one off CLI commands, even an interactive console perhaps?

  2. added a commit that references this issue on Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions