Formiko, a structured text editor for Python documentation

About formiko

In the next article we are going to take a look at Formiko. This is a small editor built with Python that I found by chance on GitHub. Formiko is an app restructuredtext with a MarkDown editor and preview to check the progress of the work done.

ReStructuredText is part of the Docutils project and is used by Python programmers to create technical documentation. I am sure there will be many people who have never heard of reStructuredText, but through this program and some basic concepts you will see that it is easy to use this syntax system. The program is written in Python with Gtk3, GtkSourceView, and Webkit2. Use Docutils and recommonmark Common Mark Parser.

It has to be said that Markdown and reStructuredText have similar capabilities. As a difference, it should be noted that reStructuredText is designed to create documentation, supports tables and footnotes and endnotes.

ReStructuredText is an easy-to-read parser and syntax system. It is useful for online program documentation, Python document strings, for quickly creating simple web pages, and for stand-alone documents. The reStructuredText parser is a component of Docutils and is a revision and reinterpretation of the StructuredText and Setext lightweight markup systems.

General characteristics of Formiko

foriko gtk

Formiko

According to the project's GitHub page, Formiko includes the following features:

  • I posed an editor based on GtkSourceView with syntax highlighting and a Vim editor.
  • We go divide the work area vertically or horizontally.
  • Offers a preview mode to see how the work is.
  • JSON and preview of HTML.
  • Spell check.

It is also compatible with:

Installing Formiko on Ubuntu

For this article I will install Formiko on Ubuntu 18.04. We will find this program available for Debian and BSD as we can see in its GitHub page.

Formiko Vim project

Formiko vim

Requirements

Before proceeding with the installation, it must be said that according to their GitHub page, we are going to have to fix some requirements which asks the program to function correctly when we install it with pip3.

  • python 2.7 or 3
  • GTK+3
  • gobject-introspection
  • PyGObject
  • web kit
  • GtkSourceView

We open a terminal (Ctrl + Alt + T) and write:

sudo apt install python3-pip python3-gi python3-docutils gir1.2-gtksource-3.0 \
gir1.2-webkit2-4.0 gir1.2-gtkspell3-3.0

I want to clarify again that I am doing this installation on Ubuntu 18.04. Once the requirements are fulfilled, we will see that the installation of the program will be done through pip or apt as we are interested. For use pip3 in the installation we will write in the terminal (Ctrl + Alt + T):

pip3 install formiko

In case you prefer use apt, in the same terminal we write:

apt formiko installation

sudo apt update && sudo apt install formiko

It must be said that both installations will provide us with the same version of the program. Optionally we can also install:

sudo apt install vim-gtk3
pip3 install docutils-tinyhtmlwriter recommonmark docutils-html5-writer

When we install it, two entries will be added to the application menu: Formiko y Formiko vim.

Formiko launcher and Formiko Vim

We will have to find the one that best suits our needs.

Uninstall Formiko

As we have seen two installation options, we will also see two commands to remove the program from our operating system.

The first of the commands will be the one referring to the installation done with pip3. To eliminate the program we are going to open a terminal (Ctrl + Alt + T) and write in it:

sudo pip3 uninstall formiko

Now we will see the command for those who chose the installation with apt. In a terminal (Ctrl + Alt + T) we write:

sudo apt purge formiko && sudo apt autoremove

It may not be the best of the programs for its function, but I have to say that Formiko worked without any problems while I have tested it. I do not want to end without first talking about what is perhaps the biggest black point of this program, the format limitation with which allows us to work

More information about this program can be obtained on the page of Project GitHub.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.