Sha256: ab37ee15366c948d25b34d5943c0bd61aef6b098b62f67e550f478080cfef0ec
Contents?: true
Size: 1.37 KB
Versions: 3
Compression:
Stored size: 1.37 KB
Contents
= documenter Documenter is small collection of scripts to work with different format of documents It includes: * Odf and Odt classes to fill forms, tables and e.t.c * File format convertor based on JodConvertor. To work with it, you need to have open office istalled localy * Pdf worker based on pdftk. You should install it too * Csv class to work with csv more easely == Installation % gem install documenter == Example === Csv Load data from file into two demetions array data = File.open('test.csv').csv(:cell_split => ';') Export data to csv file data.to_csv(:file => 'myout.csv', :header => ['a','a+100'], :cell_split => ';') === Convertor Convertor.convert 'test.xls', 'test.pdf' === Pdf Join files together Pdf.cat ['a.pdf','b.pdf'], 'output.pdf' Split pdf to pages second parameter - string that would be used as a pattern to save each page Pdf.burst 'hello.pdf', 'doc/page_%.6d.pdf' #opening existing document doc = OdtFile.new 'custom_register.odt' #set value of form field doc.text.fill_form('number' => 'test') #search for table and yield first row copy for each data row doc.text.edit_table(:name => 'posts', :data =>posts) do |row, content| #replace form fields row.replace_form(content) #we shoul return row back row end doc.save 'out.odt' #you should use close to delete temporary files doc.close
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
documenter-0.0.5 | README.rdoc |
documenter-0.0.4 | README.rdoc |
documenter-0.0.3 | README.rdoc |