Skip to content

Commit c060e3d

Browse files
committed
💡 readme.md: Documents --copy
Closes #3
1 parent 02387f9 commit c060e3d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

readme.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Want to customize **everything** before generating the image? Run it in ⚡️ *
3434
- ⚡️ [Interactive mode](#fully-customized) via `--interactive`
3535
- 🎒 [Presets](#presets): save and reuse your favorite settings
3636
- 🖱 [Selective highlighting](#selective) via `--start` and `--end`
37+
- 📎 [Copies image to clipboard](#copying-to-clipboard) via `--copy` (**cross-OS** 😱)
3738
- 🐶 Displays image directly in supported terminals
3839
- ⏱ Reports each step and therefore *shortens the wait*
3940
- 👀 Saves to [given location](#full-example) or [only opens in browser](#full-example) for manual finish
@@ -80,6 +81,7 @@ Options
8081
-l, --location Image save location, default: cwd
8182
-t, --target Image name, default: original-hash.{png|svg}
8283
-o, --open Open in browser instead of saving
84+
-c, --copy Copy image to clipboard
8385
-p, --preset Use a saved preset
8486
-h, --headless Use only non-experimental Puppeteer features
8587
--config Use a different, local config (read-only)
@@ -152,6 +154,36 @@ Selective mode can of course be combined with interactive mode, just with like a
152154

153155
**Note**: `carbon-now` will be smart enough to reuse your last used settings, instead of the default ones. 🤓
154156

157+
#### Copying to clipboard
158+
159+
It is [sometimes desired to just put the image in the clipboard](https://github.com/mixn/carbon-now-cli/issues/3#issue-339776815), so that it can be instantly pasted into other apps (like Keynote 💻 or Twitter 🐦). This is what the `--copy`/`-c` flag is for.
160+
161+
```
162+
$ carbon-now unfold.js -c
163+
```
164+
165+
will copy the image to clipboard instead of downloading it to a given directory.
166+
167+
Please be aware that this requires some binaries to be present on certain OS.
168+
169+
##### Linux
170+
171+
[`xclip`](https://linux.die.net/man/1/xclip) is required. You can install it via
172+
173+
```
174+
sudo apt-get install xclip
175+
```
176+
177+
##### Windows
178+
179+
[`NirCmd`](https://linux.die.net/man/1/xclip) is required. It can be installed via
180+
181+
```
182+
choco install nircmd
183+
```
184+
185+
Also make sure the `nircmd` command is globally accessible/inside your Windows directory.
186+
155187
#### Full Example
156188

157189
For demonstration purposes, here is an example using all options.

0 commit comments

Comments
 (0)