[wikka-community] INI parser for action metadata and extensible formatters
Dario Taraborelli
dartar
Sat Apr 19 15:17:23 GMT 2008
So what do these three things have in common?
Here's some background. Today I started playing with the Google Chart
API [1] and I must say it's tremendously powerful.
Try it yourself by embedding something like this in a wiki page:
""<img src="http://chart.apis.google.com/chart? chs=250x100
&chtt=Market Share 2008 &chd=t:60,15,10,15 &cht=p3
&chl=January|February|March|April" alt="Sample chart" /> ""
or
""<img src="http://chart.apis.google.com/chart? cht=t &chs=440x220
&chtm=europe &chco=ffffff,edf0d4,13390a &chld=ITFRES
&chd=s:Af9 &chf=bg,s,EAF7FE" alt="Sample chart" /> ""
it'd be very easy to write a formatter extension taking as an input an
INI-format [2] series of settings and rendering a Google Chart as
output. E.g.
::(google-chart)
cht=t
chs=440x220
chtm=europe
chco=ffffff,edf0d4,13390a
chld=ITFRES
chd=s:Af9
chf=bg,s,EAF7FE
::
the same could also be adapted to parse parameters for a google-maps
formatter [3], e.g.
::(google-maps)
center=45,76878;2,56658;
type=satellite;
zoom=7
width=250px
marker=1; 45,76878; 2,666; DarTar
marker= 2; 46,54763; 3,666; WikkaWiki
::
I just realised that Olivier is also considering an INI format for
storing action metadata [4] so I thought we could just integrate an
INI parser and reuse it for extensible formatters [5] or something
similar to structured data [6] as well.
If we were really smart we could also have our extensible formatter
recognize other formats on top of INI (e.g. XML, CSV or PHP arrays)
depending on the formatter key (e.g. google-chart) specified
What do you think?
Dario
Refs
[1] http://code.google.com/apis/chart/
[2] http://en.wikipedia.org/wiki/INI_file
[3] http://wikkawiki.org/GoogleMap
[4] http://wush.net/trac/wikka/ticket/446
[5] http://wikkawiki.org/WikkaExtensibleMarkup
[6] http://wikkawiki.org/StructDataActionInfo
--
Dario Taraborelli
Wikka Development Team
http://wikkawiki.org
More information about the community
mailing list