Skip to main content

A simple way to produce short-to-medium document using reStructuredText

Multi-format themes

Render the same document in HTML, ODT, PDF keeping the main visual identity

Unified interface
  • Tired of switching between rst2* tools having different arguments or behavior ?

  • Would like to not lose code-blocks or some rendering options switching the output format ?

This tool try to address this

Make your own theme

TODO: templates will be customizable easily (say, probably colors only)

How to use it

Dependencies

You’ll need rst2pdf to use all the features, other rst2* tools are coming from docutils.

Using

mkrst [-h] [--html] [--pdf] [--odt] [--theme THEME]
             [--themes-dir THEMES_DIR]
             FILE
optional arguments:
-h, --help

show this help message and exit

--html

Generate HTML output

--pdf

Generate PDF output

--odt

Generate ODT output

--theme THEME

Use a different theme

--themes-dir THEMES_DIR

Change the folder searched for theme

popo:~/2lazy2rest% ./mkrst test_page.rst --html --pdf
Using ./themes/default
  html:  test_page.html
   pdf:  test_page.pdf

Customizing

Make a copy of themes/default, edit to your needs the copy and use the –theme option with the name of your copy, that’s All !

Example

popo:~/2lazy2rest% cp -r themes/default themes/red
popo:~/2lazy2rest% sed -si 's/#FEFEFE/red/g' themes/red/html/stylesheet.css
popo:~/2lazy2rest% ./mkrst test_page.rst --html --theme red

Issues

  • ODT style is unfinished

  • PDF & HTML still needs more ReST coverage

  • No skin generation from template yet

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

2lazy2rest-0.2.2.tar.gz (4.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

2lazy2rest-0.2.2-py3-none-any.whl (4.9 MB view details)

Uploaded Python 3

File details

Details for the file 2lazy2rest-0.2.2.tar.gz.

File metadata

  • Download URL: 2lazy2rest-0.2.2.tar.gz
  • Upload date:
  • Size: 4.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.3 Linux/6.4.10-zen2-1-zen

File hashes

Hashes for 2lazy2rest-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b30dec3755f12ae88c6150bfd6a9cc8a8d34f72561cff807a3b89c42a133291e
MD5 86aa9959e4802bec05a457b50c594ab7
BLAKE2b-256 a45ad5cc6a44ad07b238717494b1c5b6d6cb20637abfc919754375ee572d9594

See more details on using hashes here.

File details

Details for the file 2lazy2rest-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: 2lazy2rest-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.3 Linux/6.4.10-zen2-1-zen

File hashes

Hashes for 2lazy2rest-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a145ee8745a26d0ab2926a5ea8c6334914acc2031be807a5236479f3deaa5e60
MD5 3ce20e6864ccba3c26b36f82994134d5
BLAKE2b-256 0c8dd4bd10005425a6213fabe556a6d0b098c3fa85d046420b398eff04632b9b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 files

0.1.2

2 files

0.1.1

3 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page