{"id":36600130,"url":"https://github.com/monopole/mdrip","last_synced_at":"2026-01-12T08:37:20.054Z","repository":{"id":23370579,"uuid":"26731897","full_name":"monopole/mdrip","owner":"monopole","description":"Rips code blocks from markdown.","archived":false,"fork":false,"pushed_at":"2025-05-16T19:22:57.000Z","size":1421,"stargazers_count":35,"open_issues_count":7,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-16T20:29:37.375Z","etag":null,"topics":["cms-framework","documentation-tool","go","markdown","tmux","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Go","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/monopole.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,"zenodo":null}},"created_at":"2014-11-16T23:24:28.000Z","updated_at":"2025-05-16T19:22:54.000Z","dependencies_parsed_at":"2023-12-16T15:31:43.800Z","dependency_job_id":"6433a2eb-6076-4303-a837-ea53a93cadd2","html_url":"https://github.com/monopole/mdrip","commit_stats":null,"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"purl":"pkg:github/monopole/mdrip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monopole%2Fmdrip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monopole%2Fmdrip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monopole%2Fmdrip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monopole%2Fmdrip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monopole","download_url":"https://codeload.github.com/monopole/mdrip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monopole%2Fmdrip/sbom","scorecard":{"id":658864,"data":{"date":"2025-08-11","repo":{"name":"github.com/monopole/mdrip","commit":"0d9e927e19caf884f03126fff6a02fbac6c1928d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/go.yml:11","Warn: no topLevel permission defined: .github/workflows/release.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/monopole/mdrip/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/monopole/mdrip/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/monopole/mdrip/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/monopole/mdrip/release.yaml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.0.6 not signed: https://api.github.com/repos/monopole/mdrip/releases/207868713","Warn: release artifact v2.0.5 not signed: https://api.github.com/repos/monopole/mdrip/releases/204714500","Warn: release artifact v2.0.4 not signed: https://api.github.com/repos/monopole/mdrip/releases/203403035","Warn: release artifact v2.0.3 not signed: https://api.github.com/repos/monopole/mdrip/releases/203219698","Warn: release artifact v2.0.2 not signed: https://api.github.com/repos/monopole/mdrip/releases/200718987","Warn: release artifact v2.0.6 does not have provenance: https://api.github.com/repos/monopole/mdrip/releases/207868713","Warn: release artifact v2.0.5 does not have provenance: https://api.github.com/repos/monopole/mdrip/releases/204714500","Warn: release artifact v2.0.4 does not have provenance: https://api.github.com/repos/monopole/mdrip/releases/203403035","Warn: release artifact v2.0.3 does not have provenance: https://api.github.com/repos/monopole/mdrip/releases/203219698","Warn: release artifact v2.0.2 does not have provenance: https://api.github.com/repos/monopole/mdrip/releases/200718987"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T15:29:24.021Z","repository_id":23370579,"created_at":"2025-08-21T15:29:24.021Z","updated_at":"2025-08-21T15:29:24.021Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["cms-framework","documentation-tool","go","markdown","tmux","tutorial"],"created_at":"2026-01-12T08:37:19.112Z","updated_at":"2026-01-12T08:37:20.048Z","avatar_url":"https://github.com/monopole.png","language":"Go","readme":"# mdrip\n\n[_here_ documents]: http://tldp.org/LDP/abs/html/here-docs.html\n[busted Go tutorial]: assets/bustedGoTutorial.md\n[raw]: https://github.com/monopole/mdrip/blob/master/assets/bustedGoTutorial.md?plain=1\n[travis-mdrip]: https://travis-ci.org/monopole/mdrip\n[`tmux`]: https://github.com/tmux/tmux/wiki\n[fenced code blocks]: https://help.github.com/articles/creating-and-highlighting-code-blocks/#fenced-code-blocks\n[block quote]: https://github.github.com/gfm/#block-quotes\n[label]: #labels\n[labels]: #labels\n[installation options]: ./assets/INSTALL.md\n[Install `mdrip`]: ./assets/INSTALL.md\n\n\u003c!-- [![Build Status](https://travis-ci.org/monopole/mdrip.svg?branch=master)](https://travis-ci.org/monopole/mdrip) --\u003e\n[![Go Report Card](https://goreportcard.com/badge/github.com/monopole/mdrip/v2)](https://goreportcard.com/report/github.com/monopole/mdrip/v2)\n\n\n`mdrip` is a tool for markdown-based [literate programming](#literate-programming).\n\n* It allows one to place your fenced code blocks under test.\n\n* It serves a keyboard-driven app with the rendered markdown to a browser,\n  allowing one to navigate through the blocks and send them directly\n  to [`tmux`] for execution.\n\nSee [installation options].\n\n\u003ca href=\"assets/mdripDemo.png\" target=\"_blank\"\u003e\n\u003cimg src=\"assets/mdripDemo.png\"\n  alt=\"mdrip screenshot\" width=\"100%\" height=\"auto\"\u003e\n\u003c/a\u003e\n\n## Use it for Testing\n\nUse `mdrip` to assure that your markdown-based instructions\nactually work.\n\nTo quickly demo this, use the following commands to\ndownload a [busted Go tutorial]:\n\n\u003c!-- @downloadBusted --\u003e\n```shell\nrepo=https://raw.githubusercontent.com/monopole/mdrip\ncurl -O $repo/master/assets/bustedGoTutorial.md\n```\n\nThis markdown has code blocks showing how to write, compile\nand run a Go program in your `TMPDIR`.\n\n[Install `mdrip`], then extract blocks to `stdout`:\n\n\u003c!-- @lookAtBlocks --\u003e\n```shell\nmdrip print bustedGoTutorial.md\n```\n\nSome code blocks in this markdown have [labels]; these are visible as\nHTML comments preceding the blocks in the [raw] markdown.\n\nUse a label to extract a subset of blocks:\n\u003c!-- @useLabel --\u003e\n```shell\nmdrip print --label goCommand bustedGoTutorial.md\n```\n\nPipe the output of the above into `/bin/bash -e` to have the effect of a test,\nor for cleaner output try the `test` command:\n\n\u003c!-- @testTheBlocks @skip --\u003e\n```shell\nmdrip test bustedGoTutorial.md\necho $?\n```\n\nThe above command should show an error, and exit with non-zero status,\nbecause the tutorial has errors.\n\nFix the error:\n\n\u003c!-- @copyTheTutorial --\u003e\n```shell\ncp bustedGoTutorial.md goTutorial.md\n```\n\n\u003c!-- @fixError1 --\u003e\n```shell\nsed -i 's|badecho |echo |' goTutorial.md\n```\n\nTry the fix:\n\n\u003c!-- @tryFix1 @skip --\u003e\n```shell\nmdrip test goTutorial.md\necho $?\n```\n\nThere's another error.  Fix it:\n\n\u003c!-- @fixError2 --\u003e\n```shell\nsed -i 's|comment this|// comment this|' goTutorial.md\n```\n\nThere are now two changes:\n\n\u003c!-- @observeDiffs --\u003e\n```shell\ndiff bustedGoTutorial.md goTutorial.md || echo files differ\n```\n\nTest the new file:\n\n\u003c!-- @testAgain --\u003e\n```shell\nmdrip test goTutorial.md\necho $?\n```\n\nThe return code should be zero.\n\nYou can run a block in your _current_ shell to, say, set\ncurrent environment variables as specified in the markdown:\n\n\u003c!-- @evalInShell --\u003e\n```shell\neval \"$(mdrip print --label setEnv goTutorial.md)\"\necho $greeting\n```\n\nThe upshot is that adding a line like\n\n\u003e ```shell\n\u003e mdrip test --label {someLabel} {path}\n\u003e ```\n\nto your CI/CD test framework covers\nthe markdown code block execution path determined by that label.\n\n\nThe `{path}` argument defaults to your current directory (`.`),\nbut it can be\n\n* a path to a file,\n* a path to a directory,\n* a GitHub URL in the style `gh:{user}/{repoName}`,\n* or a particular file or a directory in the\n  repo, e.g. `gh:{user}/{repoName}/foo/bar`.\n\n### Labels\n\nAdd _labels_ to a code block by preceding the block\nwith a one-line HTML comment, e.g:\n\n\u003cblockquote\u003e\n\u003cpre\u003e\n\u0026lt;\u0026#33;-- @sayHello @mississippi @tutorial01 --\u0026gt;\n\u0026#96;\u0026#96;\u0026#96;shell\necho hello\n\u0026#96;\u0026#96;\u0026#96;\n\u003c/pre\u003e\n\u003c/blockquote\u003e\n\nLabels are just words beginning with `@` in the comment.\n\nThe first label on a block is slightly special in that it\nis treated as the block's _name_ for reporting.\nIf no labels are present, a block name is generated.\n\nA `@skip` label tells `mdrip` to ignore the block\nfor testing.\n\n## Use it for Tutorials\n\n`mdrip` works with [`tmux`] to help develop and run\ncommand line procedures.\n\nGenerate some markdown content with:\n\u003c!-- @createTestData --\u003e\n```shell\ntmpdir=$(mktemp -d)\nmdrip generatetestdata ${tmpdir}/mdTestData\n```\n\nthen enter `tmux`, and start a server:\n\u003c!-- @serveTestData @skip --\u003e\n```shell\ntmux\nmdrip serve ${tmpdir}/mdTestData \u0026\n```\nVisit [localhost](http://localhost:8080).\n\n-  `j` and `k` move among blocks\n\n-  `Enter` sends the current block to `tmux`\n\n-  `?` shows all key controls\n\n\n## Literate Programming\n\n[_literate programming_]: http://en.wikipedia.org/wiki/Literate_programming\n\n`mdrip` encourages [_literate programming_] via markdown.\nIt lets one run code that is embedded in explanatory content.\n\nOne can use [_here_ documents] to incorporate any programming\nlanguage into tested markdown - as in the [busted Go tutorial]\ndiscussed above.  That tutorial could have covered C, C++, Rust, etc.\n\nPlace commands that the reader would want to execute directly\n(with no edits) in [fenced code blocks].\n\nIn contrast, code-style text that is not intended for copy/paste execution,\ne.g. alternative commands with fake arguments or example output,\nshould be in a fenced code block indented via a\n[block quote]. Block quotes are ignored by `mdrip`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonopole%2Fmdrip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonopole%2Fmdrip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonopole%2Fmdrip/lists"}