https://github.com/meain/mdclip
Copy markdown as html to html clipboard
https://github.com/meain/mdclip
Last synced: about 2 months ago
JSON representation
Copy markdown as html to html clipboard
- Host: GitHub
- URL: https://github.com/meain/mdclip
- Owner: meain
- Created: 2025-01-15T17:49:42.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-01-15T18:13:38.000Z (3 months ago)
- Last Synced: 2025-02-25T02:49:51.469Z (2 months ago)
- Language: Swift
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mdclip - Copy Markdown as html to html clipboard
A command-line tool that converts Markdown to HTML and copies both formats to the clipboard.
## Features
- Reads Markdown from standard input
- Converts Markdown to HTML using [Down](https://github.com/johnxnguyen/Down)
- Copies both formats to the clipboard:
- Plain text: Original Markdown content
- HTML: Converted HTML version## Installation
### Using Pre-built Binary
1. Download the latest release from the [Releases page](https://github.com/yourusername/mdclip/releases)
2. Extract the tar.gz file
3. Move the binary to your PATH:
```bash
mv mdclip /usr/local/bin/
```### Development (Build from Source)
1. Clone this repository:
```bash
git clone https://github.com/yourusername/mdclip.git
cd mdclip
```2. Build the project:
```bash
swift build -c release
```3. Install the binary:
```bash
cp .build/release/mdclip /usr/local/bin/mdclip
```## Usage
Pipe Markdown content to the program:
```bash
echo "This *could* be `completely` **pointless**." | mdclip
```Or use with a file:
```bash
mdclip < document.md
```The converted HTML and original Markdown will be available in your clipboard.
## Requirements
- macOS
- Xcode Command Line Tools
- Swift 5.10 or later