",
h(_("PDF")), false)
end
unless result.empty?
result = "\n#{result}\n
"
end
result
end
def page_navi(slide_number=@slide_number)
result = ''
result << ''
result << first_link(slide_number)
result << previous_link(slide_number)
result << next_link(slide_number)
result << last_link(slide_number)
result << '
'
result
end
def image_src(slide_number=@slide_number, optional=nil)
u(File.basename(image_filename(slide_number, optional)))
end
def slide_title(slide_number=@slide_number)
Utils.unescape_title(@canvas.slide_title(slide_number))
end
def rss_available?
not @rss_base_uri.nil?
end
def rss_uri
"#{@rss_base_uri}#{@rss_filename}"
end
def make_rss
RSS::Maker.make('1.0') do |maker|
now = Time.now
title_slide_info = @rss_info.first
filename, title, text, html = title_slide_info
maker.channel.about = rss_uri
maker.channel.title = title
maker.channel.description = text
maker.channel.link = @rss_base_uri
maker.channel.date = now
@rss_info.each_with_index do |info, i|
filename, title, text, html = info
item = maker.items.new_item
item.link = "#{@rss_base_uri}#{File.basename(filename)}"
item.title = title
item.description = text
item.content_encoded = normalize_html_reference(html, @rss_base_uri)
item.date = now - i
end
end
end
def normalize_html_reference(html, base_uri)
html.gsub(/(href|src)=(["'])((?:(?!\2)[^:])+)\2/) do
"#{$1}=#{$2}#{base_uri}#{$3}#{$2}"
end
end
end
end
end