diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/mtx-context-domotica.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/mtx-context-domotica.tex | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-domotica.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-domotica.tex index 5a162893be3..83562ee30cf 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-domotica.tex +++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-domotica.tex @@ -29,9 +29,7 @@ % % example: context --extra=domotica --openzwave ./config/fibaro/fgms.xml ./open-zwave-master/config/aeotec/zw100.xml % example: context --extra=domotica --openzwave --pattern="./open-zwave-master/config/**.xml" -% example: context --extra=domotica --hue hue-pragma-tasks.lua -% example: context --extra=domotica --hue pragma-youless-gas.lua --year=2018 --month=8 -% example: context --extra=domotica --hue pragma-youless-electricity.lua +% example: context --extra=domotica --hue hue-pragma-tasks.lua % % end help @@ -163,11 +161,8 @@ \stopmode - \startmode[hue] - \usemodule[youless] - \starttext \setupheadertexts @@ -176,22 +171,10 @@ local arguments = document.arguments local files = document.files - local filename = files[1] local pattern = arguments.pattern - local year = arguments.year - local month = arguments.month - - local action = (arguments.tasks and "task") - or (arguments.graphics and "graphics") - or (string.find(filename,"tasks") and "tasks") - or (string.find(filename,"electricity") and "graphics") - or (string.find(filename,"pulse") and "graphics") - or (string.find(filename,"gas") and "graphics") - - if not filename or filename == "" then - logs.report("youless","provide filename") - context("no files given") - elseif action == "tasks" then + local filename = files[1] + + if filename then context.starttitle { title = "Hue: " .. file.nameonly(filename) } filename = file.addsuffix(filename,"lua") if lfs.isfile(filename) then @@ -200,11 +183,9 @@ context("unknown file %a",filename) end context.stoptitle() - elseif action == "graphics" then - moduledata.youless.graphics { year = year, month = month, filename = filename } else - logs.report("youless","provide --status or --graphics") - context("no action given") + context("no files given") + context.stoptitle() end \stopluacode |