{"id":15503167,"url":"https://github.com/johno/shtml","last_synced_at":"2025-04-22T23:22:33.556Z","repository":{"id":57359035,"uuid":"62075979","full_name":"johno/shtml","owner":"johno","description":"[WIP] Style shell output in an html-like fashion","archived":false,"fork":false,"pushed_at":"2016-07-08T00:33:46.000Z","size":13,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-24T17:41:16.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/johno.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":"2016-06-27T17:50:25.000Z","updated_at":"2020-03-29T23:15:24.000Z","dependencies_parsed_at":"2022-09-06T22:21:53.173Z","dependency_job_id":null,"html_url":"https://github.com/johno/shtml","commit_stats":null,"previous_names":["johnotander/shtml"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fshtml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fshtml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fshtml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fshtml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johno","download_url":"https://codeload.github.com/johno/shtml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250338520,"owners_count":21414203,"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-10-02T09:12:22.983Z","updated_at":"2025-04-22T23:22:33.528Z","avatar_url":"https://github.com/johno.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shtml [![Build Status](https://secure.travis-ci.org/johnotander/shtml.svg?branch=master)](https://travis-ci.org/johnotander/shtml) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n\nStyle shell output in an html-like fashion.\nThis library draws inspiration from [chx](https://github.com/zeit/chx) but differs because it uses JavaScript template literals.\n\nRequires no transpilation or babelscript.\n\n## Installation\n\n```bash\nnpm install --save shtml\n```\n\n## Usage\n\n```javascript\nconst shtml = require('shtml')\n\nconsole.log(shtml`\n  \u003cul\u003e\n    \u003cli\u003eItem \u003cred\u003eA\u003c/red\u003e\u003c/li\u003e\n    \u003cli\u003eItem \u003crainbow\u003eB\u003c/rainbow\u003e\u003c/li\u003e\n  \u003c/ul\u003e\n`)\n\nconsole.log(shtml`\n  \u003cspan\u003e\n    \u003crainbow\u003eHello, world!\u003c/rainbow\u003e\u003cbr\u003e\n    \u003cunderline\u003eThis is pretty neat.\u003c/underline\u003e\n  \u003c/span\u003e\n`)\n```\n\n#### Supported tags\n\nTag | Usage | Description\n--- | ---   | -----------\n`\u003cp\u003e` | `\u003cp\u003e...\u003c/p\u003e` | Wrapper for text, adds a new line to the end\n`\u003cbr\u003e` | `\u003cbr\u003e` | Adds a newline\n`\u003chr\u003e` | `\u003chr\u003e` | Adds a horizontal rule\n`\u003cul\u003e` | `\u003cul\u003e\u003cli\u003eItem A\u003c/li\u003e\u003cli\u003eItem B\u003c/li\u003e\u003c/ul\u003e` | Adds an unordered list with bullet points\n`\u003ccolor\u003e` | `\u003cred\u003e...\u003c/red\u003e` | Color the text, see the [supported colors](#colors) below\n`\u003cbgcolor\u003e` | `\u003cbgcyan\u003e...\u003c/bgcyan\u003e` | Color the background of text, see the [supported colors](#colors) below\n`\u003crainbow\u003e` | `\u003crainbow\u003e...\u003c/rainbow\u003e` | Get rainbow colored text\n\n#### Colors\n\nIn order to color console text, `shtml` uses [`chalk`](https://npmjs.com/package/chalk).\nThe following colors are supported:\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n## License\n\nMIT\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nCrafted with \u003c3 by John Otander ([@4lpine](https://twitter.com/4lpine)).\n\n***\n\n\u003e This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fshtml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohno%2Fshtml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fshtml/lists"}