Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
domotikad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
domotika
domotikad
Commits
68da1e55
Commit
68da1e55
authored
Oct 20, 2016
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better code organization
parent
f4087849
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
229 additions
and
135 deletions
+229
-135
dmdb.py
domotika/db/dmdb.py
+1
-1
domotika.py
domotika/domotika.py
+7
-4
bot.py
domotika/web/bot.py
+221
-130
No files found.
domotika/db/dmdb.py
View file @
68da1e55
...
...
@@ -941,7 +941,7 @@ def getVoiceCommandList():
def
getScreenshotUri
(
target
):
qstring
=
"select screenshot from mediasources where button_name LIKE '"
+
target
+
"
%
'
limit 1
"
qstring
=
"select screenshot from mediasources where button_name LIKE '"
+
target
+
"
%
'"
return
runQuery
(
qstring
)
def
getClimaUniques
():
...
...
domotika/domotika.py
View file @
68da1e55
...
...
@@ -2455,13 +2455,16 @@ class domotikaService(service.Service):
def
web_on_getScreenshotList
(
self
,
screenshot
=
True
):
return
dmdb
.
getScreenshotList
(
screenshot
=
screenshot
)
def
web_on_getScreenshot
(
self
,
target
):
def
web_on_getScreenshot
(
self
,
target
,
callback
=
None
):
def
imageReturn
(
img
):
return
img
def
prepareScreenshot
(
res
):
if
res
:
return
wu
.
getPage
(
res
[
0
][
0
])
.
addCallback
(
imageReturn
)
return
False
if
callback
==
None
:
if
res
:
return
wu
.
getPage
(
res
[
0
][
0
])
.
addCallback
(
imageReturn
)
return
False
for
r
in
res
:
wu
.
getPage
(
r
[
0
])
.
addCallback
(
callback
)
return
dmdb
.
getScreenshotUri
(
target
)
.
addCallback
(
prepareScreenshot
)
def
web_on_getClimaUniques
(
self
):
...
...
domotika/web/bot.py
View file @
68da1e55
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment