Code Monkey home page Code Monkey logo

rst2docx's Introduction

RST2DOCX

RST2DOCX is a tool written in Python used to format reStructuredText documentation to MS Word docx files.

File Tree

.
|-- LICENSE
|-- README.md
|-- ini
|   |-- img
|   |   |-- 488px-Snake-anatomy.svg.png
|   │   `-- EuroLuxemburgo.svg.png
|   |-- rst2docx.ini_OPENSRC
|   `-- tpl_rst2docx.docx
|-- tmp
|   |-- PYTHON-DOCX_Edition.docx
|   `-- PYTHON-DOCX_Edition.rst
`-- utils
    `-- rst2docx.py
  • The ini directory contains the configuration files:
    • img directory contains the images used in the MS Word template.
    • rst2docx.ini_OPENSRC is the skeleton of a required configuration file.
    • tpl_rst2docx.docx is an example of MS Word template.
  • The tmp directory contains a documentation about python-docx and some details about how to create a MS Word Template. This documentation is also used as an example of reStructuredText documentation and formatted DOCX file.
  • The utils directory contains the script to format reStructuredText documentation to MS Word docx files.

Prerequisites

To be able to use rst2docx, python3 and the python package python-docx should be installed.

Configuration Files

MS Word Template

The MS Word Template should be named tpl_rst2docx.docx and stored under ./ini/.

To learn more about how to modify this template or create your own, check the PYTHON-DOCX_Edition documentation under ./tmp/.

Variables File

The configuration rst2docx.ini contains required variables for the utility rst2docx.py.

The file ./ini/rst2docx.ini_OPENSRC is a skeleton of this file, copy it or rename it as ./ini/rst2docx.ini and adapt it with your own values.

Usage

usage: rst2docx.py [-h] [-s SRC]

Format documentation

optional arguments:
  -h, --help  show this help message and exit
  -s SRC      source file

The following configuration files are mandatory:

  • ./ini/rst2docx.ini
  • ./ini/tpl_rst2docx.docx

The formated DOCX file will be generated under ./tmp/.

Attribution

The images used in the MS Word template example are under the Creative Commons license:

Authors

  • Quentin Petit - Initial work

License

This project is licensed under the MIT License - see the LICENSE file for details

rst2docx's People

Contributors

qpe-y9d37y avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

aspnetcs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.