Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sir-go/bot-notion-aidkit
telegram bot to my home first aid kit
https://github.com/sir-go/bot-notion-aidkit
bot docker go notion notion-api telegram telegram-bot
Last synced: about 1 month ago
JSON representation
telegram bot to my home first aid kit
- Host: GitHub
- URL: https://github.com/sir-go/bot-notion-aidkit
- Owner: sir-go
- License: mit
- Created: 2022-10-04T04:33:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-20T09:26:37.000Z (about 2 years ago)
- Last Synced: 2024-11-06T22:08:38.223Z (3 months ago)
- Topics: bot, docker, go, notion, notion-api, telegram, telegram-bot
- Language: Go
- Homepage:
- Size: 4.07 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Go](https://github.com/sir-go/bot-notion-aidkit/actions/workflows/go.yml/badge.svg)](https://github.com/sir-go/bot-notion-aidkit/actions/workflows/go.yml)
# Telegram bot for search the medicine in my home first aid kit
> https://t.me/mserg_apteka_botI developed this project while I had COVID and I was doing an inventory of my home first-aid kit.
## How it works
The bot listens to users' requests and searches records via Notion API in the database.
If something is found, a user gets the answer including a photo of the medicine and tags, and location info.The data updates from the database periodically or by the command `/update`.
The database easily administrates at the Notion service.
## Configuration file
Option `-c` sets the configuration file path (default `./conf.toml`).```toml
[tg_api]
token = '...' # Tg bot token, BotFather (https://t.me/BotFather) helps[notion_api]
token = '...' # notion account API token
timeout = '10s' # request timeout
version = '2021-08-16' # API version
db_id = '...' # notion database ID
search_url = 'https://api.notion.com/v1/search' # seach API URL[warehouse]
update_interval = '45m' # autoupdate data time interval
```
## Docker
```bash
docker build -t bot .
docker run -v ${PWD}/conf.toml:/conf.toml --rm -it bot:latest
```## Build & run
```bash
go mod download
go test ./cmd/bot
go build -o bot ./cmd/bot
```## Screencast
### DB in the Notion table
![](notion.png)### Bot interaction
![](sc.gif)