{"id":19289433,"url":"https://github.com/adamlc/premailer-cli-wrapper","last_synced_at":"2025-04-22T05:31:19.614Z","repository":{"id":16129535,"uuid":"18874796","full_name":"adamlc/premailer-cli-wrapper","owner":"adamlc","description":"PHP CLI wrapper for https://github.com/premailer/premailer","archived":false,"fork":false,"pushed_at":"2014-11-03T18:56:19.000Z","size":202,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T20:00:04.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamlc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-17T10:30:47.000Z","updated_at":"2015-06-13T02:20:33.000Z","dependencies_parsed_at":"2022-09-24T06:30:18.764Z","dependency_job_id":null,"html_url":"https://github.com/adamlc/premailer-cli-wrapper","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlc%2Fpremailer-cli-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlc%2Fpremailer-cli-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlc%2Fpremailer-cli-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlc%2Fpremailer-cli-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamlc","download_url":"https://codeload.github.com/adamlc/premailer-cli-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248557818,"owners_count":21124167,"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":[],"created_at":"2024-11-09T22:15:03.659Z","updated_at":"2025-04-22T05:31:19.608Z","avatar_url":"https://github.com/adamlc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Premailer CLI Wrapper\n=====================\n\nThis library is a PHP CLI wrapper for [Premailer](https://github.com/premailer/premailer). Premailer is a tool to inline all of your CSS to ensure best compatibility with email clients.\n\nPremailer is written in Ruby, but can be accessed via a CLI. You will first need to install the Rubygem:\n\n```bash\nsudo gem install premailer\n```\n\n\n## Install via Composer\n\nTo install AddressFormat as a Composer package add this to your composer.json:\n\n```json\n\"adamlc/premailer-cli-wrapper\": \"0.0.*\"\n```\n\nRun `composer update`\n\n\n## Usage Instructions\n\nWARNING! This library currently doesn't have any unit tests and very much error checking. It will develop over time as I begin to use it in Production.\n\n```php\n\u003c?php\n\nuse Adamlc\\Premailer\\Command;\nuse Adamlc\\Premailer\\Email;\n\n//Path to Premailer Binary\n$command = new Command('/usr/bin/premailer');\n\n//Create a new email instance, passing the Command instance\n$email = new Email($command);\n\n//Set the body of the Email\n$email-\u003esetBody('\u003ch1\u003eHello world\u003c/h1\u003e');\n\n//Get the parsed body of the email\n$html = $email-\u003egetHtml();\n$text = $email-\u003egetText();\n\n```\n\nThats pretty much it!\n\n##TODO\n* Write some unit tests.\n* Error checking / Exceptions\n* Use filesystem abstraction library\n* Additional Premailer options. Such as remove scripts etc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamlc%2Fpremailer-cli-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamlc%2Fpremailer-cli-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamlc%2Fpremailer-cli-wrapper/lists"}