texlive[48521] Master/tlpkg/TeXLive: include contact from TeX
commits+preining at tug.org
commits+preining at tug.org
Fri Aug 31 05:41:21 CEST 2018
Revision: 48521
http://tug.org/svn/texlive?view=revision&revision=48521
Author: preining
Date: 2018-08-31 05:41:21 +0200 (Fri, 31 Aug 2018)
Log Message:
-----------
include contact from TeX Catalogue in tlpdb
Modified Paths:
--------------
trunk/Master/tlpkg/TeXLive/TLPOBJ.pm
trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm
Modified: trunk/Master/tlpkg/TeXLive/TLPOBJ.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLPOBJ.pm 2018-08-31 03:41:13 UTC (rev 48520)
+++ trunk/Master/tlpkg/TeXLive/TLPOBJ.pm 2018-08-31 03:41:21 UTC (rev 48521)
@@ -850,6 +850,11 @@
if (@{$entry->topics}) {
$self->cataloguedata->{'topics'} = "@{$entry->topics}";
}
+ if (%{$entry->contact}) {
+ for my $k (keys %{$entry->contact}) {
+ $self->cataloguedata->{"contact-$k"} = $entry->contact->{$k};
+ }
+ }
#if (defined($entry->texlive)) {
# $self->cataloguedata->{'texlive'} = $entry->texlive;
#}
Modified: trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm 2018-08-31 03:41:13 UTC (rev 48520)
+++ trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm 2018-08-31 03:41:21 UTC (rev 48521)
@@ -48,6 +48,7 @@
also => defined($params{'also'}) ? $params{'also'} : [],
topic => defined($params{'topic'}) ? $params{'topic'} : [],
alias => defined($params{'alias'}) ? $params{'alias'} : [],
+ contact => defined($params{'contact'}) ? $params{'contact'} : {},
};
bless $self, $class;
if (defined($self->{'ioref'})) {
@@ -103,6 +104,14 @@
my $alsoid = $parser->find('./@refid',$node);
push @{$self->{'also'}}, "$alsoid";
}
+ # parse the contact entries
+ foreach my $node ($parser->find('/entry/contact')->get_nodelist) {
+ my $contacttype = $parser->find('./@type',$node);
+ my $contacthref = $parser->find('./@href',$node);
+ if ($contacttype && $contacthref) {
+ $self->{'contact'}{$contacttype} = $contacthref;
+ }
+ }
# parse the keyval/topic entries
foreach my $node ($parser->find('/entry/keyval')->get_nodelist) {
my $k = $parser->find('./@key',$node);
@@ -195,6 +204,12 @@
if (@_) { $self->{'topic'} = \@newtopics }
return $self->{'topic'};
}
+sub contact {
+ my $self = shift;
+ my %newcontact = @_;
+ if (@_) { $self->{'contact'} = \%newcontact }
+ return $self->{'contact'};
+}
################################################################
More information about the tex-live-commits
mailing list