CSON is a thing too!
:p
Nice!
On Apr 11, 2014, at 12:17 PM, Yuvi Panda yuvipanda@gmail.com wrote:
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:
- Write YAML file describing the schema
- run `python yaml-to-json.py <yaml-file-name> | pbcopy`
- 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 Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics