texlive[69844] Master/texmf-dist: gitinfo-lua (14feb24)

commits+karl at tug.org commits+karl at tug.org
Wed Feb 14 00:52:29 CET 2024


Revision: 69844
          https://tug.org/svn/texlive?view=revision&revision=69844
Author:   karl
Date:     2024-02-14 00:52:29 +0100 (Wed, 14 Feb 2024)
Log Message:
-----------
gitinfo-lua (14feb24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/gitinfo-lua/README.md
    trunk/Master/texmf-dist/doc/lualatex/gitinfo-lua/gitinfo-lua.pdf
    trunk/Master/texmf-dist/doc/lualatex/gitinfo-lua/gitinfo-lua.tex
    trunk/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua.lua
    trunk/Master/texmf-dist/tex/lualatex/gitinfo-lua/gitinfo-lua.sty

Modified: trunk/Master/texmf-dist/doc/lualatex/gitinfo-lua/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/gitinfo-lua/README.md	2024-02-13 23:52:19 UTC (rev 69843)
+++ trunk/Master/texmf-dist/doc/lualatex/gitinfo-lua/README.md	2024-02-13 23:52:29 UTC (rev 69844)
@@ -1,4 +1,5 @@
-# Git LaTeX
+# Gitinfo Lua
+![CTAN Version](https://img.shields.io/ctan/v/gitinfo-lua)
 
 A LaTeX package which provides macros integrated with LuaTeX and the commandline tool `git`.
 
@@ -17,8 +18,8 @@
 lualatex -shell-escape gitinfo-lua.tex
 ```
 
-Read [gitinfo-lua.pdf](gitinfo-lua.pdf) for more information about this package.
+See the [releases section](https://github.com/Xerdi/gitinfo-lua/releases) for getting the latest manual.
 
 ## License
 This project is licensed under the LPPL version 1.3c and maintained by Erik Nijenhuis.
-See [LICENSE.pdf](LICENSE.pdf) for more information.
+See [LICENSE.txt](LICENSE.txt) for more information.

Modified: trunk/Master/texmf-dist/doc/lualatex/gitinfo-lua/gitinfo-lua.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/gitinfo-lua/gitinfo-lua.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/gitinfo-lua/gitinfo-lua.tex	2024-02-13 23:52:19 UTC (rev 69843)
+++ trunk/Master/texmf-dist/doc/lualatex/gitinfo-lua/gitinfo-lua.tex	2024-02-13 23:52:29 UTC (rev 69844)
@@ -17,10 +17,15 @@
 % gitinfo-cmd.lua and gitinfo-lua.lua
 \documentclass{ltxdoc}
 \usepackage[english]{babel}
-\usepackage[titlepage]{gitinfo-lua}
+\usepackage[titlepage,authors]{../tex/gitinfo-lua}
 
 \usepackage{listings}
-
+\lstset{
+    basicstyle=\ttfamily,
+    columns=fullflexible,
+    breaklines=true,
+    breakatwhitespace=false
+}
 \usepackage{calc}
 \usepackage{multicol}
 \usepackage{tabularx}
@@ -285,7 +290,7 @@
     The \meta{csname} takes exactly three arguments, namely, the \meta{current}, \meta{next tag} and \meta{rev spec}.
     The last iteration gives an empty value for \meta{next tag} and the \meta{rev spec} is identical to \meta{current}.
 
-    Afterward tag info get be fetched using the \DescribeMacro{\gittag} \cmd{\gittag}\oarg{format}\marg{csname}\marg{tag}.
+    Afterward tag info can be fetched using the \DescribeMacro{\gittag} \cmd{\gittag}\oarg{format}\marg{csname}\marg{tag}.
     This macro takes the same formatting specification as \cmd{\fotgittag}.
     Beware of using \cmd{\gittag} for the \meta{next tag} parameter in \cmd{\forgittagseq}.
 

Modified: trunk/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua.lua	2024-02-13 23:52:19 UTC (rev 69843)
+++ trunk/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua.lua	2024-02-13 23:52:29 UTC (rev 69844)
@@ -23,9 +23,10 @@
 local module = {
     name = 'gitinfo-lua',
     info = {
-        version = 1.0,
+        version = '1.0.1', --TAGVERSION
+        date    = '2024/02/12',       --TAGDATE
         comment = "Git info Lua — Git integration with LaTeX",
-        author = "Erik Nijenhuis",
+        author  = "Erik Nijenhuis",
         license = "free"
     }
 }
@@ -43,8 +44,8 @@
         ['_'] = '\\_',
         ['{'] = '\\{',
         ['}'] = '\\}',
-        ['~'] = '\\textasciitilde',
-        ['%^'] = '\\textasciicircum'
+        ['~'] = '\\textasciitilde ',
+        ['%^'] = '\\textasciicircum '
     }
 }
 local mt = {
@@ -55,11 +56,11 @@
 setmetatable(gitinfo, mt)
 
 function api.trim(s)
-    return (s:gsub("^%s*(.-)%s*$", "%1"))
+    return s and (s:gsub("^%s*(.-)%s*$", "%1")) or 'nil'
 end
 
 function api:set_date()
-    local date, err = self.cmd:log('cs', '-1', {'max-count=1'})
+    local date, err = self.cmd:log('cs', '-1', { 'max-count=1' })
     if date and #date == 1 then
         local _, _, year, month, day = date[1][1]:find('(%d+)[-/](%d+)[-/](%d+)')
         tex.year = tonumber(year)
@@ -71,7 +72,7 @@
 end
 
 function api:escape_str(value)
-    local buf = string.gsub(value, '\\', '\\textbackslash')
+    local buf = string.gsub(value, '\\', '\\textbackslash ')
     for search, replace in pairs(self.escape_chars) do
         buf = string.gsub(buf, search, replace)
     end
@@ -223,7 +224,7 @@
 function api:cs_commit(csname, rev, format)
     if token.is_defined(csname) then
         local tok = token.create(csname)
-        local log, err = self.cmd:log(format, rev, {'max-count=1'})
+        local log, err = self.cmd:log(format, rev, { 'max-count=1' })
         if log then
             if #log == 1 then
                 tex.print(tok)
@@ -266,7 +267,7 @@
 
 function api:tag_info(format_spec, tag, target_dir)
     local err, info
-    info, err = self.cmd:for_each_ref(format_spec, 'refs/tags', {'count=1', 'contains=' .. tag}, target_dir)
+    info, err = self.cmd:for_each_ref(format_spec, 'refs/tags', { 'count=1', 'contains=' .. tag }, target_dir)
     if info and #info == 1 then
         return info[1]
     else
@@ -305,7 +306,7 @@
 function api:cs_for_tag(csname, format_spec, target_dir)
     if token.is_defined(csname) then
         local tok = token.create(csname)
-        local tags, err = self.cmd:for_each_ref(format_spec, 'refs/tags', {'sort=-authordate'}, target_dir)
+        local tags, err = self.cmd:for_each_ref(format_spec, 'refs/tags', { 'sort=-authordate' }, target_dir)
         if tags then
             for _, info in ipairs(tags) do
                 tex.print(tok)

Modified: trunk/Master/texmf-dist/tex/lualatex/gitinfo-lua/gitinfo-lua.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/gitinfo-lua/gitinfo-lua.sty	2024-02-13 23:52:19 UTC (rev 69843)
+++ trunk/Master/texmf-dist/tex/lualatex/gitinfo-lua/gitinfo-lua.sty	2024-02-13 23:52:29 UTC (rev 69844)
@@ -16,7 +16,7 @@
 % This work consists of the files gitinfo-lua.sty gitinfo-lua.pdf
 % gitinfo-cmd.lua and gitinfo-lua.lua
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{gitinfo-lua}[2023/11/10 Xerdi's Git Package]
+\ProvidesPackage{gitinfo-lua}[2024/02/12 1.0.1 Xerdi's Git Package]
 
 \RequirePackage{luacode}
 



More information about the tex-live-commits mailing list.