Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/et0x/md2term
md2term is a command-line tool that renders Markdown content in the terminal with syntax highlighting and formatting.
https://github.com/et0x/md2term
golang markdown terminal
Last synced: 2 days ago
JSON representation
md2term is a command-line tool that renders Markdown content in the terminal with syntax highlighting and formatting.
- Host: GitHub
- URL: https://github.com/et0x/md2term
- Owner: et0x
- License: mit
- Created: 2024-09-02T02:35:50.000Z (26 days ago)
- Default Branch: main
- Last Pushed: 2024-09-02T03:24:27.000Z (26 days ago)
- Last Synced: 2024-09-03T06:42:27.466Z (25 days ago)
- Topics: golang, markdown, terminal
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# md2term
md2term is a command-line tool that renders Markdown content in the terminal with syntax highlighting and formatting.
## Features
- Supports common Markdown elements (headers, lists, code blocks, tables, etc.)
- Colorful and styled output in the terminal
- Can read from files or stdin
- Easy to use and integrate into your workflow
- Customizable themes for different visual preferences## Installation
To install md2term, make sure you have Go installed on your system, then run:
```
go install github.com/et0x/md2term/cmd/md2term@latest
```## Usage
md2term reads from stdin by default, but you can specify a file to read from:
```
echo "# Hello, World!" | md2termcat README.md | md2term
md2term README.md
```### Theme Selection
md2term supports multiple themes for different visual preferences. You can specify a theme using the `-theme` flag:
```
md2term -theme dark README.md
```Available themes:
- `default`: A colorful theme suitable for most terminal backgrounds
- `dark`: A theme optimized for dark terminal backgrounds
- `light`: A theme optimized for light terminal backgrounds### Setting a Default Theme
You can set a theme as your default using the `-set-default-theme` flag:
```
md2term -theme dark -set-default-theme
```This will save your theme preference for future use.
### Version Information
To check the version of md2term, use the `-version` flag:
```
md2term -version
```## Customizing Themes
md2term uses a `themes.yaml` file to define color schemes. You can modify this file to create your own custom themes. The theme structure includes colors for various Markdown elements:
- Headings (levels 1-6)
- List items (regular, checked, unchecked)
- Table elements (border, cells, header, even/odd rows)
- Code blocks and inline code
- Links and images
- BlockquotesRefer to the `themes.yaml` file in the repository for the complete theme structure and color definitions.
## License
md2term is licensed under the MIT License. See the LICENSE file for more details.