Name | warriors-leaderboard JSON |
Version |
0.1.9
JSON |
| download |
home_page | None |
Summary | Watch ArchiveTeam Warrior leaderboards on the command line |
upload_time | 2025-02-09 23:46:29 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
archiveteam
warrior
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Archive Warrior Leaderboard [](https://pypi.org/project/warriors-leaderboard/)
A python CLI tool to list rank of [Archive Warriors](https://wiki.archiveteam.org/index.php/ArchiveTeam_Warrior)
<img width="466" alt="image" src="https://github.com/user-attachments/assets/3f0d6088-4f8e-47f9-9f45-d4b735b69564" />
([Command line for this](#sample-image-command-line))
# Install
## Via pip
```shell
pip install warriors-leaderboard
```
## Via [brew](https://brew.sh/)/pipx
If you don't have [`pipx`](https://github.com/pypa/pipx):
```shell
brew install pipx
pipx ensurepath
```
Restart terminal, then:
```shell
pipx install warriors-leaderboard
```
# Run
```shell
warriors <project> [<user(s)>] [--top count] [--bottom count] [--surround count]
```
Full usage available under `--help`:
```
Usage: warriors [OPTIONS] PROJECT [USERS]...
Shows leaderboard for given Archive Warrior project, focussing on supplied
users or ranks
Options:
-t, --top TEXT Include these many from the top of the ranking
-b, --bottom TEXT Include these many from the bottom of the
ranking
-s, --surround TEXT Include these many either side of each supplied
user
-r, --rank TEXT Include this rank, or inclusive range of ranks
using a..b format, e.g. -r10..20
--no-totals Hide the totals row
--no-speed Hide speed column and do not show rank changes
-l, --live Show and update the table in real time, ctrl+c
to exit
-p, --poll-time TEXT Live mode: Refresh rate in seconds, default 60
-c, --average-count TEXT Live mode: Number of refreshes to calculate
speed and compare ranks over, default 60
-j, --json-record-path TEXT Save every response under this path, latest
used when resuming a live view.Potentially
useful for a future playback mode.
--help Show this message and exit.
```
With only a project specified you get the top 10 users:
```
% warriors telegram
telegram
┏━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Rank ┃ User ┃ Bytes ┃ Items ┃
┡━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ 1 │ fuzzy80211 │ 513.13 TiB │ 2.79 G │
│ 2 │ igloo22225 │ 183.59 TiB │ 917.25 M │
│ 3 │ fionera │ 181.88 TiB │ 636.09 M │
│ 4 │ DLoader │ 154.84 TiB │ 1.06 G │
│ 5 │ Nothing4You │ 104.87 TiB │ 460.27 M │
│ 6 │ T31M │ 96.87 TiB │ 368.98 M │
│ 7 │ Sluggs │ 76.79 TiB │ 205.35 M │
│ 8 │ datechnoman │ 69.84 TiB │ 234.03 M │
│ 9 │ nstrom │ 36.51 TiB │ 209.52 M │
│ 10 │ chrismeller │ 34.65 TiB │ 91.96 M │
└──────┴─────────────┴────────────┴──────────┘
```
Or you can list a number of users after the project:
```
% warriors usgovernment kiwi breadbrix
usgovernment
┏━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┓
┃ Rank ┃ User ┃ Bytes ┃ Items ┃
┡━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━┩
│ 14 │ breadbrix │ 4.38 TiB │ 10.88 M │
├──────┼───────────┼──────────┼─────────┤
│ 17 │ kiwi │ 3.73 TiB │ 9.11 M │
└──────┴───────────┴──────────┴─────────┘
```
To include top or bottom ranks, use `-t` or `-b`:
```
% warriors usgovernment kiwi -t5 -b1
usgovernment
┏━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Rank ┃ User ┃ Bytes ┃ Items ┃
┡━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━┩
│ 1 │ filesdotdog │ 83.37 TiB │ 170.05 M │
│ 2 │ datechnoman │ 52.74 TiB │ 83.02 M │
│ 3 │ fuzzy80211 │ 26.04 TiB │ 58.39 M │
│ 4 │ nstrom │ 14.85 TiB │ 29.44 M │
│ 5 │ paarklicks │ 13.41 TiB │ 29.4 M │
├──────┼────────────────┼───────────┼──────────┤
│ 17 │ kiwi │ 3.72 TiB │ 9.11 M │
├──────┼────────────────┼───────────┼──────────┤
│ 1893 │ atomicbunnies2 │ 10.26 kiB │ 2 │
└──────┴────────────────┴───────────┴──────────┘
```
To lookaround the specified user(s), use `-sN`. e.g. to list the 3 above and below `kiwi`:
```
% warriors usgovernment kiwi -s3
usgovernment
┏━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┓
┃ Rank ┃ User ┃ Bytes ┃ Items ┃
┡━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━┩
│ 14 │ breadbrix │ 4.38 TiB │ 10.87 M │
│ 15 │ katia │ 4.1 TiB │ 10.58 M │
│ 16 │ Sluggs │ 3.91 TiB │ 7.32 M │
│ 17 │ kiwi │ 3.72 TiB │ 9.11 M │
│ 18 │ xxdesmus │ 3.61 TiB │ 6.81 M │
│ 19 │ DigitalDragon │ 3.37 TiB │ 7.34 M │
│ 20 │ meisnick │ 3.27 TiB │ 6.53 M │
└──────┴───────────────┴──────────┴─────────┘
```
## Styling
When specifying a user, you can specify a [rich](https://rich.readthedocs.io/en/stable/style.html) style.
For a list of colors, see https://rich.readthedocs.io/en/stable/appendix/colors.html#appendix-colors
If the style contains "on" then it applies to the whole row. Speed and Rank text foreground colors will not be replaced.
Examples:
`alan:red` - Highlight user `alan` in red.
`alan:"red bold"` - Highlight user `alan` in red with bold.
`alan:"red bold on yellow"` - Highlight user `alan` in red with bold on a yellow background, and apply to whole row.
## Development
1. Clone repo.
2. Install [uv](https://docs.astral.sh/uv/getting-started/installation/) if you don't have it.
Then run:
```shell
uv run warrior_rank.py <options as decripted above>
```
## Sample image command line
The sample image was taken while running:
```shell
warriors telegram red5:"red1 bold on grey19" blue2:"deep_sky_blue1 bold on grey23" --top 10 --bottom 1 --surround 5 --live
```
Raw data
{
"_id": null,
"home_page": null,
"name": "warriors-leaderboard",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Alan Evans <thealanevans@gmail.com>",
"keywords": "ArchiveTeam, Warrior",
"author": null,
"author_email": "Alan Evans <thealanevans@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/0c/46/411199c911470df68895fb164b5388b455b309bdae00dcf61b66df11cc5b/warriors_leaderboard-0.1.9.tar.gz",
"platform": null,
"description": "# Archive Warrior Leaderboard [](https://pypi.org/project/warriors-leaderboard/)\n\nA python CLI tool to list rank of [Archive Warriors](https://wiki.archiveteam.org/index.php/ArchiveTeam_Warrior)\n\n<img width=\"466\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3f0d6088-4f8e-47f9-9f45-d4b735b69564\" />\n\n([Command line for this](#sample-image-command-line))\n\n# Install\n\n## Via pip\n\n```shell\npip install warriors-leaderboard\n```\n\n## Via [brew](https://brew.sh/)/pipx\n\nIf you don't have [`pipx`](https://github.com/pypa/pipx):\n\n```shell\nbrew install pipx\npipx ensurepath\n```\n\nRestart terminal, then:\n\n```shell\npipx install warriors-leaderboard\n```\n\n# Run\n\n```shell\nwarriors <project> [<user(s)>] [--top count] [--bottom count] [--surround count]\n```\n\nFull usage available under `--help`:\n\n```\nUsage: warriors [OPTIONS] PROJECT [USERS]...\n\n Shows leaderboard for given Archive Warrior project, focussing on supplied\n users or ranks\n\nOptions:\n -t, --top TEXT Include these many from the top of the ranking\n -b, --bottom TEXT Include these many from the bottom of the\n ranking\n -s, --surround TEXT Include these many either side of each supplied\n user\n -r, --rank TEXT Include this rank, or inclusive range of ranks\n using a..b format, e.g. -r10..20\n --no-totals Hide the totals row\n --no-speed Hide speed column and do not show rank changes\n -l, --live Show and update the table in real time, ctrl+c\n to exit\n -p, --poll-time TEXT Live mode: Refresh rate in seconds, default 60\n -c, --average-count TEXT Live mode: Number of refreshes to calculate\n speed and compare ranks over, default 60\n -j, --json-record-path TEXT Save every response under this path, latest\n used when resuming a live view.Potentially\n useful for a future playback mode.\n --help Show this message and exit.\n\n```\n\nWith only a project specified you get the top 10 users:\n```\n% warriors telegram\n telegram \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Rank \u2503 User \u2503 Bytes \u2503 Items \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 1 \u2502 fuzzy80211 \u2502 513.13 TiB \u2502 2.79 G \u2502\n\u2502 2 \u2502 igloo22225 \u2502 183.59 TiB \u2502 917.25 M \u2502\n\u2502 3 \u2502 fionera \u2502 181.88 TiB \u2502 636.09 M \u2502\n\u2502 4 \u2502 DLoader \u2502 154.84 TiB \u2502 1.06 G \u2502\n\u2502 5 \u2502 Nothing4You \u2502 104.87 TiB \u2502 460.27 M \u2502\n\u2502 6 \u2502 T31M \u2502 96.87 TiB \u2502 368.98 M \u2502\n\u2502 7 \u2502 Sluggs \u2502 76.79 TiB \u2502 205.35 M \u2502\n\u2502 8 \u2502 datechnoman \u2502 69.84 TiB \u2502 234.03 M \u2502\n\u2502 9 \u2502 nstrom \u2502 36.51 TiB \u2502 209.52 M \u2502\n\u2502 10 \u2502 chrismeller \u2502 34.65 TiB \u2502 91.96 M \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\nOr you can list a number of users after the project:\n\n```\n% warriors usgovernment kiwi breadbrix\n usgovernment \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Rank \u2503 User \u2503 Bytes \u2503 Items \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 14 \u2502 breadbrix \u2502 4.38 TiB \u2502 10.88 M \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 17 \u2502 kiwi \u2502 3.73 TiB \u2502 9.11 M \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\nTo include top or bottom ranks, use `-t` or `-b`:\n\n```\n% warriors usgovernment kiwi -t5 -b1\n usgovernment \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Rank \u2503 User \u2503 Bytes \u2503 Items \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 1 \u2502 filesdotdog \u2502 83.37 TiB \u2502 170.05 M \u2502\n\u2502 2 \u2502 datechnoman \u2502 52.74 TiB \u2502 83.02 M \u2502\n\u2502 3 \u2502 fuzzy80211 \u2502 26.04 TiB \u2502 58.39 M \u2502\n\u2502 4 \u2502 nstrom \u2502 14.85 TiB \u2502 29.44 M \u2502\n\u2502 5 \u2502 paarklicks \u2502 13.41 TiB \u2502 29.4 M \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 17 \u2502 kiwi \u2502 3.72 TiB \u2502 9.11 M \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 1893 \u2502 atomicbunnies2 \u2502 10.26 kiB \u2502 2 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\nTo lookaround the specified user(s), use `-sN`. e.g. to list the 3 above and below `kiwi`:\n\n```\n% warriors usgovernment kiwi -s3 \n usgovernment \n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Rank \u2503 User \u2503 Bytes \u2503 Items \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 14 \u2502 breadbrix \u2502 4.38 TiB \u2502 10.87 M \u2502\n\u2502 15 \u2502 katia \u2502 4.1 TiB \u2502 10.58 M \u2502\n\u2502 16 \u2502 Sluggs \u2502 3.91 TiB \u2502 7.32 M \u2502\n\u2502 17 \u2502 kiwi \u2502 3.72 TiB \u2502 9.11 M \u2502\n\u2502 18 \u2502 xxdesmus \u2502 3.61 TiB \u2502 6.81 M \u2502\n\u2502 19 \u2502 DigitalDragon \u2502 3.37 TiB \u2502 7.34 M \u2502\n\u2502 20 \u2502 meisnick \u2502 3.27 TiB \u2502 6.53 M \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Styling\n\nWhen specifying a user, you can specify a [rich](https://rich.readthedocs.io/en/stable/style.html) style.\n\nFor a list of colors, see https://rich.readthedocs.io/en/stable/appendix/colors.html#appendix-colors\n\nIf the style contains \"on\" then it applies to the whole row. Speed and Rank text foreground colors will not be replaced.\n\nExamples:\n\n`alan:red` - Highlight user `alan` in red.\n`alan:\"red bold\"` - Highlight user `alan` in red with bold.\n`alan:\"red bold on yellow\"` - Highlight user `alan` in red with bold on a yellow background, and apply to whole row.\n\n## Development\n\n1. Clone repo.\n2. Install [uv](https://docs.astral.sh/uv/getting-started/installation/) if you don't have it.\n\nThen run:\n\n```shell\nuv run warrior_rank.py <options as decripted above>\n```\n\n## Sample image command line\n\nThe sample image was taken while running:\n\n```shell\nwarriors telegram red5:\"red1 bold on grey19\" blue2:\"deep_sky_blue1 bold on grey23\" --top 10 --bottom 1 --surround 5 --live\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Watch ArchiveTeam Warrior leaderboards on the command line",
"version": "0.1.9",
"project_urls": {
"Issues": "https://github.com/westonal/archive-warrior-leaderboard-cli/issues",
"Repository": "https://github.com/westonal/archive-warrior-leaderboard-cli.git"
},
"split_keywords": [
"archiveteam",
" warrior"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4501187cc133093abd84bf208d884c2c7d4532799d3c763047060445ee3d3802",
"md5": "e45fcb30492ede9aa885adbd41af5cc7",
"sha256": "6f38af9a8bfe840999870d4bf952f4e249457877d5b40977f192e46b2a7f5bc5"
},
"downloads": -1,
"filename": "warriors_leaderboard-0.1.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e45fcb30492ede9aa885adbd41af5cc7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8976,
"upload_time": "2025-02-09T23:46:27",
"upload_time_iso_8601": "2025-02-09T23:46:27.381524Z",
"url": "https://files.pythonhosted.org/packages/45/01/187cc133093abd84bf208d884c2c7d4532799d3c763047060445ee3d3802/warriors_leaderboard-0.1.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0c46411199c911470df68895fb164b5388b455b309bdae00dcf61b66df11cc5b",
"md5": "90465330a99dbb036e94aab4384e66c8",
"sha256": "707aecdc3ed30b4b26ea4e4a6e4a03dd62089e280f8cfab465ddf4b012647f86"
},
"downloads": -1,
"filename": "warriors_leaderboard-0.1.9.tar.gz",
"has_sig": false,
"md5_digest": "90465330a99dbb036e94aab4384e66c8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 19438,
"upload_time": "2025-02-09T23:46:29",
"upload_time_iso_8601": "2025-02-09T23:46:29.669370Z",
"url": "https://files.pythonhosted.org/packages/0c/46/411199c911470df68895fb164b5388b455b309bdae00dcf61b66df11cc5b/warriors_leaderboard-0.1.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-09 23:46:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "westonal",
"github_project": "archive-warrior-leaderboard-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "warriors-leaderboard"
}