summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtx-colors.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-02-08 12:00:13 +0200
committerMarius <mariausol@gmail.com>2011-02-08 12:00:13 +0200
commit9c6992a3436a0db6a01790b29d7c0c3c65460f94 (patch)
treec384372b23cfb6a5379641b4857bae07057bb3be /scripts/context/lua/mtx-colors.lua
parent801c806a2489c5c96578fe95945bef589329c4e0 (diff)
downloadcontext-9c6992a3436a0db6a01790b29d7c0c3c65460f94.tar.gz
beta 2011.02.08 10:06
Diffstat (limited to 'scripts/context/lua/mtx-colors.lua')
-rw-r--r--scripts/context/lua/mtx-colors.lua34
1 files changed, 20 insertions, 14 deletions
diff --git a/scripts/context/lua/mtx-colors.lua b/scripts/context/lua/mtx-colors.lua
index e5338a32b..ee825a42c 100644
--- a/scripts/context/lua/mtx-colors.lua
+++ b/scripts/context/lua/mtx-colors.lua
@@ -8,6 +8,22 @@ if not modules then modules = { } end modules ['mtx-colors'] = {
-- todo: fc-cache -v en check dirs, or better is: fc-cat -v | grep Directory
+local helpinfo = [[
+--table show icc table
+
+example:
+
+mtxrun --script color --table somename
+]]
+
+local application = logs.application {
+ name = "mtx-cache",
+ banner = "ConTeXt Color Management 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
if not fontloader then fontloader = fontforge end
dofile(resolvers.findfile("colo-icc.lua","tex"))
@@ -21,31 +37,21 @@ function scripts.colors.table()
for i=1,#files do
local profile, okay, message = colors.iccprofile(files[i])
if not okay then
- logs.simple(message)
+ report(message)
else
- logs.simple(table.serialize(profile,"profile"))
+ report(table.serialize(profile,"profile"))
end
end
else
- logs.simple("no file(s) given" )
+ report("no file(s) given" )
end
end
-logs.extendbanner("ConTeXt Color Management 0.1")
-
-messages.help = [[
---table show icc table
-
-example:
-
-mtxrun --script color --table somename
-]]
-
--~ local track = environment.argument("track")
--~ if track then trackers.enable(track) end
if environment.argument("table") then
scripts.colors.table()
else
- logs.help(messages.help)
+ application.help()
end