{"id":16679445,"url":"https://github.com/mischov/pearly","last_synced_at":"2025-04-09T22:32:32.167Z","repository":{"id":57549694,"uuid":"103458810","full_name":"mischov/pearly","owner":"mischov","description":"Pearly is an Elixir library for syntax highlighting using Sublime Text syntax definitions.","archived":false,"fork":false,"pushed_at":"2017-09-22T23:51:35.000Z","size":287,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-14T23:47:14.804Z","etag":null,"topics":["elixir","highlighting","syntax","syntect"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mischov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-09-13T22:36:10.000Z","updated_at":"2024-03-14T23:47:14.805Z","dependencies_parsed_at":"2022-09-01T07:11:33.192Z","dependency_job_id":null,"html_url":"https://github.com/mischov/pearly","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischov%2Fpearly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischov%2Fpearly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischov%2Fpearly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischov%2Fpearly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mischov","download_url":"https://codeload.github.com/mischov/pearly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248123817,"owners_count":21051537,"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":["elixir","highlighting","syntax","syntect"],"created_at":"2024-10-12T13:35:26.974Z","updated_at":"2025-04-09T22:32:32.140Z","avatar_url":"https://github.com/mischov.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pearly\n\n[![Build Status](https://travis-ci.org/mischov/pearly.svg?branch=master)](https://travis-ci.org/mischov/pearly)\n[![Pearly version](https://img.shields.io/hexpm/v/pearly.svg)](https://hex.pm/packages/pearly)\n\n\u003e Pearly Soames wanted gold and silver, but not, in the way of common thieves, for wealth. He wanted them because they shone and were pure. Strange, afflicted, and deformed, he sought a cure in the abstract relation of colors.\n\u003e -- \u003ccite\u003eMark Helprin, *Winter's Tale*\u003c/cite\u003e\n\nPearly is an Elixir library for syntax highlighting using Sublime Text syntax definitions.\n\n```elixir\nPearly.highlight(\"html\", \"\u003ch1\u003eHello, World!\u003c/h1\u003e\",\n  format: :html,\n  theme: \"Solarized (dark)\")\n#=\u003e {:ok, \"\u003cpre style=\\\"background-color:#002b36;\\\"\u003e\\n\u003cspan style=...\"}\n```\n\nPearly currently supports formatting output for either HTML pages or the terminal.\n\nSee [HexDocs](https://hexdocs.pm/pearly/Pearly.html) for additional documentation.\n\n## Dependencies\n\nPearly depends on the Rust library [Syntect](https://github.com/trishume/syntect), and you will need to have the Rust compiler [installed](https://www.rust-lang.org/en-US/install.html).\n\nAdditionally, one of Syntect's dependencies (onig) requires cmake to be installed.\n\n## Installation\n\nEnsure Rust and cmake are installed, then add Pearly to your `mix.exs`:\n\n```elixir\ndefp deps do\n  [\n    {:pearly, \"~\u003e 0.1.1\"}\n  ]\nend\n```\n\nFinally, run `mix deps.get`.\n\n## Roadmap\n\n  - [x] Highlight for HTML pages (styled `\u003cpre\u003e` tags)\n  - [x] Highlight for the terminal (24-bit color ANSI terminal escape sequences)\n  - [x] Provide Elixir and EEx syntaxes\n  - [ ] Support providing additional syntaxes\n  - [ ] Support providing additional themes\n  - [ ] Support additional and/or custom formatters\n\n## License\n\nPearly is licensed under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmischov%2Fpearly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmischov%2Fpearly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmischov%2Fpearly/lists"}