This release is a pre-release and may not be stable for production use.
What is it ?
Odt2sphinx converts OpenDocument Text file(s) to one or several .rst files.
This is a fork of Christophe de Vienne odt2sphinx.
Install
pip install metapensiero.odt2sphinx
Usage
usage: odt2sphinx [-h] [--debug] [--download-source-link]
[--encoding ENCODING]
source [target]
ODT to RST
positional arguments:
source Source ODT file to be converted
target Either destination directory or single .rst target
filename
optional arguments:
-h, --help show this help message and exit
--debug Emit debug noise
--download-source-link
Add a link to the ODT source file
--encoding ENCODING Output encoding, by default UTF-8
Output files
There are two modes of operation:
Sphinx, splitting the source in multiple files, one per chapter
Monolithic single plain reST output
The first mode is selected by omitting the second positional argument, or giving it the name of a directory. The latter is selected by specifing a file name with a .rst extension as the second positional argument.
Multiple files mode
The files are generated in the target dir, which by default has the same name as the .odt file minus the extension.
At least one file, “index.rst”, will be written. Depending on the document content, additional rst files may be generated.
Images are extracted and put together in an “images” directory inside the targetdir.
Monolithic output mode
All the output goes into the single rst file specified as the second positional argument.
Images are extracted and put together in an “images” directory inside the directory containing the output file.
Styles mapping
The following rules will be applied to particulary styles when converting an .odt file. The style names are case-insensitive.
- “Title” (in any language)
Becomes the main document title (underlined with ‘=’)
- “Title 1”
Creates a new page named after the title, and becomes this page main title (underlined with ‘=’); a reference to this file is inserted in a .. toctree directive of the index.rst file
- “Title 2” to “Title 6”
Becomes sub-chapter titles, underlined respectively ‘-’, ‘~’, ‘^’, ‘”’, “’”
- “Warning” (or “Avertissement”)
The chapter becomes the content of a .. warning directive
- “Tip” (or “Trucs & Astuces”)
The chapter becomes the content of a .. tip directive
- “Note” or “Information”
The chapter becomes the content of a .. note directive
Metadata
Release files for metapensiero.odt2sphinx 1.0.dev20151105
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| metapensiero.odt2sphinx-1.0.dev20151105.tar.gz | 11.2 kB | Details |
Release files / metapensiero.odt2sphinx-1.0.dev20151105.tar.gz
| Download URL | metapensiero.odt2sphinx-1.0.dev20151105.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0ffe21baa00cb6ac9aa851a1218e0781aba9b821731a1b95516f037d320a800
|
|
BLAKE2b-256 checksum How to use checksums |
0bb1821a24e6c875b2fa381a363b49858ab8fc593d16893fdb98d6ab07d52e18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |