[![Build Status](https://github.com/hukkin/mdformat-shfmt/actions/workflows/tests.yaml/badge.svg?branch=master)](<https://github.com/hukkin/mdformat-shfmt/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush>)
[![PyPI version](<https://img.shields.io/pypi/v/mdformat-shfmt>)](<https://pypi.org/project/mdformat-shfmt>)
# mdformat-shfmt
> Mdformat plugin to format shell code blocks
## Description
mdformat-shfmt is an [mdformat](https://github.com/executablebooks/mdformat) plugin
that makes mdformat format shell code blocks embedded in Markdown with [shfmt](https://github.com/mvdan/sh).
The plugin invokes shfmt in a subprocess so having either shfmt, Docker or Podman installed is a requirement.
## Installing
1. Install either [shfmt](https://github.com/mvdan/sh#shfmt), [Docker](https://docs.docker.com/get-docker/) or [Podman](https://podman.io/docs/installation)
1. Install mdformat-shfmt
```bash
pip install mdformat-shfmt
```
## Usage
```bash
mdformat YOUR_MARKDOWN_FILE.md
```
## Limitations
The Docker/Podman fallback is only tested on Linux.
If you experience issues with it on Windows or macOS, please install shfmt.
Raw data
{
"_id": null,
"home_page": "https://github.com/hukkin/mdformat-shfmt",
"name": "mdformat-shfmt",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "mdformat, markdown, commonmark, formatter, bash, shell",
"author": "Taneli Hukkinen",
"author_email": "hukkin@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/ed/94/ba4551aa5e3dc6bf7858dc628e0d56dfba5c669206c09e1be098095ad3bb/mdformat_shfmt-0.2.0.tar.gz",
"platform": null,
"description": "[![Build Status](https://github.com/hukkin/mdformat-shfmt/actions/workflows/tests.yaml/badge.svg?branch=master)](<https://github.com/hukkin/mdformat-shfmt/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush>)\n[![PyPI version](<https://img.shields.io/pypi/v/mdformat-shfmt>)](<https://pypi.org/project/mdformat-shfmt>)\n\n# mdformat-shfmt\n> Mdformat plugin to format shell code blocks\n\n## Description\nmdformat-shfmt is an [mdformat](https://github.com/executablebooks/mdformat) plugin\nthat makes mdformat format shell code blocks embedded in Markdown with [shfmt](https://github.com/mvdan/sh).\nThe plugin invokes shfmt in a subprocess so having either shfmt, Docker or Podman installed is a requirement.\n\n## Installing\n1. Install either [shfmt](https://github.com/mvdan/sh#shfmt), [Docker](https://docs.docker.com/get-docker/) or [Podman](https://podman.io/docs/installation)\n1. Install mdformat-shfmt\n ```bash\n pip install mdformat-shfmt\n ```\n\n## Usage\n```bash\nmdformat YOUR_MARKDOWN_FILE.md\n```\n\n## Limitations\nThe Docker/Podman fallback is only tested on Linux.\nIf you experience issues with it on Windows or macOS, please install shfmt.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Mdformat plugin to format shell code blocks",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/hukkin/mdformat-shfmt",
"Repository": "https://github.com/hukkin/mdformat-shfmt"
},
"split_keywords": [
"mdformat",
" markdown",
" commonmark",
" formatter",
" bash",
" shell"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3b06322c62c2e5199e604fed22b048250fc9acf9bcdbee2f496f18895c9ff1c6",
"md5": "8da6d10aed339cc4026415f61b95da12",
"sha256": "61ae5f25b6ad0dc39bb64928663254efd357b7bf4a018f9b3e0c8c8c845f0e3b"
},
"downloads": -1,
"filename": "mdformat_shfmt-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8da6d10aed339cc4026415f61b95da12",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 3273,
"upload_time": "2024-10-22T05:32:40",
"upload_time_iso_8601": "2024-10-22T05:32:40.500041Z",
"url": "https://files.pythonhosted.org/packages/3b/06/322c62c2e5199e604fed22b048250fc9acf9bcdbee2f496f18895c9ff1c6/mdformat_shfmt-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ed94ba4551aa5e3dc6bf7858dc628e0d56dfba5c669206c09e1be098095ad3bb",
"md5": "8e82a0e01445d009517c81c7a0c249ec",
"sha256": "0c0f662b4f11a3fb1d175cf629330b08057afe91cdc259682bc8e856fcdf0b7a"
},
"downloads": -1,
"filename": "mdformat_shfmt-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "8e82a0e01445d009517c81c7a0c249ec",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 2835,
"upload_time": "2024-10-22T05:32:41",
"upload_time_iso_8601": "2024-10-22T05:32:41.942430Z",
"url": "https://files.pythonhosted.org/packages/ed/94/ba4551aa5e3dc6bf7858dc628e0d56dfba5c669206c09e1be098095ad3bb/mdformat_shfmt-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-22 05:32:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hukkin",
"github_project": "mdformat-shfmt",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mdformat-shfmt"
}