Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucaswerkmeister/itsbinotstraight
Mastodon + Twitter bot
https://github.com/lucaswerkmeister/itsbinotstraight
bi bot lgbt mastodon mastodon-bot twitter twitter-bot
Last synced: 6 days ago
JSON representation
Mastodon + Twitter bot
- Host: GitHub
- URL: https://github.com/lucaswerkmeister/itsbinotstraight
- Owner: lucaswerkmeister
- License: agpl-3.0
- Created: 2019-12-08T00:02:31.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-29T18:42:21.000Z (3 months ago)
- Last Synced: 2024-10-30T02:37:48.911Z (about 2 months ago)
- Topics: bi, bot, lgbt, mastodon, mastodon-bot, twitter, twitter-bot
- Language: Rust
- Homepage: https://botsin.space/@ItsBiNotStraight
- Size: 217 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# it’s bi not straight
A [Mastodon bot](https://fox.nexus/@ItsBiNotStraight)
posting riffs on the “it’s the bible not the straightble” joke.
(Formerly a [different Mastodon bot](https://botsin.space/@ItsBiNotStraight)
and before then also a [Twitter bot](https://twitter.com/ItsBiNotHetero).)## Development
The bot is written in Rust.
(An earlier version, which you can find in the Git history, was written in JS;
it only supported Twitter and had minor differences in Unicode handling.)Run `cargo run` to generate a post text (without sending a post),
or `cargo test` to run unit tests.
Cargo will automatically download and build dependencies as needed.`src/lib.rs` is the meat of the bot, generating the post texts.
`src/main.rs`, the main binary (and default for `cargo run`), simply generates one post text and prints it out.
`src/bin/post.rs` is the binary that actually sends a post,
loading credentials from the `.env` file or process environment,
and the one that is deployed to the server.
You can run it directly with `cargo run --bin post`.## Deployment
Build an image suitable as a [portable service](https://systemd.io/PORTABLE_SERVICES/), using `./make-image`.
An `.env` file with valid credentials must exist at image build time
and will be included in the image.
(The credentials are sensitive,
so they are not included in this repository
and you should not distribute the image containing them.
See `.env.template` for the format.)Copy the resulting image (`itsbinotstraight/`) on some server into `/var/lib/portables/`,
attach it e. g. with `portablectl attach itsbinotstraight`
and enable it with `systemctl enable --now itsbinotstraight.timer`.
(You can also send a single post with `systemctl start itsbinotstraight.service` first, to see if it works.)See also `DEPLOYING.md`.
## License
The code in this repository is released under the AGPL v3,
as provided in the `LICENSE` file.