Tagging library for Ruby
Provide a robust tagging API that solves the problems posed by Acidus:
How to handle multiple words
If/how to allow tag delimiter inside a tag
Does letter case matter
Punctuation and symbols
Handling plural or singular words
Multiple language support
YTag handles cases 1, 2, 3, and 4, as these are syntactic issues. Cases 5, 6, 7, and 8 are more interesting. I think they should really be left to user creativity. Case 6 is not a problem because YTag maintains independent date and time stamps for tags, so even if I encode it in the tag in a weird manner, any user will be able to get at an ISO-standard date/time stamp.
At the end of the day, YTag draws a lot of inspiration from Consumating [RIP] and del.icio.us.
require 'rubygems' require 'ytag'
What you get:
YTag::Tag#new(name, user, active=true, hidden=false) YTag::Tag#create YTag::Tag#modify YTag::Tag#access YTag::Tag#print
To construct a Ruby gem, just type:
To install it, type:
sudo gem install pkg/ytag-0.0.1.gem
I haven't tested this code with YARV, so YMMV.
The source is availble at github: git://github.com/yesmar/ytag.git. Feel free to clone it and implement your own awesome ideas. You can also send your patches by email to yesmar[at]speakeasynet.