[홈으로] [게시판]

2021년 5월 1일부로 닥북 한국 위키를 읽기 전용으로 전환합니다. 페이지 생성과 수정이 불가능하고 플러그인들(최근 변경 사항, 역링크 등)도 작동하지 않습니다.

Hello from New York, New York!

The features I've seen in DbWiki are very inspiring - I would be pleased to help on the team to create an English version.

Also, if there is interest I'd like to help with the wiki -> DocBook -> pdf workflow.

Interested? Contribute here!


Hello and Welcome ^^

Accoding to the summary(below), transformation flow is like this:

 wiki -> xhtml -> docbook -> pdf

In case of DbWiki, it can output a well-formed or valid DocBook document by itself. So the flow can be like this;

 dbwiki -> docbook -> html, pdf, and so on..

It is more ideal process for docbook, and it works actually (but manually). So I hope DbWiki will support this automatically.

Ryu Gwang (류광) is the project manager and a core developer of dbwiki. When he comes back (he is off-line state temporarily), we can discuss more technical details of DbWiki.

Thanks ^^


Thank you for your interest, Micki. You can download the DbWiki source code with CVS.

cvs -d:pserver:[email protected]:/cvsroot/docbook login
cvs -z3 -d:pserver:[email protected]:/cvsroot/docbook co dbwiki

Just press Enter for the password.

The best way to contribute (at least for now) is to upload patches through our project homepage (http://kldp.net/patch/?group_id=8). Since most menus are in English, I don't expect you will have any difficulty using them.

I like to see your work merged into DbWiki, especially using IncludePage to create a book. Nice work!

Min Sik Kim

Here is what I have thus far: it works wonderfully. Good luck to you!


How it works

xhtml -> xml -> fo -> pdf

  • Use IncludePage to create big books
  • make sure you use fop-extensions (see below) in order to have pdf bookmarks

What it does

  • TOC
  • Headers/Footers, etc. etc.
  • Table col width calcs

What it doesn't yet do

  • fix duplicate-named anchors on a page (causes a failure)... I do have a discussion with Michael Fuchs, maker of dbdoclet and a very good developer indeed, about a property for integrating the pages' anchors if they are not unique - and for dbwiki, it shouldn't even be a problem, since it outputs the DocBook directly.
  • handle internal links well (should be a simple matter of converting the # back to a # from whatever crazy character it is
  • convert any IncludePage from the 'main' page into a chapter (would make books very easy to manage in wiki)

Integration into a phpwiki site

Two ways it can/should be integrated, that I can think of.

Autobuilding of daily/hourly pdfs

  1. Autobuild shell script via cron, consisting of:
  2. create new xhtml dump of wiki
  3. logs all verboses back to a logfile
  4. process those matching a FullTextSearch into pdf's as per 'Installation', and

On-demand button allowing 'print pdf book now'

  1. button on phpwiki's viewpage.
  2. launches shell script for single xhtml page dump (new phpwiki feature)
  3. ECHO's all verboses back to the web page:
  4. processes the dumpfile into a pdf as 'Installation' describes.
  5. and finally returns the pdf to the browser

What it consists of

(you'll need to install everything in Installation).

  • shell script with proper setuid to run Java to the display window (usually admin)
 #! wiki2pdf.cgi
 curl -o /tmp/$1.html 'http://{wikidir}/'$1
 /usr/bin/html2db -i /tmp/$1.html -o /tmp/$1.xml
 /usr/bin/xsltproc --stringparam fop.extensions 1 /docbook/fo/docbook.xsl /tmp/$1.xml > /tmp/$1.fo
 /usr/bin/fop/fop.sh -q /tmp/$1.fo /tmp/$1.pdf
 echo "Content-Type: application/pdf"
 echo ""
 cat < /tmp/$1.pdf
  • mod to* themes/default/templates/navbar.tmpl
 | <a href="http://{wikidir}/wiki2pdf.cgi/
 " target=blank class="wiki"><b>PDF</b></a>

and bingo. Automagically named, fresh pdf's.

Required Packages

You will need to install the following packages and their dependencies (please note I do not have advice here yet about overcoming error messages from missing dependencies:

;dbdoclet: http://www.michael-a-fuchs.de/ You will only need to use the standalone 'html2db' executable.

;xsltproc: http://xmlsoft.org/XSLT/xsltproc2.html

; fop: http://xml.apache.org/fop/

; docbook dtd and xsl: http://docbook.sourceforge.net/

If you've got them all in place, you're good to go!


First and foremost

A few basic things, and then we'll get started:

  • You'll want to increase the 'toc-section-depth' param in ../fo/param.xml. Makes for a much more impressive Table of Contents.
  • Initiate or use the last xhtml file dump from PhpWikiAdministration (yeah you have to be an admin). Choose the appropriate dump directory for the (not yet created) shell script.
  • Don't dump a zip file, dump as individual files for now till we write the wrapper.
  • to create the 'on-demand' pdf we will benefit a great deal from dbwiki's ability to output individual pages in DocBook.

The Good Part

Issue the following commands (my shell is tcsh, yours may vary!).

  setenv JAVA_HOME /Your/Java/Home
  html2db -i /tmp/{filename}.html -o /tmp/{filename}.xml

Here you may want to grep and insert <chapter> tags where phpwiki put <p> tags around the includepage main headers.

You will also need to fix any duplicate anchor names as html2db doesn't yet ensure they're unique.

Next the --stringparam fop.extension 1 parameter is a real help. It generates nice PDF Bookmarks for each chapter and section.

  xsltproc --stringparam fop.extensions 1 ../fo/docbook.xsl /tmp/{filename}.xml &gt; /tmp/{filename}.fo
  ./fop.sh /tmp/{filename}.fo /tmp/{filename}.pdf

Sounds great! I'll be compiling some stuff to provide (believe it or not i currently have no code at all involved and am going completely off public domain stylesheeta and apps/executables. - I can however document my process. And as the build scripts are being written I'll pass em along too.

I have a question:

Does dbwiki support the IncludePagePlugin that is present in the phpwiki 1.3.4 on sourceforge?

No, DbWiki was forked from PhpWiki 1.3.2. I think many new features of recent PhpWiki should be ported to DbWiki, and IncludePagePlugin is one of them. -- Min Sik Kim

So much to learn - and thanks for the warm welcome! ...Micki

More news... I've been going thru the dbwiki source code and you have done some great work. I'm still learning it, and it will take some major time, but it's an excellent work. Congratulations to the authors of dbwiki for a great job.