snipster
A simple cli snippet manager
snipster is a command line snippet manager allowing you to view, edit, create and copy snippets from your command line. It follows the Unix philosophy of "do one thing and do it well".
Installation | Setup | Usage | Troubleshooting | Other | Credits
Installation
snipster is available on PyPI. This is the easiest way to install it. All dependencies will be installed automatically.
pip3 install snipster-py
If you want to install snipster from source, have a look here
Setup
When you first start up snipster, you should run
snipster source
This will create a .snipster directory in your home folder (if it does not already exist) and create an empty snippet list.
Usage
snipster source
snipster list
snipster list [-t <tag>... | -l <language>... | -k <keyword>... ]...
snipster (-c|-e|-o) [-f] <snippet-id>
snipster -h | --help
snipster -v | --version
Listing (And Filtering) All Snippets
You can filter by tag (-t), keyword in the title (-k) and language (-l). If the filters result in only one match, the match will be displayed directly (instead of a list with only one entry).
Creating/Editing A Snippet
When you create a snippet, an empty file will be created in ~/.snipster and opened in your $EDITOR. For this snippet to be read as valid, it needs to have yaml frontmatter and the actual snippet code needs to be marked as such. You do not need to have any attributes in the front matter but they are heavily encouraged. Valid attributes are tags, lang, title.
An id is not necessary. It will be automatically assigned by snipster when you source again.
In order for (changes to) a snippet to be recognized you need to snipster source after saving.
Viewing A Snippet
Copying A Snippet To The Clipboard
Troubleshooting
Bug Reports and Feature Requests
Bug reports and feature requests are very much appreciated. Please contact me on Twitter (@SolviAu) or open an issue here.
Other
Install From Source
If you do not want to use pip, you can "install" snipster by simply cloning the repo onto your local machine or downloading the latest release from here
git clone https://github.com/SophieAu/snipster.git
Then, you need to add the file snipster to your path. the easiest way to do that is to symbolically link to it from the bin directory
ln -s snipster/src/snipster ~/bin/
snipster also needs a few dependencies to function properly. Make sure they are installed
- Pygments 2.2.0 (for the syntax highlighting)
- pyperclip 1.6.0 (to copy snippets to the clipboard)
- tabulate 0.8.2 (to display the snippet list in a table)
Credits
This project was heavily inspired by cheat, a command line cheat sheet viewer/creator
sophieau.github.io – Twitter @SolviAu – © 2018, MIT Licence
Metadata
Release files for snipster-py 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| snipster-py-1.0.3.tar.gz | 7.0 kB | Without provenance | Details for snipster-py-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| snipster_py-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for snipster_py-1.0.3-py3-none-any.whl |
Total release size: 14.6 kB
Release files / snipster-py-1.0.3.tar.gz
| Download URL | snipster-py-1.0.3.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe96f543cf0c0b92f7a5c572647a03240a4106f9473f4c0e8cad5321cace8616
|
|
BLAKE2b-256 checksum How to use checksums |
2b1fd403fdddda228f96a057e87723b0cb4d4a0df2b1335b00f773d91139725e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / snipster_py-1.0.3-py3-none-any.whl
| Download URL | snipster_py-1.0.3-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
765b7c45520861f684a077a011a3d92bfb1fa6c28e8e57483c54514e75d4f8a7
|
|
BLAKE2b-256 checksum How to use checksums |
b927f5f9985e999be11e5291b016eb8b7132a56f0bf8a5bee94570f86e7f8980
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for snipster-py 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.