{"id":44206172,"url":"https://github.com/mherkazandjian/docxsphinx","last_synced_at":"2026-02-09T23:07:16.546Z","repository":{"id":23785124,"uuid":"98816897","full_name":"mherkazandjian/docxsphinx","owner":"mherkazandjian","description":"Generate word documents from sphinx documentation","archived":false,"fork":false,"pushed_at":"2024-11-17T06:04:48.000Z","size":603,"stargazers_count":30,"open_issues_count":38,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-22T14:34:23.693Z","etag":null,"topics":["docx","docx-generator","microsoft","python3","python36","sphinx","sphinx-doc","word"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mherkazandjian.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":"2017-07-30T18:26:44.000Z","updated_at":"2025-05-18T17:29:36.000Z","dependencies_parsed_at":"2024-11-17T07:18:58.063Z","dependency_job_id":"170270fe-2026-4b77-86a1-b4bca897317a","html_url":"https://github.com/mherkazandjian/docxsphinx","commit_stats":{"total_commits":110,"total_committers":2,"mean_commits":55.0,"dds":0.4818181818181818,"last_synced_commit":"866198a947a7764066801ea0d1eb57947ad74332"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mherkazandjian/docxsphinx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherkazandjian%2Fdocxsphinx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherkazandjian%2Fdocxsphinx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherkazandjian%2Fdocxsphinx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherkazandjian%2Fdocxsphinx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mherkazandjian","download_url":"https://codeload.github.com/mherkazandjian/docxsphinx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherkazandjian%2Fdocxsphinx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29284874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T21:57:15.303Z","status":"ssl_error","status_checked_at":"2026-02-09T21:57:11.537Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docx","docx-generator","microsoft","python3","python36","sphinx","sphinx-doc","word"],"created_at":"2026-02-09T23:07:15.879Z","updated_at":"2026-02-09T23:07:16.540Z","avatar_url":"https://github.com/mherkazandjian.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DocxSphinx\n\n[![CircleCI](https://circleci.com/gh/mherkazandjian/docxsphinx/tree/master.svg?style=svg)](https://circleci.com/gh/mherkazandjian/docxsphinx/tree/master)\n\nIntroduction\n============\nThis repository has been forked from\n\n   https://bitbucket.org/shimizukawa/sphinxcontrib-docxbuilder\n\nand some heavy modification have been done. The major changes are listed in\nthe release notes (`todo` add the release notes).\n\nInstallation\n============\nThe latest bleeding edge version can be installed through\n\n   ```\n   pip install docxsphinx\n   ```\n\nTo install the development version\n\n   ```\n   pip install git+https://github.com/mherkazandjian/docxsphinx.git@master\n   ```\n\nAlternatively the repository can be cloned and installed locally\n\n   ```\n   git clone https://github.com/mherkazandjian/docxsphinx.git\n   cd docxsphinx\n   python -m pip install -r requirements.txt\n   python setup.py install\n   ```\n\nAfter installation, ```make docx``` in a sphinx project  should work\n(see next section)\n\nGenerating a `docx` document\n============================\nIt is assumed that a sphinx project already is in place. At least one change\nmust be done to `conf.py` in-order to be able to generate a docx file.\n\nThe following line must be added to `conf.py`:\n\n   ```\n   extensions = ['docxsphinx']\n   ```\n\nThe sample projects are in the directory `examples`\n\n  - REPO_ROOT/examples/sample_1 : default example (from the original repo)\n  - REPO_ROOT/examples/sample_2 : example tested with `make docx`\n  - REPO_ROOT/examples/sample_3 : example tested with `make docx` with a custom style\n\n\nWord styles\n===========\n\na custom word style file can be specified by adding\n\n    ```\n    # 'docx_template' need *.docx or *.dotx template file name. default is None.\n    docx_template = 'template.docx'\n    ```\n\nto the end of `conf.py` (or anywhere in the file)\n\nDevelopment\n===========\n\nSetup the development environment (make sure that pipenv is installed):\n\n   ```\n   pipenv install --dev        # creates the .venv dir\n   pipenv shell                # set the environment to use the venv \n   python setup.py install\n   make tests -B\n   ```\n\nwhenever changes are made the package needs to be re-installed through:\n\n   ```\n   python setup.py install\n   ```\n\nsince the tests are run using the commands ``sphinx-build`` that needs to be\nin the environment paths.\n\nThe tests can also be run using (but this is not recommended and will be\nremoved in the future):\n\n   ```\n   python setup.py test\n   ```\n \nTo debug the build process\n\n   ``` \n   python -m pdb $(which sphinx-build) -b docx /path/to/src/dir /path/to/build/dir OTHER_SPHINX_OPTIONS_IF_ANY\n   ```\n\nTo produce the ``.docx`` of any of the example files using the current\ndevelopment docxsphinx source, e.g. the sphixn project ``sample_2``:\n\n   ```\n   cd examples/sample_2\n   PYTHONPATH=../../src:$PYTHONPATH make docx -B\n   ```\n\nProfiling is useful to see which sections of the code are \nvisited in the module ``src/docxsphinx/writer.py``. For example\nto profile ``sample_2``, the following pattern can be used:\n\n   ```\n   PYTHONPATH=../../src:$PYTHONPATH python3 -m cProfile -s calls $(which sphinx-build) -M docx source build/docx/ | grep writer.py | awk '{print $6}' | sort \u003e calls\n   ```\n\nAPI\n===\nsee also \n\n    REPO_ROOT/src/README.md  (outdated - but useful)\n    REPO_ROOT/src/docxsphinx/docx/README.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmherkazandjian%2Fdocxsphinx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmherkazandjian%2Fdocxsphinx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmherkazandjian%2Fdocxsphinx/lists"}