Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cursor-printer

Interactive thermal receipt kiosk for the Magebit x Cursor tech meetup in Riga, Latvia. Press a key, get an AI-generated startup idea printed on a receipt.

What It Does

A keyboard-driven kiosk that prints receipts on an Epson TM-T20IV 80 mm thermal printer. Each receipt contains:

  • AI Startup Idea — a Latvian-themed startup pitch generated by Gemini 2.5 Flash via OpenRouter
  • AI Fortune — a chaotic developer fortune cookie
  • Vibe Track — a random song from a curated playlist of internet classics
  • QR Code — link to free Cursor credits at cursor.magebit.dev
  • Branding — Cursor and Magebit logos

There's also a Golden Ticket mechanic — a 2% chance per print (max 1 per run) to receive a special Wonka-style ticket redeemable for a mystery prize from the organizers.

Controls

Key Action
TAB Print a startup idea receipt
G Force-print a Golden Ticket

There's a 5-second cooldown between prints.

Requirements

  • OS: Windows (uses Win32 GDI for printing)
  • Hardware: Epson TM-T20IV (or compatible 80 mm thermal printer set as default)
  • Python: 3.10+
  • Admin: Must run as administrator for global keyboard hook

Setup

  1. Clone the repo:
git clone git@github.com:arturskruze/cursor-printer.git
cd cursor-printer
  1. Install dependencies:
pip install openai keyboard qrcode[pil] pywin32 pypiwin32 python-dotenv
  1. Create a .env file:
OPENROUTER_API_KEY=your-openrouter-api-key
  1. Make sure these image assets are in the project root:

    • cursor_logo.png — Cursor logo for receipt header
    • party_image.png — image printed on Golden Tickets
  2. Run (as administrator):

python app.py

How It Works

  • Content (startup idea + fortune + track) is preloaded in a background thread so printing feels instant after the first receipt.
  • Receipts are rendered via Windows GDI (win32ui / win32print) directly to the printer — no driver-level ESC/POS needed.
  • The Magebit logo is rendered at runtime from embedded SVG path data.
  • fetch_ids.py is a utility script for looking up YouTube video IDs for the vibe track playlist.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages