Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sjml/fclip
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/sjml/fclip
- Owner: sjml
- License: mit
- Created: 2024-11-07T08:49:10.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-07T08:52:00.000Z (2 months ago)
- Last Synced: 2024-11-07T09:40:48.527Z (2 months ago)
- Language: TypeScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# `fclip`
Takes whatever is in your clipboard and formats it with `prettier`.
### Example
1. Copy some jankily formatted JSON from someplace.
2. `fclip json`
3. Paste your nicely formatted JSON wherever you want.I used to have [a little shell script that did this](https://github.com/sjml/dotfiles/blob/d100dee9f920a888054acdf48ae9f3053a8174b3/bin.homelink/fclip) but [prettier seems pretty devoted to making themselves useless if installed globally](https://github.com/prettier/prettier/issues/15141). So I made a little script with Deno which compiles to an absurdly large (but portable) executable.
Only works on Macs because that's what I use and it leverages the built-in `pbcopy` and `pbpaste` utilities instead of doing any fancy kind of API work.
Enjoy. Or don't, whatever. It's useful to me.