xdcget: a command line tool to collect webxdc apps from git repositories
The main purpose for this tool is to maintain a cache of released webxdc apps and to export release files so they can be imported from the xdcstore bot which in turn can be contacted by Delta Chat users in order to be able to search and share webxdc apps in chats.
Getting started
-
Install
xdcgetcommand line tool from a local checkout:pip install -e . -
Initialize config files:
xdcget init -
Edit
xdcget.iniand make sure that you set environment variables containing your credentials for Codeberg/Github API usage. See below for how to get API credentials. -
Run the
updatecommand to retrieve newest webxdc app releases for repositories listed inxdcget.iniand export them to theexportdirectory:xdcget update
Getting a Codeberg API access token
Login with Codeberg and open https://codeberg.org/user/settings/applications to generate a new token. This token does not need any special "scopes" it's only used for querying releases of public repositories. You can copy the resulting API token into your clipboard and then set it into the environment variables you declared in the config file:
# bash example
export XDCGET_CODEBERG_USER=<your-codeberg-user-name>
export XDCGET_CODEBERG_TOKEN=<paste-your-codeberg-access-token-here>
Getting a Github API access token
Login with github and open https://github.com/settings/tokens to generate a new token. This token does not need any access to your private repos -- it's only used for querying releases of public repositories. You may give it 90 days or other expiration times as you feel fine with. You can copy the resulting API token into your clipboard and then set it into the environment variables you declared in the config file:
# bash example
export XDCGET_GITHUB_USER=<your-github-user-name>
export XDCGET_GITHUB_TOKEN=<paste-your-github-access-token-here>
Contributing
Install tox:
pip install tox
We use black to format the code and ruff as linter. After modifying the code, run:
tox -e lint
Run automated tests with:
tox
IMPORTANT: Pull Requests with new features / bug fixes should come with automated tests.
Building and publishing xdcget releases
Quick notes on requirements for testing and releasing:
-
pip install tox build twineto install development dependencies -
toxto run tests -
python -m buildto build the distribution files -
create API-tokens on PyPI to be able to upload to PyPI repositories.
-
Use git to tag a release before uploading (e.g. "git tag" and "git push --tags") The version of xdcget (also obtained via
xdcget --version) is dynamically computed using setuptools-scm -
twine upload dist/*to upload all built distribution files
Metadata
Release files for xdcget 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xdcget-0.3.0.tar.gz | 26.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xdcget-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.8 kB
Release files / xdcget-0.3.0.tar.gz
| Download URL | xdcget-0.3.0.tar.gz |
|---|---|
| Size | 26.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09d403233c55b6bf50a50ec7c521ad78debac46b91bf8cc9ae2cdd2c1e6ee55f
|
|
BLAKE2b-256 checksum How to use checksums |
ee28e38497e0be44aeb93bc224ec2031389e314f7961e5a5daf21cd3bd0720e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / xdcget-0.3.0-py3-none-any.whl
| Download URL | xdcget-0.3.0-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f61132fa6b06e14c852771b7ca2eb2da496e5e65a5a3855e59edbb1f0f6ad9c2
|
|
BLAKE2b-256 checksum How to use checksums |
fd382dc99fdbb56bbb927c51978ebd5d8506a7aaf290a65ab0c5758f46dc512c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|