{"id":21823821,"url":"https://github.com/onel/pinky","last_synced_at":"2025-03-21T11:43:22.424Z","repository":{"id":72081830,"uuid":"130745257","full_name":"onel/pinky","owner":"onel","description":"A python port of Zurb's Inky email Html template system","archived":false,"fork":false,"pushed_at":"2018-06-30T11:00:50.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T08:11:44.727Z","etag":null,"topics":["email-template","html"],"latest_commit_sha":null,"homepage":"https://github.com/zurb/inky","language":"Python","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/onel.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-23T19:19:44.000Z","updated_at":"2019-10-17T09:05:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"42e4a961-f4b4-4c52-b44e-ebc0eb37c85c","html_url":"https://github.com/onel/pinky","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onel%2Fpinky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onel%2Fpinky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onel%2Fpinky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onel%2Fpinky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onel","download_url":"https://codeload.github.com/onel/pinky/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244794895,"owners_count":20511516,"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":["email-template","html"],"created_at":"2024-11-27T17:38:06.859Z","updated_at":"2025-03-21T11:43:22.397Z","avatar_url":"https://github.com/onel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pinky\n\nInky is an HTML-based templating language that converts simple HTML into complex, responsive email-ready HTML. Designed for [Foundation for Emails](http://foundation.zurb.com/emails), a responsive email framework from [ZURB](http://zurb.com).\n\n**Inky is built for node, Pinky is just a python port for this great library.**\n\nGive Inky simple HTML like this:\n\n```html\n\u003crow\u003e\n  \u003ccolumns large=\"6\"\u003e\u003c/columns\u003e\n  \u003ccolumns large=\"6\"\u003e\u003c/columns\u003e\n\u003c/row\u003e\n```\n\nAnd get complicated, but battle-tested, email-ready HTML like this:\n\n```html\n\u003ctable class=\"row\"\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth class=\"small-12 large-6 columns first\"\u003e\n        \u003ctable\u003e\n          \u003ctr\u003e\n            \u003cth class=\"expander\"\u003e\u003c/th\u003e\n          \u003c/tr\u003e\n        \u003c/table\u003e\n      \u003c/th\u003e\n      \u003cth class=\"small-12 large-6 columns first\"\u003e\n        \u003ctable\u003e\n          \u003ctr\u003e\n            \u003cth class=\"expander\"\u003e\u003c/th\u003e\n          \u003c/tr\u003e\n        \u003c/table\u003e\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n```\n\n## Installation\nGit clone this repo and then install with pip locally\n```bash\ngit clone https://github.com/onel/pinky.git\npip install ./pinky\n```\n**COMING SOON: pip package**\n\n## Usage\n\nPinky can be used programatically or from the command line\n\n### Programmatic Use\n\n```py\nfrom pinky import Pinky\n\nhtml_string = '\u003chtml\u003e...\u003c/html\u003e'\nresult = Pinky.parse(html_string)\n```\n\n### Command Line\n```bash\npinky \"[html string]\"\n```\nThe command returns the resulted HTML string.\n\n## Under the hood\nPinky uses [BeautifulSoop4](https://pypi.org/project/beautifulsoup4/) (with the lxml option) to parse the received html string and then replace all the custom Inky tags with the proper html elements (table, tr, td, etc.).\n\nIn the second step is uses [Premailer](https://github.com/peterbe/premailer) to inline the CSS and minify the HTML.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonel%2Fpinky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonel%2Fpinky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonel%2Fpinky/lists"}