Article View: linux.debian.bugs.dist
Article #748Bug#1149541: debian-reference: please add a Markdown output target
From: Osamu Aoki
Date: Tue, 13 Oct 2026 15:30
Date: Tue, 13 Oct 2026 15:30
65 lines
4418 bytes
4418 bytes
Hi, On Mon, 2026-10-12 at 03:29 -0700, Osman Vielma wrote: > Hi Osamu, > > Attached is the code from the Pandoc proof of concept, with the Lua filter and > instructions to run it against debian/2.100. I made the source and output > paths configurable and checked that it reproduces the chapter 3 sample I sent > you byte for byte with Pandoc 2.9.2.1. Quite impressive. I understand your code includes some operations which should be moved to Makefile but well written to show how you did. TBH, I never knew how to use lua filter with pandoc. > It starts from the merged DocBook XML, applies the repository's table and URL > transforms, resolves the entities and cross-references, and then converts to > GFM. The README describes the extra handling for tables and admonitions, and > the limitations. This is still a proof of concept, not a ready-to-merge build > patch. > > Using Pandoc in place of w3m sounds worth exploring. Thank you for sharing > your draft MR; I would welcome adapting this code to that approach. I tried to use pandoc as shown in my MR draft: https://salsa.debian.org/debian/debian-reference/-/merge_requests/31 Here, this code on "md" branch creates a huge single markdown file in build/ directory upon running: $ make txt LANGPO=ja. As I checked how markdown and gfm version looks under my text viewer (neovim with syntax highlight and hiding.) GFM looks better than pandoc's MARKDOWN. Use of xsltproc leaves space in XML like `<ulink ...> <literal>` causing generated gfm to have `[ `mc` ](...)`. Your python-lxml generate XML file with `<ulink ...><literal>` (no space) resulting `[`mc`](...)`. (nicer) Before going further, can you tell me a few things. * Do you think chaper-by-chaper file output is better? (I think so too.) * Can you implement similar chaper-by-chaper file output using xslt and xsltproc (I suppose html generating xslt does this, so we should be able to do it.) * Do you know how to remove useless space? Osamu
Technical Details
Message-ID:
<NNMBY-5hYX-13@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomodReferences:
<NNe7f-4ZFg-3@gated-at.bofh.it> <NNe7f-4ZFg-1@gated-at.bofh.it> <NNfPH-50Dy-5@gated-at.bofh.it> <NNfPH-50Dy-3@gated-at.bofh.it> <NNMBY-5hYX-15@gated-at.bofh.it> <NNe7f-4ZFg-3@gated-at.bofh.it> <NNMBY-5hYX-15@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod From: Osamu Aoki <osamu@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1149541: debian-reference: please add a Markdown output target Date: Tue, 13 Oct 2026 17:30:02 +0200 Message-ID: <NNMBY-5hYX-13@gated-at.bofh.it> References: <NNe7f-4ZFg-3@gated-at.bofh.it> <NNe7f-4ZFg-1@gated-at.bofh.it> <NNfPH-50Dy-5@gated-at.bofh.it> <NNfPH-50Dy-3@gated-at.bofh.it> <NNMBY-5hYX-15@gated-at.bofh.it> <NNe7f-4ZFg-3@gated-at.bofh.it> <NNMBY-5hYX-15@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Tue Oct 13 15:23:07 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.7 Reply-To: Osamu Aoki <osamu@debian.org>, 1149541@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: osamu@debian.org X-Debian-Pr-Message: followup 1149541 X-Debian-Pr-Package: debian-reference X-Debian-Pr-Source: debian-reference Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-10+b1 MIME-Version: 1.0 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1996626 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 65 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: 1149541@bugs.debian.org X-Original-Date: Tue, 13 Oct 2026 23:41:06 +0900 X-Original-Message-ID: <5c9aa0270c0b529894fe1ee2d15b52da258b1446.camel@debian.org> X-Original-References: <CAKQP=7NKzKUUWk9Erh=6Dqkj7euO8tPgEGyunf+rcUcPJfgeDw@mail.gmail.com> <82895bacdab4b3d597b1fba143f641ed0891cb82.camel@debian.org> <CAKQP=7MYyGZDC5ArQA0CSnY65hY4LBjcC-RAa8jiZeQUOkbTmQ@mail.gmail.com> <bd6b76c862746c53ef001957add9e387e05241c5.camel@debian.org> <CAKQP=7Mg9+aqhOtQjEaBEM5PEqWVbHW881AN2kQHwdb0dWfawg@mail.gmail.com> <CAKQP=7NKzKUUWk9Erh=6Dqkj7euO8tPgEGyunf+rcUcPJfgeDw@mail.gmail.com> <CAKQP=7Mg9+aqhOtQjEaBEM5PEqWVbHW881AN2kQHwdb0dWfawg@mail.gmail.com>