https://github.com/indrasaputra/tetesan-hujan
Bot to connect Telegram with Raindrop.io
https://github.com/indrasaputra/tetesan-hujan
go golang raindrop-api telegram-bot
Last synced: about 1 month ago
JSON representation
Bot to connect Telegram with Raindrop.io
- Host: GitHub
- URL: https://github.com/indrasaputra/tetesan-hujan
- Owner: indrasaputra
- License: bsd-3-clause
- Created: 2021-02-26T07:39:33.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-01T09:32:40.000Z (over 2 years ago)
- Last Synced: 2025-03-29T13:11:11.529Z (2 months ago)
- Topics: go, golang, raindrop-api, telegram-bot
- Language: Go
- Homepage:
- Size: 64.5 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tetesan Hujan
[](https://goreportcard.com/report/github.com/indrasaputra/tetesan-hujan)
[](https://github.com/indrasaputra/tetesan-hujan/actions)
[](https://codecov.io/gh/indrasaputra/tetesan-hujan)
[](https://codeclimate.com/github/indrasaputra/tetesan-hujan/maintainability)
[](https://sonarcloud.io/dashboard?id=indrasaputra_tetesan-hujan)
[](https://pkg.go.dev/github.com/indrasaputra/tetesan-hujan)## Description
Tetesan Hujan is a bot to connect [Telegram](https://telegram.org/) with [Raindrop](https://raindrop.io/).
Its main purpose is currently to save a bookmark for my own purpose.## Owner
[Indra Saputra](https://github.com/indrasaputra)
## Usage
Send exactly two strings separated by a space to [@tetesan_hujan_bot](t.me/tetesan_hujan_bot) in Telegram.
The first string represents the link and the second represents the collection/category in which the link will be saved in [Raindrop.io](https://raindrop.io/).For example, the link is `https://queue.acm.org/detail.cfm?id=3197520` and collection is `learning`. Then, the message in Telegram will be:
## Caveat
To use this bot, make sure you have the access to use the bot (it is set by `TELEGRAM_OWNER_ID` environment variable).
Since the original purpose is my own usage only, the [@tetesan_hujan_bot](t.me/tetesan_hujan_bot) is only available for me.
If you want to use the bot, please follow the [Development](#development) and [Deployment](#deployment) sections.The bot is heavily depends on [Raindrop API](https://developer.raindrop.io/).
Thus, any latency will be depends on [Raindrop API](https://developer.raindrop.io/) latency.## Development
- Install Go
This project uses version 1.19. Follow [Golang installation guideline](https://golang.org/doc/install).
- Create your Telegram bot
Read [https://telegram.org/blog/bot-revolution](https://telegram.org/blog/bot-revolution).
Follow [https://core.telegram.org/bots](https://telegram.org/blog/bot-revolution) for developer guide.
- Create Raindrop.io account
Get the Raindrop's token in [settings](https://app.raindrop.io/settings/integrations).
Follow [https://developer.raindrop.io/](https://developer.raindrop.io/) for more guidance.
- Clone the project (use one of the two methods below)
Use SSH
```
$ [email protected]:indrasaputra/tetesan-hujan.git
```
Use HTTP
```
$ https://github.com/indrasaputra/tetesan-hujan.git
```- Go to project folder
Usually, it would be
```
$ cd go/src/github.com/indrasaputra/tetesan-hujan
```- Fill in the environment variables
Copy the sample env file.
```
$ cp env.sample .env
```
Then, fill the values according to your setting in `.env` file.- Download the dependencies
```
$ make dep-download
```
or run this command if you don't have `make` installed in your local.
```
$ go mod download
```- Run the application
```
$ go run cmd/bot/main.go
```- Expose your localhost to the internet
Usually, I use [https://ngrok.com/](https://ngrok.com/)
```
$ ngrok http $PORT
```- Send some messages to your bot in Telegram.
## Deployment
Currently, this project is deployed in [Fly](https://fly.io/).
The deployment process definiton is stated and ruled in [fly.toml](https://fly.io/docs/reference/configuration/)
and run automatically using [Github Actions](https://docs.github.com/en/actions).