From be8be324bb2b51a0f44d297490ea0ab47ad0381d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 9 Feb 2009 07:42:52 +0000 Subject: make docfile data accessible via the tlmgr show --list git-svn-id: svn://tug.org/texlive/trunk@12124 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf/scripts/texlive/tlmgr.pl | 11 ++++++++++- Master/tlpkg/TeXLive/TLPOBJ.pm | 13 ++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'Master') diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 149a02a05e6..7affa313114 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -839,7 +839,16 @@ sub action_show { } if ($foo->docfiles) { print "doc files:\n"; - for my $f (sort $foo->docfiles) { print " $f\n"; } + for my $f (sort $foo->docfiles) { + print " $f"; + my $dfd = $foo->docfiledata; + if (defined($dfd->{$f})) { + for my $k (keys %{$dfd->{$f}}) { + print " $k=\"", $dfd->{$f}->{$k}, '"'; + } + } + print "\n"; + } } # in case we have them if ($foo->allbinfiles) { diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 91a743bb0d3..75b93883c3d 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -958,6 +958,12 @@ sub remove_docfiles { my ($self,@files) = @_; $self->remove_files("doc",@files); } +sub docfiledata { + my $self = shift; + my %newfiles = @_; + if (@_) { $self->{'docfiledata'} = \%newfiles } + return $self->{'docfiledata'}; +} sub binfiles { my $self = shift; my %newfiles = @_; @@ -1096,7 +1102,9 @@ But the lines listing the files are allowed to have additional tags: | texmf-dist/doc/latex/achemso/achemso.pdf details="Package documentation" language="en" |... -Currently only the tags C
and C are allowed. +Currently only the tags C
and C are allowed. These +additional information can be accessed via the C function +returning a hash with the respective files (including path) as key. =item C @@ -1164,6 +1172,9 @@ are lists. Arguments and return values for C is a hash with the architectures as keys. +Arguments and return values for C is a hash with the +full file names of docfiles as key, and the value is again a hash. + The size values are handled with these functions: $tlpobj->docsize -- cgit v1.2.3