{"id":19607900,"url":"https://github.com/mkdoc/mkmsg","last_synced_at":"2025-04-27T20:32:28.708Z","repository":{"id":57298896,"uuid":"54029294","full_name":"mkdoc/mkmsg","owner":"mkdoc","description":"Message injection","archived":true,"fork":false,"pushed_at":"2016-04-18T03:58:37.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T22:56:25.094Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkdoc.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-03-16T12:19:14.000Z","updated_at":"2024-12-11T22:13:08.000Z","dependencies_parsed_at":"2022-08-26T18:12:39.535Z","dependency_job_id":null,"html_url":"https://github.com/mkdoc/mkmsg","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdoc%2Fmkmsg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdoc%2Fmkmsg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdoc%2Fmkmsg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdoc%2Fmkmsg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkdoc","download_url":"https://codeload.github.com/mkdoc/mkmsg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251204566,"owners_count":21552240,"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-11T10:12:53.826Z","updated_at":"2025-04-27T20:32:28.409Z","avatar_url":"https://github.com/mkdoc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Message\n\n[![Build Status](https://travis-ci.org/mkdoc/mkmsg.svg?v=3)](https://travis-ci.org/mkdoc/mkmsg)\n[![npm version](http://img.shields.io/npm/v/mkmsg.svg?v=3)](https://npmjs.org/package/mkmsg)\n[![Coverage Status](https://coveralls.io/repos/mkdoc/mkmsg/badge.svg?branch=master\u0026service=github\u0026v=3)](https://coveralls.io/github/mkdoc/mkmsg?branch=master)\n\n\u003e Append or prepend a message\n\nBy default appends a message to a stream, use the `message` option to change the message; to prepend set the `prepend` option.\n\nWhen no message is given the default generator message is used.\n\n## Install\n\n```\nnpm i mkmsg --save\n```\n\nFor the command line interface install [mkdoc][] globally (`npm i -g mkdoc`).\n\n---\n\n- [Install](#install)\n- [Usage](#usage)\n- [Example](#example)\n- [Help](#help)\n- [API](#api)\n  - [msg](#msg)\n    - [Options](#options)\n- [License](#license)\n\n---\n\n## Usage\n\nCreate the stream and write a [commonmark][] document:\n\n```javascript\nvar msg = require('mkmsg')\n  , ast = require('mkast');\nast.src('This is a markdown paragraph.')\n  .pipe(msg())\n  .pipe(ast.stringify({indent: 2}))\n  .pipe(process.stdout);\n```\n\n## Example\n\nAppend the default generator message:\n\n```shell\nmkcat README.md | mkmsg | mkout\n```\n\nAppend a custom message:\n\n```shell\nmkcat README.md | mkmsg -m \"Commit: $(git rev-parse HEAD)\" | mkout\n```\n\nPrepend a custom message:\n\n```shell\nmkcat README.md | mkmsg -p -m \"Commit: $(git rev-parse HEAD)\" | mkout\n```\n\n## Help\n\n```\nUsage: mkmsg [options]\n\n  Message injection.\n\nOptions\n  -m, --message=[MSG]     Custom message, parsed as markdown\n  -p, --prepend           Prepend message to the stream\n  -h, --help              Display help and exit\n  --version               Print the version and exit\n\nmkmsg@1.2.5\n```\n\n## API\n\n### msg\n\n```javascript\nmsg([opts][, cb])\n```\n\nAppend or prepend a message string.\n\nThe message string is parsed as markdown and written to the end of the\ndocument unless `prepend` is given.\n\nThe document node itself is omitted; it's content nodes are written to\nthe stream.\n\nReturns an output stream.\n\n* `opts` Object processing options.\n* `cb` Function callback function.\n\n#### Options\n\n* `input` Readable input stream.\n* `output` Writable output stream.\n* `message` String markdown message.\n* `prepend` Boolean prepend message to the stream.\n\n## License\n\nMIT\n\n---\n\nCreated by [mkdoc](https://github.com/mkdoc/mkdoc) on April 18, 2016\n\n[mkdoc]: https://github.com/mkdoc/mkdoc\n[mkparse]: https://github.com/mkdoc/mkparse\n[commonmark]: http://commonmark.org\n[jshint]: http://jshint.com\n[jscs]: http://jscs.info\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkdoc%2Fmkmsg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkdoc%2Fmkmsg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkdoc%2Fmkmsg/lists"}