===============================================================
sphinx-docxbuilder
An extension for a docx file generation with Sphinx-1.1.2
Copyright(c) 2011, haraisao at gmail dot com
===============================================================
About this
==========
This programs is an extension to generate a docx file with Sphinx-1.1.2.
This extension is developed by hacking both 'sphinxcontrib-docxbuilder' and 'python-docx'.
Special thanks to Mike MacCana and Takayuki SHIMIZUKAWA.
Information
=============
Auther: Isao Hara
Home Page: https://bitbucket.org/haraisao/sphinx-docxbuilder/
Keywords: sphinx,extension,builder,docx,OpenXML
License: MIT
Files
=====
This program is consist of following files.
* builder.py
This file defined a builder class for Sphinx-1.1.2. This file is copyed from sphinx-docxbuilder's one.
* writer.py
This file defined a writer class for Sphinx-1.1.2. This file is modified sphinx-docxbuilder's.
* highlight.py
This file defined DocxFormatter and DocxPygmentsBridge to support highlighting in the literal block.
* docx/docx.py
This file defined two classes to manipulate a docx file.
* docx/style.docx
This is a default style file.
If you customize a docx document when you generate sphinx-docxbuilder, please copy this file in a local directory and modify styles with MS Word.
* contrib/quickstart.py
This is for 'sphinx-quickstart' command to add some definitions for 'sphinx-docxbuilder'.
Please replace the original one.
* contrib/exportDocx.py contrib/restructDocx.py
These are sample command to export/restruct docx file.
Requirements
=============
* Python2.6 or later
* lxml module
* PIL(Python Imaging Library) module
* Optionally, you need MS Word 2007 or later to modify a style file.
Features
==========
Currently it works followings:
* Headings
* Bullet List
* Enumerated Lists
* Definition Lists
* Field Lists (simple text only)
* Literal Blocks
* High Lighing in Literal Blocks
* Line Blocks
* Block Quotes
* Option Lists (simple text only)
* Simple table and csv table
* Images
* Admonitions
* Basic Inline Markups
Known issue
============
Many sphinx syntaxes and directives aren't tested yet.
Quick Start
=============
Setup
-----
First of all, download or hg clone sphix-docxbuilder archive and extract all files into $(SPHINX_EGG_DIR)/sphinx-docxbuilder .
Usage
Set 'sphinx-docxbuilder' to 'extensions' line of target sphinx source
conf.py ::
extensions = ['sphinx-docxbuilder']
Execute sphinx-build with below option ::
$ sphinx-build -b docx [input-dir] [output-dir]
Customize Style file
---------------------
If you want to customize output file, only you have to do is to change named styles in 'sphinx-doc/docx/style.docx' .
Customize document properties
-----------------------------
sphinx-docxbuilder support to customize document properties. Currently, you can set 'title','subject','creator','company','category','descriptions','keyword' to append expressions to 'conf.py'.
For example, to set the creator and the keyword properties, you add follows ::
docx_creator = 'Isao HARA'
docx_keywords = ['Sphinx', 'OpenXML']
Futhermore, you can use your original style file to set following expressions to 'conf.py'. ::
docx_style = 'MyStyle.docx'
Metadata
Release files for sphinx-docxbuilder 2019.1.28.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_docxbuilder-2019.1.28.post1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / sphinx_docxbuilder-2019.1.28.post1-py3-none-any.whl
| Download URL | sphinx_docxbuilder-2019.1.28.post1-py3-none-any.whl |
|---|---|
| Size | 75.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d8253e94db92ce9421ee761f4eebe38ac7f81acedc8f68d338f99cd73572d9e
|
|
BLAKE2b-256 checksum How to use checksums |
5f11235beae40f0f1ec79a4e9f1430bca0319812b06efdd1bcf8e1747d08caa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
|