# txmd
A modern, feature-rich terminal-based Markdown viewer with pipeline support,
built with [Textual](https://github.com/Textualize/textual).
![PyPI version](https://img.shields.io/pypi/v/txmd)
![Python versions](https://img.shields.io/pypi/pyversions/txmd)
![License](https://img.shields.io/pypi/l/txmd)
## Features
- 📝 Render Markdown files directly in your terminal
- 🔄 Pipeline support - pipe markdown content directly to txmd
- 🎨 Syntax highlighting for code blocks
- 📊 Table support
- 🖼️ Beautiful TUI interface powered by Textual
- ⌨️ Vim-style navigation (j/k for scrolling)
- 🚀 Fast and lightweight
## Installation
You can install txmd using pip:
```bash
pip install txmd
```
Or using Poetry:
```bash
poetry add txmd
```
## Usage
### Basic Usage
View a Markdown file:
```bash
txmd README.md
```
### Pipeline Usage
Pipe content to txmd:
```bash
echo "# Hello World" | txmd
cat document.md | txmd
curl https://raw.githubusercontent.com/user/repo/main/README.md | txmd
```
### Navigation
Inside the viewer:
- `↑`/`k`: Scroll up
- `↓`/`j`: Scroll down
- `Page Up`/`Page Down`: Scroll by page
- `Home`/`End`: Jump to top/bottom
- `q`: Quit the viewer
## Features in Detail
### Supported Markdown Elements
txmd supports all standard Markdown features:
- Headers (all levels)
- Bold and italic text
- Lists (ordered and unordered)
- Code blocks with syntax highlighting
- Tables
- Blockquotes
- Horizontal rules
- Links
- Images (ASCII art representation in terminal)
### Pipeline Integration
txmd is designed to work seamlessly in Unix pipelines. This means you can:
```bash
# View git diff in markdown
git diff | txmd
# View formatted man pages
man git | txmd
# Preview markdown before committing
git show HEAD:README.md | txmd
```
## Development
### Setting Up Development Environment
1. Clone the repository:
```bash
git clone https://github.com/yourusername/txmd
cd txmd
```
2. Install development dependencies using Poetry:
```bash
poetry install
```
3. Run tests:
```bash
poetry run pytest
```
### Project Structure
```
txmd/
├── txmd/
│ ├── __init__.py
│ ├── cli.py # CLI implementation
│ └── markdown_parser.py # Markdown parsing logic
├── tests/
│ └── ...
├── pyproject.toml
└── README.md
```
## Contributing
Contributions are welcome! Here's how you can help:
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
Please make sure to update tests as appropriate and follow the existing code style.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Acknowledgments
- Built with [Textual](https://github.com/Textualize/textual)
- Markdown parsing by [Python-Markdown](https://python-markdown.github.io/)
- Command-line interface by [Typer](https://typer.tiangolo.com/)
## FAQ
**Q: Why use txmd instead of other markdown viewers?**
A: txmd is designed to be lightweight, fast, and integrate seamlessly
with Unix pipelines while providing a beautiful TUI interface.
**Q: Does txmd support custom themes?**
A: Not yet, but it's on our roadmap! Stay tuned for updates.
**Q: Can I use txmd to preview markdown before committing to git?**
A: Yes! Just pipe the content to txmd: `git show HEAD:README.md | txmd`
## Roadmap
- [ ] Custom theme support
- [ ] GitHub Flavored Markdown extensions
- [ ] Image preview support via terminal graphics protocols
- [ ] Configuration file support
- [ ] Search functionality
- [ ] Bookmark support for long documents
## Support
If you encounter any issues or have questions,
please file an issue on the [GitHub repository](https://github.com/yourusername/txmd/issues).
Raw data
{
"_id": null,
"home_page": "https://github.com/guglielmo/txmd",
"name": "txmd",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "markdown, terminal, cli, viewer, textual",
"author": "Guglielmo Celata",
"author_email": "guglielmo.celata@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/4d/cd/5e6f3b5e48822555de7d9b0962a32de9a8bd33dd98997eb2ef1915755e1a/txmd-0.1.3.tar.gz",
"platform": null,
"description": "# txmd\n\nA modern, feature-rich terminal-based Markdown viewer with pipeline support, \nbuilt with [Textual](https://github.com/Textualize/textual).\n\n![PyPI version](https://img.shields.io/pypi/v/txmd)\n![Python versions](https://img.shields.io/pypi/pyversions/txmd)\n![License](https://img.shields.io/pypi/l/txmd)\n\n## Features\n\n- \ud83d\udcdd Render Markdown files directly in your terminal\n- \ud83d\udd04 Pipeline support - pipe markdown content directly to txmd\n- \ud83c\udfa8 Syntax highlighting for code blocks\n- \ud83d\udcca Table support\n- \ud83d\uddbc\ufe0f Beautiful TUI interface powered by Textual\n- \u2328\ufe0f Vim-style navigation (j/k for scrolling)\n- \ud83d\ude80 Fast and lightweight\n\n## Installation\n\nYou can install txmd using pip:\n\n```bash\npip install txmd\n```\n\nOr using Poetry:\n\n```bash\npoetry add txmd\n```\n\n## Usage\n\n### Basic Usage\n\nView a Markdown file:\n\n```bash\ntxmd README.md\n```\n\n### Pipeline Usage\n\nPipe content to txmd:\n\n```bash\necho \"# Hello World\" | txmd\ncat document.md | txmd\ncurl https://raw.githubusercontent.com/user/repo/main/README.md | txmd\n```\n\n### Navigation\n\nInside the viewer:\n- `\u2191`/`k`: Scroll up\n- `\u2193`/`j`: Scroll down\n- `Page Up`/`Page Down`: Scroll by page\n- `Home`/`End`: Jump to top/bottom\n- `q`: Quit the viewer\n\n## Features in Detail\n\n### Supported Markdown Elements\n\ntxmd supports all standard Markdown features:\n\n- Headers (all levels)\n- Bold and italic text\n- Lists (ordered and unordered)\n- Code blocks with syntax highlighting\n- Tables\n- Blockquotes\n- Horizontal rules\n- Links\n- Images (ASCII art representation in terminal)\n\n### Pipeline Integration\n\ntxmd is designed to work seamlessly in Unix pipelines. This means you can:\n\n```bash\n# View git diff in markdown\ngit diff | txmd\n\n# View formatted man pages\nman git | txmd\n\n# Preview markdown before committing\ngit show HEAD:README.md | txmd\n```\n\n## Development\n\n### Setting Up Development Environment\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/txmd\ncd txmd\n```\n\n2. Install development dependencies using Poetry:\n```bash\npoetry install\n```\n\n3. Run tests:\n```bash\npoetry run pytest\n```\n\n### Project Structure\n\n```\ntxmd/\n\u251c\u2500\u2500 txmd/\n\u2502 \u251c\u2500\u2500 __init__.py\n\u2502 \u251c\u2500\u2500 cli.py # CLI implementation\n\u2502 \u2514\u2500\u2500 markdown_parser.py # Markdown parsing logic\n\u251c\u2500\u2500 tests/\n\u2502 \u2514\u2500\u2500 ...\n\u251c\u2500\u2500 pyproject.toml\n\u2514\u2500\u2500 README.md\n```\n\n## Contributing\n\nContributions are welcome! Here's how you can help:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\nPlease make sure to update tests as appropriate and follow the existing code style.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Built with [Textual](https://github.com/Textualize/textual)\n- Markdown parsing by [Python-Markdown](https://python-markdown.github.io/)\n- Command-line interface by [Typer](https://typer.tiangolo.com/)\n\n## FAQ\n\n**Q: Why use txmd instead of other markdown viewers?**\nA: txmd is designed to be lightweight, fast, and integrate seamlessly \nwith Unix pipelines while providing a beautiful TUI interface.\n\n**Q: Does txmd support custom themes?**\nA: Not yet, but it's on our roadmap! Stay tuned for updates.\n\n**Q: Can I use txmd to preview markdown before committing to git?**\nA: Yes! Just pipe the content to txmd: `git show HEAD:README.md | txmd`\n\n## Roadmap\n\n- [ ] Custom theme support\n- [ ] GitHub Flavored Markdown extensions\n- [ ] Image preview support via terminal graphics protocols\n- [ ] Configuration file support\n- [ ] Search functionality\n- [ ] Bookmark support for long documents\n\n## Support\n\nIf you encounter any issues or have questions, \nplease file an issue on the [GitHub repository](https://github.com/yourusername/txmd/issues).",
"bugtrack_url": null,
"license": "MIT",
"summary": "A textual markdown viewer CLI",
"version": "0.1.3",
"project_urls": {
"Documentation": "https://github.com/guglielmo/txmd#readme",
"Homepage": "https://github.com/guglielmo/txmd",
"Repository": "https://github.com/guglielmo/txmd"
},
"split_keywords": [
"markdown",
" terminal",
" cli",
" viewer",
" textual"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "04c4fdd42e5c1607df5f8d3515359861e5d9d0976f918c96f76d65612eaa827f",
"md5": "dea88fc9abd330c8a3181d56e9a7c00d",
"sha256": "f22921e43d0c9de7275e3ae45f339e5b161ac4a6201880062219f7bfdfda2238"
},
"downloads": -1,
"filename": "txmd-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dea88fc9abd330c8a3181d56e9a7c00d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 5530,
"upload_time": "2024-11-23T15:32:07",
"upload_time_iso_8601": "2024-11-23T15:32:07.617453Z",
"url": "https://files.pythonhosted.org/packages/04/c4/fdd42e5c1607df5f8d3515359861e5d9d0976f918c96f76d65612eaa827f/txmd-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4dcd5e6f3b5e48822555de7d9b0962a32de9a8bd33dd98997eb2ef1915755e1a",
"md5": "b26f7849dafeee4a37490aee45c456d4",
"sha256": "6c6d4c615bb1508a80d7013ae50399a980337584cb4824f6884a47504f842ad6"
},
"downloads": -1,
"filename": "txmd-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "b26f7849dafeee4a37490aee45c456d4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 4960,
"upload_time": "2024-11-23T15:32:11",
"upload_time_iso_8601": "2024-11-23T15:32:11.556644Z",
"url": "https://files.pythonhosted.org/packages/4d/cd/5e6f3b5e48822555de7d9b0962a32de9a8bd33dd98997eb2ef1915755e1a/txmd-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-23 15:32:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "guglielmo",
"github_project": "txmd",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "txmd"
}