- Rust 42.8%
- JavaScript 27%
- Nix 10.3%
- HTML 10.2%
- CSS 7.8%
- Other 1.9%
| src | Temporary disconnect "fix" | |
| static | Logic error fix | |
| .gitignore | It works :3 | |
| Cargo.lock | waff | |
| Cargo.toml | waff | |
| docker-compose.yml | hm | |
| Dockerfile | meow! | |
| flake.lock | locke | |
| flake.nix | unstable meow | |
| module.nix | meowmeowm meow *commits all over your git* | |
| package.nix | meowmeowmeowmeowmewo | |
| README.md | mraow | |
| shell.nix | awa | |
Clickrtraining
This repository contains the source code for https://clickertrain.ing, a simple internet clicker. :3
API
This application has a simple API you can use to automate clicking and listening.
GET /api/{room}/click
Clicks any creature listening on that room. Returns 200 on success or 404 if nothing is listening.
GET /api/{room}/listen
This endpoint expects to be connected to as a websocket. It will then send clicks and other events over the socket.
Websocket
Websocket messages are strings. Currently the following values are possible:
c- A click has occured and should be played.h- A keep-alive heartbeat message. May be ignored.
Local client
This application can be installed locally to serve as a command line client. From there you can, for example, create a systemd service to run it in the background.
The local client is currently only known to work on linux, and does not have a GUI.
You will need to have Cargo and the Rust toolchain installed.
cargo install --git https://codeberg.org/enjarai/clickrtraining
clickrtraining --help
Running in the background
Want to be able to be clicked at any time without having to keep the client running? That's what systemd is for!
You can make a simple service file in ~/.config/systemd/user/clickrtraining.service that contains something like this:
[Unit]
Description = Clickrtraining
After = network.target
[Service]
WorkingDirectory = %h/
ExecStart = %h/.cargo/bin/clickrtraining listen --id <YOUR ID HERE> --volume 1
Restart = always
[Install]
WantedBy = default.target
Then run:
systemctl --user daemon-reload
systemctl --user enable --now clickrtraining
This will keep the clicker service running while you are logged in, across restarts.
Self-hosting
Want to host clickertraining yourself? Sure can do.
Either use the provided Nix flake, or install it as you would the local client, and use the host option.
When installing on a server via Cargo, be sure to explicitly omit the audio feature.
Otherwise the app won't compile on most headless servers.