DocBook 到 DokuWiki

发布于 2024-07-15 04:08:43 字数 1542 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

踏月而来 2024-07-22 04:08:43

另一种选择是

  1. 使用 'docbook2html' - [DocBook 工具] 将 docbook 转换为 HTML ,然后
  2. 使用类似 Perl 模块的内容将 HTML 转换为 wiki 标记。 http://metacpan.org/pod/HTML::WikiConverter

Another option will be to

  1. Use 'docbook2html' - [DocBook tools] to convert docbook to HTML, and then
  2. use something like this Perl Module to convert the HTML to wiki markup. http://metacpan.org/pod/HTML::WikiConverter
我们的影子 2024-07-22 04:08:43

我不熟悉您提到的工具,但我对您可能采用的一般策略有一些想法。

  1. 如果您对 DocuWiki 插件的输出感到满意,您可以用 perl、sh、ruby 等编写某种脚本来执行插件并存储将来静态提供的内容。

  2. 看来 DocuWiki 只是调用 xsltproc 程序并提供输出。 如果插件正常工作,那么您应该能够直接从命令行或您自己的脚本调用 xsltproc。 看看 DocuWiki 中的这些行

    exec("$xsltproc -o $tmpXhtmlFile $docbookXsl $tmpDocbookFile 2>&1", $errors);

    $returnXhtml = shell_exec("$xsltproc " . DOKU_PLUGIN . "/docbook/xhtmlCleaner.xsl $tmpXhtmlFile");

  3. 当选项 1 或 2 起作用后。 在修订控制系统中设置一个 cron 作业或挂钩,以监视对原始 docbook 源的更改,并调用脚本来重新生成静态版本。

I'm not familar with the tool you mentioned, but I have some thoughts on general strategies you might employ.

  1. If you're happy with the output from the DocuWiki plugin you could write some sort of script in perl, sh, ruby, etc. that executes the plugin and stores the content to be served up statically in the future.

  2. It appears that DocuWiki is simply calling the xsltproc program and serving up the output. If the plugin is working then you should be able to call xsltproc directly from the command line or your own script. Take a look at these lines from DocuWiki

    exec("$xsltproc -o $tmpXhtmlFile $docbookXsl $tmpDocbookFile 2>&1", $errors);

    $returnXhtml = shell_exec("$xsltproc " . DOKU_PLUGIN . "/docbook/xhtmlCleaner.xsl $tmpXhtmlFile");

  3. Once you have option 1 or 2 working. Setup a cron job or hook in your revision control system to watch for changes to the original docbook source and call the script to regenerate the static version.

做个ˇ局外人 2024-07-22 04:08:43

一个小(但可能很重要)注意事项:DokuWiki 包含一个缓存机制,用于保存输出的 HTML 文件。 这意味着通常该插件很少执行(即仅在第一次查看页面的特定修订版时)。

One small (but possibly important) note: DokuWiki contains a caching mechanism which saves the outputted HTML file. This means that normally the plugin would be executed very infrequently (ie. only the first time a particular revision of the page is viewed).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文