github-markup 0.1.7 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.0 (2010-01-10)
2
+
3
+ * org-mode support
4
+
1
5
  ## 0.1.7 (2009-11-17)
2
6
 
3
7
  * Ditch asciidoc2html, call asciidoc directly
data/README.md CHANGED
@@ -57,7 +57,8 @@ Tests should be added in the same manner as described under the
57
57
  Installation
58
58
  -----------
59
59
 
60
- gem install github-markup --source=http://gemcutter.org
60
+ gem install github-markup
61
+ gem install org-ruby
61
62
 
62
63
 
63
64
  Usage
data/Rakefile CHANGED
@@ -24,14 +24,14 @@ begin
24
24
  gemspec.version = GitHub::Markup::Version
25
25
  end
26
26
  rescue LoadError
27
- puts "Jeweler not available."
28
- puts "Install it with: gem install jeweler"
27
+ warn "Jeweler not available."
28
+ warn "Install it with: gem install jeweler"
29
29
  end
30
30
 
31
31
  begin
32
32
  require 'sdoc_helpers'
33
33
  rescue LoadError
34
- puts "sdoc support not enabled. Please gem install sdoc-helpers."
34
+ warn "sdoc support not enabled. Please gem install sdoc-helpers."
35
35
  end
36
36
 
37
37
  desc "Build a gem"
@@ -1,5 +1,5 @@
1
1
  module GitHub
2
2
  module Markup
3
- Version = '0.1.7'
3
+ Version = '0.2.0'
4
4
  end
5
5
  end
@@ -10,6 +10,10 @@ markup('github/markup/rdoc', /rdoc/) do |content|
10
10
  GitHub::Markup::RDoc.new(content).to_html
11
11
  end
12
12
 
13
+ markup('org-ruby', /org/) do |content|
14
+ Orgmode::Parser.new(content).to_html
15
+ end
16
+
13
17
  command(:rest2html, /rest|rst/)
14
18
 
15
19
  command('asciidoc -s --backend=xhtml11 -o - -', /asciidoc/)
@@ -0,0 +1,115 @@
1
+ #+TITLE: org-ruby
2
+ #+AUTHOR: Brian Dewey
3
+ #+EMAIL: bdewey@gmail.com
4
+ #+DATE: 2009-12-21
5
+ #+DESCRIPTION:
6
+ #+KEYWORDS:
7
+ #+LANGUAGE: en
8
+ #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
9
+ #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:not-in-toc
10
+ #+EXPORT_EXCLUDE_TAGS: exclude
11
+ #+STARTUP: showall
12
+
13
+ | Status: | Under Development |
14
+ | Location: | [[http://github.com/bdewey/org-ruby]] |
15
+ | Version: | 0.5.1 |
16
+
17
+ * Description
18
+
19
+ Helpful Ruby routines for parsing orgmode files. The most
20
+ significant thing this library does today is convert orgmode files
21
+ to textile. Currently, you cannot do much to customize the
22
+ conversion. The supplied textile conversion is optimized for
23
+ extracting "content" from the orgfile as opposed to "metadata."
24
+
25
+
26
+ * History
27
+
28
+ ** 2009-12-30: Version 0.5.1
29
+
30
+ - Minor enhancement: Recognize lines starting with ":" as examples.
31
+ - Minor enhancement: Recognize #+BEGIN_SRC as source blocks
32
+ - Minor enhancement: Add "src" and "example" classes to <pre> blocks.
33
+
34
+
35
+ ** 2009-12-30: Version 0.5.0
36
+
37
+ - Parse (but not necessarily *use*) in-buffer settings. The following
38
+ in-buffer settings *are* used:
39
+ - Understand the #+TITLE: directive.
40
+ - Exporting todo keywords (option todo:t)
41
+ - Numbering headlines (option num:t)
42
+ - Skipping text before the first headline (option skip:t)
43
+ - Skipping tables (option |:nil)
44
+ - Custom todo keywords
45
+ - EXPORT_SELECT_TAGS and EXPORT_EXLUDE_TAGS for controlling parts of
46
+ the tree to export
47
+ - Rewrite "file:(blah).org" links to "http:(blah).html" links. This
48
+ makes the inter-links to other org-mode files work.
49
+ - Uses <th> tags inside table rows that precede table separators.
50
+ - Bugfixes:
51
+ - Headings now have HTML escaped.
52
+
53
+ ** 2009-12-29: Version 0.4.2
54
+
55
+ - Got rid of the extraneous newline at the start of code blocks.
56
+ - Everything now shows up in code blocks, even org-mode metadata.
57
+ - Fixed bugs:
58
+ - Regressed smart double quotes with HTML escaping. Added a test
59
+ case and fixed the regression.
60
+
61
+ ** 2009-12-29: Version 0.4.1
62
+ - HTML is now escaped by default
63
+ - org-mode comments will show up in a code block.
64
+
65
+ ** 2009-12-29: Version 0.4
66
+
67
+ - The first thing output in HTML gets the class "title"
68
+ - HTML output is now indented
69
+ - Proper support for multi-paragraph list items.
70
+
71
+ See? This paragraph is part of the last bullet.
72
+
73
+ - Fixed bugs:
74
+ - "rake spec" wouldn't work on Linux. Needed "require 'rubygems'".
75
+
76
+ ** 2009-12-27: Version 0.3
77
+
78
+ - Uses rubypants to get better typography (smart quotes, elipses, etc...).
79
+ - Fixed bugs:
80
+ - Tables and lists did not get properly closed at the end of file
81
+ - You couldn't do inline formatting inside table cells
82
+ - Characters in PRE blocks were not HTML escaped.
83
+
84
+ ** 2009-12-26: Version 0.2
85
+
86
+ - Added =to_html= output on the parser.
87
+ - Added support for the full range of inline markup: *bold*,
88
+ /italic/, =code=, ~verbatim~, _underline_, +strikethrough+.
89
+ - Lots of refactoring to make the code more maintainable.
90
+
91
+ ** 2009-12-23: Version 0.1
92
+
93
+ - Added support for block code, like this:
94
+
95
+ #+BEGIN_EXAMPLE
96
+ def flush!
97
+ @logger.debug "FLUSH ==========> #{@output_type}"
98
+ if (@output_type == :blank) then
99
+ @output << "\n"
100
+ elsif (@buffer.length > 0) then
101
+ if @cancel_modifier then
102
+ @output << "p. " if @output_type == :paragraph
103
+ @cancel_modifier = false
104
+ end
105
+ @output << @paragraph_modifier if (@paragraph_modifier and not sticky_modifier?)
106
+ @output << @buffer.textile_substitution << "\n"
107
+ end
108
+ @buffer = ""
109
+ end
110
+ #+END_EXAMPLE
111
+
112
+ - Major code cleanup: Created the =OutputBuffer= class that
113
+ greatly simplified a lot of the messiness of =textile=
114
+ conversion.
115
+ - Added support for line breaks within list items.
@@ -0,0 +1,99 @@
1
+ <p class="title">org-ruby</p>
2
+ <table>
3
+ <tr><td>Status:</td><td>Under Development</td></tr>
4
+ <tr><td>Location:</td><td><a href="http://github.com/bdewey/org-ruby">http://github.com/bdewey/org-ruby</a></td></tr>
5
+ <tr><td>Version:</td><td>0.5.1</td></tr>
6
+ </table>
7
+ <h1><span class="heading-number heading-number-1">1 </span>Description</h1>
8
+ <p>Helpful Ruby routines for parsing orgmode files. The most significant thing this library does today is convert orgmode files to textile. Currently, you cannot do much to customize the conversion. The supplied textile conversion is optimized for extracting &#8220;content&#8221; from the orgfile as opposed to &#8220;metadata.&#8221;</p>
9
+ <h1><span class="heading-number heading-number-1">2 </span>History</h1>
10
+ <h2><span class="heading-number heading-number-2">2.1 </span>2009-12-30: Version 0.5.1</h2>
11
+ <ul>
12
+ <li>Minor enhancement: Recognize lines starting with &#8220;:&#8221; as examples.</li>
13
+ <li>Minor enhancement: Recognize #+BEGIN_SRC as source blocks</li>
14
+ <li>Minor enhancement: Add &#8220;src&#8221; and &#8220;example&#8221; classes to &lt;pre&gt; blocks.</li>
15
+ </ul>
16
+ <h2><span class="heading-number heading-number-2">2.2 </span>2009-12-30: Version 0.5.0</h2>
17
+ <ul>
18
+ <li>Parse (but not necessarily <b>use</b>) in-buffer settings. The following in-buffer settings <b>are</b> used:</li>
19
+ <ul>
20
+ <li>Understand the #+TITLE: directive.</li>
21
+ <li>Exporting todo keywords (option todo:t)</li>
22
+ <li>Numbering headlines (option num:t)</li>
23
+ <li>Skipping text before the first headline (option skip:t)</li>
24
+ <li>Skipping tables (option |:nil)</li>
25
+ <li>Custom todo keywords</li>
26
+ <li>EXPORT_SELECT_TAGS and EXPORT_EXLUDE_TAGS for controlling parts of the tree to export</li>
27
+ </ul>
28
+ <li>Rewrite &#8220;file:(blah).org&#8221; links to &#8220;http:(blah).html&#8221; links. This makes the inter-links to other org-mode files work.</li>
29
+ <li>Uses &lt;th&gt; tags inside table rows that precede table separators.</li>
30
+ <li>Bugfixes:</li>
31
+ <ul>
32
+ <li>Headings now have HTML escaped.</li>
33
+ </ul>
34
+ </ul>
35
+ <h2><span class="heading-number heading-number-2">2.3 </span>2009-12-29: Version 0.4.2</h2>
36
+ <ul>
37
+ <li>Got rid of the extraneous newline at the start of code blocks.</li>
38
+ <li>Everything now shows up in code blocks, even org-mode metadata.</li>
39
+ <li>Fixed bugs:</li>
40
+ <ul>
41
+ <li>Regressed smart double quotes with HTML escaping. Added a test case and fixed the regression.</li>
42
+ </ul>
43
+ </ul>
44
+ <h2><span class="heading-number heading-number-2">2.4 </span>2009-12-29: Version 0.4.1</h2>
45
+ <ul>
46
+ <li>HTML is now escaped by default</li>
47
+ <li>org-mode comments will show up in a code block.</li>
48
+ </ul>
49
+ <h2><span class="heading-number heading-number-2">2.5 </span>2009-12-29: Version 0.4</h2>
50
+ <ul>
51
+ <li>The first thing output in HTML gets the class &#8220;title&#8221;</li>
52
+ <li>HTML output is now indented</li>
53
+ <li>Proper support for multi-paragraph list items.</li>
54
+ <p>See? This paragraph is part of the last bullet.</p>
55
+ <li>Fixed bugs:</li>
56
+ <ul>
57
+ <li>&#8220;rake spec&#8221; wouldn&#8217;t work on Linux. Needed &#8220;require &#8216;rubygems&#8217;&#8221;.</li>
58
+ </ul>
59
+ </ul>
60
+ <h2><span class="heading-number heading-number-2">2.6 </span>2009-12-27: Version 0.3</h2>
61
+ <ul>
62
+ <li>Uses rubypants to get better typography (smart quotes, elipses, etc&#8230;).</li>
63
+ <li>Fixed bugs:</li>
64
+ <ul>
65
+ <li>Tables and lists did not get properly closed at the end of file</li>
66
+ <li>You couldn&#8217;t do inline formatting inside table cells</li>
67
+ <li>Characters in PRE blocks were not HTML escaped.</li>
68
+ </ul>
69
+ </ul>
70
+ <h2><span class="heading-number heading-number-2">2.7 </span>2009-12-26: Version 0.2</h2>
71
+ <ul>
72
+ <li>Added <code>to_html</code> output on the parser.</li>
73
+ <li>Added support for the full range of inline markup: <b>bold</b>, <i>italic</i>, <code>code</code>, <code>verbatim</code>, <span style="text-decoration:underline;">underline</span>, <del>strikethrough</del>.</li>
74
+ <li>Lots of refactoring to make the code more maintainable.</li>
75
+ </ul>
76
+ <h2><span class="heading-number heading-number-2">2.8 </span>2009-12-23: Version 0.1</h2>
77
+ <ul>
78
+ <li>Added support for block code, like this:</li>
79
+ </ul>
80
+ <pre class="example">
81
+ def flush!
82
+ @logger.debug "FLUSH ==========&gt; #{@output_type}"
83
+ if (@output_type == :blank) then
84
+ @output &lt;&lt; "\n"
85
+ elsif (@buffer.length &gt; 0) then
86
+ if @cancel_modifier then
87
+ @output &lt;&lt; "p. " if @output_type == :paragraph
88
+ @cancel_modifier = false
89
+ end
90
+ @output &lt;&lt; @paragraph_modifier if (@paragraph_modifier and not sticky_modifier?)
91
+ @output &lt;&lt; @buffer.textile_substitution &lt;&lt; "\n"
92
+ end
93
+ @buffer = ""
94
+ end
95
+ </pre>
96
+ <ul>
97
+ <li>Major code cleanup: Created the <code>OutputBuffer</code> class that greatly simplified a lot of the messiness of <code>textile</code> conversion.</li>
98
+ <li>Added support for line breaks within list items.</li>
99
+ </ul>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-markup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-17 00:00:00 -08:00
12
+ date: 2010-01-10 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -43,6 +43,8 @@ files:
43
43
  - test/markups/README.markdown.html
44
44
  - test/markups/README.noformat
45
45
  - test/markups/README.noformat.html
46
+ - test/markups/README.org
47
+ - test/markups/README.org.html
46
48
  - test/markups/README.pod
47
49
  - test/markups/README.pod.html
48
50
  - test/markups/README.rdoc