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!
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
On Fri, Apr 11, 2014 at 9:52 PM, Andrew Otto aotto@wikimedia.org wrote:
CSON is a thing too!
:p
Cool! We should've always stuck to keeping schemas in PHPON and just evaling it serverside...
Because lord knows we'd never want our researchers to be able to easily handle the schemas or anything ;p.
On 11 April 2014 09:29, Yuvi Panda yuvipanda@gmail.com wrote:
On Fri, Apr 11, 2014 at 9:52 PM, Andrew Otto aotto@wikimedia.org wrote:
CSON is a thing too!
:p
Cool! We should've always stuck to keeping schemas in PHPON and just evaling it serverside...
-- Yuvi Panda T http://yuvi.in/blog
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics