Skip to content

attakei-lab/rst-budoux

Repository files navigation

rst-budoux

Badges https://readthedocs.org/projects/rst-budoux/badge/?version=stable

Text splitter in reStructuredText by BudouX.

https://raw.githubusercontent.com/attakei-lab/rst-budoux/main/mv.png

Overview

This is bridge library to docutils and budoux. You can break lines naturally when build contents from reStructuredText by using this.

See document for more information.

Usage

You can install from PyPI.

pip install rst-budoux

This provides also as Sphinx-extension, therefore it works to register into your conf.py.

extensions = [
    "rst_budoux.sphinx",
]

You want to use wihout Sphinx ? Please see document.

Example

This is example using psuedoxml outputs for "docutils only" and "with rst-budoux".

Example from BudouX
===================

あなたに寄り添う最先端のテクノロジー。
$ run rst2pseudoxml examples/budoux-sample-text.rst
<document ids="example-from-budoux" names="example\ from\ budoux" source="examples/budoux-sample-text.rst" title="Example from BudouX">
    <title>
        Example from BudouX
    <paragraph>
        あなたに寄り添う最先端のテクノロジー。
$ run rst-budoux2pseudoxml examples/budoux-sample-text.rst
<document ids="example-from-budoux" names="example\ from\ budoux" source="examples/budoux-sample-text.rst" title="Example from BudouX">
    <title>
        Example from BudouX
    <paragraph>
        あなたに
        <word-break>
        寄り添う
        <word-break>
        最先端の
        <word-break>
        テクノロジー。