Code By GK Logo

AI Brochure Creator

An AI-powered brochure generator that analyzes a website, selects the most relevant company pages and links, and produces a polished marketing brochure in markdown.

Features

  • Validates and normalizes website URLs.
  • Fetches page content and removes non-essential HTML elements.
  • Identifies relevant brochure links such as About, Careers, and Product pages.
  • Aggregates content from the main page and related brochure pages.
  • Uses OpenAI-compatible chat completions to generate a clean brochure.
  • Optional translation into supported languages.
  • Exports generated brochures to output/ as markdown files.

Requirements

Setup

Repository: https://github.com/codebygk/ai-webpage-brochurizer

  1. Clone the repository and open the project folder.
  2. Create a .env file in the project root.
  3. Add the following variables to .env:
BASE_URL=your_openai_compatible_base_url
API_KEY=your_openai_compatible_api_key
MODEL=gpt-4o-mini
  1. If you use the standard OpenAI endpoint, set BASE_URL=https://api.openai.com/v1.
  2. Install dependencies with uv:
uv install

Usage

Run the main script from the project directory:

uv run main.py

Follow the prompts:

  1. Enter the URL of the page to create a brochure from.
  2. Choose a translation language, or leave blank to keep the brochure in the original language.
  3. Choose whether to export the brochure as a markdown file.

The tool will:

  • Fetch the provided webpage,
  • Discover relevant brochure-related links,
  • Aggregate the page content,
  • Generate a brochure using AI,
  • Optionally translate it,
  • Saves the result to 'output/brochure-.md'.