Skip to content

valeriyvan/geometrizebot

Repository files navigation

Geometrizebot logo fulltext

Geometrizebot is written in Swift Telegram bot for geometrizing images. Bot is available at https://t.me/geometrizebot. Experimental very limited version is available also over web. Bot uses Swift Package swift-geometrize for geometrizing images.

Here's how bot is looking at the moment:

Here's image from the screenshot above and one geometrized with 250 rotated ellipses:

Historical moment: bot makes its own logo. A bit of postmodernism.

Here is logo bot made:

How do I run bot?

I run it in Digital Ocean Ubuntu droplet.

In fresh instance install dependencies:

sudo apt-get update
sudo apt-get install clang libicu-dev libatomic1 build-essential pkg-config
sudo apt-get install libssl-dev
# install Swift
wget https://download.swift.org/swift-5.8-release/ubuntu2204/swift-5.8-RELEASE/swift-5.8-RELEASE-ubuntu22.04.tar.gz
tar xzf - < swift-5.8-RELEASE-ubuntu22.04.tar.gz*
sudo mkdir /swift
sudo mv swift-5.8-RELEASE-ubuntu22.04.tar.gz /swift/5.8.0
sudo ln -s /swift/5.8.0/usr/bin/swift /usr/bin/swift
swift --version # checks Swift version installed

Provide telegram API token with export geometrizebot_telegram_api_key="TOKEN".

Then run bot with swift run.

That's it.

Buy Me A Coffee