Class: Docsplit::OfficeUtils
- Inherits:
-
Object
- Object
- Docsplit::OfficeUtils
- Defined in:
- lib/docsplit/office_utils.rb
Instance Method Summary collapse
-
#get_office_path ⇒ Object
Lets check if the user is using LibreOffice If he is using Openoffice,org, jodconverter will take care of things.
Instance Method Details
#get_office_path ⇒ Object
Lets check if the user is using LibreOffice If he is using Openoffice,org, jodconverter will take care of things
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/docsplit/office_utils.rb', line 5 def get_office_path mac_libre_office_path = "/Applications/LibreOffice.app/Contents" linux_libreoffice_path = "/usr/lib/libreoffice" if RUBY_PLATFORM.match(/darwin/i) if File.exists?(mac_libre_office_path) "-Doffice.home=#{mac_libre_office_path}" else "" end else if File.exists?(linux_libreoffice_path) "-Doffice.home=#{linux_libre_office_path}" else "-Doffice.home=/usr/lib/openoffice" end end end |