{"id":13456963,"url":"https://github.com/swsnr/mdcat","last_synced_at":"2025-04-28T12:07:27.231Z","repository":{"id":46018587,"uuid":"116555732","full_name":"swsnr/mdcat","owner":"swsnr","description":"cat for markdown","archived":true,"fork":false,"pushed_at":"2025-01-10T11:56:15.000Z","size":3809,"stargazers_count":2304,"open_issues_count":0,"forks_count":76,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-28T12:07:08.262Z","etag":null,"topics":["cat","iterm2","markdown","rust","terminal"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/mdcat","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swsnr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":"https://paypal.me/swsnr"}},"created_at":"2018-01-07T10:16:08.000Z","updated_at":"2025-04-25T12:03:55.000Z","dependencies_parsed_at":"2023-02-08T05:30:19.346Z","dependency_job_id":"79cec48b-0261-481b-898c-b8dd2e6beaca","html_url":"https://github.com/swsnr/mdcat","commit_stats":{"total_commits":842,"total_committers":27,"mean_commits":"31.185185185185187","dds":"0.10807600950118768","last_synced_commit":"3053ee3cea9cb73e1077ab334fbfee6b2917b6e5"},"previous_names":["lunaryorn/mdcat"],"tags_count":73,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swsnr%2Fmdcat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swsnr%2Fmdcat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swsnr%2Fmdcat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swsnr%2Fmdcat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swsnr","download_url":"https://codeload.github.com/swsnr/mdcat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251311330,"owners_count":21569009,"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":["cat","iterm2","markdown","rust","terminal"],"created_at":"2024-07-31T08:01:30.937Z","updated_at":"2025-04-28T12:07:27.205Z","avatar_url":"https://github.com/swsnr.png","language":"Rust","funding_links":["https://paypal.me/swsnr"],"categories":["Rust","CLI Tools","语言资源库","terminal","\u003ca name=\"markdown\"\u003e\u003c/a\u003eMarkdown","Text Viewing"],"sub_categories":["rust"],"readme":"\u003e [!IMPORTANT]\n\u003e No longer maintained.  If you wish to take over, send a mail to \u003csebastian@swsnr.de\u003e.\n\n# mdcat\n\nFancy `cat` for Markdown (that is, [CommonMark][]):\n\n```\n$ mdcat sample.md\n```\n\n![mdcat showcase with different colour themes][sxs]\n\nmdcat in [WezTerm], with \"One Light (base16)\", \"Gruvbox Light\", and \"Darcula\n(base16)\" (from left to right), and [JetBrains Mono] as font.\n\n[CommonMark]: http://commonmark.org\n[Solarized]: http://ethanschoonover.com/solarized\n[dracula]: https://draculatheme.com/iterm/\n[wezterm]: https://wezfurlong.org/wezterm/\n[JetBrains Mono]: https://www.jetbrains.com/lp/mono/\n[sxs]: ./screenshots/side-by-side.png\n\n## Features\n\n`mdcat` works best with [iTerm2], [WezTerm], and [kitty], and a good terminal font with italic characters.\nThen it\n\n* nicely renders all basic CommonMark syntax,\n* highlights code blocks with [syntect],\n* shows [links][osc8], and also images inline in supported terminals (see above, where \"Rust\" is a clickable link!),\n* adds jump marks for headings in [iTerm2] (jump forwards and backwards with \u003ckey\u003e⇧⌘↓\u003c/key\u003e and \u003ckey\u003e⇧⌘↑\u003c/key\u003e).\n\n| Terminal                   |  Basic syntax | Syntax highlighting | Images | Jump marks |\n| :------------------------- | :-----------: | :-----------------: | :----: | :--------: |\n| Basic ANSI¹                | ✓             | ✓                   |        |            |\n| Windows 10 console         | ✓             | ✓                   |        |            |\n| [Terminology]              | ✓             | ✓                   | ✓      |            |\n| [iTerm2]                   | ✓             | ✓                   | ✓²     | ✓          |\n| [kitty]                    | ✓             | ✓                   | ✓²     |            |\n| [WezTerm]                  | ✓             | ✓                   | ✓²     |            |\n| [VSCode]                   | ✓             | ✓                   | ✓²     |            |\n| [Ghostty]                  | ✓             | ✓                   | ✓²     |            |\n\n1) mdcat requires that the terminal supports strikethrough formatting and [inline links][osc8].\n    This includes most modern terminal emulators, such as Windows Terminal, KDE Konsole, or anything based on VTE, GNOME's terminal emulation library.\n    But mdcat likely won't work well on old terminals that lack these features (e.g. the Linux text console).\n2) SVG images are rendered with [resvg], see [SVG support].\n\nNot supported:\n\n* CommonMark extension for footnotes.\n* Inline markup and text wrapping in table cells.\n\n[syntect]: https://github.com/trishume/syntect\n[osc8]: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda\n[Terminology]: http://terminolo.gy\n[iterm2]: https://www.iterm2.com\n[WezTerm]: https://wezfurlong.org/wezterm/\n[kitty]: https://sw.kovidgoyal.net/kitty/\n[resvg]: https://github.com/RazrFalcon/resvg\n[SVG support]: https://github.com/RazrFalcon/resvg#svg-support\n[VSCode]: https://code.visualstudio.com/\n[Ghostty]: https://mitchellh.com/ghostty\n\n## Usage\n\nTry `mdcat --help` or read the [mdcat(1)](./mdcat.1.adoc) manpage.\n\n## Installation\n\n* [Release binaries](https://github.com/swsnr/mdcat/releases/) built on Github Actions.\n  - These binaries are build from Git source on Github actions; you find provenance attestations at \u003chttps://github.com/swsnr/mdcat/attestations\u003e.\n* 3rd party packages at [Repology](https://repology.org/project/mdcat/versions)\n* You can also build `mdcat` manually with `cargo install mdcat` (see below for details).\n\n`mdcat` can be linked or copied to `mdless`; if invoked as `mdless` it automatically uses pagination.\n\n## Building\n\nRun `cargo build --release`.\n\nBuilding requires `libcurl`.\n\n## Packaging\n\nWhen packaging `mdcat` you may wish to include the following additional artifacts:\n\n- A symlink or hardlink from `mdless` to `mdcat` (see above).\n- Shell completions for relevant shells, by invoking `mdcat --completions` after building, e.g.\n\n  ```console\n  $ mdcat --completions fish \u003e /usr/share/fish/vendor_completions.d/mdcat.fish\n  $ mdcat --completions bash \u003e /usr/share/bash-completion/completions/mdcat\n  $ mdcat --completions zsh \u003e /usr/share/zsh/site-functions/_mdcat\n  # Same for mdless if you include it\n  $ mdless --completions fish \u003e /usr/share/fish/vendor_completions.d/mdless.fish\n  $ mdless --completions bash \u003e /usr/share/bash-completion/completions/mdless\n  $ mdless --completions zsh \u003e /usr/share/zsh/site-functions/_mdless\n  ```\n\n- A build of the man page `mdcat.1.adoc`, using [AsciiDoctor]:\n\n  ```console\n  $ asciidoctor -b manpage -a reproducible -o /usr/share/man/man1/mdcat.1 mdcat.1.adoc\n  $ gzip /usr/share/man/man1/mdcat.1\n  # If you include a mdless as above, you may also want to support man mdless\n  $ ln -s mdcat.1.gz /usr/share/man/man1/mdless.1.gz\n  ```\n\n[AsciiDoctor]: https://asciidoctor.org/\n\n## Troubleshooting\n\n`mdcat` can output extensive tracing information when asked to.\nRun `mdcat` with `$MDCAT_LOG=trace` for complete tracing information, or with `$MDCAT_LOG=mdcat::render=trace` to trace only rendering.\n\n## License\n\nCopyright Sebastian Wiesner \u003csebastian@swsnr.de\u003e\n\nBinaries are subject to the terms of the Mozilla Public\nLicense, v. 2.0, see [LICENSE](LICENSE).\n\nMost of the source is subject to the terms of the Mozilla Public\nLicense, v. 2.0, see [LICENSE](LICENSE), unless otherwise noted;\nsome files are subject to the terms of the Apache 2.0 license,\nsee \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswsnr%2Fmdcat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswsnr%2Fmdcat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswsnr%2Fmdcat/lists"}