[Ruby] Announcements from HOE

Aaron Patterson aaron_patterson at speakeasy.net
Sun Jan 28 03:37:19 PST 2007


On Sat, Jan 27, 2007 at 01:12:50AM -0800, Eric Hodel wrote:
> On Jan 22, 2007, at 21:22, Aaron Patterson wrote:
> > I thought it would be fun to post announcments to my blog from hoe,  
> > so I
> > added that functionality to my local copy of hoe.  Here's the result:
> >
> > http://tenderlovemaking.com/2007/01/22/ograph-version-001-has-been- 
> > released/
> >
> > It uses the MetaWeblog API:
> >
> >   http://www.xmlrpc.com/metaWeblogApi
> >
> > My diff is below.  Does anyone else like it?
> 
> I like it!
> 
> > ==== //src/hoe/dev/lib/hoe.rb#4 -
> > /Users/aaron/Programming/ruby/p4/zss/src/hoe/dev/lib/hoe.rb ====
> > ***************
> > *** 360,365 ****
> > --- 360,393 ----
> >         puts "Created email.txt"
> >       end
> >
> > +     desc 'Post announcement to blog.'
> > +     task :post_blog do
> > +       require 'xmlrpc/client'
> > +       require 'yaml'
> > +       require 'rdoc/markup/simple_markup'
> > +       require 'rdoc/markup/simple_markup/to_html'
> > +
> > +       config = YAML.load_file([ ENV['HOME'],
> > +                   '.blogs',
> > +                   'config.yml'].join(File::SEPARATOR))
> 
> Can we make this ~/.hoerc?  or is ~/.blogs/config.yml used by other  
> things?

AFAIK, nothing else uses ~/.blogs/, so .hoerc would be fine!  Also, I
don't know about converting the RDoc to html.  I'm not too impressed by
the html output my code produced......  Maybe just leave it text?

-- 
Aaron Patterson
http://tenderlovemaking.com/


More information about the Ruby mailing list