rabbit 0.9.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. data/Gemfile +9 -2
  2. data/Rakefile +11 -4
  3. data/TODO +0 -2
  4. data/bin/rabbirack +95 -0
  5. data/bin/rabbit +23 -2
  6. data/bin/rabbiter +9 -0
  7. data/data/locale/en/LC_MESSAGES/rabbit.mo +0 -0
  8. data/data/locale/fr/LC_MESSAGES/rabbit.mo +0 -0
  9. data/data/locale/ja/LC_MESSAGES/rabbit.mo +0 -0
  10. data/doc/_layouts/en.html +1 -1
  11. data/doc/_layouts/ja.html +1 -1
  12. data/doc/_layouts/skeleton.html +1 -1
  13. data/doc/_site/css/rabbit.css +41 -1
  14. data/doc/_site/en/development.html +2 -2
  15. data/doc/_site/en/faq.html +2 -2
  16. data/doc/_site/en/hiki.html +2 -2
  17. data/doc/_site/en/how-to-make/hiki.html +2 -2
  18. data/doc/_site/en/how-to-make/index.html +2 -2
  19. data/doc/_site/en/how-to-make/pdf.html +2 -2
  20. data/doc/_site/en/how-to-make/rd.html +2 -2
  21. data/doc/_site/en/how-to-make/theme.html +2 -2
  22. data/doc/_site/en/index.html +20 -20
  23. data/doc/_site/en/install/homebrew.html +6 -12
  24. data/doc/_site/en/install/index.html +5 -3
  25. data/doc/_site/en/install/macports.html +2 -2
  26. data/doc/_site/en/install/windows.html +2 -2
  27. data/doc/_site/en/news.html +172 -61
  28. data/doc/_site/en/rd.html +2 -2
  29. data/doc/_site/en/sample/hiki/rabbit.html +3 -3
  30. data/doc/_site/en/sample/index.html +2 -2
  31. data/doc/_site/en/sample/rd/rabbit.html +3 -3
  32. data/doc/_site/en/slides.html +2 -2
  33. data/doc/_site/en/usage.html +60 -60
  34. data/doc/_site/en/users.html +2 -2
  35. data/doc/_site/images/screenshots/en/blue-circle.png +0 -0
  36. data/doc/_site/images/screenshots/en/clear-blue-raw.png +0 -0
  37. data/doc/_site/images/screenshots/en/clear-blue.png +0 -0
  38. data/doc/_site/images/screenshots/en/cozmixng-raw.png +0 -0
  39. data/doc/_site/images/screenshots/en/cozmixng.png +0 -0
  40. data/doc/_site/images/screenshots/en/dark-gradation.png +0 -0
  41. data/doc/_site/images/screenshots/en/day-white.png +0 -0
  42. data/doc/_site/images/screenshots/en/debian.png +0 -0
  43. data/doc/_site/images/screenshots/en/green-circle.png +0 -0
  44. data/doc/_site/images/screenshots/en/night-black.png +0 -0
  45. data/doc/_site/images/screenshots/en/rabbit-raw.png +0 -0
  46. data/doc/_site/images/screenshots/en/rabbit.png +0 -0
  47. data/doc/_site/images/screenshots/en/ranguba-raw.png +0 -0
  48. data/doc/_site/images/screenshots/en/ranguba.png +0 -0
  49. data/doc/_site/images/screenshots/en/red-frame.png +0 -0
  50. data/doc/_site/images/screenshots/en/ruby-gnome2.png +0 -0
  51. data/doc/_site/images/screenshots/ja/blue-circle.png +0 -0
  52. data/doc/_site/images/screenshots/ja/clear-blue-raw.png +0 -0
  53. data/doc/_site/images/screenshots/ja/clear-blue.png +0 -0
  54. data/doc/_site/images/screenshots/ja/cozmixng-raw.png +0 -0
  55. data/doc/_site/images/screenshots/ja/cozmixng.png +0 -0
  56. data/doc/_site/images/screenshots/ja/dark-gradation.png +0 -0
  57. data/doc/_site/images/screenshots/ja/day-white.png +0 -0
  58. data/doc/_site/images/screenshots/ja/debian.png +0 -0
  59. data/doc/_site/images/screenshots/ja/green-circle.png +0 -0
  60. data/doc/_site/images/screenshots/ja/night-black.png +0 -0
  61. data/doc/_site/images/screenshots/ja/rabbit-raw.png +0 -0
  62. data/doc/_site/images/screenshots/ja/rabbit.png +0 -0
  63. data/doc/_site/images/screenshots/ja/ranguba-raw.png +0 -0
  64. data/doc/_site/images/screenshots/ja/ranguba.png +0 -0
  65. data/doc/_site/images/screenshots/ja/red-frame.png +0 -0
  66. data/doc/_site/images/screenshots/ja/ruby-gnome2.png +0 -0
  67. data/doc/_site/index.html.en +8 -2
  68. data/doc/_site/index.html.ja +8 -2
  69. data/doc/_site/ja/about.html +2 -2
  70. data/doc/_site/ja/development.html +2 -2
  71. data/doc/_site/ja/faq.html +25 -14
  72. data/doc/_site/ja/hiki.html +2 -2
  73. data/doc/_site/ja/how-to-make/hiki.html +2 -2
  74. data/doc/_site/ja/how-to-make/index.html +2 -2
  75. data/doc/_site/ja/how-to-make/pdf.html +2 -2
  76. data/doc/_site/ja/how-to-make/rd.html +2 -2
  77. data/doc/_site/ja/how-to-make/theme.html +2 -2
  78. data/doc/_site/ja/index.html +2 -2
  79. data/doc/_site/ja/install/homebrew.html +6 -12
  80. data/doc/_site/ja/install/index.html +5 -3
  81. data/doc/_site/ja/install/macports.html +3 -6
  82. data/doc/_site/ja/install/windows.html +2 -2
  83. data/doc/_site/ja/news.html +165 -61
  84. data/doc/_site/ja/rd.html +2 -2
  85. data/doc/_site/ja/sample/hiki/rabbit.html +3 -3
  86. data/doc/_site/ja/sample/index.html +2 -2
  87. data/doc/_site/ja/sample/rd/rabbit.html +3 -3
  88. data/doc/_site/ja/slides.html +2 -2
  89. data/doc/_site/ja/usage.html +60 -69
  90. data/doc/_site/ja/users.html +2 -2
  91. data/doc/css/rabbit.css +41 -1
  92. data/doc/en/index.rd +1 -1
  93. data/doc/en/install/homebrew.rd +2 -11
  94. data/doc/en/install/index.rd +2 -0
  95. data/doc/en/news.rd +117 -3
  96. data/doc/en/sample/hiki/rabbit.hiki +1 -1
  97. data/doc/en/sample/rd/rabbit.rd +1 -1
  98. data/doc/en/usage.rd +12 -17
  99. data/doc/images/screenshots/en/blue-circle.png +0 -0
  100. data/doc/images/screenshots/en/clear-blue-raw.png +0 -0
  101. data/doc/images/screenshots/en/clear-blue.png +0 -0
  102. data/doc/images/screenshots/en/cozmixng-raw.png +0 -0
  103. data/doc/images/screenshots/en/cozmixng.png +0 -0
  104. data/doc/images/screenshots/en/dark-gradation.png +0 -0
  105. data/doc/images/screenshots/en/day-white.png +0 -0
  106. data/doc/images/screenshots/en/debian.png +0 -0
  107. data/doc/images/screenshots/en/green-circle.png +0 -0
  108. data/doc/images/screenshots/en/night-black.png +0 -0
  109. data/doc/images/screenshots/en/rabbit-raw.png +0 -0
  110. data/doc/images/screenshots/en/rabbit.png +0 -0
  111. data/doc/images/screenshots/en/ranguba-raw.png +0 -0
  112. data/doc/images/screenshots/en/ranguba.png +0 -0
  113. data/doc/images/screenshots/en/red-frame.png +0 -0
  114. data/doc/images/screenshots/en/ruby-gnome2.png +0 -0
  115. data/doc/images/screenshots/ja/blue-circle.png +0 -0
  116. data/doc/images/screenshots/ja/clear-blue-raw.png +0 -0
  117. data/doc/images/screenshots/ja/clear-blue.png +0 -0
  118. data/doc/images/screenshots/ja/cozmixng-raw.png +0 -0
  119. data/doc/images/screenshots/ja/cozmixng.png +0 -0
  120. data/doc/images/screenshots/ja/dark-gradation.png +0 -0
  121. data/doc/images/screenshots/ja/day-white.png +0 -0
  122. data/doc/images/screenshots/ja/debian.png +0 -0
  123. data/doc/images/screenshots/ja/green-circle.png +0 -0
  124. data/doc/images/screenshots/ja/night-black.png +0 -0
  125. data/doc/images/screenshots/ja/rabbit-raw.png +0 -0
  126. data/doc/images/screenshots/ja/rabbit.png +0 -0
  127. data/doc/images/screenshots/ja/ranguba-raw.png +0 -0
  128. data/doc/images/screenshots/ja/ranguba.png +0 -0
  129. data/doc/images/screenshots/ja/red-frame.png +0 -0
  130. data/doc/images/screenshots/ja/ruby-gnome2.png +0 -0
  131. data/doc/index.html.en +6 -0
  132. data/doc/index.html.ja +6 -0
  133. data/doc/ja/faq.rd +21 -3
  134. data/doc/ja/install/homebrew.rd +2 -11
  135. data/doc/ja/install/index.rd +2 -0
  136. data/doc/ja/install/macports.rd +1 -6
  137. data/doc/ja/news.rd +109 -3
  138. data/doc/ja/sample/hiki/rabbit.hiki +1 -1
  139. data/doc/ja/sample/rd/rabbit.rd +1 -1
  140. data/doc/ja/usage.rd +11 -29
  141. data/lib/rabbit/canvas.rb +7 -4
  142. data/lib/rabbit/console.rb +1 -1
  143. data/lib/rabbit/div/main-i.erb +1 -1
  144. data/lib/rabbit/div/main.erb +1 -1
  145. data/lib/rabbit/element/base.rb +17 -1
  146. data/lib/rabbit/element/image.rb +1 -0
  147. data/lib/rabbit/element/preformatted.rb +8 -3
  148. data/lib/rabbit/element/syntax-highlighting.rb +15 -0
  149. data/lib/rabbit/element/text-renderer.rb +3 -3
  150. data/lib/rabbit/element/text.rb +0 -12
  151. data/lib/rabbit/element/title-slide.rb +1 -25
  152. data/lib/rabbit/formatter.rb +26 -6
  153. data/lib/rabbit/front.rb +10 -6
  154. data/lib/rabbit/html/template.erb +1 -1
  155. data/lib/rabbit/image.rb +1 -1
  156. data/lib/rabbit/keys.rb +70 -70
  157. data/lib/rabbit/middleware/config.ru +42 -0
  158. data/lib/rabbit/middleware/controller.rb +66 -0
  159. data/lib/rabbit/middleware/public/stylesheets/rabbirack.css +12 -0
  160. data/lib/rabbit/middleware/views/index.haml +13 -0
  161. data/lib/rabbit/middleware/views/layout.haml +8 -0
  162. data/lib/rabbit/parser/ext/aafigure.rb +1 -1
  163. data/lib/rabbit/parser/ext/blockdiag.rb +46 -0
  164. data/lib/rabbit/parser/ext/coderay.rb +66 -0
  165. data/lib/rabbit/parser/ext/emacs.rb +116 -0
  166. data/lib/rabbit/parser/ext/enscript.rb +15 -22
  167. data/lib/rabbit/parser/rd.rb +8 -2
  168. data/lib/rabbit/parser/rd/ext/block-verbatim.rb +53 -16
  169. data/lib/rabbit/parser/wiki.rb +3 -1
  170. data/lib/rabbit/parser/wiki/output.rb +28 -16
  171. data/lib/rabbit/rabbit.rb +7 -1
  172. data/lib/rabbit/renderer/display.rb +14 -2
  173. data/lib/rabbit/renderer/display/clutter-embed.rb +1 -1
  174. data/lib/rabbit/renderer/display/key-handler.rb +12 -12
  175. data/lib/rabbit/soap/base.rb +1 -1
  176. data/lib/rabbit/theme-browser.rb +2 -2
  177. data/lib/rabbit/theme/base/base.rb +7 -0
  178. data/lib/rabbit/theme/default-comment/default-comment.rb +9 -0
  179. data/lib/rabbit/theme/default-comment/property.rb +4 -0
  180. data/lib/rabbit/theme/default-item-mark-setup/default-item-mark-setup.rb +1 -1
  181. data/lib/rabbit/theme/default-slide/default-slide.rb +2 -2
  182. data/lib/rabbit/theme/default-text/default-text.rb +5 -0
  183. data/lib/rabbit/theme/default/default.rb +6 -7
  184. data/lib/rabbit/theme/footer-comment/footer-comment.rb +35 -8
  185. data/lib/rabbit/theme/pdf/pdf.rb +18 -0
  186. data/lib/rabbit/theme/rabbit-powered-by/rabbit-powered-by.rb +1 -1
  187. data/lib/rabbit/theme/syntax-highlighting/property.rb +4 -0
  188. data/lib/rabbit/theme/syntax-highlighting/syntax-highlighting.rb +139 -0
  189. data/lib/rabbit/theme/title-shadow/title-shadow.rb +1 -1
  190. data/lib/rabbit/theme/twitter-comment/twitter-comment.rb +1 -1
  191. data/lib/rabbit/twitter.rb +28 -4
  192. data/lib/rabbit/utils.rb +40 -12
  193. data/po/en/rabbit.po +175 -145
  194. data/po/fr/rabbit.po +180 -149
  195. data/po/ja/rabbit.po +176 -148
  196. data/po/rabbit.pot +175 -145
  197. data/sample/can_rabbit.rd +0 -21
  198. data/sample/rabbit-en.hiki +21 -2
  199. data/sample/rabbit-en.rd +42 -2
  200. data/sample/rabbit-implementation.rd +0 -5
  201. data/sample/rabbit.hiki +19 -16
  202. data/sample/rabbit.rd +42 -11
  203. data/sample/test.hiki +31 -0
  204. data/sample/test.rab +30 -0
  205. metadata +84 -58
  206. data/lib/rabbit/parser/ext/anthy.rb +0 -43
  207. data/lib/rabbit/parser/rd/ext/aafigure.rb +0 -18
  208. data/lib/rabbit/parser/rd/ext/anthy.rb +0 -29
  209. data/lib/rabbit/parser/rd/ext/enscript.rb +0 -24
  210. data/lib/rabbit/parser/rd/ext/tex.rb +0 -24
  211. data/lib/rabbit/source/rwiki.rb +0 -54
  212. data/lib/rabbit/theme/pdf-tortoise-and-hare/pdf-tortoise-and-hare.rb +0 -18
  213. data/lib/rabbit/theme/pdf-tortoise-and-hare/property.rb +0 -3
@@ -1,43 +0,0 @@
1
- begin
2
- require 'anthy'
3
- Anthy.set_personality("")
4
- rescue LoadError
5
- end
6
-
7
- require 'rabbit/utils'
8
-
9
- module Rabbit
10
- module Parser
11
- module Ext
12
- module Anthy
13
- include Element
14
- include GetText
15
-
16
- module_function
17
- def available?
18
- defined?(::Anthy)
19
- end
20
-
21
- def hiragana_to_kanji(text)
22
- context = ::Anthy::Context.new
23
- context.encoding = ::Anthy::EUC_JP_ENCODING
24
- converted_text = ''
25
- text.split(/(\s+)/m).each do |sentence|
26
- if /\A\s+\z/m =~ sentence
27
- converted_text << sentence
28
- next
29
- end
30
- context.reset
31
- context.string = Converter.to_eucjp_from_utf8(sentence)
32
- context.stat.nr_segment.times do |i|
33
- segment = context.segment(i, 0)
34
- converted_text << Converter.to_utf8_from_eucjp(segment)
35
- end
36
- end
37
-
38
- converted_text
39
- end
40
- end
41
- end
42
- end
43
- end
@@ -1,18 +0,0 @@
1
- require 'rabbit/parser/ext/aafigure'
2
-
3
- module Rabbit
4
- module Parser
5
- class RD
6
- module Ext
7
- module AAFigure
8
- def make_image_by_aafigure(source, visitor)
9
- make_image_from_file(source, visitor) do |src_file_path, prop|
10
- Parser::Ext::AAFigure.make_image_by_aafigure(src_file_path, prop,
11
- visitor)
12
- end
13
- end
14
- end
15
- end
16
- end
17
- end
18
- end
@@ -1,29 +0,0 @@
1
- require 'rabbit/parser/ext/anthy'
2
-
3
- module Rabbit
4
- module Parser
5
- class RD
6
- module Ext
7
- module Anthy
8
- include Element
9
- include GetText
10
-
11
- def anthy_hiragana_to_kanji(label, source, content, visitor)
12
- unless Parser::Ext::Anthy.available?
13
- visitor.logger.warn(_("Anthy isn't available"))
14
- return nil
15
- end
16
- src, prop = parse_source(source)
17
-
18
- converted_src = Parser::Ext::Anthy.hiragana_to_kanji(src)
19
- tree = ::RD::RDTree.new("=begin\n#{converted_src}\n=end\n")
20
- elems = tree.root.children.collect do |child|
21
- child.accept(visitor)
22
- end
23
- Container.new(elems)
24
- end
25
- end
26
- end
27
- end
28
- end
29
- end
@@ -1,24 +0,0 @@
1
- require 'rabbit/parser/ext/enscript'
2
-
3
- module Rabbit
4
- module Parser
5
- class RD
6
- module Ext
7
- module Enscript
8
- include GetText
9
-
10
- def enscript_block(label, lang, source, content, visitor)
11
- src, prop = parse_source(source)
12
- logger = visitor.logger
13
-
14
- result = nil
15
- if Parser::Ext::Enscript.check_availability(lang, logger)
16
- result = Parser::Ext::Enscript.highlight(lang, src, logger)
17
- end
18
- result || default_ext_block_verbatim(label, src, src, visitor)
19
- end
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- require 'rabbit/parser/ext/tex'
2
-
3
- module Rabbit
4
- module Parser
5
- class RD
6
- module Ext
7
- module TeX
8
- def make_image_by_LaTeX(source, visitor)
9
- make_image_from_file(source, visitor) do |src_file_path, prop|
10
- Parser::Ext::TeX.make_image_by_LaTeX(src_file_path, prop, visitor)
11
- end
12
- end
13
-
14
- def make_image_by_mimeTeX(source, visitor)
15
- make_image_from_file(source, visitor) do |src_file_path, prop|
16
- Parser::Ext::TeX.make_image_by_mimeTeX(src_file_path, prop,
17
- visitor)
18
- end
19
- end
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,54 +0,0 @@
1
- require 'rabbit/source/base'
2
- require 'rwiki/soap/driver'
3
-
4
- module Rabbit
5
- module Source
6
- class RWiki
7
-
8
- include Base
9
- include LimitAccessInterval
10
-
11
- def self.initial_args_description
12
- N_("[RWIKI_SOAP_IF_URI] and [PAGE_NAME]")
13
- end
14
-
15
- def initialize(encoding, logger, soap_if_uri, name)
16
- @soap_if_uri = soap_if_uri
17
- @name = name
18
- super(encoding, logger)
19
- @driver = ::RWiki::SOAP::Driver.new(@soap_if_uri)
20
- @driver.log_dir = tmp_dir_name
21
- end
22
-
23
- def need_read?
24
- super or old?(@last_modified, :modified)
25
- end
26
-
27
- private
28
- def _read
29
- begin
30
- @last_modified = modified
31
- @driver.src(@name)
32
- rescue ::SOAP::Error
33
- @logger.error($!.message)
34
- @last_modified = Time.now + MINIMUM_ACCESS_TIME
35
- ""
36
- end
37
- end
38
-
39
- def modified
40
- begin
41
- @driver.modified(@name)
42
- rescue ::SOAP::Error
43
- @logger.error($!.message)
44
- Time.now
45
- end
46
- end
47
-
48
- def init_base
49
- set_base(::File.dirname(@soap_if_uri.to_s))
50
- end
51
- end
52
-
53
- end
54
- end
@@ -1,18 +0,0 @@
1
- include_theme("pdf")
2
-
3
- @image_slide_number_image = "mini-usa-taro.png"
4
- @image_slide_number_show_text = true
5
-
6
- @image_slide_number_margin_left = @margin_left
7
- @image_slide_number_margin_right = @margin_right
8
- @image_slide_number_margin_bottom = @margin_bottom
9
- include_theme("image-slide-number")
10
-
11
- canvas.title_slide['allotted-time'] = ENV["RABBIT_ALLOTTED_TIME"]
12
- if canvas.allotted_time
13
- @image_timer_image = "mini-kame-taro.png"
14
- @image_timer_margin_left = @margin_left
15
- @image_timer_margin_right = @margin_right
16
- @image_timer_margin_bottom = @margin_bottom
17
- include_theme("image-timer")
18
- end
@@ -1,3 +0,0 @@
1
- @category = N_("Theme")
2
- @title = N_("PDF with The Tortoise and The Hare")
3
- @description = N_("Theme for PDF with The Tortoise and The Hare")