Handy Conversion Sexagesimal (base 60) for Short URLs
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 18 commits behind veganstraightedge:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.autotest
.gitignore
CHANGELOG.rdoc
Manifest.txt
README.rdoc
Rakefile

README.rdoc

new_base_60

DESCRIPTION:

Handy Conversion Sexagesimal (base 60) for Short URLs Cuts out ambiguous characters like:

  • l : lowercase l (looks like a 1 : one)

  • I : capital I (looks like a 1 : one)

  • O : capital O (looks like a 0 : zero)

Based on work done by Tantek Çelik : tantek.pbworks.com/New_base_60

FEATURES/PROBLEMS:

  • Converts Base10 (like 147124) to Base60 (like fs4)

  • Converts Base60 (like fs4) to Base60 (like 147124)

  • Converts Base60 (like fs4) to a Time object (Mon Oct 23 23:00:00 -0800 2372)

SYNOPSIS:

How to use:

require "new_base_60"
n = NewBase60.new("464")# => #<NewBase60:0x1011ea468 @base_60="464">
puts n.to_i             # => 14764
puts n.to_i.to_sxg      # => "464"
puts n.to_date          # => #<Date: 4910703/2,0,2299161>
puts n.to_date.to_s     # => "2010-06-04"
puts n.to_date.to_sxg   # => "464"

INSTALL:

  • sudo gem install new_base_60

CREDITS:

  • Original Idea : Tantek Çelik

  • Ruby Port : Shane Becker

  • Lotsa Cleanup : John Barnette

LICENSE:

PUBLIC DOMAIN. Your heart is as free as the air you breathe. The ground you stand on is liberated territory.