Sha256: 4de2ecf4fbc4b5b11955a6c1bbc9a6c04bedd10f4043dc6c6d72409946b3b8cf
Contents?: true
Size: 764 Bytes
Versions: 2
Compression:
Stored size: 764 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require 'methadone' require 'wine/pdf.rb' class App include Methadone::Main include Methadone::CLILogging main do |pdf_file| username = `whoami`.chomp! command = '"c:\\\\Program Files\\\\Tracker Software\\\\PDF Editor\\\\PDFXEdit.exe"' pdf_unix_path = File.absolute_path pdf_file pdf_wine_path = pdf_unix_path.gsub( "/home/#{username}/", "c:/users/#{username}/My Documents/") pdf_wine_path.gsub! '/', '\\\\' `wine #{command} \"#{pdf_wine_path}\"` #puts "wine #{command} \"#{pdf_wine_path}\"" end description "Open PDF files in Wine." arg :pdf_file, 'Path to the PDF file' version Wine::Pdf::VERSION use_log_level_option :toggle_debug_on_signal => 'USR1' go! end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wine-pdf-0.1.1 | bin/wine-pdf |
wine-pdf-0.1.0 | bin/wine-pdf |