Live Hattrick scores in your terminal and polybar
Project description
polyhattrick
polyhattrick is a simple command-line utility for fetching live match scores from Hattrick. It can be easily integrated into polybar, allowing you to see how your team is performing live directly on your desktop.
Installation
Install polyhattrick using pip:
pip install polyhattrick
Authentication
Before you can display match results in your terminal or in polybar, you need to authorize polyhattrick to access your match data on Hattrick.
First, start the authentication process:
polyhattrick login authenticate
This command will generate a login link. Open it in your browser to log in to Hattrick and authorize polyhattrick. Once authorized, Hattrick will display a token. Copy this token and complete the authorization process:
polyhattrick login exchange [TOKEN]
Usage
After authentication, you can start fetching live match results.
To display the score of the first match in your live ticker on Hattrick, run:
polyhattrick match live watch
If you want to see the result of a different match, reorder your live ticker on the Hattrick website so that the desired match appears first.
Integration with polybar
To display live match results in polybar, add the following module to your polybar configuration:
[module/hattrick]
type = custom/script
exec = polyhattrick match live watch
Then place the module wherever you want it to appear in your bar.
Notes
-
This tool is intended for Linux systems.
-
Make sure polyhattrick is available in your PATH when used with polybar.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file polyhattrick-0.1.0.tar.gz.
File metadata
- Download URL: polyhattrick-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7304933d3be0453b1dab068007eddd38dcbdf8edba09036eb735eaad660ca5af
|
|
| MD5 |
ec7dd40d1505f6ab7006592bf9561a92
|
|
| BLAKE2b-256 |
7bdcae332e8b183540152e77a687e59aed940195f8efb2c6454fc0fe3a91e910
|
File details
Details for the file polyhattrick-0.1.0-py3-none-any.whl.
File metadata
- Download URL: polyhattrick-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0ceb36e51ab632c9c9df517922e38a4f784de926878d57ad43e0e13a7bcffd1
|
|
| MD5 |
afdfabd84636537cbc6d8e8851f34a42
|
|
| BLAKE2b-256 |
b495abfc15f62fa4fcd006f463b8e083c85316fe41ade637f32c3956da434bc7
|