Preparing release 0.6

This commit is contained in:
david 2003-05-19 04:47:32 +00:00
parent b1e1361aaa
commit 9ba82321c2
5 changed files with 44 additions and 41 deletions

View File

@ -1,30 +1,34 @@
CVS Documentation updates.
2002-05-19 0.6 Updated documentation.
Removed wget call to retrieve ldp namespace.
This really doesn't belong in a general purpose utility.
Encode [[link:foo]] as <xref/> instead of <xref></xref>.
Encoded [[link:foo]] as <xref/> instead of <xref></xref>.
Encode "Q: Foo?" as:
Encoded "Q: Foo?" as:
<question id='foo'>
<para id='foo-title'>Foo?</para>
</question>
instead of:
<question>
<para>Foo?</para>
</question>.
</question>
This was causing our xrefs to become:
<a href="foo"><p>Bar</p></a>
which causes ugly line breaks in the final output.
Add -f, --faq option to generate the article tag as:
Added -f, --faq option to generate the article tag as:
<article class='faq'>
Add processing instruction:
Added processing instruction:
<? dbhtml toc='1' ?>
so each <qandaset> gets its own list of questions.
Fixed wiki links -- spaces in URLs are now correctly
replaced with underscores.
Fixed bug where lines ending in \x0a aren't chomped.
2002-06-25 0.5 Switched -V and -v, now -v is version, -V is verbose.
Changed -a, --article to -x, --xml and -s, --sgml to

View File

@ -4,25 +4,23 @@ When packaging and releasing wt2db:
2. Record the release date and version in the Changelog.
3. Record the release date and version in the man page (doc/wt2db.sgml).
3. Commit into cvs.
4. Commit into cvs.
4. Tag the release "cvs tag v0-0".
5. Tag the release "cvs tag v0-0".
5. Build the release executable (perl Makefile.PL).
6. Build the release executable (perl Makefile.PL).
6. Build the tar (tar -f wt2db-0.0.tar wt2db lib/Wt2db.pm, etc).
7. Build the tar (tar -f wt2db-0.0.tar wt2db lib/Wt2db.pm, etc).
7. Gzip the tar file (gzip wt2db-0.0.tar).
8. Gzip the tar file (gzip wt2db-0.0.tar).
8. Post the .tar.gz on the LDP site in the /downloads directory.
9. Post the .tar.gz on the LDP site in the /downloads directory.
9. Update the html version of the man page on the LDP site (make publish).
10. Update the html version of the man page on the LDP site (make publish).
10. Update /downloads/index.html to list the new package.
11. Update /downloads/index.html to list the new package.
11. Bump $VERSION in wt2db and add -cvs (from 0.1 it would go to 0.2-cvs).
12. Bump $VERSION in wt2db and add -cvs (from 0.1 it would go to 0.2-cvs).
13. Commit cvs version.
12. Commit cvs version.

View File

@ -48,10 +48,6 @@ Wikipedia into DocBook for republishing at the LDP.
As development proceeded, I realized that it could be used
to provide an easier way to write DocBook documentation.
Currently, B<wt2db> is being built into the Lampadas Documentation
Management System as its "native" format. See http://www.lampadas.org
for more information on Lampadas.
=head1 NOTES

View File

@ -57,7 +57,7 @@ sub Reset {
$txtfile = '';
$dbfile = '';
$verbose = 0;
$doctype = '';
$doctype = 0;
$articleclass = '';
$nonet = 0;
@ -113,13 +113,11 @@ sub ProcessFile {
#
$encoding = 'ISO-8859-1' unless ($encoding);
if ($doctype eq 'XML') {
print "Adding XML DOCTYPE and article tags." if ($verbose);
print "Adding XML DOCTYPE and article tags\n" if ($verbose);
$buf = '<?xml version="1.0" encoding="' . $encoding . '" standalone="no"?>' . "\n";
$buf .= '<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"' . "\n";
$buf .= ' "http://docbook.org/xml/4.1.2/docbookx.dtd"';
$buf .= "\[\n";
$buf .= '<!ENTITY % ISOnum PUBLIC' . "\n";
$buf .= ' "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"' . "\n";
$buf .= ' "http://docbook.org/xml/4.1.2/ent/iso-num.ent">' . "\n";
@ -127,12 +125,13 @@ sub ProcessFile {
$buf .= "\]\>\n";
$buf .= "\n";
if ($articleclass) {
print "Setting article class to $articleclass\n" if ($verbose);
$buf .= "<article class='$articleclass'>\n";
} else {
$buf .= '<article>' . "\n";
}
} elsif ($doctype eq 'SGML') {
print "Adding SGML DOCTYPE and article tags." if ($verbose);
print "Adding SGML DOCTYPE and article tags\n" if ($verbose);
$buf = '<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.1//EN">' . "\n";
if ($articleclass) {
$buf .= "<article class='$articleclass'>\n";
@ -144,7 +143,11 @@ sub ProcessFile {
# read in the text file
#
while ($originalline = <$fh>) {
ProcessLine($foo, $originalline);
chomp($originalline);
$originalline =~ s/\x0a//g;;
$originalline =~ s/\x0d//g;;
print "Read line $originalline\n" if ($verbose);
ProcessLine($foo, $originalline);
print $outfh "$buf";
$buf = '';
}
@ -222,7 +225,7 @@ sub ProcessLine {
# namespaces are handled differently
#
print "$link\n" if ($verbose);
print "Link to $link\n" if ($verbose);
if ($link =~ /^http:\/\//) {
$line =~ s/\[\[.*?\]\]/<ulink url='$link'><citetitle>$linkname<\/citetitle><\/ulink>/;
@ -236,7 +239,7 @@ sub ProcessLine {
} elsif ($link =~ /^wiki:/) {
$linkname =~ s/^wiki://;
$link =~ s/^wiki:/http:\/\/www\.wikipedia\.com\/wiki\.phtml\?title=/;
$link =~ s/\ /+/;
$link =~ s/\ /_/g;
$line =~ s/\[\[.*?\]\]/<ulink url='$link'><citetitle>$linkname<\/citetitle><\/ulink>/;
} elsif ($link =~ /^ldp:/) {
$linkname =~ s/^ldp://;
@ -246,7 +249,7 @@ sub ProcessLine {
} else {
#$tempfile = "/tmp/wt2db-" . $rand;
#$cmd = "wget -q http://db.linuxdoc.org/cgi-pub/ldp-xml.pl?name=$link -O $tempfile";
#print "$cmd\n" if ($verbose > 1);
#print "Command $cmd\n" if ($verbose > 1);
#$return = system("$cmd");
#unless ($return) {
# open(URL, "$tempfile") || die "wt2db: cannot open temporary file ($!)\n\n";
@ -319,8 +322,8 @@ sub ProcessLine {
&closepara;
$noparatag = $line;
$noparatag =~ s/^.*?<//;
$noparatag =~ s/>.*?$//;
$noparaline = $linenumber;
$noparatag =~ s/>.*$//;
$noparaline = $linenumber;
# screen sections don't embed para tags, but are wrapped in them
#
@ -337,11 +340,11 @@ sub ProcessLine {
if ($noparatag ne '') {
$temp = $line;
while ($temp =~ /<$noparatag>/) {
$temp =~ s/<?$noparatag>//;
$temp =~ s/<$noparatag>//;
$noparadepth ++;
}
while ($temp =~ /<\/$noparatag>/) {
$temp =~ s/<?\/$noparatag>//;
$temp =~ s/<\/$noparatag>//;
$noparadepth --;
if ($noparadepth == 0) {
$noparaline = 0;
@ -379,7 +382,7 @@ sub ProcessLine {
encode_entities($line);
}
$line = "$starttag$line$endtag";
chomp($line);
# sect3
#
} elsif ($line =~ /^===/) {
@ -492,7 +495,10 @@ sub ProcessLine {
$qandaentry = 1;
}
if ($qandaset == 0) {
$line = "<qandaset defaultlabel='qanda'>\n<?dbhtml toc='1' ?>" . $line;
$line = "<qandaset defaultlabel='qanda'>\n" .
"<?dbhtml toc='1' ?>\n" .
# "<?dbhtml cell-spacing='1em' cell-padding='1em' ?>" .
$line;
$qandaset = 1;
}
@ -637,7 +643,6 @@ sub closepara {
}
sub trimline {
chomp($line);
$line =~ s/\s+$//;
$line =~ s/^\s+//;
}

View File

@ -18,14 +18,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
$VERSION = '0.6-cvs';
$VERSION = '0.6';
use Wt2Db;
$WT2DB = new Wt2Db;
my $txtfile = '';
my $dbfile = '';
my $doctype = '';
my $doctype = 0;
my $articleclass = '';
my $nonet = 0;
my $encoding = 'ISO-8859-1';