Host your own link shortener that works with a bot. Just send the link to a bot and it'll take care of the rest for you. Demo: @GiveMeShortLinkBot
- Install Docker in your local machine or server
- Create a Telegram bot by talking to @BotFather
- Set up your own Firebase database
- Create and fill in the credentials to the
env.yml
file, seeenv.yml.example
for the template - run
./bin/build
from the project root folder - run
./bin/run
from the project root folder - Send a link to your bot from Telegram, you should be see reply like (you will need to set up a backend too.)
YOU: http://example.com
BOT: Wow, try http://randomhost.name/abcdefgh
- Following the Docker installation guide.
- Create a Telegram bot with @BotFather
- Set up Firebase database from the official site.
After cloning the repo, you should create and fill in the credentials to the env.yml
file, see env.yml.example
for the template
To run locally using Docker:
$ ./bin/build
$ ./bin/run
To run without Docker (requires locally installed Ruby 2.3.1+):
$ bundle install
$ ruby link-shortener-bot.rb
On the deployment machine:
$ ./bin/build
$ ./bin/run
- Docker - For building and deploying the image
- atipugin/telegram-bot-ruby - Telegram API wrapper
- tommyku/telegram-bot-starter - A telegram bot Boilerplate
This project is an open-sourced software licensed under the MIT license.