caramelize 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +19 -24
- data/bin/caramelize +48 -2
- data/caramelize.gemspec +2 -1
- data/lib/caramelize.rb +12 -0
- data/lib/caramelize/caramel.rb +33 -29
- data/lib/caramelize/content_transferer.rb +78 -111
- data/lib/caramelize/filter_processor.rb +31 -0
- data/lib/caramelize/input_wiki/redmine_wiki.rb +97 -0
- data/lib/caramelize/{wiki → input_wiki}/trac_converter.rb +0 -0
- data/lib/caramelize/input_wiki/wiki.rb +61 -0
- data/lib/caramelize/input_wiki/wikkawiki.rb +57 -0
- data/lib/caramelize/output_wiki/gollum.rb +73 -0
- data/lib/caramelize/page.rb +10 -4
- data/lib/caramelize/services/page_builder.rb +20 -0
- data/lib/caramelize/version.rb +1 -1
- data/spec/lib/caramelize/content_transferer_spec.rb +9 -0
- data/spec/lib/caramelize/filter_processor_spec.rb +32 -0
- data/spec/lib/caramelize/filters/wikka_to_markdown_spec.rb +25 -13
- data/spec/lib/caramelize/{wiki → input_wiki}/wiki_spec.rb +30 -4
- data/spec/lib/caramelize/output_wiki/gollum_spec.rb +113 -0
- data/spec/lib/caramelize/page_spec.rb +49 -0
- data/spec/lib/caramelize/services/page_builder.rb +29 -0
- data/spec/spec_helper.rb +1 -1
- metadata +38 -17
- data/lib/caramelize/cli.rb +0 -89
- data/lib/caramelize/cli/create_command.rb +0 -36
- data/lib/caramelize/cli/run_command.rb +0 -33
- data/lib/caramelize/gollum_output.rb +0 -79
- data/lib/caramelize/wiki/redmine_wiki.rb +0 -88
- data/lib/caramelize/wiki/wiki.rb +0 -63
- data/lib/caramelize/wiki/wikkawiki.rb +0 -48
- data/spec/lib/caramelize/gollum_output_spec.rb +0 -64
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f7fe435304327d466829f0dcbe0ab9ed23978da90c0c992f1464d123cffa3965
|
4
|
+
data.tar.gz: f89cdef42b840eff1869081e813cb37f93172fea6a5c7446ffba2685b34aae88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b1c74be41c73bd7e0f35e4f9441f9bc96a5a6f04e994502b70fec73fda7444e8d7e8e4fb8868d5822d4333e4f3a37b2348f954d8d37064674ee68046e8d6c58
|
7
|
+
data.tar.gz: 3b7a59b339ef5779ab86be0ee4a054f0772f58483db5edee3479d736f355ad4f04bfac06e46fda39319fc431c2003885687666abc0da854b080631484f3bcd10
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# caramelize
|
2
2
|
|
3
|
-
Caramelize is a compact and flexible wiki content migration tool. It is intended for easily transfering content from otherwise rare supported legacy wikis. With caramelize you can create your own export configurations and migrate your data into a git-based [gollum](gollum)-wiki retaining all your history and gaining the most flexible access to your wiki content.
|
3
|
+
Caramelize is a compact and flexible wiki content migration tool. It is intended for easily transfering content from otherwise rare supported legacy wikis. With caramelize you can create your own export configurations and migrate your data into a git-based [gollum](https://github.com/github/gollum)-wiki retaining all your history and gaining the most flexible access to your wiki content.
|
4
4
|
|
5
|
-
In the future more target wikis may be added. For the moment migration is supported for [WikkaWiki](
|
5
|
+
In the future more target wikis may be added. For the moment migration is supported for [WikkaWiki](http://wikkawiki.org/) and [Redmine](http://www.redmine.org/)-Wiki.
|
6
6
|
|
7
7
|
## Usage
|
8
8
|
|
@@ -41,7 +41,6 @@ Creates an example configuration by the given name.
|
|
41
41
|
Executes the given configuration.
|
42
42
|
|
43
43
|
$ caramelize --verbose [command]
|
44
|
-
$ caramelize -v [command]
|
45
44
|
|
46
45
|
Displays more verbose output to the command line.
|
47
46
|
|
@@ -49,10 +48,10 @@ Displays more verbose output to the command line.
|
|
49
48
|
|
50
49
|
### Wiki support
|
51
50
|
|
52
|
-
Caramelize comes with direct support for [WikkaWiki](
|
51
|
+
Caramelize comes with direct support for [WikkaWiki](http://wikkawiki.org/) and [Redmine](http://www.redmine.org/)-Wiki.
|
53
52
|
More custom wikis can be supported by creating a suitable configuration file.
|
54
53
|
|
55
|
-
Any imported wiki exports into a [gollum](gollum) git-repository. This is a wiki based around a git-repository. This gives you the flexibility of having all wiki pages exported as physical files, while keeping the history and having an easy and wide-supported way of access by using the wiki server gollum features.
|
54
|
+
Any imported wiki exports into a [gollum](https://github.com/github/gollum) git-repository. This is a wiki based around a git-repository. This gives you the flexibility of having all wiki pages exported as physical files, while keeping the history and having an easy and wide-supported way of access by using the wiki server gollum features.
|
56
55
|
|
57
56
|
Since wiki software may have special features, that are not common among other wikis, content migration may always have a loss of style or information. Caramelize tries to support the most common features.
|
58
57
|
|
@@ -76,11 +75,11 @@ Custom import allows you to import data from wikis that are not natively support
|
|
76
75
|
|
77
76
|
For a custom wiki you need to create a `wiki` instance object, that receives the necessary database creditials.
|
78
77
|
|
79
|
-
wiki = Caramelize::Wiki.new(
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
78
|
+
wiki = Caramelize::InputWiki::Wiki.new(host: "localhost",
|
79
|
+
username: "user",
|
80
|
+
database: "database_name",
|
81
|
+
password: 'monkey',
|
82
|
+
markup: :wikka})
|
84
83
|
|
85
84
|
This example ignores custom markup conversion and assumes WikkaWiki-markup.
|
86
85
|
|
@@ -94,15 +93,15 @@ Once the object is established we need to hook in a method that defines how revi
|
|
94
93
|
results.each do |row|
|
95
94
|
titles << row["tag"]
|
96
95
|
author = authors[row["user"]]
|
97
|
-
page = Page.new({:
|
98
|
-
:
|
99
|
-
:
|
100
|
-
:
|
101
|
-
:
|
102
|
-
:
|
103
|
-
:
|
104
|
-
:
|
105
|
-
:
|
96
|
+
page = Page.new({id: row["id"],
|
97
|
+
title: row["tag"],
|
98
|
+
body: row["body"],
|
99
|
+
markup: 'wikka',
|
100
|
+
latest: row["latest"] == "Y",
|
101
|
+
time: row["time"],
|
102
|
+
message: row["note"],
|
103
|
+
author: author,
|
104
|
+
author_name: row["user"]})
|
106
105
|
revisions << page
|
107
106
|
end
|
108
107
|
# titles is the list of all unique page titles contained in the wiki
|
@@ -150,8 +149,4 @@ to install the new gem right to your system.
|
|
150
149
|
|
151
150
|
## Copyright
|
152
151
|
|
153
|
-
Copyright (c) 2011-
|
154
|
-
|
155
|
-
[wikka]: http://wikkawiki.org/
|
156
|
-
[gollum]: https://github.com/github/gollum
|
157
|
-
[redmine]: http://www.redmine.org/
|
152
|
+
Copyright (c) 2011-2015 Daniel Senff. See LICENSE.md for further details.
|
data/bin/caramelize
CHANGED
@@ -1,5 +1,51 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require 'caramelize
|
3
|
+
require 'caramelize'
|
4
|
+
require 'commander/import'
|
4
5
|
|
5
|
-
|
6
|
+
# :name is optional, otherwise uses the basename of this executable
|
7
|
+
program :name, 'caramelize'
|
8
|
+
program :version, Caramelize::VERSION
|
9
|
+
program :description, 'TODO'
|
10
|
+
program :help, 'Author', 'Daniel Senff <public@danielsenff.de>'
|
11
|
+
|
12
|
+
default_command :run
|
13
|
+
|
14
|
+
global_option '--verbose'
|
15
|
+
|
16
|
+
command :new do |c|
|
17
|
+
c.syntax = 'caramelize create [options]'
|
18
|
+
c.summary = 'Create new configuration'
|
19
|
+
c.description = 'Create a fresh configuration file for caramelize'
|
20
|
+
c.option '--config STRING', String, 'The config file (default: caramel.rb)'
|
21
|
+
c.example 'Create a fresh config file as "caramel.rb"', 'caramelize create'
|
22
|
+
c.example 'Create a fresh config file as "config.rb"', 'caramelize create --config config.rb'
|
23
|
+
c.action do |args, options|
|
24
|
+
target_file ||= (options.config || 'caramel.rb')
|
25
|
+
options.default({ config: 'caramel.rb' })
|
26
|
+
FileUtils.cp(File.dirname(__FILE__) + '/../lib/caramelize/caramel.rb',
|
27
|
+
options.config)
|
28
|
+
say "Created new configuration file: #{optinos.config}"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
alias_command :create, :new
|
32
|
+
|
33
|
+
command :run do |c|
|
34
|
+
c.syntax = 'caramelize run [options]'
|
35
|
+
c.summary = 'Run wiki transfer'
|
36
|
+
c.description = 'Run the wiki content transfer based on the given configuration file'
|
37
|
+
c.option '--config STRING', String, 'The config file (default: caramel.rb)'
|
38
|
+
c.example 'Run transfer for "caramel.rb"', 'caramelize run'
|
39
|
+
c.example 'Run transfer for "config.rb"', 'caramelize run --config config.rb'
|
40
|
+
c.action do |args, options|
|
41
|
+
time_start = Time.now
|
42
|
+
options.default({ config: 'caramel.rb' })
|
43
|
+
puts options.inspect
|
44
|
+
|
45
|
+
instance_eval(File.read(options.config))
|
46
|
+
|
47
|
+
wiki_options = input_wiki.options.merge(verbose: options.verbose)
|
48
|
+
Caramelize::ContentTransferer.new(input_wiki, wiki_options).execute
|
49
|
+
say "Time required: #{Time.now - time_start} s"
|
50
|
+
end
|
51
|
+
end
|
data/caramelize.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency('mysql2')
|
22
|
-
spec.add_dependency('
|
22
|
+
spec.add_dependency('commander')
|
23
23
|
spec.add_dependency('docile')
|
24
24
|
spec.add_dependency('ruby-progressbar')
|
25
25
|
spec.add_dependency('gollum-lib', '>= 1.0.0') # grit dependency implicit through gollum
|
@@ -28,6 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency "rake"
|
29
29
|
spec.add_development_dependency "rspec"
|
30
30
|
spec.add_development_dependency "byebug"
|
31
|
+
spec.add_development_dependency "rubocop"
|
31
32
|
spec.add_development_dependency "guard"
|
32
33
|
spec.add_development_dependency "guard-rspec"
|
33
34
|
end
|
data/lib/caramelize.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'caramelize/version'
|
2
|
+
require 'caramelize/page'
|
3
|
+
require 'caramelize/ext'
|
4
|
+
require 'caramelize/content_transferer'
|
5
|
+
require 'caramelize/filter_processor'
|
6
|
+
require 'caramelize/database_connector'
|
7
|
+
require 'caramelize/output_wiki/gollum'
|
8
|
+
require 'caramelize/services/page_builder'
|
9
|
+
require 'caramelize/input_wiki/wiki'
|
10
|
+
require 'caramelize/input_wiki/redmine_wiki'
|
11
|
+
require 'caramelize/input_wiki/wikkawiki'
|
12
|
+
|
data/lib/caramelize/caramel.rb
CHANGED
@@ -1,21 +1,22 @@
|
|
1
|
-
require 'caramelize/
|
2
|
-
require 'caramelize/
|
3
|
-
require 'caramelize/wiki/redmine_wiki'
|
1
|
+
require 'caramelize/input_wiki/wikkawiki'
|
2
|
+
require 'caramelize/input_wiki/redmine_wiki'
|
4
3
|
|
5
4
|
## Example caramelize configuration file
|
6
5
|
|
7
|
-
# Within this method you can define your own Wiki-Connectors to Wikis
|
6
|
+
# Within this method you can define your own Wiki-Connectors to Wikis
|
7
|
+
# not supported by default in this software
|
8
8
|
|
9
9
|
# Note, if you want to activate this, you need to uncomment the line below.
|
10
10
|
def customized_wiki
|
11
11
|
|
12
12
|
# This example is a reimplementation of the WikkaWiki-Connector.
|
13
13
|
# To connect to WikkaWiki, I suggest to use the predefined Connector below.
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
options = { host: "localhost",
|
15
|
+
username: "user",
|
16
|
+
database: "database_name",
|
17
|
+
password: 'Picard-Delta-5',
|
18
|
+
markup: :wikka}
|
19
|
+
wiki = Caramelize::InputWiki::Wiki.new(options)
|
19
20
|
wiki.instance_eval do
|
20
21
|
def read_pages
|
21
22
|
sql = "SELECT id, tag, body, time, latest, user, note FROM wikka_pages ORDER BY time;"
|
@@ -23,15 +24,16 @@ def customized_wiki
|
|
23
24
|
results.each do |row|
|
24
25
|
titles << row["tag"]
|
25
26
|
author = @authors[row["user"]]
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
27
|
+
properties = { id: row["id"],
|
28
|
+
title: row["tag"],
|
29
|
+
body: row["body"],
|
30
|
+
markup: 'wikka',
|
31
|
+
latest: row["latest"] == "Y",
|
32
|
+
time: row["time"],
|
33
|
+
message: row["note"],
|
34
|
+
author: author,
|
35
|
+
author_name: row["user"]}
|
36
|
+
page = Page.new(properties)
|
35
37
|
revisions << page
|
36
38
|
end
|
37
39
|
titles.uniq!
|
@@ -48,27 +50,29 @@ end
|
|
48
50
|
def predefined_wiki
|
49
51
|
|
50
52
|
# For connection to a WikkaWiki-Database use this Connector
|
51
|
-
#
|
52
|
-
# :
|
53
|
-
# :
|
54
|
-
# :
|
53
|
+
#options = { host: "localhost",
|
54
|
+
# username: "root",
|
55
|
+
# password: "root",
|
56
|
+
# database: "wikka" }
|
57
|
+
#return Caramelize::InputWiki::WikkaWiki.new(options)
|
55
58
|
|
56
59
|
|
57
60
|
# For connection to a Redmine-Database use this Connector
|
58
61
|
# Additional options:
|
59
62
|
# :create_namespace_overview => true/false (Default: true) - Creates a new wikipage at /home as root page for Gollum wiki
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
63
|
+
options = { host: "localhost",
|
64
|
+
username: "root",
|
65
|
+
password: "root",
|
66
|
+
database: "redmine_development" }
|
67
|
+
return Caramelize::InputWiki::RedmineWiki.new(options)
|
64
68
|
end
|
65
69
|
|
66
70
|
|
67
71
|
def input_wiki
|
72
|
+
# comment and uncomment to easily switch between predefined and
|
73
|
+
# costumized Wiki-connectors.
|
68
74
|
|
69
|
-
# comment and uncomment to easily switch between predefined and costumized Wiki-connectors.
|
70
75
|
#return customized_wiki
|
71
76
|
|
72
77
|
return predefined_wiki
|
73
|
-
|
74
|
-
end
|
78
|
+
end
|
@@ -8,148 +8,115 @@ module Caramelize
|
|
8
8
|
require 'caramelize/ext'
|
9
9
|
require 'caramelize/content_transferer'
|
10
10
|
require 'caramelize/database_connector'
|
11
|
-
require 'caramelize/
|
12
|
-
require 'caramelize/
|
13
|
-
require 'caramelize/
|
14
|
-
require 'caramelize/wiki/wiki'
|
11
|
+
require 'caramelize/output_wiki/gollum'
|
12
|
+
require 'caramelize/input_wiki/redmine_wiki'
|
13
|
+
require 'caramelize/input_wiki/wikkawiki'
|
15
14
|
|
16
|
-
# Controller for the content migration
|
17
15
|
class ContentTransferer
|
16
|
+
attr_reader :input_wiki, :options, :filter_processor
|
18
17
|
|
19
|
-
|
18
|
+
def initialize(input_wiki, options)
|
19
|
+
@input_wiki = input_wiki
|
20
|
+
@options = options
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
options[:default_author] = "Caramelize" unless options[:default_author]
|
27
|
-
# see if original wiki markup is among any gollum supported markups
|
28
|
-
options[:markup] = target_markup
|
29
|
-
|
30
|
-
original_wiki.read_authors
|
31
|
-
initialize_page_filters
|
32
|
-
commit_history
|
33
|
-
|
34
|
-
# if wiki needs to convert syntax, do so
|
35
|
-
if verbose?
|
36
|
-
puts "From markup: #{original_wiki.markup.to_s}"
|
37
|
-
puts "To markup: #{markup.to_s}"
|
38
|
-
end
|
39
|
-
|
40
|
-
puts "Latest revisions:" if verbose?
|
22
|
+
options[:default_author] = options.fetch(:default_author, "Caramelize")
|
23
|
+
options[:target_directory] = './wiki-export'
|
24
|
+
options[:markup] = target_markup
|
25
|
+
end
|
41
26
|
|
42
|
-
|
43
|
-
|
44
|
-
end
|
27
|
+
def execute
|
28
|
+
input_wiki.read_authors
|
45
29
|
|
46
|
-
|
30
|
+
commit_history
|
47
31
|
|
48
|
-
|
49
|
-
|
32
|
+
if verbose?
|
33
|
+
puts "From markup: #{input_wiki.markup.to_s}"
|
34
|
+
puts "To markup: #{target_markup.to_s}"
|
35
|
+
puts "Convert latest revisions:"
|
50
36
|
end
|
51
37
|
|
52
|
-
|
53
|
-
@revisions ||= original_wiki.read_pages
|
54
|
-
end
|
55
|
-
|
56
|
-
def filters
|
57
|
-
@filters ||= []
|
58
|
-
end
|
38
|
+
migrate_markup_of_latest_revisions
|
59
39
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
end
|
40
|
+
puts 'Create Namespace Overview' if verbose?
|
41
|
+
create_overview_page_of_namespaces if options[:create_namespace_overview]
|
42
|
+
end
|
64
43
|
|
65
|
-
|
66
|
-
puts 'Create Namespace Overview' if verbose?
|
67
|
-
output_wiki.create_namespace_overview(original_wiki.namespaces)
|
68
|
-
end
|
44
|
+
private
|
69
45
|
|
70
|
-
|
71
|
-
|
46
|
+
def target_markup
|
47
|
+
@target_markup ||=
|
48
|
+
needs_conversion_to_target_markup? ? input_wiki.markup : :markdown
|
49
|
+
end
|
72
50
|
|
51
|
+
def needs_conversion_to_target_markup?
|
52
|
+
output_wiki.supported_markup.index(input_wiki.markup)
|
53
|
+
end
|
73
54
|
|
74
|
-
|
55
|
+
def revisions
|
56
|
+
@revisions ||= input_wiki.read_pages
|
57
|
+
end
|
75
58
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
end
|
80
|
-
end
|
59
|
+
def output_wiki
|
60
|
+
@output_wiki ||= OutputWiki::Gollum.new(options[:target_directory])
|
61
|
+
end
|
81
62
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
output_wiki.commit_history(revisions, options) do |page, index|
|
86
|
-
if verbose?
|
87
|
-
puts "(#{index+1}/#{revisions.count}) #{page.time} #{page.title}"
|
88
|
-
else
|
89
|
-
@progress_bar.increment
|
90
|
-
end
|
91
|
-
end
|
63
|
+
def filter_processor
|
64
|
+
@filter_processor ||= FilterProcessor.new(input_wiki)
|
65
|
+
end
|
92
66
|
|
93
|
-
|
67
|
+
def verbose?
|
68
|
+
options[:verbose]
|
69
|
+
end
|
94
70
|
|
95
|
-
|
96
|
-
|
97
|
-
|
71
|
+
def revisions_count
|
72
|
+
revisions.count
|
73
|
+
end
|
98
74
|
|
99
|
-
|
100
|
-
|
101
|
-
|
75
|
+
def create_overview_page_of_namespaces
|
76
|
+
output_wiki.commit_namespace_overview(input_wiki.namespaces)
|
77
|
+
end
|
102
78
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
@markup = output_wiki.supported_markup.index(original_wiki.markup) ? original_wiki.markup : :markdown
|
107
|
-
end
|
108
|
-
@markup
|
109
|
-
end
|
79
|
+
def migrate_markup_of_latest_revisions
|
80
|
+
progress_bar = ProgressBar.create(title: "Markup filters",
|
81
|
+
total: revisions_count)
|
110
82
|
|
111
|
-
|
112
|
-
|
83
|
+
input_wiki.latest_revisions.each do |revision|
|
84
|
+
migrate_markup_of_revision(revision, progress_bar)
|
113
85
|
end
|
86
|
+
end
|
114
87
|
|
115
|
-
|
116
|
-
|
117
|
-
|
88
|
+
def commit_history
|
89
|
+
puts revisions_count
|
90
|
+
progress_bar = ProgressBar.create(title: "Revisions",
|
91
|
+
total: revisions_count)
|
118
92
|
|
119
|
-
|
93
|
+
output_wiki.commit_history(revisions, options) do |page, index|
|
120
94
|
if verbose?
|
121
|
-
puts "
|
95
|
+
puts "(#{index + 1}/#{revisions_count}) #{page.time} #{page.title}"
|
122
96
|
else
|
123
|
-
|
97
|
+
progress_bar.increment
|
124
98
|
end
|
125
|
-
|
126
|
-
# run filters
|
127
|
-
body_new = run_filters(revision.body)
|
128
|
-
|
129
|
-
unless body_new == revision.body
|
130
|
-
revision.body = body_new
|
131
|
-
revision.author_name = markup
|
132
|
-
revision.time = Time.now
|
133
|
-
revision.author = nil
|
134
|
-
|
135
|
-
# commit as latest page revision
|
136
|
-
output_wiki.commit_revision revision, options[:markup]
|
137
|
-
end
|
138
|
-
|
139
99
|
end
|
100
|
+
end
|
140
101
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
body_new
|
102
|
+
def migrate_markup_of_revision(revision, progress_bar)
|
103
|
+
if verbose?
|
104
|
+
puts "Filter source: #{revision.title} #{revision.time}"
|
105
|
+
else
|
106
|
+
progress_bar.increment
|
147
107
|
end
|
148
108
|
|
149
|
-
|
150
|
-
|
109
|
+
body_new = filter_processor.run(revision.body)
|
110
|
+
|
111
|
+
unless body_new == revision.body
|
112
|
+
revision.body = body_new
|
113
|
+
revision.author_name = target_markup
|
114
|
+
revision.time = Time.now
|
115
|
+
revision.author = nil
|
116
|
+
|
117
|
+
# commit as latest page revision
|
118
|
+
output_wiki.commit_revision(revision, options[:markup])
|
151
119
|
end
|
152
120
|
end
|
153
|
-
|
154
121
|
end
|
155
|
-
end
|
122
|
+
end
|