Project

General

Profile

Actions

Feature #3933

closed

Add docbook export to wiki

Added by Ulrich Staudinger over 14 years ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Wiki
Target version:
-
Start date:
2009-09-27
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix

Description

Hi,
i'd love to export docbook straight from the wiki, then i could create a docbook ref file somewhere and include via url some selected wiki pages in my wiki.

Thanks !

Actions #1

Updated by John Yani over 13 years ago

Any news on this? Maybe plagin is available?

Actions #2

Updated by Etienne Massip over 12 years ago

  • Category set to Wiki
Actions #3

Updated by Hans Artmann over 10 years ago

There is a gem redcloth-formatters-docbook which can do some basic conversion from textile to docbook.
Safe the TODO's which are easy enough to add conversion works quite nice.
So I thought I share this little program and maybe someone can integrate something in Redmine.

# Convert textile formatted files to docbook
#

require 'optparse'
require 'fileutils'
require 'rubygems'
require 'RedCloth'
require 'redcloth-formatters-docbook'

revision = "0.9 - 2012-08-29" 

# CHANGELOG
# 0.9   initial version

# Program options
@options = {}

optparse = OptionParser.new do|opts|
  # Set a banner, displayed at the top
  # of the help screen.
  opts.banner = "Usage: tex2doc.rb [optionen] datei ..." 

  # Define the options, and what they do
  opts.on( '-v', '--version', 'Print version' ) do
    puts "tex2doc " + revision
  end

  # This displays the help screen, all programs are
  # assumed to have this option.
  opts.on( '-h', '--help', 'This message' ) do
    puts opts
    exit
  end
end

# Parse the command-line. Remember there are two forms
# of the parse method. The 'parse' method simply parses
# ARGV, while the 'parse!' method parses ARGV and removes
# any options found there, as well as any parameters for
# the options. What's left is the list of files to resize.
optparse.parse!

puts "Tex2Doc Version #{revision}, Help: -h, --help" unless ARGV.size > 0

# TODO replace <pre> by <programlisting>
# TODO search empty table cells ||, fill with a single blank should do
# TODO escape <, >, &

ARGV.each do |file|
  textile = File.open(file, 'rb') { |f| f.read }
  docbook = RedCloth.new(textile).to_docbook
  File.open(file + '.xml', "w") { |f| f.write docbook }
end
</pre>
Actions #4

Updated by Go MAEDA 3 months ago

  • Status changed from New to Closed
  • Resolution set to Wont fix

I think this feature is too specific to be a standard feature of Redmine.
I recommend you to use Pandoc or some other tool.

Actions

Also available in: Atom PDF