release/v2.4 -> master (#844)

This commit is contained in:
cybermaggedon 2026-04-22 15:19:57 +01:00 committed by GitHub
parent a24df8e990
commit 89cabee1b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
386 changed files with 7202 additions and 5741 deletions

View file

@ -10,13 +10,13 @@ import json
default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
default_token = os.getenv("TRUSTGRAPH_TOKEN", None)
default_user = "trustgraph"
default_workspace = os.getenv("TRUSTGRAPH_WORKSPACE", "default")
def show_docs(url, user, token=None):
def show_docs(url, token=None, workspace="default"):
api = Api(url, token=token).library()
api = Api(url, token=token, workspace=workspace).library()
docs = api.get_documents(user=user)
docs = api.get_documents()
if len(docs) == 0:
print("No documents.")
@ -60,9 +60,9 @@ def main():
)
parser.add_argument(
'-U', '--user',
default=default_user,
help=f'User ID (default: {default_user})'
'-w', '--workspace',
default=default_workspace,
help=f'Workspace (default: {default_workspace})',
)
args = parser.parse_args()
@ -71,8 +71,8 @@ def main():
show_docs(
url = args.api_url,
user = args.user,
token = args.token,
workspace = args.workspace,
)
except Exception as e: