ACRCloud client for SUISA reporting
Project description
suisa_sendemeldung
ACRCloud client that fetches data on our playout history and formats them in a CSV file format containing the data (like Track, Title and ISRC) requested by SUISA. Also takes care of sending the report to SUISA via email for hands-off operations.
Usage
We provide the SUISA Sendmeldung script as a container image or as a python package.
These usage instructions show how to install the script and how to configure it. There are different ways to run it at a schedule. We recommend using systemd-timers.
To output the scripts usage information, check out it's --help
output:
# Using Podman
podman run --rm -ti ghcr.io/radiorabe/suisasendemeldung:latest suisa_sendemeldung --help
# Using Docker
docker run --rm -ti ghcr.io/radiorabe/suisasendemeldung:latest suisa_sendemeldung --help
While we recommend running the script in it's container, you can also install the script in any python environment using pip.
We recommend using a dedicated venv for running the script hould you go down this route:
python -mvenv .venv
. venv/bin/activate
pip install suisa_sendemeldung
# Output usage after installation
suisa_sendemeldung
Configuration
You can configure this script with a configuration file (default is suisa_sendemeldung.conf
),
environment variables, or command line arguments.
Command line arguments override environment variables which themselves override settings in the configuration file.
Configuration file
The configuration files will be evaluated in the following order (last takes precedence over first):
/etc/suisa_sendemeldung.conf
$HOME/suisa_sendemeldung.conf
./suisa_sendemeldung.conf
For details on how to set configuration values, have a look at suisa_sendemeldung.conf.
Environment variables
Environment variables can also be passed as options. The relevant variables are listed in the Usage part of this document. For example run the script as follows:
podman run --rm -ti -e BEARER_TOKEN=abcdefghijklmnopqrstuvwxyzabcdef -e STREAM_ID=a-bcdefgh -e STDOUT=True ghcr.io/radiorabe/suisasendemeldung:latest suisa_sendemeldung
Command line switches
As documented in Usage, you can also pass in options on the command line as arguments. Simply run the script as follows:
podman run --rm -ti ghcr.io/radiorabe/suisasendemeldung:latest suisa_sendemeldung --bearer-token=abcdefghijklmnopqrstuvwxyzabcdef --stream_id=a-bcdefgh --stdout
Development
Snapshot testing is used to test the help output, you can update the snapshots like so:
poetry run pytest -- --snapshot-update
Release Management
At RaBe we run the script on the first and 14th of each month. Matching this we only release new versions of the script in the second half of each month.
The CI/CD setup uses semantic commit messages following the conventional commits standard. There is a GitHub Action in .github/workflows/semantic-release.yaml that uses go-semantic-commit to create new releases.
The commit message should be structured as follows:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
The commit contains the following structural elements, to communicate intent to the consumers of your library:
- fix: a commit of the type
fix
patches gets released with a PATCH version bump - feat: a commit of the type
feat
gets released as a MINOR version bump - BREAKING CHANGE: a commit that has a footer
BREAKING CHANGE:
gets released as a MAJOR version bump - types other than
fix:
andfeat:
are allowed and don't trigger a release
If a commit does not contain a conventional commit style message you can fix it during the squash and merge operation on the PR.
Once a commit has landed on the main
branch a release will be created and automatically published to pypi
using the GitHub Action in .github/workflows/release.yaml which uses twine
to publish the package to pypi. The release.yaml
action also takes care of pushing a container
image to GitHub Packages.
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 suisa_sendemeldung-0.15.5.tar.gz
.
File metadata
- Download URL: suisa_sendemeldung-0.15.5.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c480258bb6ede502d4945558262b898acda410753e60377212914ef87ba0896 |
|
MD5 | 8f707a4ce34c6199891f7c53889d9217 |
|
BLAKE2b-256 | 54f353e69ca29e9303c4d60bdabce20e2d7f645b01a922462136cf17880aa17f |
File details
Details for the file suisa_sendemeldung-0.15.5-py3-none-any.whl
.
File metadata
- Download URL: suisa_sendemeldung-0.15.5-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 740ad54e89d70fa1bd294965ba68cdfafb8759eb57888abcbc77f0e169c347c7 |
|
MD5 | fed498d8f0402217a032b755ae8dcce8 |
|
BLAKE2b-256 | e82c397c65fd65286836b5de4e241b35da965bdb367e5e88e18d18d58dda1f9e |