public
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 Mon Jun 16 14:40:52 -0700 2008 took the api key into a seperate (uncommited) file [narkisr]
file README.md Mon Apr 06 05:47:17 -0700 2009 making usage clearer [ronen]
directory bin/ Sat Jul 12 05:34:27 -0700 2008 moving a version forward for git hub gem buildup [narkisr]
directory lib/ Mon Jul 14 14:12:47 -0700 2008 less if statments (a bit more cleaner code) [narkisr]
file snipplr-ruby-gem.gemspec Wed Jul 16 15:16:22 -0700 2008 rev=0.0.7 [narkisr]
directory test/ Mon Jul 14 14:12:47 -0700 2008 less if statments (a bit more cleaner code) [narkisr]
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.