You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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?
Activity
kshepherd commentedon Feb 17, 2022
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?
Merge pull request the-library-code#2 from jsicot/dev