Module: Outlook2GCal
- Defined in:
- lib/outlook2gcal/outlook_calendar.rb,
lib/outlook2gcal/sync.rb,
lib/outlook2gcal/counter.rb,
lib/outlook2gcal/install.rb,
lib/outlook2gcal/sync_entry.rb,
lib/outlook2gcal/google_calendar.rb
Overview
Info:
http://msdn.microsoft.com/en-us/library/dd469461(v=office.12).aspx
http://msdn.microsoft.com/en-us/library/ff870661.aspx
Defined Under Namespace
Classes: Counter, EventRepeat, GoogleCalendar, OutlookCalendar, OutlookEvent, OutlookEvents, OutlookGoogleSync, SyncEntry
Class Method Summary collapse
- .copy_files(src_dir, dest_dir) ⇒ Object
- .create_licence_file(dest_dir) ⇒ Object
- .create_start_file(dest_dir) ⇒ Object
- .install(conf) ⇒ Object
Class Method Details
.copy_files(src_dir, dest_dir) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/outlook2gcal/install.rb', line 26 def Outlook2GCal::copy_files(src_dir, dest_dir) puts "Copying files from " + src_dir puts "to " + dest_dir FileUtils::mkdir_p(dest_dir) FileUtils::cp_r(src_dir, dest_dir) puts "Install successful!" end |
.create_licence_file(dest_dir) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/outlook2gcal/install.rb', line 33 def Outlook2GCal::create_licence_file(dest_dir) licence ="Copyright (c) 2012 Elias Kugler\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" f= File.new(dest_dir+"/MIT-LICENSE",'w+') f.write(licence) f.close end |
.create_start_file(dest_dir) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/outlook2gcal/install.rb', line 62 def Outlook2GCal::create_start_file(dest_dir) cmd ="@goto :end ;@rem TODO: delete this line, edit the next one !!!\n.\\\\bin\\\\ruby .\\\\src\\\\outlook2gcal_portable sync -U <google-user> -P <google-password> -C <calendar-name> -D 30 --sync-desc --sync-alarm\n@echo.\n@pause\n@rem TODO: delete the following lines !!!\n\n:end \n@echo off \necho --------------------------\necho TODO!!! Edit this file!! \necho --------------------------\n.\\\\bin\\\\ruby .\\\\src\\\\outlook2gcal_portable \necho --------------------------\necho TODO!!! Edit this file!! \necho --------------------------\n@pause\n" f= File.new(dest_dir+"/start_outlook2gcal_portable.bat",'w+') f.write(cmd) f.close end |
.install(conf) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/outlook2gcal/install.rb', line 8 def Outlook2GCal::install(conf) raise "environment variable %APPDATA% not set" unless ENV['APPDATA'] puts File.realdirpath(__FILE__+ '/../..') puts File.realdirpath($0+ '/../..') puts "---" src_dir = File.realdirpath($0 + '/../..') + '/.' dest_dir = File.realdirpath(ENV['APPDATA']+"/outlook2gcal_standalone_0.0.1") if !File.exists?(dest_dir) copy_files(src_dir,dest_dir) create_licence_file(dest_dir) create_start_file(dest_dir) else puts "Dir (#{dest_dir}) already exists. " end end |