- XMLify the multimedia section

- Fix the clean target while here

Approved by:	doceng (implicit)
This commit is contained in:
Gabor Kovesdan 2012-08-05 23:04:47 +00:00
parent 5a7bdd7b8b
commit 06cf1a8309
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/projects/sgml2xml/; revision=39325
6 changed files with 28 additions and 23 deletions

View file

@ -26,7 +26,7 @@ TEMPLATES= multimedia.sgml.intro \
multimedia-input.xml
clean:
${RM} -rf output
${RM} -rf output ${CLEANFILES}
build:
${MKDIR} -p output && \

View file

@ -6,14 +6,14 @@ of interest for FreeBSD users.
</p>
<p>
<br>
<br/>
This list is available as <a href="multimedia.html">chronological
overview</a>, as a <a href="multimedia-tags.html">tag cloud</a> and
via <a href="multimedia-sources.html">the sources</a>.
<br>
<br/>
This list is also available as RSS feed <a href="multimedia.xml"><img
src="http://www.freebsd.org/layout/images/ico_rss.png"></a>
src="http://www.freebsd.org/layout/images/ico_rss.png"/></a>
</p>
<p>

View file

@ -123,12 +123,12 @@ sub xml_char {
if ($tree[3] eq "title") {
$items[$ci]{title} = "" if (!defined $items[$ci]{title});
$items[$ci]{title} .= $value;
$items[$ci]{title} .= htmlentities($value);
return;
}
if ($tree[3] eq "desc") {
$items[$ci]{desc} = "" if (!defined $items[$ci]{desc});
$items[$ci]{desc} .= $value;
$items[$ci]{desc} .= htmlentities($value);
return;
}
if ($tree[3] eq "overview") {
@ -180,7 +180,7 @@ sub xml_char {
if ($tree[5] eq "desc") {
$items[$ci]{files}{$items[$ci]{fc}}{desc} = ""
if (!defined $items[$ci]{files}{$items[$ci]{fc}}{desc});
$items[$ci]{files}{$items[$ci]{fc}}{desc} .= $value;
$items[$ci]{files}{$items[$ci]{fc}}{desc} .= htmlentities($value);
return;
}
if ($tree[5] eq "tags") {
@ -283,26 +283,26 @@ sub print_htmlitem {
print $fhandle ")";
}
}
print $fhandle "<br>Source: <a href=\"", htmlentities($source{url}), "\">",
$source{name}, "</a><br>\n";
print $fhandle "<br/>Source: <a href=\"", htmlentities($source{url}), "\">",
$source{name}, "</a><br/>\n";
print $fhandle "Added: ",
substr($item{added}, 6, 2), " ",
$months[substr($item{added}, 4, 2)], " ",
substr($item{added}, 0, 4), "<br>\n";
substr($item{added}, 0, 4), "<br/>\n";
print $fhandle "Tags: ";
{
my $first = 1;
foreach my $t (@{$item{tags}}) {
print $fhandle ", " if (!$first);
# join(", ", @{$item{$t}}), "<br>\n";
# join(", ", @{$item{$t}}), "<br/>\n";
my $th = $t;
$th =~ s/ /_/g;
print $fhandle "<a href=\"tag-$th.html\">$t</a>";
$first = 0;
}
}
print $fhandle "<br>\n";
print $fhandle "<br/>\n";
if (defined $item{overview} && defined $item{files}) {
my $c = 0;
@ -328,7 +328,7 @@ sub print_htmlitem {
print $fhandle ")";
}
}
print $fhandle "<br>\n";
print $fhandle "<br/>\n";
}
print $fhandle "</p>\n";
print $fhandle "$item{desc}\n";
@ -581,8 +581,8 @@ sub print_htmlitem {
next if ($lastsource eq $item{source});
$lastsource = $item{source};
print $fhtml "<li><a href=\"source-$lastsource.html\">", $sources{$item{source}}{name}, "</a>\n";
print $fsgml "<li><a href=\"source-$lastsource.html\">", $sources{$item{source}}{name}, "</a>\n";
print $fhtml "<li><a href=\"source-$lastsource.html\">", $sources{$item{source}}{name}, "</a></li>\n";
print $fsgml "<li><a href=\"source-$lastsource.html\">", $sources{$item{source}}{name}, "</a></li>\n";
}
print $fhtml "</ul>\n";

View file

@ -13,7 +13,7 @@ via <a href="sources.html">the sources</a>.
<p>
This list is also available as RSS feed <a href="multimedia.xml"><img
src="http://www.freebsd.org/layout/images/ico_rss.png" alt="RSS Feed"></a>
src="http://www.freebsd.org/layout/images/ico_rss.png" alt="RSS Feed"/></a>
</p>
<p>

View file

@ -1,4 +1,3 @@
&footer;
</body>
</html>

View file

@ -1,8 +1,14 @@
<!DOCTYPE HTML PUBLIC "-//FreeBSD//DTD HTML 4.01 Transitional-Based Extension//EN" [
<!ENTITY date "$FreeBSD$">
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//FreeBSD//DTD XHTML 1.0 Transitional-Based Extension//EN"
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY title "FreeBSD Multimedia">
<!ENTITY % navinclude.about "INCLUDE">
<!ENTITY base "..">
]>
<html>
&header;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>&title;</title>
<cvs:keyword xmlns:cvs="http://www.FreeBSD.org/XML/CVS">$FreeBSD$</cvs:keyword>
</head>
<body class="navinclude.about">