From 7663d687960b44e4f12f89f828752dc52688fc0b Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 31 May 2013 18:39:36 +0200 Subject: add option ``--show-blacklist`` to luaotfload-tool --- luaotfload-tool.lua | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 25cc9fa..e3f5a93 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -183,6 +183,7 @@ This tool is part of the luaotfload package. Valid options are: --list= output list of entries by field --list=: restrict to entries with = --fields=,,…, which fields to print with --list + -b --show-blacklist show blacklisted files The font database will be saved to %s @@ -269,7 +270,7 @@ set. --]]-- local action_sequence = { - "loglevel", "help", "version", "cache", + "loglevel", "help", "version", "blacklist", "cache", "flush", "generate", "list", "query", } local action_pending = table.tohash(action_sequence, false) @@ -297,6 +298,15 @@ actions.help = function (job) return true, false end +actions.blacklist = function (job) + names.read_blacklist() + local n = 0 + for n, entry in next, table.sortedkeys(fonts.names.blacklist) do + texiowrite_nl(stringformat("(%d %s)", n, entry)) + end + return true, false +end + actions.generate = function (job) local fontnames, savedname fontnames = names.update(fontnames, job.force_reload, job.dry_run) @@ -565,12 +575,13 @@ local process_cmdline = function ( ) -- unit -> jobspec log = 1, ["prefer-texmf"] = "p", quiet = "q", + ["show-blacklist"] = "b", update = "u", verbose = 1 , version = "V", } - local short_options = "DfFilpquvVh" + local short_options = "bDfFilpquvVh" local options, _, optarg = alt_getopt.get_ordered_opts (arg, short_options, long_options) @@ -633,6 +644,8 @@ local process_cmdline = function ( ) -- unit -> jobspec result.dry_run = true elseif v == "p" then config.luaotfload.prioritize = "texmf" + elseif v == "b" then + action_pending["blacklist"] = true end end -- cgit v1.2.3