Teekanne / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

Review request for Java script and exec transformation services #414

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Java script and exec transformation services.

http://code.google.com/r/paulianttila-ihc-binding/source/detail?r=a9c236b007406c
22fe7d0bded2754015733de7c0

Original issue reported on code.google.com by pauli.an...@gmail.com on 20 Aug 2013 at 5:17

GoogleCodeExporter commented 9 years ago
Sorry, I forgotten to change the name of the issue.

Original comment by pauli.an...@gmail.com on 20 Aug 2013 at 5:20

GoogleCodeExporter commented 9 years ago

Original comment by teichsta on 23 Aug 2013 at 8:48

GoogleCodeExporter commented 9 years ago

Original comment by teichsta on 26 Aug 2013 at 5:41

GoogleCodeExporter commented 9 years ago
Merged both TransformationServices into default branch (see 
http://code.google.com/p/openhab/source/detail?r=b3e06a2358eb5685a89279010688a12
9ed8bc522 and 
http://code.google.com/p/openhab/source/detail?r=4e2b4cadebd3dc2f68053b3e65a9de4
88d3fb775).

Thanks Pali for this contribution!

Original comment by teichsta on 2 Sep 2013 at 7:48

GoogleCodeExporter commented 9 years ago
It would be a great enhancement if one could put little scripts directly as 
function rather than feeding a file name. Would that be doable?

Original comment by teichsta on 2 Sep 2013 at 7:49

GoogleCodeExporter commented 9 years ago
I also think possibility to define script directly, but I rejected it because 
little bit complicated java script code most probably cause problems to 
bindings configuration parsers. 

If configuration parsers are not a problem, maybe we could introduce more 
generic way to provide inline code / file to all transformation services. 

Something like

JS(file:test.js)
XSLT(file:test.xsl)
REGEX(file:test.regex)
JS(function(input){return input/100;})
REGEX(.*?<title>(.*?)</title>.*)
XSLT(...)

Original comment by pauli.an...@gmail.com on 3 Sep 2013 at 2:45