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:40:43 -0700 2009
commit 4b74cef582f64f69f2ef477eeca92486a8e5cbbe
tree a716f7a13f34e651e1da82bf5ca6d8a55de03922
parent 12bf8b6f4125640d463db78afb1354c19a923cff
tree a716f7a13f34e651e1da82bf5ca6d8a55de03922
parent 12bf8b6f4125640d463db78afb1354c19a923cff
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
README.md | ||
| |
bin/ | ||
| |
lib/ | ||
| |
snipplr-ruby-gem.gemspec | ||
| |
test/ |
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:
# note that on its first operation it will create a home/$user$/.snipplr folder, the user may add api_key
# which holds its api key, also any error will be logged to .snipplr/errors file.
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/./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.








