OpenWebif [E2OpenPlugins]
Re: OpenWebif [E2OpenPlugins] #21
Re: OpenWebif [E2OpenPlugins] #22
Posted 16 October 2011 - 19:09
I've already created a simple bouquetlist channellist overview. It works with static html files, some javascript and a python function generating json. I will try to integrate it this weekend.
Wait Sjaaky i was a little busy. I hope to find tonight or tomorrow the time to write the prototype of the page so you have only to pass the html code to the function: get_main_body
Re: OpenWebif [E2OpenPlugins] #23
Re: OpenWebif [E2OpenPlugins] #24
Re: OpenWebif [E2OpenPlugins] #25
Re: OpenWebif [E2OpenPlugins] #26
Re: OpenWebif [E2OpenPlugins] #27
Re: OpenWebif [E2OpenPlugins] #28
Re: OpenWebif [E2OpenPlugins] #29
Posted 19 October 2011 - 23:46
There is something to do yet to complete this page.
Please take a look at TODO in file: ow_contents.py
affected files to complete page: http_server.py, ow_contents.py, box_info.html
code optimizations and info additions are welcome !
Attached Files
Edited by bacicciosat, 19 October 2011 - 23:47.
Re: OpenWebif [E2OpenPlugins] #30
Posted 20 October 2011 - 00:04
this evening i finally started to write some code on openwebif.
Because all you are more skilled than me about "web programming" i did something different.
I started to write the wacl (Web Api Compatibility Layer) to keep the compatibility between openwebif and the api of the original web if.
As i told i don't like really much the approach of original web if. I preferred use sax and xmlgenerator and make the xml programmatically (perhaps i'm too old style?)
Writing the code and thinking about your posts i thought that the same code may be used to generate both xml and json outputs. So i did that:
- created a folder wacl for contain all "web apis"
- created a module wacl.wacl.py as root of "web apis"
- created a common module wacl.common.py as base module for every "web api"
- created the "about" web api (as example)
Now.. calling the url "http://yourbox:8088/web/about" an xml will be generated (as do the original webif)
But calling the url "http://yourbox:8088/...ut?format=json" a json will be generated
I haven't yet committed because first i want to ask what you think about that (i have attached it to the post). Do you like it? It could be ok?
I think the code is sufficiently simple and it seem faster than original webif
Let me know
PS: if you don't like WACL we can rename it
PS2: you need to install python json extension
PS3: all the code is in wacl folder... on http_server.py need only the import and the putChild "root.putChild("web", WACL(session))"
Attached Files
Re: OpenWebif [E2OpenPlugins] #31
Re: OpenWebif [E2OpenPlugins] #32
Re: OpenWebif [E2OpenPlugins] #33
Re: OpenWebif [E2OpenPlugins] #34
Re: OpenWebif [E2OpenPlugins] #35
Re: OpenWebif [E2OpenPlugins] #36
Posted 20 October 2011 - 19:30
fine by me.
I don't know at what point you are but i was thinking that is a good idea to use jQuery.
As for example look at tabs loading content via Ajax or at nice volume slider.
http://jqueryui.com/demos/tabs/#ajax
http://jqueryui.com/...slider-vertical
Re: OpenWebif [E2OpenPlugins] #37
Re: OpenWebif [E2OpenPlugins] #38
Posted 21 October 2011 - 16:03
I'm currently using http://mootools.net/
And ? You like it ? You prefer it to Jquery ?
Let me know because we have to decide which javascript framework to use.
For me is the same but i need to know which i have to use.
Edited by bacicciosat, 21 October 2011 - 16:05.
Re: OpenWebif [E2OpenPlugins] #39
Posted 22 October 2011 - 10:55
I've used both, and they both do the job. Mootools is more compact, jQuery is more feature-rich (due to the enormous amount of third party plugins).
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Re: OpenWebif [E2OpenPlugins] #40
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users