{"id":18059417,"url":"https://github.com/9bow/sphinx-cjk-pdf","last_synced_at":"2025-04-05T11:42:26.482Z","repository":{"id":86212220,"uuid":"162509636","full_name":"9bow/sphinx-cjk-pdf","owner":"9bow","description":"Docker image for building PDF based on Sphinx reST files using CJK(Chinese, Japanese, Korean) fonts.","archived":false,"fork":false,"pushed_at":"2019-02-07T01:57:07.000Z","size":11966,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-02T23:41:51.273Z","etag":null,"topics":["chinese","cjk","docker-image","dockerfile","japanese","korean","pdf","sphinx","sphinx-cjk-pdf","sphinx-documentation","sphinx-extension"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/9bow/sphinx-cjk-pdf","language":"Dockerfile","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/9bow.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}},"created_at":"2018-12-20T01:23:08.000Z","updated_at":"2023-10-22T16:24:27.000Z","dependencies_parsed_at":"2023-04-20T23:25:10.916Z","dependency_job_id":null,"html_url":"https://github.com/9bow/sphinx-cjk-pdf","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9bow%2Fsphinx-cjk-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9bow%2Fsphinx-cjk-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9bow%2Fsphinx-cjk-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9bow%2Fsphinx-cjk-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/9bow","download_url":"https://codeload.github.com/9bow/sphinx-cjk-pdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332524,"owners_count":20921852,"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":["chinese","cjk","docker-image","dockerfile","japanese","korean","pdf","sphinx","sphinx-cjk-pdf","sphinx-documentation","sphinx-extension"],"created_at":"2024-10-31T03:22:11.354Z","updated_at":"2025-04-05T11:42:26.455Z","avatar_url":"https://github.com/9bow.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sphinx-CJK-PDF\n\n## Description\n* This is a docker image for building PDF based on [Sphinx](http://www.sphinx-doc.org/en/stable/) reST files in CJK(Chinese, Japanese, Korean) fonts.\n* Since [rst2pdf](https://github.com/rst2pdf/rst2pdf) does not supports Python3, I created this docker image to avoid using virtualenv every time.\n* In this image, only Korean fonts and settings are provided. (If you want to use other fonts, please read [the section](#Add-fonts) below.)\n* This docker image is running on the [webhippie](https://hub.docker.com/u/webhippie)'s [Sphinx container](https://github.com/dockhippie/sphinx) based on a [Python container](https://registry.hub.docker.com/u/webhippie/python/).\n\n\n## Prerequisite\n* Could get/run docker image/container.\n* Should have sphinx documents to build.\n\n\n## Quick Start\n* Setup Sphinx's configurations in `conf.py`.\n  ```python\n    # Add rst2pdf extension\n    extensions = ['rst2pdf.pdfbuilder']\n    # A comma-separated list of each document.\n    # - index document name(index.rst)\n    # - filename of the pdf\n    # - document title, this will show on first page of pdf\n    # - author name, this also show on first page\n    pdf_documents = [('index', u'PDF-Filename', u'Document Title', u'Author'),]\n    # A comma-separated list of custom styles\n    pdf_stylesheets = ['sphinx', 'kerning', 'a4', 'ko']\n    # Language to be used for hyphenation support\n    pdf_language = \"ko\"\n  ```\n* Copy this repo's language config file(`samples/ko.json`) to Sphinx's root directory. (Sphinx's `conf.py` should be located same directory.)\n* Get docker image \u0026\u0026 Run container using Sphinx document.\n  ```sh\n    docker pull 9bow/sphinx-cjk-pdf:latest\n    docker run -it -v /somehwere/sphinx/root:/docs 9bow/sphinx-cjk-pdf\n  ```\n* Done. You can find pdf file on `_build/pdf/` under Sphinx's document root directory.\n\n\n## Add fonts\n* Add new fonts to `rootfs/usr/share/fonts`. Then, modify language config file (eg. `samples/ko.json`) to use those fonts.\n* OR, use other fonts by attaching volume. Add `-v /somewhere/fonts/located:/usr/share/fonts`. (`/somewhere/fonts/located` should be replaced.)\n  ```sh\n    docker run -it -v /somehwere/sphinx/root:/docs -v /somewhere/fonts/located:/usr/share/fonts 9bow/sphinx-cjk-pdf\n  ```\n\n\n## Install Sphinx dependencies\n* If you have any dependencies for Sphinx, just modify `Dockerfile` to build new image.\n* OR, just adding `/bin/bash` for installing dependencies once on the container. (not applied on image)\n  ```sh\n    docker run -it -v /somehwere/sphinx/root:/docs 9bow/sphinx /bin/bash\n  ```\n\n\n## Base Docker images\n* [webhippie/sphinx](https://github.com/dockhippie/sphinx)\n* [webhippie/python](https://github.com/dockhippie/python)\n* [webhippie/alpine](https://github.com/dockhippie/alpine)\n\n\n## Contributing\n* Fork -\u003e Patch -\u003e Push -\u003e [Pull Request](https://github.com/9bow/sphinx-cjk-pdf/pulls)\n* If you have any free fonts, feel free to add them in `rootfs/usr/share/fonts` and add language config.\n\n\n## Authors\n* [Junghwan Park](https://github.com/9bow)\n\n\n## License\n* MIT\n* [OFL](https://scripts.sil.org/OFL) ([Naver Nanum fonts]((https://hangeul.naver.com/2017/nanum)))\n\n\n## References\n* [Language specific configuration on Sphinx](https://tk0miya.hatenablog.com/entry/20111208/p1)\n* [Korean Nanum fonts by Naver corp.](https://hangeul.naver.com/2017/nanum)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9bow%2Fsphinx-cjk-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F9bow%2Fsphinx-cjk-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9bow%2Fsphinx-cjk-pdf/lists"}