Skip to content

Delnegend/social-2-telego

Repository files navigation

social-2-telego

Comparing to my previous project

social-2-telegram social-2-telego
How it works 0. spins up a browser
1. takes a post URL
2. scrapes the content
3. composes a message
4. sends to Telegram
0. spin up a Telegram bot (can run 24/7)
1. takes a post URL with some optional additional content (artist's name/username, hashtags)
2. pretty formatting
3. sends to Telegram
Ease of use - requires a computer
- 20-25 seconds delay between each post URL due to scraping, social media links re-validation, asking for additional information
Just send the link to the Telegram bot
Advantages - Dependency-free, everything included in the Telegram post, no need for something to run 24/7 - Fast, much more convenient, easier to update information for artists if
Disadvantages - Slow, requires a Windows machine, a little bit clunky to set up - Relies on external services for viewing (fxtwitter and this bot for the preview)
- Require to maintaining a separated linktr.ee-like website

Set-up

  • Install Docker
  • Clone this repo
  • Run sh build.sh to build the binary
  • Rename .env.example to .env and fill in the required information
  • docker compose up -d to start the bot

Message format

https://x.com/foo/status/123, @bar Bar, #baz
  • When splitting the message by ,, there must be at least 1 element, at most 3 elements.
  • First element must match the URL pattern
  • Second/third element are the artist's name/username overwrite and hashtags. They are optional and the position can be exchanged.
  • The artist's name/username overwrite element must start with @ and the hashtags element must start with #.

About

Telegram bot replies formatted social links

Topics

Resources

License

Stars

Watchers

Forks