diff options
author | Karl Berry <karl@freefriends.org> | 2023-02-22 23:31:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-02-22 23:31:12 +0000 |
commit | 1863e55087cca74572536871f48124f088e11111 (patch) | |
tree | 501011adc46206edbf4c252422dbc30f8045e986 /Master/texmf-dist | |
parent | 5dc59437b77b53e04eb78d59547631134db52f5c (diff) |
ctanbib (23feb23)
git-svn-id: svn://tug.org/texlive/trunk@66068 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/man/man1/ctanbib.1 | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/ctanbib.man1.pdf | bin | 21346 -> 19997 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/support/ctanbib/ctanbib-doc.pdf | bin | 35854 -> 36316 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/support/ctanbib/ctanbib-doc.tex | 6 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/ctanbib/ctanbib | 21 |
5 files changed, 20 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/man/man1/ctanbib.1 b/Master/texmf-dist/doc/man/man1/ctanbib.1 index 54544054c89..488869a35ce 100644 --- a/Master/texmf-dist/doc/man/man1/ctanbib.1 +++ b/Master/texmf-dist/doc/man/man1/ctanbib.1 @@ -1,6 +1,6 @@ .\" Manpage for ctanbib. .\" Contact michal.h21@gmail.com to correct errors or typos. -.TH ctanbib 1 "28 aug 2018" "0.1" "ctanbib man page" +.TH ctanbib 1 "20 feb 2023" "0.2b" "ctanbib man page" .SH NAME ctanbib \- retrieve bibliographic information for packages hosted on CTAN. diff --git a/Master/texmf-dist/doc/man/man1/ctanbib.man1.pdf b/Master/texmf-dist/doc/man/man1/ctanbib.man1.pdf Binary files differindex 2c753a32a20..9727b303992 100644 --- a/Master/texmf-dist/doc/man/man1/ctanbib.man1.pdf +++ b/Master/texmf-dist/doc/man/man1/ctanbib.man1.pdf diff --git a/Master/texmf-dist/doc/support/ctanbib/ctanbib-doc.pdf b/Master/texmf-dist/doc/support/ctanbib/ctanbib-doc.pdf Binary files differindex 87296fca78e..aaeca921e01 100644 --- a/Master/texmf-dist/doc/support/ctanbib/ctanbib-doc.pdf +++ b/Master/texmf-dist/doc/support/ctanbib/ctanbib-doc.pdf diff --git a/Master/texmf-dist/doc/support/ctanbib/ctanbib-doc.tex b/Master/texmf-dist/doc/support/ctanbib/ctanbib-doc.tex index fb718635abd..2878951c3a6 100644 --- a/Master/texmf-dist/doc/support/ctanbib/ctanbib-doc.tex +++ b/Master/texmf-dist/doc/support/ctanbib/ctanbib-doc.tex @@ -5,7 +5,7 @@ \newenvironment{changelog}{\longtable{@{} l p{30em}}}{\endlongtable} \newcommand\change[2]{#1 & #2\\} \title{The \texttt{ctanbib} package} -\author{Michal Hoftich\\\url{michal.h21@gmail.com}} +\author{Michal Hoftich\\\href{mailto:michal.h21@gmail.com}{michal.h21@gmail.com}} \date{\gitdate, version \gitversion} \usepackage{hyperref} \usepackage{fontspec} @@ -134,6 +134,10 @@ it's eventual release on CTAN. Herbert Voss added the \verb|--CTAN| option. \section{Changelog} \begin{changelog} + \change{2023-02-20}{Verson 0.2b released} + \change{2023-02-20}{Use \verb|--ssl-no-revoke| option for Curl, to prevent SSL certificate errors} + \change{2023-02-20}{Better handling of errors in package info downloading} + \change{2023-02-20}{Fixed link to the author mail address} \change{2021-06-29}{Version 0.2a released} \change{2021-06-29}{Added the \verb|--ctanpath| option.} \change{2021-06-26}{Version 0.2 released} diff --git a/Master/texmf-dist/scripts/ctanbib/ctanbib b/Master/texmf-dist/scripts/ctanbib/ctanbib index 70b31badbac..0242c235de4 100755 --- a/Master/texmf-dist/scripts/ctanbib/ctanbib +++ b/Master/texmf-dist/scripts/ctanbib/ctanbib @@ -34,7 +34,7 @@ if args.help then print(msg) os.exit(0) elseif args.version then - print "ctanbib version 0.2a" + print "ctanbib version 0.2b" os.exit(0) elseif args.ctan then pkgurl = true @@ -76,15 +76,18 @@ version = {$version}, local dom = require('luaxml-domobject') -local load_xml = function(url) +local load_xml = function(url, verification) -- local command = io.popen("wget -qO- ".. url,"r") - local command = io.popen("curl -sS ".. url,"r") + local command = io.popen("curl --ssl-no-revoke -sS ".. url,"r") + local verification = verification or "" + + if not command then return nil, "Cannot open Curl" end local info = command:read("*all") command:close() - if string.len(info) == 0 then - return false + if not info or string.len(info) == 0 or not info:match(verification) then + return nil, "Cannot load XML", info end return dom.parse(info ), info end @@ -102,7 +105,11 @@ end local author_list local fetch_author_list = function() if author_list then return author_list end - local authors = load_xml(authors_url) + local authors, msg = load_xml(authors_url, "<authors") + if not authors then + print(msg) + os.exit() + end author_list = {} for _, author in ipairs(authors:query_selector("author")) do -- save all authors under they ID @@ -204,7 +211,7 @@ end for _, pkgname in ipairs(args) do local url = "https://ctan.org/xml/2.0/pkg/" .. pkgname .. "?author-name=true" - local record, info = load_xml(url) + local record, info = load_xml(url, "%<entry") if not verify_record(record) then print("% Cannot find entry for package "..pkgname) |