summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-06-20 19:57:54 +0000
committerKarl Berry <karl@freefriends.org>2021-06-20 19:57:54 +0000
commit1fd83a5e467e9bc72220664c2ced44600eae89de (patch)
tree873d107911ea6e1c14fc5e05f8cdf5b0b3ee9095 /Build
parent6586e04e3d94e8f8f6e7459fd81b8b45937deaef (diff)
ctanbib (20jun21)
git-svn-id: svn://tug.org/texlive/trunk@59659 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/ctanbib/ctanbib27
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl29
2 files changed, 37 insertions, 19 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib b/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib
index 21adfd46792..a16976acdc4 100755
--- a/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib
+++ b/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib
@@ -16,26 +16,38 @@ kpse.set_program_name("luatex")
-- The Current Maintainer of this work is Michal Hoftich
local bibtype = "manual"
+local pkgurl = false
if #arg < 1 or arg[1]=="--help" or arg[1]=="-h" then
print([[ctanbib - convert ctan package information to bibtex format
Usage:
ctanbib [options] <package name>
Available options:
- -c,--ctan Use @ctan type instead of @manual
+ -c,--ctan Use @ctan type instead of @manual and long url
+ -C,--CTAN Use @ctan type and short ... /pkg/url
-h,--help Print this message
-v,--version Print version info
]])
- os.exit(1)
+ os.exit(0)
elseif arg[1]=="--version" or arg[1]=="-v" then
- print "ctanbib version 0.1d"
- os.exit(1)
+ print "ctanbib version 0.1e"
+ os.exit(0)
elseif arg[1]=="--ctan" or arg[1]=="-c" then
table.remove(arg, 1)
bibtype = "ctan"
+elseif arg[1]=="--CTAN" or arg[1]=="-C" then
+ table.remove(arg, 1)
+ bibtype = "ctan"
+ pkgurl = true
end
local pkgname = arg[1]
-local url = "https://www.ctan.org/xml/2.0/pkg/" .. pkgname .. "?author-name=true"
+
+if not pkgname then
+ print "[ctanbib] Error: missing package name"
+ os.exit(1)
+end
+
+local url = "https://ctan.org/xml/2.0/pkg/" .. pkgname .. "?author-name=true"
local authors_url = "https://ctan.org/xml/2.0/authors"
-- change that for different title scheme
@@ -55,7 +67,6 @@ version = {$version}
local dom = require('luaxml-domobject')
-
local load_xml = function(url)
-- local command = io.popen("wget -qO- ".. url,"r")
local command = io.popen("curl -sS ".. url,"r")
@@ -142,7 +153,7 @@ end
local get_url = function(record)
local home = record:query_selector("home")[1]
if home then return home:get_attribute("href") end
- return "http://www.ctan.org/pkg/"..pkgname
+ return "https://ctan.org/pkg/"..pkgname
end
local get_caption = function(record)
@@ -191,7 +202,7 @@ e.title = get_title(record)
e.subtitle = get_caption(record)
e.url = get_url(record)
-- use the CTAN path as url for the CTAN type
-if bibtype == "ctan" then
+if (bibtype == "ctan") and not pkgurl then
e.url = ctan_url(record)
end
e.version, e.date = get_version(record)
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index 9e19aa3b432..7f05bde595e 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -1,12 +1,12 @@
#!/usr/bin/env perl
-# $Id: tlmgr.pl 59568 2021-06-12 22:02:32Z karl $
+# $Id: tlmgr.pl 59637 2021-06-19 15:17:38Z karl $
#
# Copyright 2008-2021 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
-my $svnrev = '$Revision: 59568 $';
-my $datrev = '$Date: 2021-06-13 00:02:32 +0200 (Sun, 13 Jun 2021) $';
+my $svnrev = '$Revision: 59637 $';
+my $datrev = '$Date: 2021-06-19 17:17:38 +0200 (Sat, 19 Jun 2021) $';
my $tlmgrrevision;
my $tlmgrversion;
my $prg;
@@ -2574,7 +2574,8 @@ sub auto_remove_install_force_packages {
next if $removals_full{$p};
my $remotetlp = $remotetlpdb->get_package($p);
if (!defined($remotetlp)) {
- tlwarn("$prg: Strange, $p mentioned but not found anywhere!\n");
+ tlwarn("$prg:auto_remove_install_force_packages: strange, package "
+ . "mentioned but not found anywhere: $p\n");
next;
}
next if ($remotetlp->category ne "Collection");
@@ -4109,7 +4110,8 @@ sub show_one_package_list {
if (@cand) {
my $first = shift @cand;
if (defined($first)) {
- tlwarn("$prg: strange, we have a first candidate but no tlp: $p\n");
+ tlwarn("$prg:show_one_package_list: strange, have first "
+ . "candidate but no tlp: $p\n");
return($F_WARNING);
}
# already shifted away the first element
@@ -4122,19 +4124,23 @@ sub show_one_package_list {
my ($t,$r) = split(/\//, $a, 2);
my $tlp = $remotetlpdb->get_package($p, $t);
my $foo = $tlp->shortdesc;
- print " $t: ", defined($foo) ? $foo : "(shortdesc missing)" , "\n";
+ print " $t: ",
+ defined($foo) ? $foo : "(shortdesc missing)" , "\n";
}
return($F_WARNING);
} else {
- tlwarn("$prg: strange, package listed but no residual candidates: $p\n");
+ tlwarn("$prg:show_one_package_list: strange, package listed "
+ . "but no residual candidates: $p\n");
return($F_WARNING);
}
} else {
- tlwarn("$prg: strange, package listed but no candidates: $p\n");
+ tlwarn("$prg:show_one_package_list: strange, package listed but "
+ . "no candidates: $p\n");
return($F_WARNING);
}
} else {
- tlwarn("$prg: strange, package cannot be found in remote tlpdb: $p\n");
+ tlwarn("$prg:show_one_package_list: strange, package not found in "
+ . "remote tlpdb: $p\n");
return($F_WARNING);
}
}
@@ -4189,7 +4195,8 @@ sub show_one_package_detail {
# useless test, @cand will always be defined because $remotetlpdb is virtual
my $first = shift @cand;
if (defined($first)) {
- tlwarn("$prg: strange, we have a first candidate but no tlp: $pkg\n");
+ tlwarn("$prg:show_one_package_detail: strange, have first candidate "
+ . "but no tlp: $pkg\n");
return($F_WARNING);
}
# already shifted away the first element
@@ -10224,7 +10231,7 @@ This script and its documentation were written for the TeX Live
distribution (L<https://tug.org/texlive>) and both are licensed under the
GNU General Public License Version 2 or later.
-$Id: tlmgr.pl 59568 2021-06-12 22:02:32Z karl $
+$Id: tlmgr.pl 59637 2021-06-19 15:17:38Z karl $
=cut
# test HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html