dokuwiki 1.2 → 1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/dokuwiki.rb +10 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbbc62f3ad854a8ce431488a5d2a41c9693c7fa1d072e4413e4be4d79596b45f
|
4
|
+
data.tar.gz: 2e18e0bbbb54312f2c3c0d19ccce3426199994f7395dcbc486d96dbe1670ac0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 319c5f9d2526537add900357a46a3257a75c2d70065caf050569c9d29b04ecef8d87bf10d06524b1f1dc61d4a704cb1a6bd1846a6b5e8531810e0d216845287e
|
7
|
+
data.tar.gz: 8c7f5f37defffe8931d79b66c7e40a046060193c1668271124e175b5775bf849b1477a93655677057c27866eee684781669af34c26bb1918ea577a06f1a0f984
|
data/CHANGELOG.md
CHANGED
data/lib/dokuwiki.rb
CHANGED
@@ -26,6 +26,7 @@ module DokuWiki
|
|
26
26
|
# DokuWiki.upload_dir
|
27
27
|
# DokuWiki.wait_second
|
28
28
|
# DokuWiki.namespace( wikipath )
|
29
|
+
# DokuWiki.export_url( wikipath )
|
29
30
|
# DokuWiki.edit_url( wikipath )
|
30
31
|
# DokuWiki.get( url )
|
31
32
|
# DokuWiki.login( wikipath, user, pass )
|
@@ -88,6 +89,11 @@ module DokuWiki
|
|
88
89
|
wikipath.gsub( ':', '%3A' ).freeze
|
89
90
|
end
|
90
91
|
|
92
|
+
# make export url
|
93
|
+
def export_url( wikipath )
|
94
|
+
"#{@dokuwiki_page_url}#{wikipath}&do=export_raw"
|
95
|
+
end
|
96
|
+
|
91
97
|
# make edit url
|
92
98
|
def edit_url( wikipath )
|
93
99
|
"#{@dokuwiki_page_url}#{wikipath}&do=edit"
|
@@ -157,11 +163,10 @@ module DokuWiki
|
|
157
163
|
|
158
164
|
# save wiki source to file
|
159
165
|
def save_wiki_source( page, filename )
|
160
|
-
|
161
|
-
wikitext =
|
166
|
+
wikitext = ''
|
167
|
+
wikitext = page.body \
|
168
|
+
if page.header[ 'content-type' ].include?( 'text/plain' )
|
162
169
|
file_put_contents( filename, wikitext )
|
163
|
-
button = f.button_with( name: 'do[draftdel]' )
|
164
|
-
@agent.submit( f, button )
|
165
170
|
end
|
166
171
|
|
167
172
|
# save wiki body to file
|
@@ -196,7 +201,7 @@ module DokuWiki
|
|
196
201
|
url = @dokuwiki_page_url + wikipath.sub( /[.]html$/, '' )
|
197
202
|
save_wiki_body( filename, url )
|
198
203
|
else
|
199
|
-
url =
|
204
|
+
url = export_url( wikipath )
|
200
205
|
filename << ".#{EXTENSION}"
|
201
206
|
page = get( url )
|
202
207
|
save_wiki_source( page, filename )
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dokuwiki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dirk Meyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http-cookie
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
|
-
rubygems_version: 3.
|
85
|
+
rubygems_version: 3.4.19
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: access DokuWiki server
|