How to edit Wiki files without internet connection in your favorite editors

Wikipedia is perhaps the most enormous collaborative work project. It is, for that same reason, a free culture project that follows the same philosophy as free software.

If you are one of those who usually collaborate on wiki-like sites, like Wikipedia, you may miss editing articles without an internet connection, from your favorite text editors. Here we show you how to do it from Gedit, Kate / Kwrite and LibreOffice / OpenOffice.

Gedit

gedit is the default text editor in Ubuntu and other distros that use GNOME, and it is a tool that highlights the syntax of the code you are writing with colors, something very useful for programmers.

To make gedir highlight the MediaWiki code, I opened a terminal and typed:

wget http://www.jpfleury.net/site/fichiers/gedit-mediawiki/gedit-mediawiki.zip
unzip gedit-mediawiki.zip
mkdir -p ~ / .local / share / gtksourceview-2.0 / language-specs /
cp gedit-mediawiki / mediawiki.lang ~ / .local / share / gtksourceview-2.0 / language-specs /

The MediaWiki code that you edit in Gedit will be highlighted when you select the "MediaWiki" option in the application status bar.

Kate / Kwrite

Kate already comes with support for highlighting MediaWiki code. The problem is that, at least in my case, I had to edit a little thing for everything to work well.

The /usr/share/apps/katepart/syntax/mediawiki.xml file is the one that has the information on how to highlight the code in Kate. However, when editing it, the part where it says extensions appears empty. I tried saving a file with wiki code to see if it detected it but nothing. That was when it occurred to me to modify the extensions property to "* .wiki" and then save my wiki code in a file with that extension. Everything was great.

So what needs to be done is the following.

1.- Edit /usr/share/apps/katepart/syntax/mediawiki.xml

sudo nano /usr/share/apps/katepart/syntax/mediawiki.xml

Where it says extensions «», write extensions «* .wiki»

2.- Open a new file, write all the wiki code you want.

3.- Save the file and give it a ".wiki" extension.

Note: this change not only has an effect on Kate but also on Kwrite. 🙂

libreoffice

Wiki Publisher is an extension for LibreOffice / OpenOffice that allows you to generate MediaWiki articles without having to know the markup language. This is very useful not only to facilitate the creation of articles by those who do not want to learn the wiki language but also for those who do not have time to write code (come on, it is always easier to press a button than to put a phrase between million quotes and see where they start or end, etc.).

Wiki Publisher supports all the basic attributes: headings, links, lists, simple tables, bold, italic, etc. It also comes with support for images, provided they have been previously uploaded to the wiki server.

File> Export> Filter> Media Wiki (.txt)

Then, just open the generated txt file with any text editor and copy-paste the result in the editor of our wiki. It is also possible to send the article directly from LibreOffice / OpenOffice. Open the generated TXT file and navigate to File> Send> To MediaWiki… A dialog window will open in which you must enter the server data and the article you want to upload.

In Arch, this extension is in the extra repositories:

pacman -S libreoffice-extension-wiki-publisher

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.

  1.   Saito Mordraw said

    The wiki publisher is wonderful, you can easily edit wiki files.

    Excellent tips. Thanks = D

  2.   deousavelino said

    Good evening I would like to ask if it is not a lot of annoyance for you to talk a little about the distribution of GNU / Linux in Venezuela of the OS that has been made here but there is little Documentation we do not have a "what to do after installing Canaima" and I would like you to study it and You will publish news on your blog, please, here is the Canaima website in its latest stable version 3.0 that was launched yesterday. I hope a response from the moderators and people who work here and, if possible, thank you. try it out and I'll leave the rest in your hands. Thank you very much from Venezuela. My name is Avelino De Sousa, Computer Engineering student.

    Homepage: http://canaima.softwarelibre.gob.ve/

    Canaima 3.0 download page: http://canaima.softwarelibre.gob.ve/descargas/canaima/versiones/3.0