Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: formiko
3 Version: 2.0.0
4 Summary: Formiko is reStructuredText and MarkDown editor and live previewer.
5 Author-email: Ondrej Tuma <[email protected]>
6 License-Expression: BSD-3-Clause
7 Project-URL: Homepage, https://formiko.zeropage.cz
8 Keywords: doc,html,rst,docutils,md,markdown,editor
9 Classifier: Development Status :: 5 - Production/Stable
10 Classifier: Environment :: X11 Applications :: GTK
11 Classifier: Intended Audience :: Developers
12 Classifier: Intended Audience :: End Users/Desktop
13 Classifier: Natural Language :: English
14 Classifier: Operating System :: OS Independent
15 Classifier: Programming Language :: Python :: 3
16 Classifier: Topic :: Documentation
17 Classifier: Topic :: Software Development :: Documentation
18 Classifier: Topic :: Text Editors :: Documentation
19 Classifier: Topic :: Text Editors :: Text Processing
20 Classifier: Topic :: Text Processing
21 Classifier: Topic :: Text Processing :: Markup
22 Classifier: Topic :: Text Processing :: Markup :: HTML
23 Classifier: Topic :: Utilities
24 Description-Content-Type: text/x-rst
25 License-File: COPYING
26 License-File: AUTHORS
27 Requires-Dist: docutils>=0.12
28 Requires-Dist: jsonpath-ng
29 Provides-Extra: extra
30 Requires-Dist: pynvim; extra == "extra"
31 Requires-Dist: m2r2; extra == "extra"
32 Requires-Dist: Pygments; extra == "extra"
33 Requires-Dist: docutils-tinyhtmlwriter; extra == "extra"
34 Requires-Dist: docutils-htmlwriter; extra == "extra"
35 Requires-Dist: docutils-html5-writer; extra == "extra"
36 Dynamic: license-file
37
38 Formiko
39 =======
40
41 :author: Ondřej Tůma <[email protected]>
42 :contributors: `The Formiko Team <https://github.com/ondratu/formiko/blob/master/formiko/data/AUTHORS>`_
43
44 Formiko is a reStructuredText and MarkDown editor and live previewer. It is
45 written in Python with Gtk4, GtkSourceView and WebKit. It uses Docutils and a
46 MarkDown-to-reStructuredText converter. If you want to **donate** to the
47 development, you can do so via the `paypal link <https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=4F4EJ3SV8JGYJ&item_name=Formiko+editor&currency_code=EUR&amount=5&source=url>`_.
48
49 Features:
50 ---------
51 * GtkSourceView based editor with syntax highlighting
52 * optional Vim editor support
53 * vertical or horizontal window splitting
54 * preview mode with auto scroll
55 * periodic save file
56 * json and html preview
57 * spell check
58 * linked file opening
59
60 It supports these parsers and writers:
61
62 * Docutils reStructuredText parser - https://www.docutils.org
63 * MarkDown to reStructuredText convertor (M2R2) -
64 https://github.com/crossnox/m2r2
65 * Docutils HTML4, HTML5, S5/HTML slide show and PEP HTML writer -
66 http://docutils.sourceforge.net
67 * Tiny HTML writer - https://github.com/ondratu/docutils-tinyhtmlwriter
68
69 Custom directives
70 ~~~~~~~~~~~~~~~~~
71 Formiko registers additional directives that are available in both
72 reStructuredText and MarkDown (via M2R2) documents.
73
74 ``.. file-tree:: <path>``
75 Renders a directory tree rooted at *path* (relative to the source file)
76 as a bullet list.
77
78 Options:
79
80 ``:depth: <n>``
81 Maximum display depth. Default is ``2``.
82 ``:include: <pattern>``
83 Show only files matching the glob pattern (e.g. ``*.md``).
84 Directories with no matching files are hidden automatically.
85 ``:exclude: <pattern>``
86 Hide files matching the glob pattern. Applied after ``:include:``.
87 ``:links:``
88 Turn file names into hyperlinks pointing to the files,
89 with paths relative to the source document.
90
91 Example::
92
93 .. file-tree:: docs
94 :depth: 3
95 :include: *.rst
96 :links:
97
98 ``.. mdinclude:: <file>``
99 Includes a Markdown file and converts it to reStructuredText inline.
100 Requires `m2r2 <https://github.com/crossnox/m2r2>`_. The directive is
101 intended for Markdown files, but works in RST documents as well.
102
103 Options:
104
105 ``:start-line: <n>``
106 Start reading the file from line *n*.
107 ``:end-line: <n>``
108 Stop reading the file at line *n*.
109
110 Example::
111
112 .. mdinclude:: CONTRIBUTING.md
113 :start-line: 3
114
115 Vim support
116 ~~~~~~~~~~~
117 Formiko has Neovim editor support aka ``formiko-vim`` command. This runs `Neovim
118 <https://neovim.io/>`_ editor in Vte.Terminal.
119
120 Requirements:
121 -------------
122 * Python 3
123 * GTK 4
124 * gobject-introspection
125 * PyGObject
126 * WebKitGTK 6.x
127 * GtkSourceView 5.x
128 * libspelling 1.x
129 * gir files for all Gtk libraries
130 * vte - neovim support
131 * docutils - reStructuredText support
132 * jsonpath-ng - JSON Search path support
133
134 recommended:
135 ~~~~~~~~~~~~
136 * m2r2 - converting MarkDown to reStructuredText
137 * Pygments - syntax color in html output code blocks
138 * docutils-tinyhtmlwriter - Tiny HTML Writer
139
140 **formiko-vim**:
141
142 * vte - Terminal emulator widget
143 * neovim - heavily refactored vim fork
144 * pynvim - Python3 library for scripting Neovim processes
145
146 development:
147 ~~~~~~~~~~~~
148
149 * pygobject-stubs
150
151 Installation
152 ------------
153
154 Flatpak
155 ~~~~~~~
156 Formiko exists in the Flathub repository as cz.zeropage.Formiko. If you are new with
157 Flatpak, see `setup guide <https://flatpak.org/setup/>`_.
158
159 .. code:: sh
160
161 # add Flathub repository as root
162 flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
163
164 # install Formiko as user
165 flatpak install flathub cz.zeropage.Formiko
166
167 # run Formiko
168 flatpak run cz.zeropage.Formiko
169
170 Debian based
171 ~~~~~~~~~~~~
172 Debian-based distributions sometimes use versions in package names. Here is an
173 example for the Debian Forky version. If you use a different version, your
174 gtksource or webkit2 may have a different version name.
175
176 .. code:: sh
177
178 # python3, gtk4 etc are in dependencies
179 apt install python3-pip python3-gi python3-docutils python3-jsonpath-ng \
180 python3-pygments gir1.2-gtksource-5 gir1.2-webkit-6.0 \
181 gir1.2-spelling-1 gir1.2-adw
182
183 pip3 install formiko --break-system-packages
184
185 # languages
186 apt install hunspell-en-us # or other language you want
187
188 # neovim
189 apt install gir1.2-vte-3.91 neovim python3-pynvim
190
191 NetBSD
192 ~~~~~~
193 **Broken at this moment - the WebKit with GTK4 and the libspelling packages are not available at this moment**
194
195 Installation process can be different for each BSD releases. It's about which
196 Python release is default. By this, you can change ``py313`` to your right
197 version.
198
199 NetBSD use pkgsrc, so some binaries are stored in ``/usr/pkg/bin`` directory.
200 Formiko call neovim directly. If you want to use neovim version with
201 pkgsrc, you must fix ``VIM_PATH`` variable in ``formiko/vim.py`` file.
202
203 .. code:: sh
204
205 # python3.13 is in dependencies, as is gtk4
206 pkgin install py313-pip py313-gobject3 py313-docutils gtksourceview5 \
207 libadwaita librsvg webkit-gtk
208 pip3.6 install jsonpath-ng formiko
209
210 # optionally
211 pkgin install neovim pynvim
212 pip3.6 install m2r2 docutils-tinyhtmlwriter
213
214 FreeBSD
215 ~~~~~~~
216
217 Installation process can be different for each BSD releases. It's about which
218 Python release is default. By this, you can change ``py311`` to your right
219 version.
220
221 On FreeBSD you must install all these packages:
222
223 .. code:: sh
224
225 pkg install py311-pygobject py311-docutils py311-pygments py311-pip \
226 gtksourceview5 webkit2-gtk_60 libspelling py311-jsonpath-ng \
227 libadwaita
228
229 pip-3.11 install formiko
230
231
232
233 **Optionally**
234
235 .. code:: sh
236
237 # MarkDown, and tiny writer support
238 pip-3.11 install m2r2 docutils-tinyhtmlwriter
239
240 # languages
241 pkg install en-hunspell # or other language you want
242
243 # neovim
244 pkg install vte3 neovim py311-pynvim py311-typing-extensions