org-ruby 0.2.0
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/.bnsignore +18 -0
- data/History.txt +24 -0
- data/README.txt +66 -0
- data/Rakefile +22 -0
- data/TAGS +128 -0
- data/bin/org-ruby +40 -0
- data/lib/org-ruby.rb +48 -0
- data/lib/org-ruby/headline.rb +75 -0
- data/lib/org-ruby/html_output_buffer.rb +80 -0
- data/lib/org-ruby/line.rb +172 -0
- data/lib/org-ruby/output_buffer.rb +154 -0
- data/lib/org-ruby/parser.rb +72 -0
- data/lib/org-ruby/regexp_helper.rb +156 -0
- data/lib/org-ruby/textile_output_buffer.rb +67 -0
- data/spec/data/freeform.org +111 -0
- data/spec/data/hyp-planning.org +335 -0
- data/spec/data/remember.org +53 -0
- data/spec/headline_spec.rb +55 -0
- data/spec/html_examples/block_code.html +29 -0
- data/spec/html_examples/block_code.org +35 -0
- data/spec/html_examples/blockquote.html +7 -0
- data/spec/html_examples/blockquote.org +13 -0
- data/spec/html_examples/inline-formatting.html +10 -0
- data/spec/html_examples/inline-formatting.org +17 -0
- data/spec/html_examples/lists.html +19 -0
- data/spec/html_examples/lists.org +36 -0
- data/spec/html_examples/tables.html +20 -0
- data/spec/html_examples/tables.org +26 -0
- data/spec/html_examples/text.html +2 -0
- data/spec/html_examples/text.org +16 -0
- data/spec/line_spec.rb +89 -0
- data/spec/parser_spec.rb +86 -0
- data/spec/regexp_helper_spec.rb +57 -0
- data/spec/spec_helper.rb +20 -0
- data/spec/textile_examples/block_code.org +35 -0
- data/spec/textile_examples/block_code.textile +29 -0
- data/spec/textile_examples/blockquote.org +13 -0
- data/spec/textile_examples/blockquote.textile +11 -0
- data/spec/textile_examples/keywords.org +13 -0
- data/spec/textile_examples/keywords.textile +11 -0
- data/spec/textile_examples/links.org +11 -0
- data/spec/textile_examples/links.textile +10 -0
- data/spec/textile_examples/lists.org +36 -0
- data/spec/textile_examples/lists.textile +20 -0
- data/spec/textile_examples/single-space-plain-list.org +13 -0
- data/spec/textile_examples/single-space-plain-list.textile +10 -0
- data/spec/textile_examples/tables.org +26 -0
- data/spec/textile_examples/tables.textile +23 -0
- data/spec/textile_output_buffer_spec.rb +21 -0
- data/test/test_orgmode_parser.rb +0 -0
- metadata +120 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w[spec_helper])
|
2
|
+
|
3
|
+
describe Orgmode::TextileOutputBuffer do
|
4
|
+
it "should substitute / with _" do
|
5
|
+
Orgmode::TextileOutputBuffer.new("").inline_formatting("/italic/").should eql("_italic_")
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should convert simple links" do
|
9
|
+
Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com]]").should \
|
10
|
+
eql("\"http://www.google.com\":http://www.google.com")
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should convert links with text" do
|
14
|
+
Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com][Google]]").should \
|
15
|
+
eql("\"Google\":http://www.google.com")
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should convert spaces in urls" do
|
19
|
+
Orgmode::TextileOutputBuffer.new("").inline_formatting("[[my url]]").should eql("\"my url\":my%20url")
|
20
|
+
end
|
21
|
+
end
|
File without changes
|
metadata
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: org-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Brian Dewey
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-12-26 00:00:00 -08:00
|
13
|
+
default_executable: org-ruby
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: bones
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 3.2.0
|
24
|
+
version:
|
25
|
+
description: "This gem contains Ruby routines for parsing org-mode files.The most\n\
|
26
|
+
significant thing this library does today is convert org-mode files to\n\
|
27
|
+
HTML or textile. Currently, you cannot do much to customize the\n\
|
28
|
+
conversion. The supplied textile conversion is optimized for\n\
|
29
|
+
extracting \"content\" from the orgfile as opposed to \"metadata.\" "
|
30
|
+
email: bdewey@gmail.com
|
31
|
+
executables:
|
32
|
+
- org-ruby
|
33
|
+
extensions: []
|
34
|
+
|
35
|
+
extra_rdoc_files:
|
36
|
+
- History.txt
|
37
|
+
- README.txt
|
38
|
+
- bin/org-ruby
|
39
|
+
files:
|
40
|
+
- .bnsignore
|
41
|
+
- History.txt
|
42
|
+
- README.txt
|
43
|
+
- Rakefile
|
44
|
+
- TAGS
|
45
|
+
- bin/org-ruby
|
46
|
+
- lib/org-ruby.rb
|
47
|
+
- lib/org-ruby/headline.rb
|
48
|
+
- lib/org-ruby/html_output_buffer.rb
|
49
|
+
- lib/org-ruby/line.rb
|
50
|
+
- lib/org-ruby/output_buffer.rb
|
51
|
+
- lib/org-ruby/parser.rb
|
52
|
+
- lib/org-ruby/regexp_helper.rb
|
53
|
+
- lib/org-ruby/textile_output_buffer.rb
|
54
|
+
- spec/data/freeform.org
|
55
|
+
- spec/data/hyp-planning.org
|
56
|
+
- spec/data/remember.org
|
57
|
+
- spec/headline_spec.rb
|
58
|
+
- spec/html_examples/block_code.html
|
59
|
+
- spec/html_examples/block_code.org
|
60
|
+
- spec/html_examples/blockquote.html
|
61
|
+
- spec/html_examples/blockquote.org
|
62
|
+
- spec/html_examples/inline-formatting.html
|
63
|
+
- spec/html_examples/inline-formatting.org
|
64
|
+
- spec/html_examples/lists.html
|
65
|
+
- spec/html_examples/lists.org
|
66
|
+
- spec/html_examples/tables.html
|
67
|
+
- spec/html_examples/tables.org
|
68
|
+
- spec/html_examples/text.html
|
69
|
+
- spec/html_examples/text.org
|
70
|
+
- spec/line_spec.rb
|
71
|
+
- spec/parser_spec.rb
|
72
|
+
- spec/regexp_helper_spec.rb
|
73
|
+
- spec/spec_helper.rb
|
74
|
+
- spec/textile_examples/block_code.org
|
75
|
+
- spec/textile_examples/block_code.textile
|
76
|
+
- spec/textile_examples/blockquote.org
|
77
|
+
- spec/textile_examples/blockquote.textile
|
78
|
+
- spec/textile_examples/keywords.org
|
79
|
+
- spec/textile_examples/keywords.textile
|
80
|
+
- spec/textile_examples/links.org
|
81
|
+
- spec/textile_examples/links.textile
|
82
|
+
- spec/textile_examples/lists.org
|
83
|
+
- spec/textile_examples/lists.textile
|
84
|
+
- spec/textile_examples/single-space-plain-list.org
|
85
|
+
- spec/textile_examples/single-space-plain-list.textile
|
86
|
+
- spec/textile_examples/tables.org
|
87
|
+
- spec/textile_examples/tables.textile
|
88
|
+
- spec/textile_output_buffer_spec.rb
|
89
|
+
- test/test_orgmode_parser.rb
|
90
|
+
has_rdoc: true
|
91
|
+
homepage: http://bdewey.com
|
92
|
+
licenses: []
|
93
|
+
|
94
|
+
post_install_message:
|
95
|
+
rdoc_options:
|
96
|
+
- --main
|
97
|
+
- README.txt
|
98
|
+
require_paths:
|
99
|
+
- lib
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: "0"
|
105
|
+
version:
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: "0"
|
111
|
+
version:
|
112
|
+
requirements: []
|
113
|
+
|
114
|
+
rubyforge_project: org-ruby
|
115
|
+
rubygems_version: 1.3.5
|
116
|
+
signing_key:
|
117
|
+
specification_version: 3
|
118
|
+
summary: This gem contains Ruby routines for parsing org-mode files
|
119
|
+
test_files:
|
120
|
+
- test/test_orgmode_parser.rb
|