Skip to content

Add generate_svg function (closes #40)#48

Open
sruju333 wants to merge 1 commit intogambitproject:mainfrom
sruju333:add-generate-svg
Open

Add generate_svg function (closes #40)#48
sruju333 wants to merge 1 commit intogambitproject:mainfrom
sruju333:add-generate-svg

Conversation

@sruju333
Copy link

@sruju333 sruju333 commented Mar 1, 2026

This PR is submitted as part of my GSoC 2026 application for the Gambit project (Idea 2: GameInterpreter).
It implements the generate_svg function as described in #40.

Changes:

  1. Added generate_svg to src/draw_tree/core.py - generates a PDF first using generate_pdf, then converts to SVG using pdf2svg
  2. Exported generate_svg from src/draw_tree/init.py
  3. Updated README.md with SVG generation documentation, including install instructions for pdf2svg across macOS, Ubuntu and Windows

Requirements:

  • pdflatex (same as generate_pdf)
  • pdf2svg - install via brew install pdf2svg (macOS) or sudo apt install pdf2svg (Ubuntu)

Testing:
Tested locally with games/one_card_poker.ef - SVG generated and renders correctly in browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant