public inbox for docbook-tools-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Ondřej Vašík" <ovasik@redhat.com>
To: "Christian Bünnig" <masala@web.de>
Cc: docbook-tools-discuss@sources.redhat.com
Subject: Re: bug in docbook-tools text backend using w3m
Date: Thu, 22 Nov 2007 15:06:00 -0000	[thread overview]
Message-ID: <1195743882.3846.6.camel@dhcp-lab-219.englab.brq.redhat.com> (raw)
In-Reply-To: <1195223148.10704.22.camel@ume>


[-- Attachment #1.1: Type: text/plain, Size: 1000 bytes --]

Hi,
Actually I would prefer to modify ARGS of w3m as is suggested in
man pages and as is done in xmlto docbook txt formatter.
(done in attached patch - I'll commit that one to Fedora)

About Eric Bischoffs current address - after a bit of google
searching, it seems that now he is using ebischoff@nerim.net
- but nothing guaranteed.

Greetings,
         Ondrej Vasik


Christian Bünnig wrote:
> Hey,
> 
> I've experienced a bug in the text backend of the docbook tools. The bug
> is about converting from HTML to TEXT with w3m. The backend creates a
> temporary HTML file to make a TEXT file from. However, the temporary
> HTML has no '.html' suffix and in that case w3m does not convert it to
> plain text - the resulting <FILE>.txt is still HTML.
> 
> Below is a workaround. I just appended '.html' to the variable HTML
> (line 22). Now it works.
> 
> Btw .. the e-mail address <eric@caldera.de> seems to be not valid
> anymore.
> 
> Regards,
> 
> Christian
> 
> 

[-- Attachment #1.2: docbook-utils-w3mtxtconvert.patch --]
[-- Type: text/x-patch, Size: 355 bytes --]

diff -urNp original/txt new/txt
--- original/backends/txt	2007-11-05 18:44:52.000000000 +0100
+++ new/backends/txt	2007-11-22 15:21:36.000000000 +0100
@@ -13,7 +13,7 @@ then
 elif [ -x /usr/bin/w3m ]
 then
   CONVERT=/usr/bin/w3m
-  ARGS="-dump"
+  ARGS="-T text/html -dump"
 else
   echo >&2 "No way to convert HTML to text found."
   exit 1

[-- Attachment #2: Toto je digitálně podepsaná část zprávy --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

      reply	other threads:[~2007-11-22 15:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-16 14:25 Christian Bünnig
2007-11-22 15:06 ` Ondřej Vašík [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1195743882.3846.6.camel@dhcp-lab-219.englab.brq.redhat.com \
    --to=ovasik@redhat.com \
    --cc=docbook-tools-discuss@sources.redhat.com \
    --cc=masala@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).