A tool for accessing code snippets contained in a folder of plain text Markdown files. This is a python reimplementation of snibbets
This is, for the most part, api compatible with snibbets
. The config file is the same format, the command line arguments are identical. There are minor differences, documented below.
For further documentation, reference the snibbets docs (at least until I get around to adding them here).
Currently only installation from git is supported:
python -m pip install git+https://github.com/borzilleri/clipper.git
These are features that snibbets
has that I have not yet implemented, or
additional features I'd like to add. They're very roughly in priority order.
-
Alfred support: IN PROGRESS/Mostly done.
This should be nearly functionally complete and usable. Remaining tasks are improved documentation in the configuration window, and removing "nulls" from some of the displayed fields.
-
Improved Output Redirection
Better checking that our output is a tty when prompting for menus.
-
Documentation
Properly document options, usage, installation, etc, here instead of relying relying on the snibbets docs.
-
Release to PyPi
-
skylighting
highlighter supportLow priority.
pygments
is built in and works pretty well. -
LaunchBar support
Low priority. I don't use LaunchBar myself, so I'm not as inclined to get this to work.
-
copy
behaviorWhen multiple snippets are printed (by specifying
--all
or selectingAll Snippets
from the menu), the entire output will be copied, not just the last snippet's code. -
pygments highlighting
Pygments is available as a python module, and as such is bundled with clipper. This means there's no need to install it separately, and it's always available as the default highlighter.
-
console menu
The default ("console") menu is powered by the pick library.
-
Minor formatting differences
I have attempted to maintain compatability for the config file, command-line options, and snippet files. However, the code is not exactly the same, and I have made some opinionated choices around format and whitespace. The result is that the output format may differ slightly.
Honestly? No good reason. Stretching some codeing muscles, learning more about building and publishing python packages.
Also, I just don't care for ruby and didnt feel like installing it.