L. Cleophas schreef:
Hi
I've been trying to use the API to get output into YAML format for
processing in Ruby. Seems (see
http://bugzilla.wikimedia.org/show_bug.cgi?id=12120 ) that the API's
YAML output is broken, as it does not escape quotes, colons followed
by spaces etc. This causes output like
title: Job: A Comedy of Justice
when getting the Wikipedia page with that title; due to the unescaped
second colon followed by space, Ruby's YAML.load chokes on this. Seems
to me that this basically means that YAML output is not usable for
getting data from wikipedia, quite a few of whose articles use ": " in
titles or other fields.
I know, I should fix it. It's just that I'm not
familiar with YAML at
all, so I need to find some time to read the YAML specs and rewrite the
YAML formatter.
Any thoughts on how to circumvent this (without using XML as format; I
know I can parse this from Ruby using REXML, but it ain't nearly as
easy/clean as YAML), or on a time horizon for a fix/update?
XML is not that bad.
There's also JSON, which is equally easy/clean.
Roan Kattouw (Catrope)