Hello!

EventLogging Schemas are in JSON, and I hate hand-writing JSON. It
feels rather painful. So I whipped up this little python script
(requires pyyaml) that will let me write the actual schema in YAML,
and convert it trivially to JSON for copy pasting into metawiki. You
can find it at https://gist.github.com/yuvipanda/10481205

My workflow now is:

1. Write YAML file describing the schema
2. run `python yaml-to-json.py <yaml-file-name> | pbcopy`
3. Paste that into appropriate metawiki page

(2) and (3) can be further consolidated if we want, but that is for
another day (and I had to write only 4 schemas from scratch, so this
was useful enough).

Hope someone finds it useful!

-- 
Yuvi Panda T
http://yuvi.in/blog

_______________________________________________
Analytics mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/analytics

Reply via email to