A tool to convert blog text or URLs into SVG visualizations using Gemini API.
- Accepts either blog text or a blog URL as input.
- Uses Google’s Gemini API to summarize and structure content.
- Outputs a basic SVG visualization based on the result.
-
Clone the repository:
git clone https://github.com/yourusername/blog2svg.git cd blog2svg -
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the root directory with your Gemini API key:GEMINI_API_KEY="Your API KEY"
Run the script:
python3 svg.pyYou'll be prompted to:
- Enter a URL of a blog post, OR
- Paste the blog text directly
The script will generate an SVG visualization based on the content. The resulting SVG will be saved as output.svg in the same directory.
Despite experimenting with various prompts, I've found that the Gemini (2.0 Flash) API doesn't consistently produce visually appealing results for this use case. In comparison, tests with Claude AI (via claude.ai/chats) produced significantly better visualizations for the same inputs.