GitHub - letientai299/md2cb: Convert Markdown to rich HTML clipboard content
Extracto
Convert Markdown to rich HTML clipboard content. Contribute to letientai299/md2cb development by creating an account on GitHub.
Resumen
Resumen Principal
md2cb se presenta como una herramienta altamente funcional y relevante para la conversión eficiente de Markdown, específicamente GitHub Flavored Markdown (GFM), a HTML enriquecido. Su propósito central es optimizar el flujo de trabajo de los usuarios al permitirles redactar contenido en Markdown y luego transformarlo, copiándolo directamente al portapapeles del sistema
Contenido
md2cb - Markdown to clipboard converter.
Converts GitHub Flavored Markdown (GFM) to rich HTML and copies it to the system clipboard for pasting into Word, Google Docs, Pages, Teams, etc.
Usage
Then, paste the copied clipboard content to the target app.
Add --edit/-e flag to edit the content in $EDITOR before converting. -e
would open an empty markdown file if run without any input (file or stdin).
Installation
Linux/macOS:
curl -fsSL https://raw.githubusercontent.com/letientai299/md2cb/main/scripts/install.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/letientai299/md2cb/main/scripts/install.ps1 | iex
Installs to /usr/local/bin (Unix) or %USERPROFILE%\bin (Windows) by default.
Use -d <path> to specify a custom directory.
Demo
Rendered from test/demo.md.
Development
See mise tasks for list of common tasks. Use mise dev to start the 2 web
servers:
- http://localhost:9091/demo.md: Markdown preview rendered by markserv:
- http://localhost:9090: Froala editor for pasting the converted content
Requirements
- https://mise.jdx.dev for manage dev toosl and tasks runner.
- Docker for running dev servers
Notes
Most of the code was written by Claude Code, with some code review from Copilot!
At work I need to use Teams. It supports a few makdown features, but the editing experience for long message isn't smooth. So, I often write in NVim and use the below shell script to convert them before paste to Teams.
pandoc --from gfm --to html | textutil -convert rtf -stdin -stdout -format html | pbcopy -Prefer
The script work well for typical bullet list, but:
- Doesn't support image, mermaid.
- Mac only.
Hence, I build this.
Fuente: GitHub