{"id":49392898,"url":"https://github.com/okayama-daiki/drawio2tikz","last_synced_at":"2026-05-29T02:31:13.500Z","repository":{"id":323124735,"uuid":"1092120842","full_name":"okayama-daiki/drawio2tikz","owner":"okayama-daiki","description":"A converter from draw.io (diagrams.net) to TikZ","archived":false,"fork":false,"pushed_at":"2026-04-28T12:52:20.000Z","size":97,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-28T14:12:24.846Z","etag":null,"topics":["converter","drawio","hobby","tikz","vibe-coding"],"latest_commit_sha":null,"homepage":"https://drawio2tikz.daiki.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/okayama-daiki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-08T03:11:15.000Z","updated_at":"2026-04-28T12:52:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/okayama-daiki/drawio2tikz","commit_stats":null,"previous_names":["okayama-daiki/drawio-to-tikz","okayama-daiki/drawio2tikz"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/okayama-daiki/drawio2tikz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okayama-daiki%2Fdrawio2tikz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okayama-daiki%2Fdrawio2tikz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okayama-daiki%2Fdrawio2tikz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okayama-daiki%2Fdrawio2tikz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okayama-daiki","download_url":"https://codeload.github.com/okayama-daiki/drawio2tikz/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okayama-daiki%2Fdrawio2tikz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33634611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","drawio","hobby","tikz","vibe-coding"],"created_at":"2026-04-28T14:06:44.119Z","updated_at":"2026-05-29T02:31:13.492Z","avatar_url":"https://github.com/okayama-daiki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# drawio2tikz\n\n`drawio2tikz` is a thin wrapper around [`svg2tikz`](https://github.com/xyz2tex/svg2tikz) that converts draw.io diagrams to TikZ code for embedding in LaTeX documents.\n\n## Features\n\n- Converts either a single draw.io page or all pages\n- Preserves label colors, bold text, font sizes, and simple line breaks\n- **Ignores draw.io font family names**, allowing output to use the host LaTeX document font\n- Removes draw.io SVG CSS that `svg2tikz` cannot parse, including `light-dark(...)` from draw.io's dark mode color scheme\n- Restores draw.io labels emitted as SVG `foreignObject` elements, which draw.io exports as HTML fragments\n\n## Requirements\n\n- **Python 3.14 or newer**\n- **`drawio` CLI** available on `PATH` (install from [diagrams.net](https://diagrams.net) or via Homebrew: `brew install --cask drawio`)\n\n## Installation\n\n### pip / uv\n\nInstall from PyPI:\n\n```bash\nuv tool install drawio2tikz\n```\n\nOr with pip:\n\n```bash\npip install drawio2tikz\n```\n\n### Development Setup\n\nClone the repository and install in development mode:\n\n```bash\ngit clone https://github.com/daikiokayama/drawio2tikz.git\ncd drawio2tikz\nuv sync\nuv run drawio2tikz --help\n```\n\n## Usage\n\n### Basic Usage\n\nConvert a single page from a draw.io file to TikZ:\n\n```bash\ndrawio2tikz path/to/figure.drawio -o output_dir\n```\n\nThis generates `figure.tex` in the output directory.\n\n### Convert All Pages\n\nTo convert all pages in a multi-page `.drawio` file:\n\n```bash\ndrawio2tikz path/to/multipage.drawio --all-pages -o output_dir\n```\n\nEach page is saved as `multipage-01.tex`, `multipage-02.tex`, and so on.\n\n### Keep Intermediate SVG\n\nTo debug or inspect the intermediate SVG (after sanitization):\n\n```bash\ndrawio2tikz path/to/figure.drawio -o output_dir --keep-svg --svg-dir output_dir/svg\n```\n\n### View Help\n\n```bash\ndrawio2tikz --help\n```\n\n## LaTeX Setup\n\nAdd these packages to your LaTeX document preamble:\n\n```tex\n\\usepackage{xcolor}\n\\usepackage{tikz}\n```\n\nInclude the generated TikZ file:\n\n```tex\n\\input{path/to/figure.tex}\n```\n\nFor support of arbitrary large font sizes, use a scalable font:\n\n```tex\n\\usepackage{mlmodern}\n```\n\n### Example LaTeX Document\n\n```tex\n\\documentclass{article}\n\\usepackage{xcolor}\n\\usepackage{tikz}\n\\usepackage{mlmodern}\n\n\\begin{document}\n\n\\section{My Diagram}\n\n\\begin{figure}\n  \\centering\n  \\input{figures/diagram.tex}\n  \\caption{A diagram created in draw.io}\n\\end{figure}\n\n\\end{document}\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to open issues or submit pull requests on [GitHub](https://github.com/daikiokayama/drawio2tikz).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokayama-daiki%2Fdrawio2tikz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokayama-daiki%2Fdrawio2tikz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokayama-daiki%2Fdrawio2tikz/lists"}