Updated Python OMHE Parser

24 views
Skip to first unread message

Alan Viars

unread,
Nov 28, 2011, 10:36:05 AM11/28/11
to OMHE
Hello All:

I've updated the OMHE parser somewhat over the holiday. This is a
summary of the updates:

- The import situation was kind of ugly so I cleaned it up. I moved
validators directory so it now lives inside omhe.core. Also the
__init__.py files are now blank as I like to keep them.

- I added a helper called "points" so you can assign a point value to
any OMHE message. Foe example steps=10000#pts=20
would result in a dict/JSON containing the a field named points with
the value of 20. This should make using OMHE for healthy gaming a
little easier.

- The parser now handles OMHE messages without a value. For example
"gbp" or "getbloodpressure" requires no value.

- Made result of bp more verbose. The resulting dict/JSON from "bp",
(a.k.a. bloodpressure) now spells out systolic, diastolic and pulse.
So you get

bp_systolic
bp_diastolic
bp_pulse

instead of

bp_syst
bp_dia
bp_pul

The code for python-omhe can be found here:

https://github.com/videntity/python-omhe

I'll be making more updates to this code in the coming weeks. What
I'd really like to see is a JavaScript parser! Has anyone been
working on one that is open source.

Alan

Jim Gilbert

unread,
Nov 28, 2011, 10:43:32 AM11/28/11
to omhe_mic...@googlegroups.com
Cool. We have the framework for a JS parser utilizing Node and
Express. Here is an example URL:
http://bconnected.connextions.com:8080/omhetest?ci=omhe+node+express%23hello%23world

Will keep going, if useful. Open for relative priority guidance.

Jim Gilbert

Reply all
Reply to author
Forward
0 new messages