{"id":18439082,"url":"https://github.com/demonstrandum/markupemail","last_synced_at":"2026-04-25T12:36:10.952Z","repository":{"id":96636342,"uuid":"97309046","full_name":"Demonstrandum/MarkupEmail","owner":"Demonstrandum","description":"Converting Markup to E-mails","archived":false,"fork":false,"pushed_at":"2017-09-24T12:28:01.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T15:18:12.569Z","etag":null,"topics":["email","html","markdown","markup","markup-converter","rst","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Demonstrandum.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":"2017-07-15T10:34:22.000Z","updated_at":"2017-07-18T11:41:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"02918499-dc05-44cc-a5c6-65fc42feaa8c","html_url":"https://github.com/Demonstrandum/MarkupEmail","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Demonstrandum/MarkupEmail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FMarkupEmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FMarkupEmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FMarkupEmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FMarkupEmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Demonstrandum","download_url":"https://codeload.github.com/Demonstrandum/MarkupEmail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FMarkupEmail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32262801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","html","markdown","markup","markup-converter","rst","ruby"],"created_at":"2024-11-06T06:23:18.958Z","updated_at":"2026-04-25T12:36:10.919Z","avatar_url":"https://github.com/Demonstrandum.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MarkupEmail\n\u003e Converting Markup to e-mails\n\n## Installation\nFrom [rubygems.org](https://rubygems.org/gems/markup-email)\n```shell\ngem install markup-email --no-ri --no-rdoc\n# Then use the executables\nmarkup-email [file] [options]\n```\nFrom source (without gems)\n```shell\ngit clone https://github.com/Demonstrandum/MarkupEmail.git \u0026\u0026 cd MarkupEmail\ncat *.gemspec # Read through and download all runtime dependencies\nruby -Ilib bin/markup-email [file] [options] # Then you can use the program\n```\n\n## Usage\nBasic usage:\n  `markup-email [markup file] [options]`\u003cbr /\u003e\n  e.g. `markup-email -s email.md -t 'Special E-mail'`\n\nOptions:\n\n| Option                | Description   |    \n| ----------------------|:-------------:|\n| `-s`, `--sanitize`    | Sanitizes all html/markdown by removing potentially harmful tags or their attributes        |\n| `-t`, `--title`       | The subsequent word/argument will be set as the title                                   |\n| `-h`, `--help, help`  | Brings up the help menu (similar as this)  |\n\n\nYour chosen markdown requires these packages accordingly:\n-   .markdown, .mdown, .mkdn, .md -- `gem install commonmarker`\n-   .textile -- `gem install RedCloth`\n-   .rdoc -- `gem install rdoc -v 3.6.1`\n-   .org -- `gem install org-ruby`\n-   .creole -- `gem install creole`\n-   .mediawiki, .wiki -- `gem install wikicloth`\n-   .rst -- `python3 -m pip install sphinx`\n-   .asciidoc, .adoc, .asc -- `gem install asciidoctor`\n-   .pod -- Pod::Simple::XHTML comes with Perl \u003e= 5.10.\n\nDelete the example `.html` in this repo's `examples` folder and generate it yourself\n```shell\n$ markup-email -s -t veryExampleWow examples/example.md\n\nTitle is    : veryExampleWow\nFilename is : veryExampleWow.html\n\nMarkup/HTML will be sanitized,\n(`class=...` attributes and \u003cscript\u003e tags will be disalowed).\n```\n### E-mail it\nThen open `examples/veryExampleWow.html` in your browser and see for yourself, then you can open it in a text-editor, view the source and copy it in to your e-mail editor as `HTML` source.\n\n## Add custom styling\nCreate a file named either: `.markup-email.css`, `.email.css`, `.markup.css` or `.markdown.css`\nin your home directory (`~`) edit it with an editor, e.g. vim: `vim ~/.email.css`\n\nAdd your custom css for your email in either one of these files.\n\ne.g.\n```css\nbody { width: 600px; } /* As opposed to 980px */\n\narticle, .markdown-body {\n  border-radius: 0; /* 5px */\n  padding: 20px;    /* 45px */\n}\n\n.markdown-body:first-child {\n  box-shadow: none; /* 0 10px 50px rgba(0, 0, 0, 0.2) */\n}\n```\nInspect the email/site in the browser to prototype and learn about how to style it.\n\n## In Ruby\n*Can* also be used in Ruby\n```ruby\nrequire 'markup_email'\n\nfile = '~/emails/hello.md' # Markup file path\ntitle = 'Hello, World' # Title of the email\n\nmarkup = MarkupEmail::Convert.new(file, title, sanitize)\nputs markup.content # Will print the pure HTML\n\nmarkup.write \"#{File.dirname file}/#{File.basename(file).split('.')[0..-2].join('.')}-converted.html\" # Makes a new file\n# If `file` was equal to \"hello.there.md\"\n# then the new file from `markup.write()` would be called\n# \"hello.there-converted.html\"\n```\nIf this is not sufficient, perhaps see the [rubydoc.info](http://www.rubydoc.info/gems/markup-email/1.2.4/) for autogenerated documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemonstrandum%2Fmarkupemail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdemonstrandum%2Fmarkupemail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemonstrandum%2Fmarkupemail/lists"}