{"id":18764905,"url":"https://github.com/psygo/template_tsumego_ebook","last_synced_at":"2026-01-07T00:18:57.794Z","repository":{"id":155613883,"uuid":"494244414","full_name":"psygo/template_tsumego_ebook","owner":"psygo","description":"Template Tsumego Book","archived":false,"fork":false,"pushed_at":"2022-06-06T20:14:27.000Z","size":254,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T22:01:43.670Z","etag":null,"topics":["baduk","ebooks","epub","go","pandoc","pdf","weiqi"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psygo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-05-19T22:13:48.000Z","updated_at":"2023-06-28T00:54:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"54c7919a-1dca-4d32-88db-87656b7f1e1b","html_url":"https://github.com/psygo/template_tsumego_ebook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psygo%2Ftemplate_tsumego_ebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psygo%2Ftemplate_tsumego_ebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psygo%2Ftemplate_tsumego_ebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psygo%2Ftemplate_tsumego_ebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psygo","download_url":"https://codeload.github.com/psygo/template_tsumego_ebook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670515,"owners_count":21142896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["baduk","ebooks","epub","go","pandoc","pdf","weiqi"],"created_at":"2024-11-07T18:31:59.607Z","updated_at":"2026-01-07T00:18:57.765Z","avatar_url":"https://github.com/psygo.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## Template Tsumego eBook\n\n\u003e I've also written a [companion article on my website](https://fanaro.io/articles/epub_tsumego_template/epub_tsumego_template.html).\n\nA lab for learning how to write a Go, mainly tsumegos, EPUB ebook.\n\nEPUBs are basically HTML files. For instance, if you open any of [GoBooks](https://gobooks.com/) books with a text editor, besides some many unicode errors, you will note that it is composed of 90% HTML and 10% embedded ~~Chinese~~ JavaScript for the diagrams.\n\nUseful resources for studying EPUBs:\n\n- [*EPUB 3 Best Practices*, by Matt Garrish and Markus Gylling](https://www.goodreads.com/book/show/13593753-epub-3-best-practices) \u0026mdash; Anders Kierulf, author of the SGF standard, GoBooks, and SmartGo, recommends it\n- [*What is EPUB 3?*, by Matt Garrish](https://www.goodreads.com/book/show/18881975-what-is-epub-3)\n- [*Zen of eBook Formatting: A Step-by-step Guide To Format eBooks for Kindle and EPUB*, by Guido Henkel](https://www.goodreads.com/book/show/22381850-zen-of-ebook-formatting)\n- [*Epub Straight to the Point: Creating eBooks for the Apple iPad and Other Ereaders*, by Elizabeth Castro](https://www.goodreads.com/book/show/8477489-epub-straight-to-the-point)\n- [A Kiseido book I translated into Portuguese using LaTeX and GoWrite2](https://github.com/FanaroEngineering/traducao_como_jogar_go)\n\n## Pandoc\n\nSo far, the most practical way of creating an EPUB book seems to be [Pandoc](https://pandoc.org/). Adobe InDesign \u0026mdash; or Word, or Google Docs? \u0026mdash; is also able to do it.\n\nHere are some useful resources:\n\n- [Pandoc EPUB](https://pandoc.org/epub.html)\n- [Scott Chacon's *Pro Git* book](https://git-scm.com/book/en/v2) was written using Pandoc, if you wish to know how far it can go, or have a reference example.\n\nThe essential workflow of developing an EPUB (or PDF) tsumego book in this manner is:\n\n1. Create the problem inside GoWrite, with likely at least 3 diagrams, problem, solution, mistake.\n1. Export the diagrams to vector images.\n1. Mention the diagrams inside the markdown file.\n1. Add the necessary text to make it more understandable.\n\n### Compiling to EPUB\n\n```bash\npandoc \u003cfile.md\u003e -o \u003cfile.epub\u003e\n```\n\nYou can also add custom CSS to it.\n\n### Compiling to PDF\n\nNote that using HTML inside Markdown doesn't seem to work when compiling to PDF with Pandoc, unlike EPUB.\n\n```bash\npandoc \u003cfile.md\u003e -o \u003cfile.pdf\u003e\n```\n\n## GoWrite\n\nFor Go diagrams, I highly recommend [GoWrite2](http://gowrite.net/GOWrite2_download.html), it won't be as slick as [GoBooks](https://gobooks.com/) interactive diagrams, but it's enough.\n\nGoWrite2 can be a bit tricky to use, depending on what you want. Here are some tips and best practices:\n\n- In general, do use vector images for diagrams, this way there won't be any pixelation on them. The main two vector formats in GoWrite2 are:\n    - SVG\n    - EPS\n- When showing only part of the board in a diagram, crop it in the editing tab, not on the board, otherwise there will be a bunch of empty space in the resulting image.\n- SVG is basically text, so you can inspect it and change it through an editor. If you dislike anything about GoWrite's results, do change it.\n    - For example, I think it would look better to have black thicker lines around the White stones. So I simply would change White stones to have `.35` thickness: `stroke=\"black\" stroke-width=\"0.35px\"`.\n- If you want to open or convert the diagrams other formats, I recommend either using [GIMP](https://www.gimp.org/) or [Inkscape](https://inkscape.org/), which are both free.\n\n## EPUB Readers\n\nMost EPUB readers are incredibly unpleasant or ugly. The only ones I've found so far which are good enough:\n\n- [Thorium](https://github.com/edrlab/thorium-reader/releases)\n- [Lithium](https://play.google.com/store/apps/details?id=com.faultexception.reader\u0026hl=en\u0026gl=US)\n- [iBooks](https://www.apple.com/apple-books/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsygo%2Ftemplate_tsumego_ebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsygo%2Ftemplate_tsumego_ebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsygo%2Ftemplate_tsumego_ebook/lists"}