public
Rubygem
Description: A small gem which allows posting and fetching of entries from snipplr
Homepage:
Clone URL: git://github.com/narkisr/snipplr-ruby-gem.git
name age message
file .gitignore Loading commit data...
file README.md
directory bin/
directory lib/
file snipplr-ruby-gem.gemspec
directory test/

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.