A chat bot for Matrix servers that posts the summary of a given article using SMMRY.
When in a matrix chat with mx-tldr-bot, send a message in this format:
!tldr <url>
e.g.
!tldr https://repl.it/site/blog/upm
You'll need node.js installed.
git clone https://github.com/cromo/mx-tldr-bot.git
cd mx-tldr-bot
cp config.example.toml config.toml
$EDITOR config.toml
npm install
npm start
Using Docker:
docker run -it --rm -v "$(pwd)":/src/state -e MX_TLDR_BOT_ACCESS_TOKEN='YOUR ACCESS TOKEN' -e MX_TLDR_BOT_SMMRY_API_KEY='YOUR SMMRY API KEY' -e MX_TLDR_BOT_SYNC_STATE_FILE=state/mx-tldr-bot.sync.json cromo/mx-tldr-bot
mx-tldr-bot can be configured by editing config.toml
or via environment variables.
homeserverUrl
optional - the homeserver of the account the bot will use. Defaults to"https://matrix.org"
.accessToken
- the access token to authenticate the bot. See T2Bot's documentation for how to get an access token.smmryApiKey
- the API key for SMMRY.syncStateFile
optional - the file that keeps track of the matrix server sync state. Defaults to"mx-tldr-bot.sync.json"
.
MX_TLDR_BOT_CONFIG_FILE
- specifies the location ofconfig.toml
.MX_TLDR_BOT_HOMESERVER_URL
- same ashomeserverUrl
inconfig.toml
.MX_TLDR_BOT_ACCESS_TOKEN
- same asaccessToken
inconfig.toml
.MX_TLDR_BOT_SMMRY_API_KEY
- same assmmryApiKey
inconfig.toml
.
ISC