{"id":19826857,"url":"https://github.com/dedalozzo/converter","last_synced_at":"2025-05-01T14:31:44.470Z","repository":{"id":52725998,"uuid":"11926025","full_name":"dedalozzo/converter","owner":"dedalozzo","description":"A set of classes to translate a text from a HTML to BBcode and from BBCode to Markdown.","archived":false,"fork":false,"pushed_at":"2021-04-20T03:26:50.000Z","size":73,"stargazers_count":27,"open_issues_count":3,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-21T22:03:37.857Z","etag":null,"topics":["bbcode","bbcode-to-markdown","converter","html","html-to-bbcode","html-to-markdown","markdown","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dedalozzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-06T14:29:25.000Z","updated_at":"2025-02-15T19:15:42.000Z","dependencies_parsed_at":"2022-08-21T06:50:17.617Z","dependency_job_id":null,"html_url":"https://github.com/dedalozzo/converter","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalozzo%2Fconverter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalozzo%2Fconverter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalozzo%2Fconverter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalozzo%2Fconverter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dedalozzo","download_url":"https://codeload.github.com/dedalozzo/converter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251890090,"owners_count":21660445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bbcode","bbcode-to-markdown","converter","html","html-to-bbcode","html-to-markdown","markdown","php"],"created_at":"2024-11-12T11:11:44.424Z","updated_at":"2025-05-01T14:31:44.156Z","avatar_url":"https://github.com/dedalozzo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Latest Stable Version](https://poser.pugx.org/3f/converter/v/stable.png)](https://packagist.org/packages/3f/converter)\n[![Latest Unstable Version](https://poser.pugx.org/3f/converter/v/unstable.png)](https://packagist.org/packages/3f/converter)\n[![Build Status](https://scrutinizer-ci.com/g/dedalozzo/converter/badges/build.png?b=master)](https://scrutinizer-ci.com/g/dedalozzo/converter/build-status/master)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/dedalozzo/converter/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/dedalozzo/converter/?branch=master)\n[![License](https://poser.pugx.org/3f/converter/license.svg)](https://packagist.org/packages/3f/converter)\n[![Total Downloads](https://poser.pugx.org/3f/converter/downloads.png)](https://packagist.org/packages/3f/converter)\n\n\nConverter\n=========\nA set of classes to translate a text **from HTML to BBCode** and **from BBCode to Markdown**.\n\nThe HTML to BBCode converter, in particular, has not been created with the intent to convert an entire HTML page, but \njust to convert a set of HTML tags used to format articles and blog posts in the HTML era, when Markdown and BBcode \ndidn't exist at all.\n\nThe special BBCode to Markdown converter is able to convert: bold, italic, underline and strikethrough texts, lists, \nurls, images, quotes and even code blocks (snippets).\n\n\nComposer Installation\n---------------------\n\nTo install Converter, you first need to install [Composer](http://getcomposer.org/), a Package Manager for\nPHP, following these few [steps](http://getcomposer.org/doc/00-intro.md#installation-nix):\n\n```sh\ncurl -s https://getcomposer.org/installer | php\n```\n\nYou can run this command to easily access composer from anywhere on your system:\n\n```sh\nsudo mv composer.phar /usr/local/bin/composer\n```\n\n\nConverter Installation\n----------------------\nOnce you have installed Composer, it's easy install Converter.\n\n1. Edit your `composer.json` file, adding Converter to the require section:\n```sh\n{\n    \"require\": {\n        \"3f/converter\": \"dev-master\"\n    },\n}\n```\n2. Run the following command in your project root dir:\n```sh\ncomposer update\n```\n\n\nUsage\n-----\nThere are two classes: `HTMLConverter` and `BBCodeConverter`. The first class may be used to convert from HTML to\nBBCode, while the second one is used to convert from BBCode to Markdown.\n\nHTML to BBCode conversion:\n\n```php\n$converter = new Converter\\HTMLConverter($text, $id);\necho $converter-\u003etoBBCode();\n```\n\nBBCode to Markdown conversion:\n\n```php\n$converter = new Converter\\BBCodeConverter($text, $id);\necho $converter-\u003etoMarkdown();\n```\n\nIn both cases the `$id` is optional. When provided is used in case an exception is raised during the conversion process.\n\n\nDocumentation\n-------------\nThe documentation can be generated using [Doxygen](http://doxygen.org). A `Doxyfile` is provided for your convenience.\n\n\nRequirements\n------------\n- PHP 5.4.0 or above.\n\n\nAuthors\n-------\nFilippo F. Fadda - \u003cfilippo.fadda@programmazione.it\u003e - \u003chttp://www.linkedin.com/in/filippofadda\u003e\n\n\nLicense\n-------\nConverter is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedalozzo%2Fconverter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdedalozzo%2Fconverter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedalozzo%2Fconverter/lists"}