{"id":18809559,"url":"https://github.com/inversoft/prime-transformer","last_synced_at":"2025-04-13T20:27:29.793Z","repository":{"id":17225603,"uuid":"19994501","full_name":"inversoft/prime-transformer","owner":"inversoft","description":"Fast Java8 BBCode \u0026 HTML parser and transformation library.","archived":false,"fork":false,"pushed_at":"2023-04-15T19:43:11.000Z","size":511,"stargazers_count":14,"open_issues_count":2,"forks_count":4,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-04-08T17:19:02.657Z","etag":null,"topics":["bbcode","bbcode-parser","html-parser","java8"],"latest_commit_sha":null,"homepage":"http://www.inversoft.org","language":"Java","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/inversoft.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":"2014-05-20T19:31:43.000Z","updated_at":"2024-03-31T14:14:51.000Z","dependencies_parsed_at":"2022-09-11T20:30:27.025Z","dependency_job_id":null,"html_url":"https://github.com/inversoft/prime-transformer","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inversoft%2Fprime-transformer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inversoft%2Fprime-transformer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inversoft%2Fprime-transformer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inversoft%2Fprime-transformer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inversoft","download_url":"https://codeload.github.com/inversoft/prime-transformer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223602608,"owners_count":17171952,"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-parser","html-parser","java8"],"created_at":"2024-11-07T23:16:51.116Z","updated_at":"2024-11-07T23:16:51.630Z","avatar_url":"https://github.com/inversoft.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Prime Transformer ![semver 2.0.0 compliant](http://img.shields.io/badge/semver-2.0.0-brightgreen.svg?style=flat-square)\n\nPrime Transformer is a BBCode parser and transformation library. Additional implementations may be added support additional source or target markup languages.\nThe parser returns a light weight document object model of the source BBCode consisting mostly of index values and offsets that can be utilized by the transformer.\n\nPrime Transformer is actively developed and is being utilized in high performance commercial products.\n\n##### Example:\n\n```java\nString source = \"[b]Hello World![/b]\";\nDocument document = new BBCodeParser().buildDocument(source, null);\nString html = new BBCodeToHTMLTransformer().transform(document, (node) -\u003e {\n  // transform predicate, returning false will cause this node to not be transformed\n  return true;\n}, new HTMLTransformFunction(), null);\n\nAssert.assertEquals(html, \"\u003cstrong\u003eHello World!\u003c/strong\u003e\");\n```\n\nIn the above example, we also provided a transform function as the third parameter. This parameter is optional, but most users will wish to escape HTML characters.\nThis function is provided in the library, the caller can provide their own implementation as well.\n\n##### Features:\n* Written in Java 8\n* No regular expressions, implementation uses a finite state machine... it's fast\n* Supports tag attributes\n * Tag does not require a closing tag. (e.g. [*])\n * Tag has a pre-formatted body (e.g. [code] or [noparse])\n* Supports escape character.\n * Normal: ```[b]foo\\[/b]``` --\u003e **foo**\n * Escaped: ```\\[b]foo\\[/b]``` --\u003e ```[b]foo[/b]```\n \n\n### Download from Maven \n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.inversoft\u003c/groupId\u003e\n  \u003cartifactId\u003eprime-transformer\u003c/artifactId\u003e\n  \u003cversion\u003e2.1.4\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Building in Maven\n\n```bash\n$ mvn install\n```\n\n### Downloading from Savant\nReleased versions can be downloaded from the Savant Repository.\n \n * http://savant.inversoft.org/org/primeframework/prime-transformer/\n \n### Building in Savant\n**Note:** This project uses the Savant build tool. To compile using using Savant, follow these instructions:\n \n```bash\n$ mkdir ~/savant\n$ cd ~/savant\n$ wget http://savant.inversoft.org/org/savantbuild/savant-core/1.0.0/savant-1.0.0.tar.gz\n$ tar xvfz savant-1.0.0.tar.gz\n$ ln -s ./savant-1.0.0 current\n$ export PATH=$PATH:~/savant/current/bin/\n```\n\nThen, perform an integration build of the project by running:\n```bash\n$ sb int\n```\n\nFor more information, checkout [savantbuild.org](http://savantbuild.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finversoft%2Fprime-transformer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finversoft%2Fprime-transformer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finversoft%2Fprime-transformer/lists"}