Blogging software

Anyone done any work on a ruby-powered weblog?

martin

James Britt’s site (http://www.rubyxml.com/) is powered by Blogtari,
which is a Ruby port he did of the Cherry Blossom blogger that Rael
Dornfest (O’Reilly & Assoc) wrote. It seems pretty cool.

-rich

···

On Thursday, February 6, 2003, at 10:50 AM, Martin DeMello wrote:

Anyone done any work on a ruby-powered weblog?

martin

Anyone done any work on a ruby-powered weblog?

ruby-lang.org uses tdiary, link at the bottom of the ruby-lang home page.

Chris

There is a bug in the dbd_mysql package.

When I specify a port in the connection (as follows):

DBI.connect(‘DBI:Mysql:database=dbName;host=hostName;port=3307’,
‘username’)

I get the following error:

/usr/local/lib/ruby/site_ruby/1.6/DBD/Mysql/Mysql.rb:61:in `connect’:
no implicit conversion from string (TypeError)

Line 61 of DBD/Mysql/Mysql.rb reads:

handle = ::Mysql.connect(hash[‘host’], user, auth, hash[‘database’],
hash[‘port’], hash[‘socket’], hash[‘flag’])

The error is fixed by changing line 61 as follows:

handle = ::Mysql.connect(hash[‘host’], user, auth, hash[‘database’],
hash[‘port’].to_i, hash[‘socket’], hash[‘flag’])

My question is, I’ve reported the bug. What else do I need to do to
get this fix incorporated into the dbi source?

Best,

Dave

PGP.sig (186 Bytes)

···

David King Landrith
(w) 617.227.4469x213
(h) 617.696.7133

One useless man is a disgrace, two
are called a law firm, and three or more
become a congress – John Adams

public key available upon request

Martin DeMello wrote:

Anyone done any work on a ruby-powered weblog?

pragprog.com/pragdave is Ruby powered (thinking about it, it should
probably say that). I wanted something that would accept multiple input
formats, and that would work from both normal files and from CVS
repositories.

Cheers

Dave

I’ll second the ref to James Britt’s blogtari. I’m working on a
weblogger too, based on some of the ideas in James’ implementation, but
with my own requirements satisfied (more blosxom-ish). It’s currently
just a personal project, and a great way to learn more about Ruby.

later…

···

— Chris Morris chrismo@clabs.org wrote:

Anyone done any work on a ruby-powered weblog?

ruby-lang.org uses tdiary, link at the bottom of the ruby-lang home
page.

Chris

=====

Mike Thomas
http://www.samoht.com
It’s better backwards


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Anyone know how to get in touch with him? His RSS feed returns a 500 Server error…

d.

···

James Britt’s site (http://www.rubyxml.com/) is powered by Blogtari,
which is a Ruby port he did of the Cherry Blossom blogger that Rael
Dornfest (O’Reilly & Assoc) wrote. It seems pretty cool.

-rich

On Thursday, February 6, 2003, at 10:50 AM, Martin DeMello wrote:

Anyone done any work on a ruby-powered weblog?

martin

There is a bug in the dbd_mysql package.

When I specify a port in the connection (as follows):

DBI.connect(‘DBI:Mysql:database=dbName;host=hostName;port=3307’, ‘username’)

I get the following error:

/usr/local/lib/ruby/site_ruby/1.6/DBD/Mysql/Mysql.rb:61:in
`connect’: no implicit conversion from string (TypeError)

Line 61 of DBD/Mysql/Mysql.rb reads:

handle = ::Mysql.connect(hash[‘host’], user, auth, hash[‘database’],
hash[‘port’], hash[‘socket’], hash[‘flag’])

The error is fixed by changing line 61 as follows:

handle = ::Mysql.connect(hash[‘host’], user, auth, hash[‘database’],
hash[‘port’].to_i, hash[‘socket’], hash[‘flag’])

My question is, I’ve reported the bug. What else do I need to do to
get this fix incorporated into the dbi source?

It’ll be fixed soon.

Note that hash[‘flag’] also needs a .to_i or you’ll get the same
exception if you pass a flag value.

···

At 2:06 +0900 2/7/03, David King Landrith wrote:

Best,

Dave


David King Landrith
(w) 617.227.4469x213
(h) 617.696.7133

One useless man is a disgrace, two
are called a law firm, and three or more
become a congress – John Adams

public key available upon request

Any chance that you’d make the code availible? It would be interesting
to see how you’ve implemented things. =)

···

On Thursday 06 February 2003 11:42 am, Dave Thomas wrote:

Martin DeMello wrote:

Anyone done any work on a ruby-powered weblog?

pragprog.com/pragdave is Ruby powered (thinking about it, it should
probably say that). I wanted something that would accept multiple
input formats, and that would work from both normal files and from
CVS repositories.


Wesley J. Landaker - wjl@icecavern.net
OpenPGP FP: C99E DF40 54F6 B625 FD48 B509 A3DE 8D79 541F F830

I use rubyjournal for my daily weblog, thedailychannel.com.
I’ve been meaning to find the time to put it on RAA, and,
of course, improve it. Nice name, don’t you think?

http://www.thedailychannel.com/rubyjournal

“RubyJournal 1.0 is a weblog application that uses plain text files created
with any text editor for individual entries. It offers permalink page
creation, support for multiple weblogs, RSS output, templates, and simple
content management. RubyJournal is free for Mac OS X (as well as Unix and
Windows).”

cheers!
George Girton

···

On Thursday, February 6, 2003, at 05:26 PM, Wesley J Landaker wrote:

On Thursday 06 February 2003 11:42 am, Dave Thomas wrote:

Martin DeMello wrote:

Anyone done any work on a ruby-powered weblog?

pragprog.com/pragdave is Ruby powered (thinking about it, it should
probably say that). I wanted something that would accept multiple
input formats, and that would work from both normal files and from
CVS repositories.

Any chance that you’d make the code availible? It would be interesting
to see how you’ve implemented things. =)


Wesley J. Landaker - wjl@icecavern.net
OpenPGP FP: C99E DF40 54F6 B625 FD48 B509 A3DE 8D79 541F F830

Wesley J Landaker wrote:

pragprog.com/pragdave is Ruby powered (thinking about it, it should
probably say that). I wanted something that would accept multiple
input formats, and that would work from both normal files and from
CVS repositories.

Any chance that you’d make the code availible? It would be interesting
to see how you’ve implemented things. =)

Yup: see

http://pragprog.com/pragdave/Tech/Blog/SourceCode.rdoc,v

Cheers

Dave

I’ll second the ref to James Britt’s blogtari. I’m working on a
weblogger too, based on some of the ideas in James’ implementation, but
with my own requirements satisfied (more blosxom-ish). It’s currently
just a personal project, and a great way to learn more about Ruby.

later…

I have three sites running Blogtari:
www.jamesbritt.com
www.rubyxml.com
www.ruby-doc.org

With each one I’ve found a reason to tweak the code, and have been juggling to maintain a sane core version. There hasn’t been a
new release in a while, though I’m fairly close to getting one together. At the moment I’m driving cross-country (USA: Virginia to
Arizona, quasi-scenic route), so tidying up code and getting it public will still take a bit a of time.

The main goals have been to make it really easy to install and use for basic blogging, but have enough simple hooks that one can
enhance the behavior without touching any core code. I have accessory classes for fetching and rendering RSS feeds, fetching RAA
info as RSS, styling keywords, auto-creating Google links for “see related pages”, rendering of sub-blog headings, and some other
stuff.

For what it’s worth, while Blogtari started life as my hacking on a port of Blosxom, I’ve not tried to maintain any Blosxom
compatibility or features other than what I happen to like.
James

Anyone know how to get in touch with him? His RSS feed returns a 500 Server error…

Sadly, there are number of problems with the site, and I haven’t the wherewithal to fix things at the moment. I hope to get settled
down in about a week.

James

There is a bug in the dbd_mysql package.

When I specify a port in the connection (as follows):

DBI.connect(‘DBI:Mysql:database=dbName;host=hostName;port=3307’, ‘username’)

I get the following error:

/usr/local/lib/ruby/site_ruby/1.6/DBD/Mysql/Mysql.rb:61:in
`connect’: no implicit conversion from string (TypeError)

Line 61 of DBD/Mysql/Mysql.rb reads:

handle = ::Mysql.connect(hash[‘host’], user, auth,
hash[‘database’], hash[‘port’], hash[‘socket’], hash[‘flag’])

The error is fixed by changing line 61 as follows:

handle = ::Mysql.connect(hash[‘host’], user, auth,
hash[‘database’], hash[‘port’].to_i, hash[‘socket’], hash[‘flag’])

My question is, I’ve reported the bug. What else do I need to do
to get this fix incorporated into the dbi source?

It’ll be fixed soon.

Note that hash[‘flag’] also needs a .to_i or you’ll get the same
exception if you pass a flag value.

The above changes have been made. A few other changes have been
added as well, such as that DatabaseError exceptions return the
error number (not just the error message), and transaction support.
(If your server is recent enough, the commit and rollback methods
now work.)

Until the next release, these changes will only be available from
the Ruby DBI CVS repository, available at:

It’d be good if people checked out the changes and gave them a
try…

···

At 7:34 +0900 2/7/03, Paul DuBois wrote:

At 2:06 +0900 2/7/03, David King Landrith wrote:

Best,

Dave


David King Landrith
(w) 617.227.4469x213
(h) 617.696.7133

One useless man is a disgrace, two
are called a law firm, and three or more
become a congress – John Adams

public key available upon request

Very cool. =) I actually am most interested in your CVS stuff. I’m
currently working a little ruby weblog myself; most of the base stuff
of what I have implemented is similar to blogtari and your rublog (it
can handle plugable filters, templates, heirarchies, etc) but I’m
adding a few other things I like to it:

o CVS support - not only can it read from CVS, it will allow the
display of more than one version while preserving chronological flow.
For example, if I make a new entry on Monday, a new entry Tuesday, and
a new entry Wednesday, chronologically it’ll look something like this:

Wednesday’s Entry [link] [CVS: 1.1]
Tuesday Entry [link] [CVS: 1.1]
Monday’s Entry [link] [CVS: 1.1]

But then I update the entry I made Monday on Friday, you’ll see
something like this when looking at the weblog chronologically:

Monday’s Entry (Updated Friday) [link] [CVS: 1.2]
Wednesday’s Entry [link] [CVS: 1.1]
Tuesday Entry [link] [CVS: 1.1]
Monday’s Entry (Updated Friday) [link] [CVS: 1.2 1.1]

The key here being that things stay put chronologically and get linked
in whereever they are updated, but it’s always possible to see the
revision history (unless the admin, for some reason, wants to make a
version unavailable–but that’s not that much different than how you
just remove a blog entry permenantly; usually some direct repository
surgery is quick enough :wink:

o Stupidly easy template support - there are a lot of Ruby template
engines, and I admit I’m impressed by some of them (narf, in
particular, seems very well made). However, for my little weblog, I
didn’t want a big template engine; instead I just let my templates have
ruby code in them.

For instance, my template for entries looks something like (Dave may
notice that this block looks very familiar – for testing purposes
only :wink:

#{WebLog.entry.title} #{WebLog.entry.date}
[ #{WebLog.entry.link} ]
#{WebLog.entry.text}

I call this template with:

grab_entries(“.”,‘blog’).each { |WebLog.entry|
File.open(template) { |file|
puts file.read.gsub(/#{(.*)}/) { |cmd|
eval $1
}
}
}

Which has the not-annoying-to-me-but-might-be-to-other-people property
of not being able to handle more than one #{} on a line, and forcing
the entire #{} to be on a line.

The magic “WebLog” object just looks something like:

class WebLog
class << self
attr_accessor :name, :url, :entry
end
end

Which, of course, is just a class pretending to be a singleton. :wink:

Anyway, blogtari looks nice, and I’m going to take a look at rublog
after I stop yapping. I’m of course curious how the CVS stuff is done
(I was planning on use the CVS command itself on a checked out tree
instead of the repository itself) and what kind of input filters you’re
using right now (much harder than writing the weblog code is deciding
how you want the input to be formatted :wink:

Well, when I get this little piece of code cleaned up a little, I’ll
post it here. I’m mostly writing it for the fun of it and to use
personally, but hopefully any “cool” things I think to add to it may
inspire others–I’ve certainly been pilfering inspiration from other
rubists along the way. :wink:

···

On Friday 07 February 2003 8:42 am, Dave Thomas wrote:

Wesley J Landaker wrote:

pragprog.com/pragdave is Ruby powered (thinking about it, it should
probably say that). I wanted something that would accept multiple
input formats, and that would work from both normal files and from
CVS repositories.

Any chance that you’d make the code availible? It would be
interesting to see how you’ve implemented things. =)

Yup: see

http://pragprog.com/pragdave/Tech/Blog/SourceCode.rdoc,v


Wesley J. Landaker - wjl@icecavern.net
OpenPGP FP: C99E DF40 54F6 B625 FD48 B509 A3DE 8D79 541F F830