Seattle.rb: March 2007 Archives

PNG is an almost-pure-ruby PNG library. It lets you write a PNG without any C libraries.

FEATURES

  • Very simple interface.
  • Outputs simple PNG files with ease.
  • Basic PNG reader as well (someday it might do compositing and the like!).
  • Almost pure ruby, does require a compiler.

SYNOPSYS

require 'png'

canvas = PNG::Canvas.new 200, 200

# Set a point to a color
canvas[100, 100] = PNG::Color::Black

# draw an anti-aliased line
canvas.line 50, 50, 100, 50, PNG::Color::Blue

png = PNG.new canvas
png.save 'blah.png'

Changes:

1.1.0 / 2007-03-26

  • 4 major enhancements:
    • Fixed and incorporated Dominik Barathon's optimizations.
    • Wrote inline methods for pngcrc and pngjoin. Now about 15x faster overall.
    • Basic PNG loading.
    • Reoriented x/y origin to bottom left. This will break things!
  • 3 minor enhancements:
    • Awesome ascii art patches from Tom Werner: Canvas#inpsect, Canvas#tos, Color#toascii.
    • Switched to Hoe.
    • PNG.pie_chart from png/pie.
  • 1 bug fix:
    • Fixed bug in PNG::Canvas#each.

Allows you to lay out HTML using ASCII art. Stolen from psykotic's code posted to reddit: http://programming.reddit.com/info/k9dx/comments

SYNOPSIS:

require 'box_layout'

page_template = <<-END
----------
|        |
----------
| |    | |
| |    | |
| |    | |
| |    | |
----------
|        |
----------
END

layout = BoxLayout.html page_template
puts "<title>cute</title>"
puts "<style>* { border: 1px solid black }</style>"
puts layout % %w[header left body right footer].map {|s| "**#{s}**" }

1.0.0 / 2007-03-24

  • 1 major enhancement
    • Birthday!
require 'rubygems'
require 'ruby2ruby'

p = proc { |x| x + 1 }
puts p.to_ruby
# => proc { |x|
#      (x + 1)
#    }

hoedown

| | Comments (3)
Yeeeee Haw!2
It's a hoedown!!!

Currently:

  • There are 54 authors using hoe.
  • Contributing 102 projects to the ruby community!!!
  • Hoe is used in 7.18% of all gems!

Hot damn!

2) I should note that with 50+% Texan blood, I'm legally allowed (some might say obliged) to use the phrase "Yee Haw" and its variants.

...and the 100th is:

| | Comments (2)

Matthew King for activemdb!!! YAY Matthew!!!

Other contenders were:

  • John Nunemaker with twitter.
  • Aaron Patterson with his 4th (!!) hoe'd gem, daapclient (which only missed it by about 30 minutes).

ImageScience is a clean and happy Ruby library that generates thumbnails -- and kicks the living crap out of RMagick. Oh, and it doesn't leak memory like a sieve. :) For more information including build steps, see http://seattlerb.rubyforge.org/

Changes:

1.1.1 / 2007-03-08

  • 5 minor enhancements:
    • Added error handler that raises with information about what went wrong.
    • thumbnail is now pure ruby, everything now uses resize.
    • Produces cleaner JPEG files, with a small cost to file size/speed.
    • resize now uses Catmull-Rom spline filter for better quality.
    • resize copies existing ICC Profile to thumbnail, producing better color.
    • ICC Profile NOT copied for PNG as it seems to be buggy.
  • 1 bug fix:
    • Fixed rdoc

A simplistic script which automates a limited set of rubyforge operations

  • Run 'rubyforge help' for complete usage.
  • Setup: For first time users AND upgrades to 0.4.0:
    • rubyforge setup
    • edit ~/.rubyforge/user-config.yml
    • rubyforge config
  • Don't forget to login! logging in will store a cookie in your .rubyforge directory which expires after a time. always run the login command before any operation that requires authentication, such as uploading a package.

Changes:

0.4.1 / 2007-03-08:

  • Verify that login succeeded and warn against if not (prolly should raise).
  • Print a friendly error if you have the wrong package id.
  • Handle upload error in add_release a bit better.

Adding blogging to hoe.

| | Comments (0)

Thanks to the ever-awesome Aaron Patterson (go Seattle.rb!), hoe can now blog for you. You've got to set up a ~/.hoerc file to make it work.

--- 
publish_on_announce: true
blogs: 
- user: yourusername
  password: yourpassword
  url: http://blog.example.com/cgi-bin/mt-xmlrpc.cgi
  blog_id: 1
  extra_headers:
    mt_convert_breaks: markdown

Note that extra_headers is just that, extra. This lets me post plain text to the server and apply the markdown filter to make it pretty. Everything else is required and you'll have to consult your blog doco to see what the values should be.

About this Archive

This page is a archive of entries in the Seattle.rb category from March 2007.

Seattle.rb: February 2007 is the previous archive.

Seattle.rb: April 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.1