Commit 3b53a769 by Luc Didry

Add README

This commit is dedicated to Schoumi, who is supporting me on Tipeee.
Many thanks :-)
parent dca61fa6
Pipeline #34489 passed with stage
in 15 seconds
# Unsplash mastobot
This software is a [Mastodon](https://joinmastodon.org) bot that posts a random photo from [Unsplash](https://unsplash.com).
## How to use?
First, get the software:
```
sudo apt install git
git clone https://framagit.org/luc/unsplash-mastobot
cd unsplash-mastobot
```
Then register your app, considering that your Mastodon instance is `exemple.org`:
```
sudo cpan Carton
carton install
HOST="exemple.org" ./register-app.pl
```
This will give you three secret environment variables: `CLIENT_ID`, `CLIENT_SECRET` and `ACCESS_TOKEN`.
Keep them well and secure!
Then:
- if you want to run the bot from your computer, you'll need to install a few things:
```
sudo apt install perlmagick libnet-ssleay-perl libio-socket-ssl build-essential
sudo cpan Mojolicious Image::Randim Mastodon::Client
```
Then just set your three secret environment variables and the `HOST` like before and do `./unsplash-mastobot.pl`;
- if you want to run the bot on a Gitlab instance with enabled CI, set `HOST`, `CLIENT_ID`, `CLIENT_SECRET` and `ACCESS_TOKEN` in your repository "CI/CD > Secret variables" settings and trigger a pipeline.
It will use a custom Docker image to execute the software.
## License
GPLv3, see the [LICENSE](LICENSE) file for details.
## Author
[Luc Didry](https://fiat-tux.fr). You can support me on [Tipeee](https://tipeee.com/fiat-tux) and [Liberapay](https://liberapay.com/sky).
![Tipeee button](themes/default/img/tipeee-tip-btn.png) ![Liberapay logo](themes/default/img/liberapay.png)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment