rabbit 0.9.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +9 -2
- data/Rakefile +11 -4
- data/TODO +0 -2
- data/bin/rabbirack +95 -0
- data/bin/rabbit +23 -2
- data/bin/rabbiter +9 -0
- data/data/locale/en/LC_MESSAGES/rabbit.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rabbit.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rabbit.mo +0 -0
- data/doc/_layouts/en.html +1 -1
- data/doc/_layouts/ja.html +1 -1
- data/doc/_layouts/skeleton.html +1 -1
- data/doc/_site/css/rabbit.css +41 -1
- data/doc/_site/en/development.html +2 -2
- data/doc/_site/en/faq.html +2 -2
- data/doc/_site/en/hiki.html +2 -2
- data/doc/_site/en/how-to-make/hiki.html +2 -2
- data/doc/_site/en/how-to-make/index.html +2 -2
- data/doc/_site/en/how-to-make/pdf.html +2 -2
- data/doc/_site/en/how-to-make/rd.html +2 -2
- data/doc/_site/en/how-to-make/theme.html +2 -2
- data/doc/_site/en/index.html +20 -20
- data/doc/_site/en/install/homebrew.html +6 -12
- data/doc/_site/en/install/index.html +5 -3
- data/doc/_site/en/install/macports.html +2 -2
- data/doc/_site/en/install/windows.html +2 -2
- data/doc/_site/en/news.html +172 -61
- data/doc/_site/en/rd.html +2 -2
- data/doc/_site/en/sample/hiki/rabbit.html +3 -3
- data/doc/_site/en/sample/index.html +2 -2
- data/doc/_site/en/sample/rd/rabbit.html +3 -3
- data/doc/_site/en/slides.html +2 -2
- data/doc/_site/en/usage.html +60 -60
- data/doc/_site/en/users.html +2 -2
- data/doc/_site/images/screenshots/en/blue-circle.png +0 -0
- data/doc/_site/images/screenshots/en/clear-blue-raw.png +0 -0
- data/doc/_site/images/screenshots/en/clear-blue.png +0 -0
- data/doc/_site/images/screenshots/en/cozmixng-raw.png +0 -0
- data/doc/_site/images/screenshots/en/cozmixng.png +0 -0
- data/doc/_site/images/screenshots/en/dark-gradation.png +0 -0
- data/doc/_site/images/screenshots/en/day-white.png +0 -0
- data/doc/_site/images/screenshots/en/debian.png +0 -0
- data/doc/_site/images/screenshots/en/green-circle.png +0 -0
- data/doc/_site/images/screenshots/en/night-black.png +0 -0
- data/doc/_site/images/screenshots/en/rabbit-raw.png +0 -0
- data/doc/_site/images/screenshots/en/rabbit.png +0 -0
- data/doc/_site/images/screenshots/en/ranguba-raw.png +0 -0
- data/doc/_site/images/screenshots/en/ranguba.png +0 -0
- data/doc/_site/images/screenshots/en/red-frame.png +0 -0
- data/doc/_site/images/screenshots/en/ruby-gnome2.png +0 -0
- data/doc/_site/images/screenshots/ja/blue-circle.png +0 -0
- data/doc/_site/images/screenshots/ja/clear-blue-raw.png +0 -0
- data/doc/_site/images/screenshots/ja/clear-blue.png +0 -0
- data/doc/_site/images/screenshots/ja/cozmixng-raw.png +0 -0
- data/doc/_site/images/screenshots/ja/cozmixng.png +0 -0
- data/doc/_site/images/screenshots/ja/dark-gradation.png +0 -0
- data/doc/_site/images/screenshots/ja/day-white.png +0 -0
- data/doc/_site/images/screenshots/ja/debian.png +0 -0
- data/doc/_site/images/screenshots/ja/green-circle.png +0 -0
- data/doc/_site/images/screenshots/ja/night-black.png +0 -0
- data/doc/_site/images/screenshots/ja/rabbit-raw.png +0 -0
- data/doc/_site/images/screenshots/ja/rabbit.png +0 -0
- data/doc/_site/images/screenshots/ja/ranguba-raw.png +0 -0
- data/doc/_site/images/screenshots/ja/ranguba.png +0 -0
- data/doc/_site/images/screenshots/ja/red-frame.png +0 -0
- data/doc/_site/images/screenshots/ja/ruby-gnome2.png +0 -0
- data/doc/_site/index.html.en +8 -2
- data/doc/_site/index.html.ja +8 -2
- data/doc/_site/ja/about.html +2 -2
- data/doc/_site/ja/development.html +2 -2
- data/doc/_site/ja/faq.html +25 -14
- data/doc/_site/ja/hiki.html +2 -2
- data/doc/_site/ja/how-to-make/hiki.html +2 -2
- data/doc/_site/ja/how-to-make/index.html +2 -2
- data/doc/_site/ja/how-to-make/pdf.html +2 -2
- data/doc/_site/ja/how-to-make/rd.html +2 -2
- data/doc/_site/ja/how-to-make/theme.html +2 -2
- data/doc/_site/ja/index.html +2 -2
- data/doc/_site/ja/install/homebrew.html +6 -12
- data/doc/_site/ja/install/index.html +5 -3
- data/doc/_site/ja/install/macports.html +3 -6
- data/doc/_site/ja/install/windows.html +2 -2
- data/doc/_site/ja/news.html +165 -61
- data/doc/_site/ja/rd.html +2 -2
- data/doc/_site/ja/sample/hiki/rabbit.html +3 -3
- data/doc/_site/ja/sample/index.html +2 -2
- data/doc/_site/ja/sample/rd/rabbit.html +3 -3
- data/doc/_site/ja/slides.html +2 -2
- data/doc/_site/ja/usage.html +60 -69
- data/doc/_site/ja/users.html +2 -2
- data/doc/css/rabbit.css +41 -1
- data/doc/en/index.rd +1 -1
- data/doc/en/install/homebrew.rd +2 -11
- data/doc/en/install/index.rd +2 -0
- data/doc/en/news.rd +117 -3
- data/doc/en/sample/hiki/rabbit.hiki +1 -1
- data/doc/en/sample/rd/rabbit.rd +1 -1
- data/doc/en/usage.rd +12 -17
- data/doc/images/screenshots/en/blue-circle.png +0 -0
- data/doc/images/screenshots/en/clear-blue-raw.png +0 -0
- data/doc/images/screenshots/en/clear-blue.png +0 -0
- data/doc/images/screenshots/en/cozmixng-raw.png +0 -0
- data/doc/images/screenshots/en/cozmixng.png +0 -0
- data/doc/images/screenshots/en/dark-gradation.png +0 -0
- data/doc/images/screenshots/en/day-white.png +0 -0
- data/doc/images/screenshots/en/debian.png +0 -0
- data/doc/images/screenshots/en/green-circle.png +0 -0
- data/doc/images/screenshots/en/night-black.png +0 -0
- data/doc/images/screenshots/en/rabbit-raw.png +0 -0
- data/doc/images/screenshots/en/rabbit.png +0 -0
- data/doc/images/screenshots/en/ranguba-raw.png +0 -0
- data/doc/images/screenshots/en/ranguba.png +0 -0
- data/doc/images/screenshots/en/red-frame.png +0 -0
- data/doc/images/screenshots/en/ruby-gnome2.png +0 -0
- data/doc/images/screenshots/ja/blue-circle.png +0 -0
- data/doc/images/screenshots/ja/clear-blue-raw.png +0 -0
- data/doc/images/screenshots/ja/clear-blue.png +0 -0
- data/doc/images/screenshots/ja/cozmixng-raw.png +0 -0
- data/doc/images/screenshots/ja/cozmixng.png +0 -0
- data/doc/images/screenshots/ja/dark-gradation.png +0 -0
- data/doc/images/screenshots/ja/day-white.png +0 -0
- data/doc/images/screenshots/ja/debian.png +0 -0
- data/doc/images/screenshots/ja/green-circle.png +0 -0
- data/doc/images/screenshots/ja/night-black.png +0 -0
- data/doc/images/screenshots/ja/rabbit-raw.png +0 -0
- data/doc/images/screenshots/ja/rabbit.png +0 -0
- data/doc/images/screenshots/ja/ranguba-raw.png +0 -0
- data/doc/images/screenshots/ja/ranguba.png +0 -0
- data/doc/images/screenshots/ja/red-frame.png +0 -0
- data/doc/images/screenshots/ja/ruby-gnome2.png +0 -0
- data/doc/index.html.en +6 -0
- data/doc/index.html.ja +6 -0
- data/doc/ja/faq.rd +21 -3
- data/doc/ja/install/homebrew.rd +2 -11
- data/doc/ja/install/index.rd +2 -0
- data/doc/ja/install/macports.rd +1 -6
- data/doc/ja/news.rd +109 -3
- data/doc/ja/sample/hiki/rabbit.hiki +1 -1
- data/doc/ja/sample/rd/rabbit.rd +1 -1
- data/doc/ja/usage.rd +11 -29
- data/lib/rabbit/canvas.rb +7 -4
- data/lib/rabbit/console.rb +1 -1
- data/lib/rabbit/div/main-i.erb +1 -1
- data/lib/rabbit/div/main.erb +1 -1
- data/lib/rabbit/element/base.rb +17 -1
- data/lib/rabbit/element/image.rb +1 -0
- data/lib/rabbit/element/preformatted.rb +8 -3
- data/lib/rabbit/element/syntax-highlighting.rb +15 -0
- data/lib/rabbit/element/text-renderer.rb +3 -3
- data/lib/rabbit/element/text.rb +0 -12
- data/lib/rabbit/element/title-slide.rb +1 -25
- data/lib/rabbit/formatter.rb +26 -6
- data/lib/rabbit/front.rb +10 -6
- data/lib/rabbit/html/template.erb +1 -1
- data/lib/rabbit/image.rb +1 -1
- data/lib/rabbit/keys.rb +70 -70
- data/lib/rabbit/middleware/config.ru +42 -0
- data/lib/rabbit/middleware/controller.rb +66 -0
- data/lib/rabbit/middleware/public/stylesheets/rabbirack.css +12 -0
- data/lib/rabbit/middleware/views/index.haml +13 -0
- data/lib/rabbit/middleware/views/layout.haml +8 -0
- data/lib/rabbit/parser/ext/aafigure.rb +1 -1
- data/lib/rabbit/parser/ext/blockdiag.rb +46 -0
- data/lib/rabbit/parser/ext/coderay.rb +66 -0
- data/lib/rabbit/parser/ext/emacs.rb +116 -0
- data/lib/rabbit/parser/ext/enscript.rb +15 -22
- data/lib/rabbit/parser/rd.rb +8 -2
- data/lib/rabbit/parser/rd/ext/block-verbatim.rb +53 -16
- data/lib/rabbit/parser/wiki.rb +3 -1
- data/lib/rabbit/parser/wiki/output.rb +28 -16
- data/lib/rabbit/rabbit.rb +7 -1
- data/lib/rabbit/renderer/display.rb +14 -2
- data/lib/rabbit/renderer/display/clutter-embed.rb +1 -1
- data/lib/rabbit/renderer/display/key-handler.rb +12 -12
- data/lib/rabbit/soap/base.rb +1 -1
- data/lib/rabbit/theme-browser.rb +2 -2
- data/lib/rabbit/theme/base/base.rb +7 -0
- data/lib/rabbit/theme/default-comment/default-comment.rb +9 -0
- data/lib/rabbit/theme/default-comment/property.rb +4 -0
- data/lib/rabbit/theme/default-item-mark-setup/default-item-mark-setup.rb +1 -1
- data/lib/rabbit/theme/default-slide/default-slide.rb +2 -2
- data/lib/rabbit/theme/default-text/default-text.rb +5 -0
- data/lib/rabbit/theme/default/default.rb +6 -7
- data/lib/rabbit/theme/footer-comment/footer-comment.rb +35 -8
- data/lib/rabbit/theme/pdf/pdf.rb +18 -0
- data/lib/rabbit/theme/rabbit-powered-by/rabbit-powered-by.rb +1 -1
- data/lib/rabbit/theme/syntax-highlighting/property.rb +4 -0
- data/lib/rabbit/theme/syntax-highlighting/syntax-highlighting.rb +139 -0
- data/lib/rabbit/theme/title-shadow/title-shadow.rb +1 -1
- data/lib/rabbit/theme/twitter-comment/twitter-comment.rb +1 -1
- data/lib/rabbit/twitter.rb +28 -4
- data/lib/rabbit/utils.rb +40 -12
- data/po/en/rabbit.po +175 -145
- data/po/fr/rabbit.po +180 -149
- data/po/ja/rabbit.po +176 -148
- data/po/rabbit.pot +175 -145
- data/sample/can_rabbit.rd +0 -21
- data/sample/rabbit-en.hiki +21 -2
- data/sample/rabbit-en.rd +42 -2
- data/sample/rabbit-implementation.rd +0 -5
- data/sample/rabbit.hiki +19 -16
- data/sample/rabbit.rd +42 -11
- data/sample/test.hiki +31 -0
- data/sample/test.rab +30 -0
- metadata +84 -58
- data/lib/rabbit/parser/ext/anthy.rb +0 -43
- data/lib/rabbit/parser/rd/ext/aafigure.rb +0 -18
- data/lib/rabbit/parser/rd/ext/anthy.rb +0 -29
- data/lib/rabbit/parser/rd/ext/enscript.rb +0 -24
- data/lib/rabbit/parser/rd/ext/tex.rb +0 -24
- data/lib/rabbit/source/rwiki.rb +0 -54
- data/lib/rabbit/theme/pdf-tortoise-and-hare/pdf-tortoise-and-hare.rb +0 -18
- 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
|
data/lib/rabbit/source/rwiki.rb
DELETED
@@ -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
|