This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
ronen (author)
Mon Apr 06 05:47:17 -0700 2009
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Jun 16 14:40:52 -0700 2008 | |
| |
README.md | Mon Apr 06 05:47:17 -0700 2009 | |
| |
bin/ | Sat Jul 12 05:34:27 -0700 2008 | |
| |
lib/ | Mon Jul 14 14:12:47 -0700 2008 | |
| |
snipplr-ruby-gem.gemspec | Wed Jul 16 15:16:22 -0700 2008 | |
| |
test/ | Mon Jul 14 14:12:47 -0700 2008 |
README.md
snipplr-ruby-gem
This gem provides a CLI to snippets kept on the snipplr web site.
Installation:
gem sources -a http://gems.github.com
gem install narkisr-snipplr
# due to http://logicalawesome.lighthouseapp.com/projects/8570/tickets/574-gem-s-installed-from-github-setting-incorrect-permissions-on-bin-files
sudo chmod 777 /usr/lib/ruby/gems/1.8/gems/narkisr-snipplr-0.0.5/bin/snipplr
In the case that the gem isn't found remotly (github issues), then you may download the gem by using:
wget http://cloud.github.com/downloads/narkisr/snipplr-ruby-gem/snipplr-0.0.7.gem
# in order to install
sudo gem install narkisr-snipplr.gem -l
Usage:
# A home/$user$/.snipplr folder is created on first usage,
# any error will be logged to .snipplr/errors file.
# Add API key to /home/$user$/snipplr/api_key file or use -key option.
snipplr [options]
Where the options are:
-c (Optional, takes 0 arguments)
Create a new entry: snipplr -c -meta (see the meta description).
-h (Optional, takes 0 arguments)
Help
-d (Optional, takes 1 argument)
Delete an entry with an id number: snipplr -d 123.
-meta (Optional, takes 1 argument)
The meta data of a new entry in the following form:
":title=>'Entry title',tags:=>'C Ruby',:lang=>'c-plus-plus',:content=>'x=1'".
The content key is optional and will be piped in if not present (by using the '<' opertaor).
Lang is the language name found in Snipplr’s URLs, For example “javascript” or “c-plus-plus”.
-key (Optional, takes 1 argument)
API key (if not provided it will be taken from /home/$user$/snipplr/api_key).
-l (Optional, takes 0 arguments)
List all the existing entries (the format is id and title): snipplr -l.
-g (Optional, takes 1 argument)
Get the content of an entry and print it out: snipplr -g 123.







