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.
The text was updated successfully, but these errors were encountered:
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?
jsicot
added a commit
to jsicot/dspace-rest-python
that referenced
this issue
Jul 2, 2024
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
dspace-client get communities
dspace-client get collections
dspace-client metadata 12345/123
dspace-client view item <uuid>
dspace-client download bitstream <uuid> -p <path>
dspace-client community <uuid>
dspace-client collection <uuid>
dspace-client add item -f <path-to-json-file>
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.
The text was updated successfully, but these errors were encountered: