zimki 0.0.1 → 0.0.2
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.
- data/README.md +16 -14
- data/lib/zimki.rb +0 -13
- data/spec/zimki_spec.rb +0 -0
- data/zimki.gemspec +2 -2
- metadata +10 -5
data/README.md
CHANGED
@@ -2,7 +2,7 @@ Zimki is a text conversion tool which translates files written in [zimki Desktop
|
|
2
2
|
[textile][textile].
|
3
3
|
|
4
4
|
|
5
|
-
## Installation
|
5
|
+
## Installation
|
6
6
|
|
7
7
|
Type in your console
|
8
8
|
|
@@ -11,47 +11,49 @@ Type in your console
|
|
11
11
|
and you can use the gem.
|
12
12
|
|
13
13
|
|
14
|
-
## Usage
|
14
|
+
## Usage
|
15
15
|
|
16
16
|
Here is an example how you can use it.
|
17
17
|
|
18
|
+
|
18
19
|
require 'zimki'
|
19
20
|
|
20
21
|
zimki = Zimki.new
|
21
22
|
zimki.textile_conversion("src.txt")
|
22
23
|
|
23
|
-
|
24
|
-
|
24
|
+
|
25
|
+
A typical text file in the zimki format can be found in this repository under `spec/source/src.txt`. The output will be
|
26
|
+
written in the console - so then copy the things you need.
|
25
27
|
|
26
28
|
|
27
|
-
## Current translation status
|
29
|
+
## Current translation status
|
28
30
|
|
29
|
-
Currently the gem can translate the following constructs. On the left you can see the zimki format
|
30
|
-
|
31
|
+
Currently the gem can translate the following constructs. On the left you can see the zimki format and on the right of
|
32
|
+
the arrow you can see the textile pendant.
|
31
33
|
|
32
34
|
|
33
|
-
### General constructs
|
35
|
+
### General constructs
|
34
36
|
|
35
37
|
//italique// => _italique_
|
36
38
|
**bold** => *bold*
|
37
39
|
__highlight => @highlight@
|
38
40
|
|
39
41
|
|
40
|
-
### Headings
|
42
|
+
### Headings
|
41
43
|
|
42
44
|
==== The 10-day MBA ==== => h1. The 10-day MBA
|
43
45
|
=== The 10-day MBA === => h2. The 10-day MBA
|
44
46
|
== The 10-day MBA == => h3. The 10-day MBA
|
45
47
|
|
46
48
|
|
47
|
-
### Links and Images
|
49
|
+
### Links and Images
|
48
50
|
|
49
51
|
|
50
52
|
[[http://wikimatze.de|wikimatze]] => "wikimatze":http://wikimatze.de
|
51
53
|
{{~/Dropbox/pics/Screenshot.png}} => !http://~/Dropbox/pics/Screenshot.png!
|
52
54
|
|
53
55
|
|
54
|
-
### Bullets
|
56
|
+
### Bullets
|
55
57
|
|
56
58
|
* first bullet
|
57
59
|
* second bulltet
|
@@ -66,16 +68,16 @@ and on the right of the arrow you can see the textile pendant.
|
|
66
68
|
**** fourth
|
67
69
|
|
68
70
|
|
69
|
-
## Contact
|
71
|
+
## Contact
|
70
72
|
|
71
73
|
Feature request, bugs, questions, etc. can be send to <matthias.guenther@wikimatze.de>.
|
72
74
|
|
73
75
|
|
74
|
-
## License
|
76
|
+
## License
|
75
77
|
|
76
78
|
This software is licensed under the [MIT license][mit].
|
77
79
|
|
78
|
-
© 2011 Matthias Guenther <matthias.guenther@wikimatze.de>.
|
80
|
+
© 2011-2013 Matthias Guenther <matthias.guenther@wikimatze.de>.
|
79
81
|
|
80
82
|
[mit]: http://en.wikipedia.org/wiki/MIT_License
|
81
83
|
[textile]: http://en.wikipedia.org/wiki/Textile_(markup_language)/
|
data/lib/zimki.rb
CHANGED
@@ -111,8 +111,6 @@ class Zimki
|
|
111
111
|
text << apply_textile_conversion_rules(line)
|
112
112
|
end
|
113
113
|
|
114
|
-
puts text
|
115
|
-
|
116
114
|
replace_leading_newlines(text)
|
117
115
|
end
|
118
116
|
|
@@ -152,7 +150,6 @@ class Zimki
|
|
152
150
|
def show_regexp(string, pattern, type)
|
153
151
|
match = string.match(pattern)
|
154
152
|
if match
|
155
|
-
# puts "#{match.pre_match}->#{match[0]}<-#{match.post_match}"
|
156
153
|
if type == "link"
|
157
154
|
matching_string = match[0]
|
158
155
|
if !matching_string.include?("[[")
|
@@ -196,13 +193,3 @@ class Zimki
|
|
196
193
|
end
|
197
194
|
end
|
198
195
|
|
199
|
-
# puts Zimki.new.show_regexp(test, /\[\[http[A-Za-z0-9.-:]*\|[A-Za-z.]*\]\]|http[A-Za-z0-9.-:]*/, "link")
|
200
|
-
# file = File.join("..", "spec", "source", "notes.txt")
|
201
|
-
# filedst = File.join("..", "spec", "source", "dst.txt")
|
202
|
-
# filesrc = File.join("..", "spec", "source", "src.txt")
|
203
|
-
# a = Zimki.new
|
204
|
-
# a.textile_conversion(file)
|
205
|
-
# file = File.join("../", "2010.txt")
|
206
|
-
# puts file
|
207
|
-
# a = Zimki.new
|
208
|
-
# a.textile_conversion(file)
|
data/spec/zimki_spec.rb
CHANGED
File without changes
|
data/zimki.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'zimki'
|
3
|
-
s.version = '0.0.
|
4
|
-
s.date = '
|
3
|
+
s.version = '0.0.2'
|
4
|
+
s.date = '2013-02-10'
|
5
5
|
|
6
6
|
s.summary = 'Converts files written in the zim Desktop format to textile.'
|
7
7
|
s.description = 'Zimki converts file written in the zim Desktop Wiki format and converts them to textile.'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zimki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,12 @@ dependencies:
|
|
21
21
|
version: 2.6.0
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.6.0
|
25
30
|
description: Zimki converts file written in the zim Desktop Wiki format and converts
|
26
31
|
them to textile.
|
27
32
|
email: matthias.guenther@wikimatze.de
|
@@ -60,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
65
|
version: '0'
|
61
66
|
requirements: []
|
62
67
|
rubyforge_project:
|
63
|
-
rubygems_version: 1.8.
|
68
|
+
rubygems_version: 1.8.23
|
64
69
|
signing_key:
|
65
70
|
specification_version: 3
|
66
71
|
summary: Converts files written in the zim Desktop format to textile.
|