Download the PHP package mtawil/converter without Composer
On this page you can find all versions of the php package mtawil/converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mtawil/converter
More information about mtawil/converter
Files in mtawil/converter
Package converter
Short Description A set of classes to translate a text from HTML to BBcode and from BBCode to Markdown.
License Apache-2.0
Homepage https://github.com/dedalozzo/converter
Informations about the package converter
Converter
A set of classes to translate a text from HTML to BBCode and from BBCode to Markdown.
The HTML to BBCode converter, in particular, has not been created with the intent to convert an entire HTML page, but just to convert a set of HTML tags used to format articles and blog posts in the HTML era, when Markdown and BBcode didn't exist at all.
The special BBCode to Markdown converter is able to convert: bold, italic, underline and strikethrough texts, lists, urls, images, quotes and even code blocks (snippets).
Composer Installation
To install Converter, you first need to install Composer, a Package Manager for PHP, following these few steps:
You can run this command to easily access composer from anywhere on your system:
Converter Installation
Once you have installed Composer, it's easy install Converter.
Run the following command in your project root dir:
Usage
There are two classes: HTMLConverter
and BBCodeConverter
. The first class may be used to convert from HTML to
BBCode, while the second one is used to convert from BBCode to Markdown.
HTML to BBCode conversion:
BBCode to Markdown conversion:
In both cases the $id
is optional. When provided is used in case an exception is raised during the conversion process.
Documentation
The documentation can be generated using Doxygen. A Doxyfile
is provided for your convenience.
Requirements
- PHP 5.4.0 or above.
Authors
Filippo F. Fadda - http://www.linkedin.com/in/filippofadda
Mohammad @Taweel - https://www.linkedin.com/in/maltawil
License
Converter is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.