summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/new-texcatalogue-parsing.pl41
1 files changed, 41 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/new-texcatalogue-parsing.pl b/Master/tlpkg/TeXLive/new-texcatalogue-parsing.pl
new file mode 100644
index 00000000000..c5418cf8f5d
--- /dev/null
+++ b/Master/tlpkg/TeXLive/new-texcatalogue-parsing.pl
@@ -0,0 +1,41 @@
+#!/usr/bin/perl -w
+
+use XML::XPath;
+use XML::XPath::XMLParser;
+
+my $parser = new XML::XPath->new(filename => 'achemso.xml') ||
+ die "Failed to parse achemso.xml";
+
+my $name = $parser->findvalue("/entry/name");
+my $caption = $parser->findvalue("/entry/caption");
+my $version = $parser->findvalue('/entry/version/@number');
+my $license = $parser->findvalue('/entry/license/@type');
+my $description = $parser->findvalue("/entry/description");
+my $ctan = $parser->findvalue('/entry/ctan/@path');
+my $texlive = $parser->findvalue('/entry/texlive/@location');
+my $miktex = $parser->findvalue('/entry/miktex/@location');
+
+my $docset = $parser->find('/entry/documentation');
+my @docs;
+foreach my $node ($docset->get_nodelist) {
+ $det = $parser->find('./@details',$node);
+ $href = $parser->find('./@href',$node);
+ push @docs, [ $det, $href ];
+}
+print "MISSING DOCUMENTATION STUFF!!\n";
+
+print "name=$name\n";
+print "caption=$caption\n";
+print "version=$version\n";
+print "license=$license\n";
+print "description=$description\n";
+print "ctan=$ctan\n";
+print "texlive=$texlive\n";
+print "miktex=$miktex\n";
+
+foreach $d (@docs) {
+ my @a = @$d;
+ print "doc href = ", $a[1], "\n";
+ print "doc deta = ", $a[0], "\n";
+}
+