summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2018-08-31 03:41:21 +0000
committerNorbert Preining <preining@logic.at>2018-08-31 03:41:21 +0000
commit6932d0a2cd30904e3502d9893f7014958a762f26 (patch)
tree76c31cbf43b92a5e220c3327cb93240fd439ea4c
parenta4d6397e21499768cd1e3d88fd06aee6db0176d5 (diff)
include contact from TeX Catalogue in tlpdb
git-svn-id: svn://tug.org/texlive/trunk@48521 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm5
-rw-r--r--Master/tlpkg/TeXLive/TeXCatalogue.pm15
2 files changed, 20 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 238dd94f393..88aef34b345 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -850,6 +850,11 @@ sub update_from_catalogue {
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;
#}
diff --git a/Master/tlpkg/TeXLive/TeXCatalogue.pm b/Master/tlpkg/TeXLive/TeXCatalogue.pm
index f4537b2e1e7..273863202f3 100644
--- a/Master/tlpkg/TeXLive/TeXCatalogue.pm
+++ b/Master/tlpkg/TeXLive/TeXCatalogue.pm
@@ -48,6 +48,7 @@ sub new {
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 @@ sub initialize {
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 @@ sub topics {
if (@_) { $self->{'topic'} = \@newtopics }
return $self->{'topic'};
}
+sub contact {
+ my $self = shift;
+ my %newcontact = @_;
+ if (@_) { $self->{'contact'} = \%newcontact }
+ return $self->{'contact'};
+}
################################################################