This Telegram bot simplifies graph visualization for users, particularly in competitive programming contexts. It empowers users to seamlessly convert textual graph representations into clear and aesthetically pleasing visualizations.
- Effortless Graph Input: Users submit a list of edges (and optional labels) representing their graph structure.
- Customizable Output: The bot generates an image of the graph, employing the Graphviz library to render the visuals.
- Directed/Undirected Support: Handles both directed and undirected graphs.
- Intuitive Interaction: Guides users through the visualization process with clear commands and prompts.
- Install Graphviz: Ensure Graphviz is installed on your system and PATH variable is set(https://graphviz.org/download/).
- Clone repository from GitHub.
- Set Environment Variables: Create a .env file in your project's root directory and add this line, replacing the placeholder with your bot token:
TELOXIDE_TOKEN=YOUR_TOKEN RUST_LOG=LOG_LEVEL
- Run the Bot: Execute the following command in your terminal:
cargo run
-
Send a list of vertices in the following format:
A B B C C D
Each line represents an edge connecting two vertices. Vertices are separated by a space.
-
Optionally, you can add a third parameter as the label for the edge:
A B Edge1 B C Edge2 C D Edge3
-
Also, you can add just nodes in a single line:
A B C D
-
The bot will convert the graph into a PNG image and send it back to you.
-
Enjoy!
I would be glad to see them in issues and discussions.