texlive[45848] Master/texmf-dist/scripts/texdoc: message wording and

commits+karl at tug.org commits+karl at tug.org
Sun Nov 19 00:03:26 CET 2017


Revision: 45848
          http://tug.org/svn/texlive?view=revision&revision=45848
Author:   karl
Date:     2017-11-19 00:03:25 +0100 (Sun, 19 Nov 2017)
Log Message:
-----------
message wording and corrections, no unrequested usage; texdoc r20-24

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=20

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/texdoc/constants.tlu
    trunk/Master/texmf-dist/scripts/texdoc/main.tlu
    trunk/Master/texmf-dist/scripts/texdoc/score.tlu
    trunk/Master/texmf-dist/scripts/texdoc/texdoclib.tlu

Modified: trunk/Master/texmf-dist/scripts/texdoc/constants.tlu
===================================================================
--- trunk/Master/texmf-dist/scripts/texdoc/constants.tlu	2017-11-18 21:46:27 UTC (rev 45847)
+++ trunk/Master/texmf-dist/scripts/texdoc/constants.tlu	2017-11-18 23:03:25 UTC (rev 45848)
@@ -1,4 +1,4 @@
--- $Id: constants.tlu 13 2017-05-17 18:09:11Z karl $
+-- $Id: constants.tlu 24 2017-11-18 23:00:18Z karl $
 -- constants.tlu: global "constants" for texdoc.
 --
 -- Manuel Pégourié-Gonnard, GPLv3+, see texdoclib.tlu for details
@@ -21,7 +21,7 @@
 -- progname and version
 fullname    = kpse.find_file('texdoc/texdoclib', 'lua')
 progname    = 'texdoc'
-version     = '2.017'
+version     = '2.0171'
 
 -- make sure to update setup_config_from_cl() accordingly
 -- and set a default value in setup_config_from_defaults() if relevant
@@ -47,15 +47,16 @@
 
   -q, --quiet           Suppress warnings and most error messages.
   -v, --verbose         Print additional information (eg, viewer command).
-  -d, --debug[=list]    Activate debug output (restricted to list).
+  -d, --debug[=LIST]    Activate debug output (restricted to LIST).
 
 Environment variables: PAGER, BROWSER, PDFVIEWER, PSVIEWER, DVIVIEWER,
 and texdoc_* of each.
 
-Files: <texmf>/texdoc/texdoc.cnf, see output of the --files option.
+Files: <TEXMF>/texdoc/texdoc.cnf; see output of the --files option.
 Full manual available via `texdoc texdoc'.
 
-Please report bugs to <texdoc at tug.org>.
+texdoc home page: <https://tug.org/texdoc/>
+Please email bugs to <texdoc at tug.org>.
 ]]
 
 copyright_msg = [[
@@ -95,7 +96,7 @@
 }
 
 error_msg = [[
-Try `texdoc --help' for a short help, `texdoc texdoc' for the user manual.]]
+Try `texdoc --help' for short help, `texdoc texdoc' for full manual.]]
 
 notfound_msg = [[
 Sorry, no documentation found for PKGNAME.

Modified: trunk/Master/texmf-dist/scripts/texdoc/main.tlu
===================================================================
--- trunk/Master/texmf-dist/scripts/texdoc/main.tlu	2017-11-18 21:46:27 UTC (rev 45847)
+++ trunk/Master/texmf-dist/scripts/texdoc/main.tlu	2017-11-18 23:03:25 UTC (rev 45848)
@@ -1,3 +1,4 @@
+-- $Id: main.tlu 24 2017-11-18 23:00:18Z karl $
 -- main.tlu: default command-line interface of texdoc
 --
 -- Manuel Pégourié-Gonnard, GPLv3, see texdoclib.tlu for details
@@ -15,7 +16,7 @@
   -h, --help            Print this help message.
   -V, --version         Print the version number.
   -f, --files           Print the list of configuration files used.
-  --just-view file      Display file, given with full path (no searching).]]
+  --just-view FILE      Display FILE, given with full path (no searching).]]
 
 -- get configuration and parse command line
 local action = texdoc.setup_config_and_alias(arg)
@@ -36,6 +37,11 @@
     texdoc.show_config_files(print, true)
     os.exit(exit_ok)
 elseif action == 'view' then
+    if not arg[1] then
+        texdoc.err_print('error', "missing file operand to --just-view")
+        texdoc.err_print('error', texdoc.const.error_msg)
+        os.exit(exit_usage)
+    end
     local ok = texdoc.view_file(arg[1])
     os.exit(ok and exit_ok or exit_error)
 end
@@ -42,7 +48,8 @@
 
 -- make sure we actually have argument(s)
 if not arg[1] then
-    texdoc.print_usage()
+    texdoc.err_print('error', "no action specified")
+    texdoc.err_print('error', texdoc.const.error_msg)
     os.exit(exit_usage)
 end
 

Modified: trunk/Master/texmf-dist/scripts/texdoc/score.tlu
===================================================================
--- trunk/Master/texmf-dist/scripts/texdoc/score.tlu	2017-11-18 21:46:27 UTC (rev 45847)
+++ trunk/Master/texmf-dist/scripts/texdoc/score.tlu	2017-11-18 23:03:25 UTC (rev 45848)
@@ -75,11 +75,13 @@
     -- get score from tlp associations
     if score == -10 and df.tlptodoc then
         score = -1
-        deb_print('score', 'New score: -2 from package name association')
+        deb_print('score', 'New score: '..tostring(score)
+            ..' from package name association')
     end
     if score == -10 and df.runtodoc then
         score = -5
-        deb_print('score', 'New score: -6 from sty/cls association')
+        deb_print('score', 'New score: '..tostring(score)
+            ..' from sty/cls association')
     end
     -- bonus for metadata
     if df.details then
@@ -152,7 +154,7 @@
     if ext and config.badext_list_inv[ext] and score > 0 then
         upscore(0.1, 'bad extension', true)
     end
-    -- if basename is bad, score gets < 0
+    -- if basename is bad, score becomes an epsilon
     if has_bad_basename(file) and score > 0 then
         upscore(0.1, 'bad basename', true)
     end

Modified: trunk/Master/texmf-dist/scripts/texdoc/texdoclib.tlu
===================================================================
--- trunk/Master/texmf-dist/scripts/texdoc/texdoclib.tlu	2017-11-18 21:46:27 UTC (rev 45847)
+++ trunk/Master/texmf-dist/scripts/texdoc/texdoclib.tlu	2017-11-18 23:03:25 UTC (rev 45848)
@@ -1,7 +1,8 @@
+-- $Id: texdoclib.tlu 25 2017-11-18 23:03:01Z karl $
 -- texdoclib.tlu: the texdoc library
 
 --[[
-Copyright 2008, 2009, 2010, 2011 Manuel Pégourié-Gonnard.
+Copyright 2008, 2009, 2010, 2011, 2017 Manuel Pégourié-Gonnard.
 
 This program is free software: you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -100,5 +101,6 @@
     show_config_files      = show_config_files,
     config                 = config,
     view_file              = view_file,
+    err_print              = err_print,
     const                  = C,
 }



More information about the tex-live-commits mailing list