Skip to main content

experimental tool for collecting latest releases of webxdc apps

Project description

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

  1. Install xdcget command line tool from a local checkout:

     pip install -e . 
    
  2. Initialize config files:

     xdcget init 
    
  3. Edit xdcget.ini and make sure that you set environment variables containing your credentials for Codeberg/Github API usage. See below for how to get API credentials.

  4. Run the update command to retrieve newest webxdc app releases for repositories listed in xdcget.ini and export them to the export directory:

     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 twine to install development dependencies

  • tox to run tests

  • python -m build to 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xdcget-0.3.0.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

xdcget-0.3.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file xdcget-0.3.0.tar.gz.

File metadata

  • Download URL: xdcget-0.3.0.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for xdcget-0.3.0.tar.gz
Algorithm Hash digest
SHA256 09d403233c55b6bf50a50ec7c521ad78debac46b91bf8cc9ae2cdd2c1e6ee55f
MD5 4e4ee08f14985d8cfb21d3cc9e1c29e3
BLAKE2b-256 ee28e38497e0be44aeb93bc224ec2031389e314f7961e5a5daf21cd3bd0720e9

See more details on using hashes here.

File details

Details for the file xdcget-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: xdcget-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for xdcget-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f61132fa6b06e14c852771b7ca2eb2da496e5e65a5a3855e59edbb1f0f6ad9c2
MD5 ea3bf59588a841abe2de9a10a4b826cf
BLAKE2b-256 fd382dc99fdbb56bbb927c51978ebd5d8506a7aaf290a65ab0c5758f46dc512c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page