{"id":13998167,"url":"https://github.com/sean0x42/markdown-extract","last_synced_at":"2025-07-23T05:32:39.091Z","repository":{"id":44955381,"uuid":"235099429","full_name":"sean0x42/markdown-extract","owner":"sean0x42","description":"Extract sections of a markdown file. Useful for automatically extracting changelogs","archived":false,"fork":false,"pushed_at":"2024-10-13T03:46:29.000Z","size":76,"stargazers_count":31,"open_issues_count":5,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T17:12:09.472Z","etag":null,"topics":["cli","markdown","rust"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/sean0x42/markdown-extract","language":"Rust","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/sean0x42.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":"2020-01-20T12:45:09.000Z","updated_at":"2025-06-04T12:01:48.000Z","dependencies_parsed_at":"2024-01-15T19:44:10.929Z","dependency_job_id":"bbd214b3-1385-41ac-aad2-7e3d55757050","html_url":"https://github.com/sean0x42/markdown-extract","commit_stats":{"total_commits":41,"total_committers":2,"mean_commits":20.5,"dds":0.2682926829268293,"last_synced_commit":"e923cc4a3f665e78e987aea37259d8506ccd57b5"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/sean0x42/markdown-extract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean0x42%2Fmarkdown-extract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean0x42%2Fmarkdown-extract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean0x42%2Fmarkdown-extract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean0x42%2Fmarkdown-extract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sean0x42","download_url":"https://codeload.github.com/sean0x42/markdown-extract/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean0x42%2Fmarkdown-extract/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265096976,"owners_count":23710797,"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":["cli","markdown","rust"],"created_at":"2024-08-09T19:01:26.516Z","updated_at":"2025-07-23T05:32:38.744Z","avatar_url":"https://github.com/sean0x42.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Markdown Extract\n\n[![Crates.io](https://img.shields.io/crates/v/markdown-extract)](https://crates.io/crates/markdown-extract)\n[![Docker Pulls](https://img.shields.io/docker/pulls/sean0x42/markdown-extract)](https://hub.docker.com/r/sean0x42/markdown-extract)\n[![Build \u0026 Test](https://github.com/sean0x42/markdown-extract/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/sean0x42/markdown-extract/actions/workflows/build_and_test.yml)\n\n\u003c/div\u003e\n\nExtract sections of a markdown file with a regular expression.\n\n## Usage\n\nGiven a document called `my-document.md`:\n\n```markdown\n# Welcome\n\nThis is my amazing markdown document.\n\n## Extract me!\n\nThis section should be pulled out.\n```\n\nYou can extract the second section with the following command:\n\n```console\n$ markdown-extract \"Extract me!\" my-document.md\n## Extract me!\n\nThis section should be pulled out.\n```\n\n## Installation\n\nIf you've got Rust installed on your system, you can simply install\n`markdown-extract` with Cargo.\n\n```console\n$ cargo install markdown-extract-cli\n```\n\n### Docker\n\nA Docker image is also available, and can be installed with the following\ncommand:\n\n```console\n$ docker pull sean0x42/markdown-extract:v2\n```\n\nYou can then run the container with the following command:\n\n```console\n$ docker run -it sean0x42/markdown-extract:v2 --help\n```\n\nNote that because markdown-extract accesses the file system, you will need\nto mount a volume if you want to access a file on the host. e.g.\n\n``` console\n$ docker run -v $PWD:/opt -it sean0x42/markdown-extract:v2 v2.0.0 /opt/CHANGELOG.md\n```\n\nIf you know a better way of achieving this, please let me know!\n\n## Github Action\n\nThis project can be used as a Github action.\n\nHere is a sample workflow usage:\n\n```yaml\n- id: extract-changelog\n  uses: sean0x42/markdown-extract@v4\n  with:\n   file: crates/markdown-extract/CHANGELOG.md\n   pattern: 'v2.0.0'\n- name: Write output to file\n  run: |\n    printf '${{ steps.extract-changelog.outputs.markdown }}' \u003e CHANGELOG-extracted.txt\n- uses: actions/upload-artifact@v3\n  with:\n   name: changelog\n   path: CHANGELOG-extracted.txt\n```\n\nFor a complete reference view the [action.yml](action.yml).\n\nThe action version corresponds to the version of the tool.\n\n## Use Cases\n\nThere aren't many, to be honest.\n\n1. Extract patch notes from a `CHANGELOG.md` by version.\n2. The talented folks at HashiCorp are using `markdown-extract` to extract API\n   documentation, and inject it into OpenAPI schemas.\n\nIf you have another use for this tool, please let me know!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean0x42%2Fmarkdown-extract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsean0x42%2Fmarkdown-extract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean0x42%2Fmarkdown-extract/lists"}