Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doarakko/iyashi-edge
"iyashi" is a slack bot that randomly returns the pictures of animals you posted. When you post a picture of an animal, it will be automatically classified and registered.
https://github.com/doarakko/iyashi-edge
cloudflare slack slack-bot
Last synced: 9 days ago
JSON representation
"iyashi" is a slack bot that randomly returns the pictures of animals you posted. When you post a picture of an animal, it will be automatically classified and registered.
- Host: GitHub
- URL: https://github.com/doarakko/iyashi-edge
- Owner: Doarakko
- License: mit
- Created: 2023-10-28T14:00:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-02T02:02:31.000Z (3 months ago)
- Last Synced: 2024-11-02T03:16:29.933Z (3 months ago)
- Topics: cloudflare, slack, slack-bot
- Language: TypeScript
- Homepage:
- Size: 24.8 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# iyashi-edge
"iyashi" is a slack bot that randomly returns the pictures of animals you posted.
When you post a picture of an animal, it will be automatically classified and registered.
![example](./example.gif)
## What is "iyashi"
"iyashi" is a Japanese word meaning "soothing" or "healing" mentally and physically.
We need "iyashi", let's get "iyashi"!
## Requirements
- Slack
- Cloudflare
- wrangler CLI
- Microsoft Azure Custom Vision API## Supported animals
- cat
- にゃーん
- ニャーン
- chinchilla
- チンチラ
- ちんちら
- dog
- わんわん
- ワンワン
- hedgehog
- ハリネズミ
- はりねずみ
- owl
- フクロウ
- ふくろう
- ほーほー
- ホーホーPlease create an issue if you have any animals you would like to see supported!
## Usage
1. Copy env file and enter your environment variables.
```shell
cp .dev.vars.example .dev.vars
```1. Create database and tables
```shell
npx wrangler d1 create iyashi
npx wrangler d1 execute iyashi --file=./schema.sql
```1. Edit wrangler.toml
```toml
[[d1_databases]]
binding = "DB" # i.e. available in your Worker on env.DB
database_name = "iyashi"
database_id = "xxxx-yyyy-zzzz"
```1. Deploy to Cloudflare
```shell
wrangler deploy
```1. Set environmental variables to Cloudflare
```shell
wrangler secret put SLACK_BOT_TOKEN
wrangler secret put SLACK_SIGNING_SECRET
wrangler secret put ANIMAL_PREDICTION_API
wrangler secret put ANIMAL_PREDICTION_API_KEY
wrangler secret put IMAGE_UPLOADED_CHANNEL
```