TextGrid repository administration cli tool, based on tgclients
Project description
tgadmin
A command line tool for managing your projects in the TextGrid repository without TextGridLab.
Install
You may use this with venv or with pipx. With pipx you have the benefit of having the command available in your shell without further manual venv creation and activation.
Install pipx, e.g. on Debian/Ubuntu apt install pipx
And the this tool from pypi.org
pipx install tgadmin
Upgrade to a new version with
pipx upgrade tgadmin
If you do not want to use pipx have a look at the section "Development".
Usage
Export sessionID (SID)
and set as env var:
export TEXTGRID_SID=your_secret_sid_here
or set with --sid
for every command
Get help
tgadmin
List projects
list your projects:
tgadmin list
Create project
if there is no suitable project, create one:
tgadmin create lab-import-test-20230605
Upload an aggregation object like editons, aggregations and collections
You can upload aggregations as new textgrid objects like
tgadmin --server http://test.textgridlab.org put-aggregation TGPR-...fe eng003.edition
this would assume that you have an file containing the aggragtion with local paths in
eng003.edition and metadata description files like eng003.edition.meta. After initial uploads
you find an filename.imex
which has a mapping of lokal file names to textgrid URIs.
This can be used to update the objects from the edition like:
tgadmin --server http://test.textgridlab.org update-imex eng003.edition.imex .
Advanced Usage
You may use the development or the test instance of the TextGrid Server.
To use tgadmin with the test instance do
tgadmin --server https://test.textgridlab.org list
for the dev system there is a shortcut, you may call
tgadmin --dev list
Development
clone repo
git clone https://gitlab.gwdg.de/dariah-de/textgridrep/tgadmin.git
cd tgadmin
and create venv
python3 -m venv venv
. venv/bin/activate
pip install --editable .[dev]
afterwards tgadmin is in your venv as command and can be executed
tgadmin
Badges
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tgadmin-0.21.0.tar.gz
.
File metadata
- Download URL: tgadmin-0.21.0.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eef00ebaa706fc3ac8ac375eab05944182366c1e8e3a5186432a763e7196f08 |
|
MD5 | 03956c97959ed4cfb381bc9f6f3bfb77 |
|
BLAKE2b-256 | a56f372be1c85c9f7acb2ca6c1a76080e62d39469b02f641c441097eae96f9b2 |
File details
Details for the file tgadmin-0.21.0-py3-none-any.whl
.
File metadata
- Download URL: tgadmin-0.21.0-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96e4c30558c7ff2d35098726bd209f6bf5e5fe6c5331f9f4c371521f7fdcede1 |
|
MD5 | 72d76e7c7c62f47a81480d206dbcd0a2 |
|
BLAKE2b-256 | ad7c03740e164cbd4fd652fafc5fde78fa117d374b4bf3e5d77644a523b83277 |