org-ruby 0.5.3 → 0.6.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/History.txt +12 -0
- data/Rakefile +3 -5
- data/announcement.txt +24 -0
- data/doc/History_txt.html +272 -0
- data/doc/OrgRuby.html +149 -0
- data/doc/Orgmode.html +960 -0
- data/doc/Orgmode/Headline.html +522 -0
- data/doc/Orgmode/HtmlOutputBuffer.html +480 -0
- data/doc/Orgmode/Line.html +1251 -0
- data/doc/Orgmode/OutputBuffer.html +810 -0
- data/doc/Orgmode/Parser.html +852 -0
- data/doc/Orgmode/RegexpHelper.html +639 -0
- data/doc/Orgmode/TextileOutputBuffer.html +456 -0
- data/doc/README_rdoc.html +178 -0
- data/doc/announcement_txt.html +142 -0
- data/doc/bin/org-ruby.html +54 -0
- data/doc/created.rid +15 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +306 -0
- data/doc/js/darkfish.js +116 -0
- data/doc/js/jquery.js +32 -0
- data/doc/js/quicksearch.js +114 -0
- data/doc/js/thickbox-compressed.js +10 -0
- data/doc/lib/org-ruby/headline_rb.html +52 -0
- data/doc/lib/org-ruby/html_output_buffer_rb.html +52 -0
- data/doc/lib/org-ruby/html_symbol_replace_rb.html +54 -0
- data/doc/lib/org-ruby/line_rb.html +52 -0
- data/doc/lib/org-ruby/output_buffer_rb.html +54 -0
- data/doc/lib/org-ruby/parser_rb.html +56 -0
- data/doc/lib/org-ruby/regexp_helper_rb.html +54 -0
- data/doc/lib/org-ruby/textile_output_buffer_rb.html +54 -0
- data/doc/lib/org-ruby/textile_symbol_replace_rb.html +54 -0
- data/doc/lib/org-ruby_rb.html +52 -0
- data/doc/rdoc.css +763 -0
- data/lib/org-ruby.rb +1 -1
- data/lib/org-ruby/headline.rb +2 -2
- data/lib/org-ruby/html_output_buffer.rb +62 -5
- data/lib/org-ruby/html_symbol_replace.rb +345 -0
- data/lib/org-ruby/line.rb +20 -9
- data/lib/org-ruby/output_buffer.rb +8 -1
- data/lib/org-ruby/parser.rb +47 -19
- data/lib/org-ruby/regexp_helper.rb +16 -0
- data/lib/org-ruby/textile_output_buffer.rb +37 -2
- data/lib/org-ruby/textile_symbol_replace.rb +345 -0
- data/org-ruby.gemspec +41 -0
- data/spec/headline_spec.rb +5 -0
- data/spec/html_examples/advanced-code.html +10 -0
- data/spec/html_examples/advanced-code.org +13 -0
- data/spec/html_examples/blockcomment.html +3 -0
- data/spec/html_examples/blockcomment.org +15 -0
- data/spec/html_examples/center.html +6 -0
- data/spec/html_examples/center.org +7 -0
- data/spec/html_examples/deflist.html +6 -0
- data/spec/html_examples/deflist.org +6 -0
- data/spec/html_examples/footnotes.html +10 -0
- data/spec/html_examples/footnotes.org +7 -0
- data/spec/html_examples/inline-formatting.html +8 -0
- data/spec/html_examples/inline-formatting.org +10 -0
- data/spec/html_examples/inline-images.html +1 -1
- data/spec/html_examples/lists.html +4 -0
- data/spec/html_examples/lists.org +11 -0
- data/spec/html_examples/subsupscript-nil.html +3 -0
- data/spec/html_examples/subsupscript-nil.org +6 -0
- data/spec/html_examples/subsupscript.html +3 -0
- data/spec/html_examples/subsupscript.org +5 -0
- data/spec/html_examples/tables.html +15 -0
- data/spec/html_examples/tables.org +24 -0
- data/spec/line_spec.rb +17 -13
- data/spec/spec_helper.rb +1 -2
- data/spec/textile_examples/center.org +7 -0
- data/spec/textile_examples/center.textile +6 -0
- data/spec/textile_examples/footnotes.org +7 -0
- data/spec/textile_examples/footnotes.textile +8 -0
- data/spec/textile_examples/tables.org +24 -0
- data/spec/textile_examples/tables.textile +17 -0
- data/util/gen-special-replace.el +37 -0
- metadata +111 -19
- data/.gitignore +0 -1
| @@ -0,0 +1,37 @@ | |
| 1 | 
            +
            ;; This code creates ruby code to replace special symbols with the corresponding utf8/html code
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            (require 'org-entities)
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            (defvar gen-use-entities-user t)
         | 
| 6 | 
            +
            (defvar gen-file-name "replace-entities.rb")
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            (defun generate-replace-inbuffer (what)
         | 
| 9 | 
            +
              (let ((ll (if gen-use-entities-user
         | 
| 10 | 
            +
                            (append org-entities-user org-entities)
         | 
| 11 | 
            +
                          org-entities))
         | 
| 12 | 
            +
                    (to (if (string= what "html") 3
         | 
| 13 | 
            +
                          6))) ; use utf8 for textile
         | 
| 14 | 
            +
                (insert "  def Orgmode.special_symbols_to_" what "(str)\n")
         | 
| 15 | 
            +
                (dolist (entity ll)
         | 
| 16 | 
            +
                  (when (listp entity)
         | 
| 17 | 
            +
                    (let ((symb (nth to entity)))
         | 
| 18 | 
            +
                      (when (or (string= symb "\"") (string= symb "\\"))
         | 
| 19 | 
            +
                        (setq symb (concat "\\" symb)))
         | 
| 20 | 
            +
                      (insert "    str.gsub!(/\\\\" (car entity) "((\\{\\})|(\\s|$))/, \"" symb "\\\\3\")\n"))))
         | 
| 21 | 
            +
                (insert "  end\n")))
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            (defun generate-replace (file-name what)
         | 
| 24 | 
            +
              (when (file-exists-p file-name)
         | 
| 25 | 
            +
                (let ((buf (find-buffer-visiting file-name)))
         | 
| 26 | 
            +
                  (when buf
         | 
| 27 | 
            +
                    (kill-buffer buf)))
         | 
| 28 | 
            +
                (delete-file file-name))
         | 
| 29 | 
            +
              (find-file file-name)
         | 
| 30 | 
            +
              (insert "# Autogenerated by util/gen-special-replace.el\n\nmodule Orgmode\n")
         | 
| 31 | 
            +
              (generate-replace-inbuffer what)
         | 
| 32 | 
            +
              (insert "end # module Orgmode\n")
         | 
| 33 | 
            +
              (save-buffer)
         | 
| 34 | 
            +
              (kill-buffer))
         | 
| 35 | 
            +
             | 
| 36 | 
            +
            (generate-replace "../lib/org-ruby/html_symbol_replace.rb" "html")
         | 
| 37 | 
            +
            (generate-replace "../lib/org-ruby/textile_symbol_replace.rb" "textile")
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: org-ruby
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
               | 
| 4 | 
            +
              hash: 7
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 | 
            +
              segments: 
         | 
| 7 | 
            +
              - 0
         | 
| 8 | 
            +
              - 6
         | 
| 9 | 
            +
              - 0
         | 
| 10 | 
            +
              version: 0.6.0
         | 
| 5 11 | 
             
            platform: ruby
         | 
| 6 12 | 
             
            authors: 
         | 
| 7 13 | 
             
            - Brian Dewey
         | 
| @@ -9,29 +15,40 @@ autorequire: | |
| 9 15 | 
             
            bindir: bin
         | 
| 10 16 | 
             
            cert_chain: []
         | 
| 11 17 |  | 
| 12 | 
            -
            date:  | 
| 13 | 
            -
            default_executable: 
         | 
| 18 | 
            +
            date: 2011-09-03 00:00:00 Z
         | 
| 14 19 | 
             
            dependencies: 
         | 
| 15 20 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 16 21 | 
             
              name: rubypants
         | 
| 17 | 
            -
               | 
| 18 | 
            -
               | 
| 19 | 
            -
             | 
| 22 | 
            +
              prerelease: false
         | 
| 23 | 
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         | 
| 24 | 
            +
                none: false
         | 
| 20 25 | 
             
                requirements: 
         | 
| 21 26 | 
             
                - - ">="
         | 
| 22 27 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 28 | 
            +
                    hash: 23
         | 
| 29 | 
            +
                    segments: 
         | 
| 30 | 
            +
                    - 0
         | 
| 31 | 
            +
                    - 2
         | 
| 32 | 
            +
                    - 0
         | 
| 23 33 | 
             
                    version: 0.2.0
         | 
| 24 | 
            -
             | 
| 34 | 
            +
              type: :runtime
         | 
| 35 | 
            +
              version_requirements: *id001
         | 
| 25 36 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 26 37 | 
             
              name: bones
         | 
| 27 | 
            -
               | 
| 28 | 
            -
               | 
| 29 | 
            -
             | 
| 38 | 
            +
              prerelease: false
         | 
| 39 | 
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         | 
| 40 | 
            +
                none: false
         | 
| 30 41 | 
             
                requirements: 
         | 
| 31 42 | 
             
                - - ">="
         | 
| 32 43 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 33 | 
            -
                     | 
| 34 | 
            -
             | 
| 44 | 
            +
                    hash: 25
         | 
| 45 | 
            +
                    segments: 
         | 
| 46 | 
            +
                    - 3
         | 
| 47 | 
            +
                    - 7
         | 
| 48 | 
            +
                    - 1
         | 
| 49 | 
            +
                    version: 3.7.1
         | 
| 50 | 
            +
              type: :development
         | 
| 51 | 
            +
              version_requirements: *id002
         | 
| 35 52 | 
             
            description: "This gem contains Ruby routines for parsing org-mode files.The most\n\
         | 
| 36 53 | 
             
              significant thing this library does today is convert org-mode files to\n\
         | 
| 37 54 | 
             
              HTML or textile. Currently, you cannot do much to customize the\n\
         | 
| @@ -45,24 +62,77 @@ extensions: [] | |
| 45 62 | 
             
            extra_rdoc_files: 
         | 
| 46 63 | 
             
            - History.txt
         | 
| 47 64 | 
             
            - README.rdoc
         | 
| 65 | 
            +
            - announcement.txt
         | 
| 48 66 | 
             
            - bin/org-ruby
         | 
| 49 67 | 
             
            files: 
         | 
| 50 68 | 
             
            - .bnsignore
         | 
| 51 | 
            -
            - .gitignore
         | 
| 52 69 | 
             
            - History.txt
         | 
| 53 70 | 
             
            - README.rdoc
         | 
| 54 71 | 
             
            - Rakefile
         | 
| 55 72 | 
             
            - TAGS
         | 
| 73 | 
            +
            - announcement.txt
         | 
| 56 74 | 
             
            - bin/org-ruby
         | 
| 75 | 
            +
            - doc/History_txt.html
         | 
| 76 | 
            +
            - doc/OrgRuby.html
         | 
| 77 | 
            +
            - doc/Orgmode.html
         | 
| 78 | 
            +
            - doc/Orgmode/Headline.html
         | 
| 79 | 
            +
            - doc/Orgmode/HtmlOutputBuffer.html
         | 
| 80 | 
            +
            - doc/Orgmode/Line.html
         | 
| 81 | 
            +
            - doc/Orgmode/OutputBuffer.html
         | 
| 82 | 
            +
            - doc/Orgmode/Parser.html
         | 
| 83 | 
            +
            - doc/Orgmode/RegexpHelper.html
         | 
| 84 | 
            +
            - doc/Orgmode/TextileOutputBuffer.html
         | 
| 85 | 
            +
            - doc/README_rdoc.html
         | 
| 86 | 
            +
            - doc/announcement_txt.html
         | 
| 87 | 
            +
            - doc/bin/org-ruby.html
         | 
| 88 | 
            +
            - doc/created.rid
         | 
| 89 | 
            +
            - doc/images/brick.png
         | 
| 90 | 
            +
            - doc/images/brick_link.png
         | 
| 91 | 
            +
            - doc/images/bug.png
         | 
| 92 | 
            +
            - doc/images/bullet_black.png
         | 
| 93 | 
            +
            - doc/images/bullet_toggle_minus.png
         | 
| 94 | 
            +
            - doc/images/bullet_toggle_plus.png
         | 
| 95 | 
            +
            - doc/images/date.png
         | 
| 96 | 
            +
            - doc/images/find.png
         | 
| 97 | 
            +
            - doc/images/loadingAnimation.gif
         | 
| 98 | 
            +
            - doc/images/macFFBgHack.png
         | 
| 99 | 
            +
            - doc/images/package.png
         | 
| 100 | 
            +
            - doc/images/page_green.png
         | 
| 101 | 
            +
            - doc/images/page_white_text.png
         | 
| 102 | 
            +
            - doc/images/page_white_width.png
         | 
| 103 | 
            +
            - doc/images/plugin.png
         | 
| 104 | 
            +
            - doc/images/ruby.png
         | 
| 105 | 
            +
            - doc/images/tag_green.png
         | 
| 106 | 
            +
            - doc/images/wrench.png
         | 
| 107 | 
            +
            - doc/images/wrench_orange.png
         | 
| 108 | 
            +
            - doc/images/zoom.png
         | 
| 109 | 
            +
            - doc/index.html
         | 
| 110 | 
            +
            - doc/js/darkfish.js
         | 
| 111 | 
            +
            - doc/js/jquery.js
         | 
| 112 | 
            +
            - doc/js/quicksearch.js
         | 
| 113 | 
            +
            - doc/js/thickbox-compressed.js
         | 
| 114 | 
            +
            - doc/lib/org-ruby/headline_rb.html
         | 
| 115 | 
            +
            - doc/lib/org-ruby/html_output_buffer_rb.html
         | 
| 116 | 
            +
            - doc/lib/org-ruby/html_symbol_replace_rb.html
         | 
| 117 | 
            +
            - doc/lib/org-ruby/line_rb.html
         | 
| 118 | 
            +
            - doc/lib/org-ruby/output_buffer_rb.html
         | 
| 119 | 
            +
            - doc/lib/org-ruby/parser_rb.html
         | 
| 120 | 
            +
            - doc/lib/org-ruby/regexp_helper_rb.html
         | 
| 121 | 
            +
            - doc/lib/org-ruby/textile_output_buffer_rb.html
         | 
| 122 | 
            +
            - doc/lib/org-ruby/textile_symbol_replace_rb.html
         | 
| 123 | 
            +
            - doc/lib/org-ruby_rb.html
         | 
| 124 | 
            +
            - doc/rdoc.css
         | 
| 57 125 | 
             
            - lib/org-ruby.rb
         | 
| 58 126 | 
             
            - lib/org-ruby/headline.rb
         | 
| 59 127 | 
             
            - lib/org-ruby/html_output_buffer.rb
         | 
| 128 | 
            +
            - lib/org-ruby/html_symbol_replace.rb
         | 
| 60 129 | 
             
            - lib/org-ruby/line.rb
         | 
| 61 130 | 
             
            - lib/org-ruby/output_buffer.rb
         | 
| 62 131 | 
             
            - lib/org-ruby/parser.rb
         | 
| 63 132 | 
             
            - lib/org-ruby/regexp_helper.rb
         | 
| 64 133 | 
             
            - lib/org-ruby/textile_output_buffer.rb
         | 
| 65 | 
            -
            - org-ruby. | 
| 134 | 
            +
            - lib/org-ruby/textile_symbol_replace.rb
         | 
| 135 | 
            +
            - org-ruby.gemspec
         | 
| 66 136 | 
             
            - spec/data/freeform-example.org
         | 
| 67 137 | 
             
            - spec/data/freeform.org
         | 
| 68 138 | 
             
            - spec/data/hyp-planning.org
         | 
| @@ -74,8 +144,12 @@ files: | |
| 74 144 | 
             
            - spec/html_examples/advanced-lists.org
         | 
| 75 145 | 
             
            - spec/html_examples/block_code.html
         | 
| 76 146 | 
             
            - spec/html_examples/block_code.org
         | 
| 147 | 
            +
            - spec/html_examples/blockcomment.html
         | 
| 148 | 
            +
            - spec/html_examples/blockcomment.org
         | 
| 77 149 | 
             
            - spec/html_examples/blockquote.html
         | 
| 78 150 | 
             
            - spec/html_examples/blockquote.org
         | 
| 151 | 
            +
            - spec/html_examples/center.html
         | 
| 152 | 
            +
            - spec/html_examples/center.org
         | 
| 79 153 | 
             
            - spec/html_examples/code-comment.html
         | 
| 80 154 | 
             
            - spec/html_examples/code-comment.org
         | 
| 81 155 | 
             
            - spec/html_examples/custom-seq-todo.html
         | 
| @@ -84,6 +158,8 @@ files: | |
| 84 158 | 
             
            - spec/html_examples/custom-todo.org
         | 
| 85 159 | 
             
            - spec/html_examples/custom-typ-todo.html
         | 
| 86 160 | 
             
            - spec/html_examples/custom-typ-todo.org
         | 
| 161 | 
            +
            - spec/html_examples/deflist.html
         | 
| 162 | 
            +
            - spec/html_examples/deflist.org
         | 
| 87 163 | 
             
            - spec/html_examples/entities.html
         | 
| 88 164 | 
             
            - spec/html_examples/entities.org
         | 
| 89 165 | 
             
            - spec/html_examples/escape-pre.html
         | 
| @@ -96,6 +172,8 @@ files: | |
| 96 172 | 
             
            - spec/html_examples/export-tags.org
         | 
| 97 173 | 
             
            - spec/html_examples/export-title.html
         | 
| 98 174 | 
             
            - spec/html_examples/export-title.org
         | 
| 175 | 
            +
            - spec/html_examples/footnotes.html
         | 
| 176 | 
            +
            - spec/html_examples/footnotes.org
         | 
| 99 177 | 
             
            - spec/html_examples/html-literal.html
         | 
| 100 178 | 
             
            - spec/html_examples/html-literal.org
         | 
| 101 179 | 
             
            - spec/html_examples/inline-formatting.html
         | 
| @@ -116,6 +194,10 @@ files: | |
| 116 194 | 
             
            - spec/html_examples/skip-header.org
         | 
| 117 195 | 
             
            - spec/html_examples/skip-table.html
         | 
| 118 196 | 
             
            - spec/html_examples/skip-table.org
         | 
| 197 | 
            +
            - spec/html_examples/subsupscript-nil.html
         | 
| 198 | 
            +
            - spec/html_examples/subsupscript-nil.org
         | 
| 199 | 
            +
            - spec/html_examples/subsupscript.html
         | 
| 200 | 
            +
            - spec/html_examples/subsupscript.org
         | 
| 119 201 | 
             
            - spec/html_examples/tables.html
         | 
| 120 202 | 
             
            - spec/html_examples/tables.org
         | 
| 121 203 | 
             
            - spec/html_examples/text.html
         | 
| @@ -129,6 +211,10 @@ files: | |
| 129 211 | 
             
            - spec/textile_examples/block_code.textile
         | 
| 130 212 | 
             
            - spec/textile_examples/blockquote.org
         | 
| 131 213 | 
             
            - spec/textile_examples/blockquote.textile
         | 
| 214 | 
            +
            - spec/textile_examples/center.org
         | 
| 215 | 
            +
            - spec/textile_examples/center.textile
         | 
| 216 | 
            +
            - spec/textile_examples/footnotes.org
         | 
| 217 | 
            +
            - spec/textile_examples/footnotes.textile
         | 
| 132 218 | 
             
            - spec/textile_examples/keywords.org
         | 
| 133 219 | 
             
            - spec/textile_examples/keywords.textile
         | 
| 134 220 | 
             
            - spec/textile_examples/links.org
         | 
| @@ -142,7 +228,7 @@ files: | |
| 142 228 | 
             
            - spec/textile_output_buffer_spec.rb
         | 
| 143 229 | 
             
            - tasks/test_case.rake
         | 
| 144 230 | 
             
            - test/test_orgmode_parser.rb
         | 
| 145 | 
            -
             | 
| 231 | 
            +
            - util/gen-special-replace.el
         | 
| 146 232 | 
             
            homepage: http://github.com/bdewey/org-ruby
         | 
| 147 233 | 
             
            licenses: []
         | 
| 148 234 |  | 
| @@ -153,23 +239,29 @@ rdoc_options: | |
| 153 239 | 
             
            require_paths: 
         | 
| 154 240 | 
             
            - lib
         | 
| 155 241 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 242 | 
            +
              none: false
         | 
| 156 243 | 
             
              requirements: 
         | 
| 157 244 | 
             
              - - ">="
         | 
| 158 245 | 
             
                - !ruby/object:Gem::Version 
         | 
| 246 | 
            +
                  hash: 3
         | 
| 247 | 
            +
                  segments: 
         | 
| 248 | 
            +
                  - 0
         | 
| 159 249 | 
             
                  version: "0"
         | 
| 160 | 
            -
              version: 
         | 
| 161 250 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 251 | 
            +
              none: false
         | 
| 162 252 | 
             
              requirements: 
         | 
| 163 253 | 
             
              - - ">="
         | 
| 164 254 | 
             
                - !ruby/object:Gem::Version 
         | 
| 255 | 
            +
                  hash: 3
         | 
| 256 | 
            +
                  segments: 
         | 
| 257 | 
            +
                  - 0
         | 
| 165 258 | 
             
                  version: "0"
         | 
| 166 | 
            -
              version: 
         | 
| 167 259 | 
             
            requirements: []
         | 
| 168 260 |  | 
| 169 261 | 
             
            rubyforge_project: org-ruby
         | 
| 170 | 
            -
            rubygems_version: 1. | 
| 262 | 
            +
            rubygems_version: 1.8.5
         | 
| 171 263 | 
             
            signing_key: 
         | 
| 172 264 | 
             
            specification_version: 3
         | 
| 173 | 
            -
            summary: This gem contains Ruby routines for parsing org-mode files
         | 
| 265 | 
            +
            summary: This gem contains Ruby routines for parsing org-mode files.
         | 
| 174 266 | 
             
            test_files: 
         | 
| 175 267 | 
             
            - test/test_orgmode_parser.rb
         | 
    
        data/.gitignore
    DELETED
    
    | @@ -1 +0,0 @@ | |
| 1 | 
            -
            *.tmproj
         |