summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtx-colors.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-05-19 20:40:34 +0300
committerMarius <mariausol@gmail.com>2013-05-19 20:40:34 +0300
commit13ec4b540e0d46c97fd7b089e0b7413da81e0a9f (patch)
treebebfa563a17c06b3bd3bf8f6f4ba6d025e00d107 /scripts/context/lua/mtx-colors.lua
parent69ad13650cda027526271179e95b5294694143a1 (diff)
downloadcontext-13ec4b540e0d46c97fd7b089e0b7413da81e0a9f.tar.gz
beta 2013.05.19 19:27
Diffstat (limited to 'scripts/context/lua/mtx-colors.lua')
-rw-r--r--scripts/context/lua/mtx-colors.lua154
1 files changed, 77 insertions, 77 deletions
diff --git a/scripts/context/lua/mtx-colors.lua b/scripts/context/lua/mtx-colors.lua
index 7dd1b4ac4..cd7dcce62 100644
--- a/scripts/context/lua/mtx-colors.lua
+++ b/scripts/context/lua/mtx-colors.lua
@@ -1,77 +1,77 @@
-if not modules then modules = { } end modules ['mtx-colors'] = {
- version = 1.001,
- comment = "companion to mtxrun.lua",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- todo: fc-cache -v en check dirs, or better is: fc-cat -v | grep Directory
-
-local helpinfo = [[
-<?xml version="1.0"?>
-<application>
- <metadata>
- <entry name="name">mtx-colors</entry>
- <entry name="detail">ConTeXt Color Management</entry>
- <entry name="version">0.10</entry>
- </metadata>
- <flags>
- <category name="basic">
- <subcategory>
- <flag name="table"><short>show icc table</short></flag>
- </subcategory>
- </category>
- </flags>
- <examples>
- <category>
- <title>Example</title>
- <subcategory>
- <example><command>mtxrun --script color --table somename</command></example>
- </subcategory>
- </category>
- </examples>
-</application>
-]]
-
-local application = logs.application {
- name = "mtx-colors",
- 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"))
-
-scripts = scripts or { }
-scripts.colors = scripts.colors or { }
-
-function scripts.colors.table()
- local files = environment.files
- if #files > 0 then
- for i=1,#files do
- local profile, okay, message = colors.iccprofile(files[i])
- if not okay then
- report(message)
- else
- report(table.serialize(profile,"profile"))
- end
- end
- else
- report("no file(s) given" )
- end
-end
-
---~ local track = environment.argument("track")
---~ if track then trackers.enable(track) end
-
-if environment.argument("table") then
- scripts.colors.table()
-elseif environment.argument("exporthelp") then
- application.export(environment.argument("exporthelp"),environment.files[1])
-else
- application.help()
-end
+if not modules then modules = { } end modules ['mtx-colors'] = {
+ version = 1.001,
+ comment = "companion to mtxrun.lua",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- todo: fc-cache -v en check dirs, or better is: fc-cat -v | grep Directory
+
+local helpinfo = [[
+<?xml version="1.0"?>
+<application>
+ <metadata>
+ <entry name="name">mtx-colors</entry>
+ <entry name="detail">ConTeXt Color Management</entry>
+ <entry name="version">0.10</entry>
+ </metadata>
+ <flags>
+ <category name="basic">
+ <subcategory>
+ <flag name="table"><short>show icc table</short></flag>
+ </subcategory>
+ </category>
+ </flags>
+ <examples>
+ <category>
+ <title>Example</title>
+ <subcategory>
+ <example><command>mtxrun --script color --table somename</command></example>
+ </subcategory>
+ </category>
+ </examples>
+</application>
+]]
+
+local application = logs.application {
+ name = "mtx-colors",
+ 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"))
+
+scripts = scripts or { }
+scripts.colors = scripts.colors or { }
+
+function scripts.colors.table()
+ local files = environment.files
+ if #files > 0 then
+ for i=1,#files do
+ local profile, okay, message = colors.iccprofile(files[i])
+ if not okay then
+ report(message)
+ else
+ report(table.serialize(profile,"profile"))
+ end
+ end
+ else
+ report("no file(s) given" )
+ end
+end
+
+--~ local track = environment.argument("track")
+--~ if track then trackers.enable(track) end
+
+if environment.argument("table") then
+ scripts.colors.table()
+elseif environment.argument("exporthelp") then
+ application.export(environment.argument("exporthelp"),environment.files[1])
+else
+ application.help()
+end