やったこと
KivyでRSTをレンダリングできるらしいので試してみた。
ソースコード
試すだけなので簡単に実装
main.py
import kivy
from kivy.uix.widget import Widget
from kivy.app import App
class textImput(Widget):
def Text(self):
pass
class editorApp(App):
def build(self):
return textImput()
editorApp().run()
KVは以下の通り
editor.kv
<textImput>:
BoxLayout:
orientation: 'vertical'
size: 800, 600
TextInput:
id: txt_inpt
size_hint: 1, 5
text: ''
RstDocument:
text: txt_inpt.text
size_hint: 1, 5
show_errors: True
実行結果
画像はGetting StartedのRSTをとりあえず貼ってみた結果です。上がRST、下が結果。
レンダリングできているようです。
これは。多分、便利。
以上
試してみたでした。