What
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
-
Date formating
-
Multiple language support
-
Colloquialisms/slang
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.
References: neosmart.net/blog/2007/the-need-for-creating-tag-standards/ www.memestreams.net/users/acidus/blogid152074
How
require ‘rubygems’ require ‘ytag’
Dependencies:
-
HTMLEntities gem
-
REX gem
-
RCL gem
What you get:
YTag::Tag#new(name, user, active=true, hidden=false) YTag::Tag#create YTag::Tag#modify YTag::Tag#access YTag::Tag#print
YTag::tagify(tag)
Install
To construct a Ruby gem, just type:
rake gem
To install it, type:
sudo gem install pkg/ytag-0.0.1.gem
Notes
I haven’t tested this code with YARV, so YMMV.
Contribute
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.