2017 © Pedro Peláez
 

library converter

A set of classes to translate a text from HTML to BBcode and from BBCode to Markdown.

image

3f/converter

A set of classes to translate a text from HTML to BBcode and from BBCode to Markdown.

  • Wednesday, November 29, 2017
  • by dedalozzo
  • Repository
  • 4 Watchers
  • 18 Stars
  • 3,022 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 9 % Grown

The README.md

Latest Stable Version Latest Unstable Version Build Status Scrutinizer Code Quality License Total Downloads, (*1)

Converter

A set of classes to translate a text from HTML to BBCode and from BBCode to Markdown., (*2)

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., (*3)

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)., (*4)

Composer Installation

To install Converter, you first need to install Composer, a Package Manager for PHP, following these few steps:, (*5)

curl -s https://getcomposer.org/installer | php

You can run this command to easily access composer from anywhere on your system:, (*6)

sudo mv composer.phar /usr/local/bin/composer

Converter Installation

Once you have installed Composer, it's easy install Converter., (*7)

  1. Edit your composer.json file, adding Converter to the require section:
{
    "require": {
        "3f/converter": "dev-master"
    },
}
  1. Run the following command in your project root dir:
composer update

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., (*8)

HTML to BBCode conversion:, (*9)

$converter = new Converter\HTMLConverter($text, $id);
echo $converter->toBBCode();

BBCode to Markdown conversion:, (*10)

$converter = new Converter\BBCodeConverter($text, $id);
echo $converter->toMarkdown();

In both cases the $id is optional. When provided is used in case an exception is raised during the conversion process., (*11)

Documentation

The documentation can be generated using Doxygen. A Doxyfile is provided for your convenience., (*12)

Requirements

  • PHP 5.4.0 or above.

Authors

Filippo F. Fadda - filippo.fadda@programmazione.it - http://www.linkedin.com/in/filippofadda, (*13)

License

Converter is licensed under the Apache License, Version 2.0 - see the LICENSE file for details., (*14)

The Versions

29/11 2017

dev-master

9999999-dev https://github.com/dedalozzo/converter

A set of classes to translate a text from HTML to BBcode and from BBCode to Markdown.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

html markdown formatter translator converter bbcode

05/06 2017

1.5

1.5.0.0 http://github.com/dedalozzo/Converter

A set of classes to translate a text from HTML to BBcode and from BBCode to Markdown.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

html markdown formatter translator converter bbcode

06/08 2016

1.4

1.4.0.0 http://github.com/dedalozzo/Converter

A set of classes to translate a text from HTML to BBcode and from BBCode to Markdown.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

html markdown formatter translator converter bbcode

28/04 2016

1.3

1.3.0.0 http://github.com/dedalozzo/Converter

A set of classes to translate a text from HTML to BBcode and from BBCode to Markdown.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

html markdown formatter translator converter bbcode

24/04 2015

1.2

1.2.0.0 http://github.com/dedalozzo/Converter

A set of classes to translate a text from HTML to BBcode and from BBCode to Markdown.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

html markdown formatter translator converter bbcode

08/03 2015

1.1

1.1.0.0 http://github.com/dedalozzo/Converter

A set of classes to translate a text from HTML to BBcode and from BBCode to Markdown.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

html markdown formatter translator converter bbcode

25/02 2015

1.0

1.0.0.0 http://github.com/dedalozzo/Converter

A set of classes to translate a text from HTML to BBcode and from BBCode to Markdown.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

html markdown formatter translator converter bbcode