-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
#+TITLE: org-ruby | ||
#+AUTHOR: Brian Dewey | ||
#+EMAIL: [email protected] | ||
#+DATE: 2009-12-21 | ||
#+DESCRIPTION: | ||
#+KEYWORDS: | ||
#+LANGUAGE: en | ||
#+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t | ||
#+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:not-in-toc | ||
#+EXPORT_EXCLUDE_TAGS: exclude | ||
#+STARTUP: showall | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
| Status: | Under Development | | ||
| Location: | [[http://github.com/bdewey/org-ruby]] | | ||
| Version: | 0.5.1 | | ||
|
||
* Description | ||
|
||
Helpful Ruby routines for parsing orgmode files. The most | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
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 "content" from the orgfile as opposed to "metadata." | ||
|
||
|
||
* History | ||
|
||
** 2009-12-30: Version 0.5.1 | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
- Minor enhancement: Recognize lines starting with ":" as examples. | ||
- Minor enhancement: Recognize #+BEGIN_SRC as source blocks | ||
- Minor enhancement: Add "src" and "example" classes to <pre> blocks. | ||
|
||
|
||
** 2009-12-30: Version 0.5.0 | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
- Parse (but not necessarily *use*) in-buffer settings. The following | ||
in-buffer settings *are* used: | ||
- Understand the #+TITLE: directive. | ||
- Exporting todo keywords (option todo:t) | ||
- Numbering headlines (option num:t) | ||
- Skipping text before the first headline (option skip:t) | ||
- Skipping tables (option |:nil) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
- Custom todo keywords | ||
- EXPORT_SELECT_TAGS and EXPORT_EXLUDE_TAGS for controlling parts of | ||
the tree to export | ||
- Rewrite "file:(blah).org" links to "http:(blah).html" links. This | ||
makes the inter-links to other org-mode files work. | ||
- Uses <th> tags inside table rows that precede table separators. | ||
- Bugfixes: | ||
- Headings now have HTML escaped. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
** 2009-12-29: Version 0.4.2 | ||
|
||
- Got rid of the extraneous newline at the start of code blocks. | ||
- Everything now shows up in code blocks, even org-mode metadata. | ||
- Fixed bugs: | ||
- Regressed smart double quotes with HTML escaping. Added a test | ||
case and fixed the regression. | ||
|
||
** 2009-12-29: Version 0.4.1 | ||
- HTML is now escaped by default | ||
- org-mode comments will show up in a code block. | ||
|
||
** 2009-12-29: Version 0.4 | ||
|
||
- The first thing output in HTML gets the class "title" | ||
- HTML output is now indented | ||
- Proper support for multi-paragraph list items. | ||
|
||
See? This paragraph is part of the last bullet. | ||
|
||
- Fixed bugs: | ||
- "rake spec" wouldn't work on Linux. Needed "require 'rubygems'". | ||
|
||
** 2009-12-27: Version 0.3 | ||
|
||
- Uses rubypants to get better typography (smart quotes, elipses, etc...). | ||
- Fixed bugs: | ||
- Tables and lists did not get properly closed at the end of file | ||
- You couldn't do inline formatting inside table cells | ||
- Characters in PRE blocks were not HTML escaped. | ||
|
||
** 2009-12-26: Version 0.2 | ||
|
||
- Added =to_html= output on the parser. | ||
- Added support for the full range of inline markup: *bold*, | ||
/italic/, =code=, ~verbatim~, _underline_, +strikethrough+. | ||
- Lots of refactoring to make the code more maintainable. | ||
|
||
** 2009-12-23: Version 0.1 | ||
|
||
- Added support for block code, like this: | ||
|
||
#+BEGIN_EXAMPLE | ||
def flush! | ||
@logger.debug "FLUSH ==========> #{@output_type}" | ||
if (@output_type == :blank) then | ||
@output << "\n" | ||
elsif (@buffer.length > 0) then | ||
if @cancel_modifier then | ||
@output << "p. " if @output_type == :paragraph | ||
@cancel_modifier = false | ||
end | ||
@output << @paragraph_modifier if (@paragraph_modifier and not sticky_modifier?) | ||
@output << @buffer.textile_substitution << "\n" | ||
end | ||
@buffer = "" | ||
end | ||
#+END_EXAMPLE | ||
|
||
- Major code cleanup: Created the =OutputBuffer= class that | ||
greatly simplified a lot of the messiness of =textile= | ||
conversion. | ||
- Added support for line breaks within list items. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<p class="title">org-ruby</p> | ||
<table> | ||
<tr><td>Status:</td><td>Under Development</td></tr> | ||
<tr><td>Location:</td><td><a href="http://github.com/bdewey/org-ruby">http://github.com/bdewey/org-ruby</a></td></tr> | ||
<tr><td>Version:</td><td>0.5.1</td></tr> | ||
</table> | ||
<h1><span class="heading-number heading-number-1">1 </span>Description</h1> | ||
<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 “content” from the orgfile as opposed to “metadata.”</p> | ||
<h1><span class="heading-number heading-number-1">2 </span>History</h1> | ||
<h2><span class="heading-number heading-number-2">2.1 </span>2009-12-30: Version 0.5.1</h2> | ||
<ul> | ||
<li>Minor enhancement: Recognize lines starting with “:” as examples.</li> | ||
<li>Minor enhancement: Recognize #+BEGIN_SRC as source blocks</li> | ||
<li>Minor enhancement: Add “src” and “example” classes to <pre> blocks.</li> | ||
</ul> | ||
<h2><span class="heading-number heading-number-2">2.2 </span>2009-12-30: Version 0.5.0</h2> | ||
<ul> | ||
<li>Parse (but not necessarily <b>use</b>) in-buffer settings. The following in-buffer settings <b>are</b> used:</li> | ||
<ul> | ||
<li>Understand the #+TITLE: directive.</li> | ||
<li>Exporting todo keywords (option todo:t)</li> | ||
<li>Numbering headlines (option num:t)</li> | ||
<li>Skipping text before the first headline (option skip:t)</li> | ||
<li>Skipping tables (option |:nil)</li> | ||
<li>Custom todo keywords</li> | ||
<li>EXPORT_SELECT_TAGS and EXPORT_EXLUDE_TAGS for controlling parts of the tree to export</li> | ||
</ul> | ||
<li>Rewrite “file:(blah).org” links to “http:(blah).html” links. This makes the inter-links to other org-mode files work.</li> | ||
<li>Uses <th> tags inside table rows that precede table separators.</li> | ||
<li>Bugfixes:</li> | ||
<ul> | ||
<li>Headings now have HTML escaped.</li> | ||
</ul> | ||
</ul> | ||
<h2><span class="heading-number heading-number-2">2.3 </span>2009-12-29: Version 0.4.2</h2> | ||
<ul> | ||
<li>Got rid of the extraneous newline at the start of code blocks.</li> | ||
<li>Everything now shows up in code blocks, even org-mode metadata.</li> | ||
<li>Fixed bugs:</li> | ||
<ul> | ||
<li>Regressed smart double quotes with HTML escaping. Added a test case and fixed the regression.</li> | ||
</ul> | ||
</ul> | ||
<h2><span class="heading-number heading-number-2">2.4 </span>2009-12-29: Version 0.4.1</h2> | ||
<ul> | ||
<li>HTML is now escaped by default</li> | ||
<li>org-mode comments will show up in a code block.</li> | ||
</ul> | ||
<h2><span class="heading-number heading-number-2">2.5 </span>2009-12-29: Version 0.4</h2> | ||
<ul> | ||
<li>The first thing output in HTML gets the class “title”</li> | ||
<li>HTML output is now indented</li> | ||
<li>Proper support for multi-paragraph list items.</li> | ||
<p>See? This paragraph is part of the last bullet.</p> | ||
<li>Fixed bugs:</li> | ||
<ul> | ||
<li>“rake spec” wouldn’t work on Linux. Needed “require ‘rubygems’”.</li> | ||
</ul> | ||
</ul> | ||
<h2><span class="heading-number heading-number-2">2.6 </span>2009-12-27: Version 0.3</h2> | ||
<ul> | ||
<li>Uses rubypants to get better typography (smart quotes, elipses, etc…).</li> | ||
<li>Fixed bugs:</li> | ||
<ul> | ||
<li>Tables and lists did not get properly closed at the end of file</li> | ||
<li>You couldn’t do inline formatting inside table cells</li> | ||
<li>Characters in PRE blocks were not HTML escaped.</li> | ||
</ul> | ||
</ul> | ||
<h2><span class="heading-number heading-number-2">2.7 </span>2009-12-26: Version 0.2</h2> | ||
<ul> | ||
<li>Added <code>to_html</code> output on the parser.</li> | ||
<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> | ||
<li>Lots of refactoring to make the code more maintainable.</li> | ||
</ul> | ||
<h2><span class="heading-number heading-number-2">2.8 </span>2009-12-23: Version 0.1</h2> | ||
<ul> | ||
<li>Added support for block code, like this:</li> | ||
</ul> | ||
<pre class="example"> | ||
def flush! | ||
@logger.debug "FLUSH ==========> #{@output_type}" | ||
if (@output_type == :blank) then | ||
@output << "\n" | ||
elsif (@buffer.length > 0) then | ||
if @cancel_modifier then | ||
@output << "p. " if @output_type == :paragraph | ||
@cancel_modifier = false | ||
end | ||
@output << @paragraph_modifier if (@paragraph_modifier and not sticky_modifier?) | ||
@output << @buffer.textile_substitution << "\n" | ||
end | ||
@buffer = "" | ||
end | ||
</pre> | ||
<ul> | ||
<li>Major code cleanup: Created the <code>OutputBuffer</code> class that greatly simplified a lot of the messiness of <code>textile</code> conversion.</li> | ||
<li>Added support for line breaks within list items.</li> | ||
</ul> |
5 comments
on commit c9aa511
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
отель
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rakefile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/markups/README.org.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/markups/README.org.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
test/markups/README.org.html