On Wed, 6 Aug 2003, Gavin Sinclair wrote:
> On Wednesday, August 6, 2003, 10:53:34 PM, Hugh wrote:
>
> > Is there any sense in putting it out in YAML so that it can be
> > grabbed from there and queried by Ruby? Not sure why one would need
> > to do that programatically yet, ....it might allow triggering of
> > updates....maybe for people without CVS...
>
> I was actually thinking of it being programatically queried, just to
Oh, I thought you meant either dumping it as a table or keeping the
propriatry format, rather than ruby. Sorry.
> give different status reports. YAML is a good option for that,
> obviously, but not the only one. The file may be easier and clearer
No, true. I'm currently using something like:
open(@logfile, "a") { |lf|
lf.puts "entry({"
hash.each_pair { |k,v|
lf.puts " \"#{k}\" => \"#{v}\","
}
lf.puts "})"
}
in one appliacation, which gives entries like
entry({
"this" => "that"
"thingy" => "the other"
})
because you can't pass a hash to a method as a literal without
parens :-(. My processor will just define what entry does with the
hash, then load (execute) the logfile. This style works better in
Lua because of the parens issue, and seems to be an idiom in that
language, but I've not done much with Lua, and it's off topic here
:-). You have to trust the logfile as a source, though.
> to read and write using a hardcoded format, with all the downsides
> that brings.
>
> My spreadsheet current has headings for:
> - filename
> - happiness (/10)
> - status (examples: already done, done, first pass, obsolete)
> - committed (date)
>
- last author?
> No comments necessary so far; I've put meta-comments in the files
> themselves precisely so they are available to those who want them.
[...]
>
> Gavin
>
Hugh
|