How To Install libtext-mediawikiformat-perl on Ubuntu 18.04

In this tutorial we learn how to install libtext-mediawikiformat-perl on Ubuntu 18.04. libtext-mediawikiformat-perl is module that converts Mediawiki markup into other text formats

Introduction

In this tutorial we learn how to install libtext-mediawikiformat-perl on Ubuntu 18.04.

What is libtext-mediawikiformat-perl

libtext-mediawikiformat-perl is:

Wikipedia and its sister projects use the PHP Mediawiki to format their pages. Text::MediawikiFormat attempts to duplicate the Mediawiki formatting rules. Those formatting rules can be simple and easy to use, while providing more advanced options for the power user. They are also easy to translate into other, more complicated markup languages with this module. It creates HTML by default, but could produce valid POD, DocBook, XML, or any other format imaginable.

The most important function is Text::MediawikiFormat::format(). It is not exported by default, but will be exported as wikiformat() if any options at all are passed to the exporter, unless the name is overridden explicitly. See “EXPORT” for more information.

It should be noted that this module is written as a drop in replacement for Text::WikiMarkup that expands on that modules functionality and provides a default rule set that may be used to format text like the PHP Mediawiki. It is also well to note early that if you just want a Mediawiki clone (you don’t need to customize it heavily and you want integration with a back end database), you should look at Wiki::Toolkit::Formatter::Mediawiki.

There are three methods to install libtext-mediawikiformat-perl on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libtext-mediawikiformat-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libtext-mediawikiformat-perl using apt-get by running the following command:

sudo apt-get -y install libtext-mediawikiformat-perl

Install libtext-mediawikiformat-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libtext-mediawikiformat-perl using apt by running the following command:

sudo apt -y install libtext-mediawikiformat-perl

Install libtext-mediawikiformat-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libtext-mediawikiformat-perl using aptitude by running the following command:

sudo aptitude -y install libtext-mediawikiformat-perl

How To Uninstall libtext-mediawikiformat-perl on Ubuntu 18.04

To uninstall only the libtext-mediawikiformat-perl package we can use the following command:

sudo apt-get remove libtext-mediawikiformat-perl

Uninstall libtext-mediawikiformat-perl And Its Dependencies

To uninstall libtext-mediawikiformat-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libtext-mediawikiformat-perl

Remove libtext-mediawikiformat-perl Configurations and Data

To remove libtext-mediawikiformat-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libtext-mediawikiformat-perl

Remove libtext-mediawikiformat-perl configuration, data, and all of its dependencies

We can use the following command to remove libtext-mediawikiformat-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libtext-mediawikiformat-perl

References

Summary

In this tutorial we learn how to install libtext-mediawikiformat-perl package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.