Class: ODDB::FiPDFExporter

Inherits:
Plugin show all
Defined in:
src/plugin/fipdf.rb

Constant Summary

WRITER =
DRbObject.new(nil, FIPDF_URI)
PDF_PATH =
File.expand_path('downloads', ARCHIVE_PATH)

Constants inherited from Plugin

ARCHIVE_PATH, RECIPIENTS

Instance Method Summary (collapse)

Methods inherited from Plugin

#initialize, #l10n_sessions, #log_info, #recipients, #report, #resolve_link, #update_rss_feeds

Methods included from HttpFile

#http_body, #http_file

Constructor Details

This class inherits a constructor from ODDB::Plugin

Instance Method Details

- (Object) run



15
16
17
# File 'src/plugin/fipdf.rb', line 15

def run
  write_pdf
end

- (Object) write_pdf(language = :de, path = nil, fachinfos = nil)



18
19
20
21
22
23
# File 'src/plugin/fipdf.rb', line 18

def write_pdf(language = :de, path = nil, fachinfos = nil)
  path ||= File.expand_path('fachinfos.pdf', PDF_PATH)
  fachinfos ||= @app.fachinfos.values
  ids = fachinfos.collect do |fi| fi.odba_id end
  WRITER.write_pdf ids, language, path
end