{"id":13995958,"url":"https://github.com/cdklabs/markmac","last_synced_at":"2025-12-30T01:16:37.765Z","repository":{"id":37051544,"uuid":"301953641","full_name":"cdklabs/markmac","owner":"cdklabs","description":"Embed program outputs in markdown","archived":false,"fork":false,"pushed_at":"2024-11-27T00:43:37.000Z","size":4063,"stargazers_count":17,"open_issues_count":1,"forks_count":0,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-11-27T01:23:16.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdklabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-10-07T07:03:55.000Z","updated_at":"2024-11-27T00:29:44.000Z","dependencies_parsed_at":"2024-01-23T01:38:34.841Z","dependency_job_id":"f04a3df7-9a1c-415b-9f51-92cb5e5c0c02","html_url":"https://github.com/cdklabs/markmac","commit_stats":{"total_commits":1189,"total_committers":10,"mean_commits":118.9,"dds":"0.12279226240538266","last_synced_commit":"f9b5ebfde278d53622fb3c9364de01cd999e8e2c"},"previous_names":["eladb/markmac"],"tags_count":661,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdklabs%2Fmarkmac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdklabs%2Fmarkmac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdklabs%2Fmarkmac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdklabs%2Fmarkmac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdklabs","download_url":"https://codeload.github.com/cdklabs/markmac/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227190537,"owners_count":17745282,"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-08-09T14:03:41.912Z","updated_at":"2025-12-30T01:16:37.710Z","avatar_url":"https://github.com/cdklabs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# markmac\n\n\u003e Markdown macros - embed program outputs in markdown\n\nLet's say I have a markdown file `test.md` which looks like this:\n\n```test\n# Hello, World\n\nThis is _just markdown_.\n\n## Current date is:\n\n\u003c!-- \u003cmacro exec=\"date +%x\"\u003e --\u003e\n\u003c!-- \u003c/macro\u003e --\u003e\n\n## Current time is:\n\n\u003c!-- \u003cmacro exec=\"date +%R\"\u003e --\u003e\n\u003c!-- \u003c/macro\u003e --\u003e\n```\n\nIf I pipe it through `markmac`, the macro commands will be executed and their\nSTDOUT will be embedded between `\u003cmacro\u003e` and `\u003c/macro\u003e`.\n\n```console\n$ cat test.md | markmac\n# Hello, World\n\nThis is _just markdown_.\n\n## Current date is:\n\n\u003c!-- \u003cmacro exec=\"date +%x\"\u003e --\u003e\n10/07/2020\n\u003c!-- \u003c/macro\u003e --\u003e\n\n## Current time is:\n\n\u003c!-- \u003cmacro exec=\"date +%R\"\u003e --\u003e\n15:48\n\u003c!-- \u003c/macro\u003e --\u003e\n```\n\n`markmac` searches for the `\u003cmacro\u003e` directives inside your markdown file,\nexecutes the command in `exec` and substitutes the contents between `\u003cmacro\u003e`\nand `\u003c/macro\u003e` with STDOUT.\n\n## Installation\n\nThis program is distributed via npm, so it can be installed through `yarn` or\n`npm` or any other supporting client:\n\n```shell\nnpm i -g markmac\n```\n\n## License\n\n[Apache 2.0](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdklabs%2Fmarkmac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdklabs%2Fmarkmac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdklabs%2Fmarkmac/lists"}