Skip to content

xsnippet-cli is a simple command line interface for interacting with xsnippet service.

License

Notifications You must be signed in to change notification settings

xsnippet/xsnippet-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xsnippet-cli

xsnippet-cli is a simple command line interface for interacting with xsnippet service. By means this script, you can easily post and receive snippets directly from your terminal.

Usage

It's very easy to use. You can paste the snippet this way

$ xsnippet /path/to/file

or this way

$ cat /path/to/file | xsnippet

As you can see the last method posts a some command output. It's very usefull to post the last few lines from logfile this way

$ tail -n 5 nginx.log | xsnippet

It's important to note that you can specify a snippet language or tags. Thats can be done by the following command

$ cat setup.py | xsnippet -l python -t setuptools test

If you want to receive snippet just do the following command

$ xsnippet -r snippet_id

Installation

$ (sudo) pip install xsnippet-cli

or

$ (sudo) easy_install xsnippet-cli

or

$ wget http://git.io/xsnippet-cli.zip -O xsnippet-cli.zip
$ unzip xsnippet-cli.zip && cd xsnippet-cli-master
$ (sudo) python ./setup.py install

Meta

About

xsnippet-cli is a simple command line interface for interacting with xsnippet service.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages