rwdschedule 0.94 → 0.95
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.txt +364 -199
- data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +25 -26
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +25 -4
- data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +1 -0
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +54 -0
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +22 -7
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +3 -0
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +1 -1
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +21 -0
- data/code/superant.com.schedule/archiveicsevent.rb +14 -0
- data/code/superant.com.schedule/cleareventscreendisplay.rb +12 -8
- data/code/superant.com.schedule/deleteicseventrecord.rb +19 -0
- data/code/superant.com.schedule/helptexthashrwdschedule.rb +15 -1
- data/code/superant.com.schedule/listicseventdates.rb +19 -0
- data/code/superant.com.schedule/loadeventrecord.rb +17 -9
- data/code/superant.com.schedule/loadicseventrecord.rb +30 -0
- data/code/superant.com.schedule/openhelpwindowrwdschedule.rb +11 -2
- data/code/superant.com.schedule/renameicseventdata.rb +17 -0
- data/code/superant.com.schedule/runrwdscheduleicsbackwindow.rb +10 -0
- data/code/superant.com.schedule/saveeventrecord.rb +9 -2
- data/code/superant.com.schedule/saveicseventrecord.rb +85 -0
- data/code/superant.com.schedule/viewicsevent.rb +20 -0
- data/configuration/rwdscheduleversion.cnf +1 -1
- data/configuration/rwdtinker.cnf +3 -3
- data/configuration/rwdtinkerversion.cnf +1 -1
- data/configuration/tinkerwin2variables.cnf +7 -3
- data/extras/icalendar.rb +18 -0
- data/gui/00coreguibegin/applicationguitop.rwd +1 -1
- data/gui/frontwindow0/superant.com.rwdschedules/gl6editrecord.rwd +27 -10
- data/gui/frontwindow0/superant.com.zmenus/m03menu.rwd +6 -3
- data/gui/frontwindowselections/superant.com.schedulebackselection/rwdscheduleiscselectiontab.rwd +12 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/m03menu.rwd +3 -4
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/30viewevent.rwd +27 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/40editrecord.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/60eventicsutilities.rwd +25 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m01menubegin.rwd +10 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m02menu.rwd +36 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m03menu.rwd +12 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m85menu.rwd +21 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m88menu.rwd +12 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m99menuend.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/zvbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +11 -11
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
- data/installed/rwdviewlogo-0.4.inf +4 -0
- data/lang/templangfile.rb +15 -15
- data/lang/xlocallangfile.rb +15 -15
- data/rwd_files/HowTo_Schedule.txt +15 -2
- data/rwd_files/HowTo_Tinker.txt +11 -0
- data/rwd_files/tinker.png +0 -0
- data/schedules/20050120T09.ics +9 -0
- data/schedules/200502february22 test event.sch +5 -0
- data/schedules/Enterprise.ics +411 -0
- data/schedules/US Holidays.ics +575 -0
- data/schedules/testics05.ics +11 -0
- data/tests/rwdtinkertestEN.rb +163 -0
- data/tests/test.result +32 -0
- metadata +73 -34
- data/zips/rwdwcalc-0.50.zip +0 -0
@@ -1,11 +1,15 @@
|
|
1
|
-
|
1
|
+
# help text files used by context sensitive help
|
2
2
|
|
3
3
|
Helptext.update( :tinkerwin2_help => " You can view the list of applets you can install
|
4
4
|
by clicking on the list files button
|
5
5
|
|
6
6
|
You can download an applet created by someone else
|
7
7
|
|
8
|
-
put the file in the zips directory
|
8
|
+
put the file in the zips directory
|
9
|
+
|
10
|
+
rwdtinker applets packaged as RubyGems can be used if you have RubyGems installed.
|
11
|
+
You can download rwdtinker gems at the 'Install Remote Applets' tab
|
12
|
+
",
|
9
13
|
:applet_viewing => "You can get a list of all installed applets by clicking the 'listfiles button'
|
10
14
|
To see the text of a install file
|
11
15
|
Type in the name of the file you want.
|
@@ -32,6 +36,23 @@
|
|
32
36
|
:applet_tinkerbackeditconfiguration => " You can edit the configuration
|
33
37
|
|
34
38
|
Remember to reload the configuration variables if you want your
|
35
|
-
changes used."
|
36
|
-
|
39
|
+
changes used.",
|
40
|
+
:remotegemapplet_install => " To download and install use the 'Install Remote Applets'
|
41
|
+
|
42
|
+
First click on 'List applets in the Remote GEM Repository available for downloading'
|
43
|
+
then go to the very bottom to click on the applet you want
|
44
|
+
then on the top click 'install remote Gem applet package'
|
45
|
+
|
46
|
+
This installs the package in the Gem system
|
47
|
+
You still need to install it into rwdtinker - do that in the 'List Zips' tab
|
48
|
+
|
49
|
+
For this feature to work, you need
|
50
|
+
RubyGems installed
|
51
|
+
Variables set correctly in the tinerwin2.cnf file
|
52
|
+
$xpcommand, $gemdirectory_withgemfiles and $geminstalled_directory
|
53
|
+
the defaults as shipped will normally be for a Debian Linux system
|
54
|
+
On Debian Linux, you would usually need to be running rwdtinker as root in order to install RubyGems
|
55
|
+
|
56
|
+
You can view the list of rwdtinker applets you have installed already by clicking 'view already installed GEM applets'
|
57
|
+
"
|
37
58
|
)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# install rwdtinker applet from a long directory location
|
2
|
+
def installgemapplet
|
3
|
+
require 'fileutils'
|
4
|
+
require 'extras/zip/zip'
|
5
|
+
nametext = "%s" % [@a_installapplet]
|
6
|
+
|
7
|
+
begin # exception trapped block
|
8
|
+
fullname = nametext + ".zip"
|
9
|
+
|
10
|
+
zf = Zip::ZipFile.new(fullname)
|
11
|
+
zf.sort.each {
|
12
|
+
|entry|
|
13
|
+
zf.extract(entry.to_s, entry.to_s)
|
14
|
+
}
|
15
|
+
@installapplettext = Message[:applet_installed]
|
16
|
+
|
17
|
+
rescue
|
18
|
+
@installapplettext = "unzip error - applet may not be installed correctly"
|
19
|
+
end # exception rescue
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# download gem of rwdtinker applet
|
2
|
+
def superantcominstallremotegemapplet
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
tempnametext = "%s" % [@superantcominstallremoteappletinput]
|
6
|
+
temparray = tempnametext.split(/ /)
|
7
|
+
nametext = temparray[0]
|
8
|
+
begin # exception trapped block
|
9
|
+
|
10
|
+
|
11
|
+
commandline = $xpcommand + "gem install " + nametext
|
12
|
+
|
13
|
+
@superantcominstallremotegemappletresult = `#{commandline}`
|
14
|
+
|
15
|
+
rescue
|
16
|
+
@superantcominstallremotegemappletresult = "error during gem install!"
|
17
|
+
end # exception rescue
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# this code is to list the gem directories that are installed
|
2
|
+
def superantcomshowgemfiledirs
|
3
|
+
|
4
|
+
fileList = Dir.new($gemdirectory_withgemfiles).entries.sort.delete_if { |x| ! (x =~ /\Arwdzip/) }
|
5
|
+
@superantcomshowgemappletdirsresult = fileList.rwd_method("superantcomshowgemappletdirsname")
|
6
|
+
end
|
7
|
+
|
8
|
+
def superantcomshowgemappletdirsname(inffile)
|
9
|
+
applet = inffile
|
10
|
+
@a_gemfiledirsinput = applet
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# this code is to list the zips
|
2
|
+
|
3
|
+
|
4
|
+
def fillzipappletname(inffile)
|
5
|
+
applet = inffile.gsub(/\.zip$/, "")
|
6
|
+
@a_installapplet = applet
|
7
|
+
|
8
|
+
end
|
9
|
+
|
10
|
+
def findzipfiles(d)
|
11
|
+
a = Array.new(Dir[d].entries.sort)
|
12
|
+
#loop through and get the files names
|
13
|
+
a.each do |x|
|
14
|
+
#adjust the filters to the files you want to see...
|
15
|
+
if(!test(?d,x))
|
16
|
+
# only zip files
|
17
|
+
if x =~ /\.zip/
|
18
|
+
puts "#{x}" #opens the file thats in fileName as read only
|
19
|
+
$zipsarray = $zipsarray | ["#{x}"]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def listgemzips
|
26
|
+
startlangdir = $geminstalled_directory
|
27
|
+
#get a list of the files and subdirectories on the starting directory only
|
28
|
+
alanghash = Array.new(Dir[startlangdir].entries.sort)
|
29
|
+
p alanghash
|
30
|
+
#loop through the list, ignore the files and add all new directories found
|
31
|
+
alanghash.each do |x|
|
32
|
+
#if a directory...
|
33
|
+
if(test(?d,x))
|
34
|
+
# add to the original list of directories
|
35
|
+
@@tmproot = x + "/**"
|
36
|
+
#adds the new ones to the array
|
37
|
+
blanghash = Dir[@@tmproot].entries.sort
|
38
|
+
blanghash.each do |x|
|
39
|
+
if(test(?d,x))
|
40
|
+
alanghash.push(x) #appends to the end of the array...
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
alanghash.each do |x|
|
46
|
+
#if it is a file...
|
47
|
+
if(!test(?d,x))
|
48
|
+
alanghash.delete(x)
|
49
|
+
else #it is a directory...
|
50
|
+
findzipfiles(x + "/**")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
@zipslistresult = $zipsarray.rwd_method("fillzipappletname")
|
54
|
+
end
|
@@ -1,16 +1,31 @@
|
|
1
1
|
# this code is to list the zipped applets that can be installed
|
2
|
-
|
3
|
-
if File.exist?($zipslocation)
|
4
|
-
fileList = Dir.new($zipslocation).entries.sort.delete_if { |x| ! (x =~ /zip$/) }
|
5
|
-
@zipslistresult = fileList.rwd_method("fillziptoinstallname")
|
6
|
-
end
|
7
|
-
end
|
2
|
+
|
8
3
|
|
9
4
|
def fillziptoinstallname(inffile)
|
10
5
|
applet = inffile.gsub(/\.zip$/, "")
|
11
6
|
@a_installapplet = applet
|
12
7
|
|
13
8
|
end
|
9
|
+
|
14
10
|
|
15
11
|
|
16
|
-
|
12
|
+
|
13
|
+
def listzipfilestoinstall
|
14
|
+
startlangdir = File.join($progdir, $zipslocation )
|
15
|
+
#get a list of the files and subdirectories on the starting directory only
|
16
|
+
|
17
|
+
|
18
|
+
a = Array.new(Dir["#{startlangdir}/*"].entries.sort)
|
19
|
+
|
20
|
+
#loop through and get the files names
|
21
|
+
a.each do |x|
|
22
|
+
# only zip files
|
23
|
+
if x =~ /\.zip/
|
24
|
+
# puts "#{x}" #adds the file to the array to display on the screen
|
25
|
+
$zipsarraylocal = $zipsarraylocal | ["#{x}"]
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
@zipslistresult = $zipsarraylocal.rwd_method("fillziptoinstallname")
|
31
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This tinker method is to retrieve the list of rwdzip applets available to install from the remote repository
|
2
|
+
|
3
|
+
def superantcomremotegemlist
|
4
|
+
gemcommandoption = "search --remote "
|
5
|
+
gemfilename = "rwdzip"
|
6
|
+
commandtext = "gem search --remote rwdzip"
|
7
|
+
commandtemp = $xpcommand + commandtext
|
8
|
+
begin # exception trapped block
|
9
|
+
|
10
|
+
tempremotegemappletsresult = `#{commandtemp} 2>&1`
|
11
|
+
@superantcomremotegemappletsfullresult = tempremotegemappletsresult
|
12
|
+
fileList = tempremotegemappletsresult.split(/\n/).delete_if { |x| ! (x =~ /\Arwdzip/) }
|
13
|
+
|
14
|
+
@superantcomremotegemappletsresult = fileList.rwd_method("superantcomremotegemappletdirsname")
|
15
|
+
rescue SystemCallError, StandardError
|
16
|
+
@superantcomremotegemappletsresult = "system call error: " + $!
|
17
|
+
end # exception rescue
|
18
|
+
end
|
19
|
+
|
20
|
+
def superantcomremotegemappletdirsname(inffile)
|
21
|
+
applet = inffile
|
22
|
+
@superantcominstallremoteappletinput = applet
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
def viewgemappletcontents
|
2
|
+
require 'fileutils'
|
3
|
+
require 'extras/zip/zip'
|
4
|
+
nametext = "%s" % [@a_installapplet]
|
5
|
+
|
6
|
+
begin # exception trapped block
|
7
|
+
fullname = nametext + ".zip"
|
8
|
+
|
9
|
+
tempfilecontents = " "
|
10
|
+
zf = Zip::ZipFile.new(fullname)
|
11
|
+
zf.sort.each {
|
12
|
+
|entry|
|
13
|
+
tempfilecontents = tempfilecontents + entry.to_s + "\n"
|
14
|
+
}
|
15
|
+
@appletcontentstext = tempfilecontents
|
16
|
+
|
17
|
+
rescue
|
18
|
+
@installapplettext = "unzip error - error opening applet"
|
19
|
+
end # exception rescue
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# this code is to archive the event
|
2
|
+
def archiveicsevent
|
3
|
+
oldName = $rwdschedule_directory + "/" + @a_viewicsevent + ".ics"
|
4
|
+
newName = $rwdschedule_directory + "/" + "archive" + "/" + @a_viewicsevent + ".ics"
|
5
|
+
begin
|
6
|
+
File.move(oldName, newName)
|
7
|
+
@displayicsevent = "ics file archived"
|
8
|
+
rescue
|
9
|
+
@displayicsevent = "ics archive error"
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
|
@@ -2,14 +2,18 @@
|
|
2
2
|
def cleareventscreendisplay
|
3
3
|
|
4
4
|
@a_eventfilename = ""
|
5
|
-
@
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
@a_eventyear = ""
|
6
|
+
@a_eventmonth = ""
|
7
|
+
@a_eventday = ""
|
8
|
+
@a_eventbeginhour = ""
|
9
|
+
@a_eventbeginminute = ""
|
10
|
+
@a_eventendhour = ""
|
11
|
+
@a_eventendminute = ""
|
12
|
+
@a_eventsummary = ""
|
13
|
+
@a_eventdescription = ""
|
14
|
+
@a_eventlocation = ""
|
15
|
+
|
16
|
+
|
13
17
|
|
14
18
|
|
15
19
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# this method deletes a file
|
2
|
+
def deleteicseventrecord
|
3
|
+
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
if @a_viewicsevent
|
7
|
+
$currenticseventtext = @a_viewicsevent
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
begin # exception trapped block
|
12
|
+
fileName = $rwdschedule_directory + "/" + $currenticseventtext + ".ics"
|
13
|
+
File.delete(fileName)
|
14
|
+
@eventicsfilechangeresult = "#{$currenticseventtext} File Deleted!"
|
15
|
+
rescue
|
16
|
+
@eventicsfilechangeresult = "File Deletion error"
|
17
|
+
end # exception rescue
|
18
|
+
|
19
|
+
end
|
@@ -60,7 +60,21 @@
|
|
60
60
|
Month: 2
|
61
61
|
Click on 'show month'
|
62
62
|
|
63
|
-
It will display one month"
|
63
|
+
It will display one month",
|
64
|
+
:icsfile_help => "
|
65
|
+
You can create an ics file
|
66
|
+
you can view a raw ics file
|
67
|
+
Rename ics File
|
68
|
+
Delete ics File
|
69
|
+
|
70
|
+
format of date
|
71
|
+
year = 2005
|
72
|
+
month = 02
|
73
|
+
day = 01
|
74
|
+
hour = 01
|
75
|
+
minute = 01
|
76
|
+
"
|
77
|
+
|
64
78
|
|
65
79
|
|
66
80
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# this code is to list the events that are scheduled
|
2
|
+
def listicseventdates
|
3
|
+
# exception begin
|
4
|
+
begin
|
5
|
+
fileList = Dir.new($rwdschedule_directory).entries.sort.delete_if { |x| ! (x =~ /ics$/) }
|
6
|
+
|
7
|
+
@eventicsrecordsresult = fileList.rwd_method("fillicseventdatesname")
|
8
|
+
rescue
|
9
|
+
@eventicsrecordsresult = "error opening schedule directory"
|
10
|
+
end # end of error function
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
def fillicseventdatesname(inffile)
|
16
|
+
applet = inffile.gsub(/\.ics$/, "")
|
17
|
+
@a_viewicsevent = applet
|
18
|
+
|
19
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# this method views an existing
|
1
|
+
# this method views an existing record
|
2
2
|
def loadeventrecord
|
3
3
|
|
4
4
|
require 'fileutils'
|
@@ -10,14 +10,22 @@
|
|
10
10
|
fileName = $rwdschedule_directory + "/" + $currenteventtext + ".sch"
|
11
11
|
|
12
12
|
fd = File.open(fileName,"r")
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
@
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
eventdatetime = fd.readline.chomp
|
14
|
+
|
15
|
+
@a_eventyear = eventdatetime.slice(0..3)
|
16
|
+
@a_eventmonth = eventdatetime.slice(4..5)
|
17
|
+
@a_eventday = eventdatetime.slice(6..7)
|
18
|
+
@a_eventbeginhour = eventdatetime.slice(9..10)
|
19
|
+
@a_eventbeginminute = eventdatetime.slice(11..12)
|
20
|
+
eventdatetime2 = fd.readline.chomp
|
21
|
+
|
22
|
+
@a_eventendhour = eventdatetime2.slice(9..10)
|
23
|
+
@a_eventendminute = eventdatetime.slice(11..12)
|
24
|
+
@a_eventsummary = fd.readline.chomp
|
25
|
+
@a_eventdescription = fd.readline.chomp
|
26
|
+
@a_eventlocation = fd.readline.chomp
|
27
|
+
|
28
|
+
|
21
29
|
|
22
30
|
while ! fd.eof?
|
23
31
|
@extraeventdatadisplay = fd.readline
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# this method views an existing address record
|
2
|
+
def loadicseventrecord
|
3
|
+
|
4
|
+
require 'fileutils'
|
5
|
+
@a_eventfilename = $currenteventtext
|
6
|
+
|
7
|
+
begin # exception trapped block
|
8
|
+
|
9
|
+
|
10
|
+
fileName = $rwdschedule_directory + "/" + $currenteventtext + ".sch"
|
11
|
+
|
12
|
+
fd = File.open(fileName,"r")
|
13
|
+
@a_eventtime = fd.readline.chomp
|
14
|
+
@a_eventwhat = fd.readline.chomp
|
15
|
+
@a_eventaddress = fd.readline.chomp
|
16
|
+
@a_eventphone = fd.readline.chomp
|
17
|
+
@a_eventemail = fd.readline.chomp
|
18
|
+
@a_eventcomment1 = fd.readline.chomp
|
19
|
+
@a_eventcomment2 =fd.readline.chomp
|
20
|
+
@a_eventcomment3 = fd.readline.chomp
|
21
|
+
|
22
|
+
while ! fd.eof?
|
23
|
+
@extraeventdatadisplay = fd.readline
|
24
|
+
end
|
25
|
+
fd.close
|
26
|
+
rescue SystemCallError, StandardError
|
27
|
+
$stderr.print "system call error: " + $!
|
28
|
+
end # exception rescue
|
29
|
+
|
30
|
+
end
|
@@ -19,8 +19,17 @@ def runhelpwindowrwdschedule
|
|
19
19
|
end
|
20
20
|
if @rwd_tab == "calendar"
|
21
21
|
$help_topic = "calendar_help"
|
22
|
-
end
|
23
|
-
|
22
|
+
end
|
23
|
+
if @rwd_tab == "createicsrecordfile"
|
24
|
+
$help_topic = "icsfile_help"
|
25
|
+
end
|
26
|
+
if @rwd_tab == "eventicsutilities"
|
27
|
+
$help_topic = "icsfile_help"
|
28
|
+
end
|
29
|
+
if @rwd_tab == "Viewicseventlist"
|
30
|
+
$help_topic = "icsfile_help"
|
31
|
+
end
|
32
|
+
$helptopicsarray = $helptopicsarray | ["icsfile_help","eventutilities_help","calendar_help","rwdschedule_generalhelp","rwdschedule_configuration","rwdschedulefilelist_generalhelp","rwdschedule_sync"]
|
24
33
|
|
25
34
|
|
26
35
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# this code is to change the file name
|
2
|
+
def changeicseventdata
|
3
|
+
if ! @a_viewicsevent.empty?
|
4
|
+
oldName = $rwdschedule_directory + "/" + @a_viewicsevent + ".ics"
|
5
|
+
if ! @a_changeicseventdata.empty?
|
6
|
+
newName = $rwdschedule_directory + "/" + @a_changeicseventdata + ".ics"
|
7
|
+
begin
|
8
|
+
File.rename(oldName, newName)
|
9
|
+
@eventicsfilechangeresult = "File Renamed!"
|
10
|
+
rescue
|
11
|
+
@eventicsfilechangeresult = "rename error"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Application RwdAddresses orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a contact book
|
3
|
+
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# call the window
|
6
|
+
def runrwdscheduleicsbackwindow
|
7
|
+
@rwd_window = "rwdscheduleicswindow"
|
8
|
+
@rwd_tab = "Viewicseventlist"
|
9
|
+
end
|
10
|
+
|
@@ -3,8 +3,15 @@
|
|
3
3
|
require 'fileutils'
|
4
4
|
if @a_eventfilename
|
5
5
|
newname = "%s" % [@a_eventfilename] # grab the new filename to create
|
6
|
-
newdata
|
7
|
-
|
6
|
+
newdata = @a_eventyear.to_s + @a_eventmonth.to_s + @a_eventday.to_s + "T" + @a_eventbeginhour.to_s + @a_eventbeginminute.to_s + "00"
|
7
|
+
newdata = newdata + "\n" + @a_eventyear.to_s + @a_eventmonth.to_s + @a_eventday.to_s + "T" + @a_eventendhour.to_s + @a_eventendminute.to_s + "00"
|
8
|
+
newdata = newdata +"\n" + @a_eventsummary.to_s + "\n" + @a_eventdescription.to_s + "\n" + @a_eventlocation.to_s
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
fullnewname = newname + ".sch"
|
8
15
|
begin # exception trapped block
|
9
16
|
fileName = File.join( $rwdschedule_directory, fullnewname )
|
10
17
|
fd = File.open(fileName,"w")
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# this method adds a new record
|
2
|
+
def saveicseventrecord
|
3
|
+
Dir.chdir($progdir)
|
4
|
+
require 'fileutils'
|
5
|
+
require 'extras/icalendar'
|
6
|
+
if ! @a_eventicsfilename.empty?
|
7
|
+
newname = "%s" % [@a_eventicsfilename] # grab the new filename to create
|
8
|
+
|
9
|
+
fullnewname = newname + ".ics"
|
10
|
+
cal = Icalendar::Calendar.new
|
11
|
+
|
12
|
+
cal.version = "3.2"
|
13
|
+
cal.prodid = "rwdtinker-prodid"
|
14
|
+
event = Icalendar::Event.new
|
15
|
+
newdataText = ""
|
16
|
+
if ! @a_eventicsyear.empty?
|
17
|
+
temptimedata = @a_eventicsyear.to_s.strip
|
18
|
+
else
|
19
|
+
temptimedata = "0000"
|
20
|
+
end
|
21
|
+
if ! @a_eventicsmonth.empty?
|
22
|
+
temptimedata= temptimedata + @a_eventicsmonth.to_s
|
23
|
+
else
|
24
|
+
temptimedata = temptimedata + "00"
|
25
|
+
end
|
26
|
+
if ! @a_eventicsday.empty?
|
27
|
+
temptimedata = temptimedata + @a_eventicsday.to_s
|
28
|
+
else
|
29
|
+
temptimedata = temptimedata + "00"
|
30
|
+
end
|
31
|
+
if ! @a_eventicshour.empty?
|
32
|
+
temptimedata= temptimedata + "T" + @a_eventicshour.to_s
|
33
|
+
else
|
34
|
+
temptimedata = temptimedata + "T" + "00"
|
35
|
+
end
|
36
|
+
if ! @a_eventicsminute.empty?
|
37
|
+
temptimedata = temptimedata + @a_eventicsminute.to_s
|
38
|
+
else
|
39
|
+
temptimedata = temptimedata + "00"
|
40
|
+
end
|
41
|
+
if ! @a_eventicssummary.empty?
|
42
|
+
summarydataText = @a_eventicssummary.to_s
|
43
|
+
else
|
44
|
+
summarydataText = ""
|
45
|
+
end
|
46
|
+
if ! @a_eventicsdescription.empty?
|
47
|
+
descriptiondataText = @a_eventicsdescription.to_s
|
48
|
+
else
|
49
|
+
descriptiondataText = ""
|
50
|
+
end
|
51
|
+
if ! @a_eventicslocation.empty?
|
52
|
+
locationdataText = @a_eventicslocation.to_s
|
53
|
+
else
|
54
|
+
locationdataText = ""
|
55
|
+
end
|
56
|
+
|
57
|
+
starttime = temptimedata + "00"
|
58
|
+
|
59
|
+
|
60
|
+
# Create a new event and add it to the calendar
|
61
|
+
|
62
|
+
event.dtstart = starttime
|
63
|
+
event.dtend = starttime
|
64
|
+
event.summary = summarydataText
|
65
|
+
event.description = descriptiondataText
|
66
|
+
event.location = locationdataText
|
67
|
+
cal.add(event)
|
68
|
+
# Now generate the string and then parse it so we can verify
|
69
|
+
# that everything was set, generated and parsed correctly.
|
70
|
+
calString = cal.to_s
|
71
|
+
p calString
|
72
|
+
#cals = Icalendar::CalendarParser.new(calString).parse
|
73
|
+
|
74
|
+
# cal2 = cals.first
|
75
|
+
# begin # exception trapped block
|
76
|
+
fileName = File.join( $rwdschedule_directory, fullnewname )
|
77
|
+
fd = File.open(fileName,"w")
|
78
|
+
fd.print( calString ) # save the record info to the file
|
79
|
+
fd.close
|
80
|
+
@neweventresult= calString # show the record info in the browser
|
81
|
+
# rescue SystemCallError, StandardError
|
82
|
+
# $stderr.print "system call error: " + $!
|
83
|
+
# end # exception rescue
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
def viewicsevent
|
2
|
+
require 'fileutils'
|
3
|
+
$currenticseventtext = "%s" % [@a_viewicsevent]
|
4
|
+
|
5
|
+
begin # exception trapped block
|
6
|
+
|
7
|
+
|
8
|
+
fileName = $rwdschedule_directory + "/" + $currenticseventtext + ".ics"
|
9
|
+
|
10
|
+
fd = File.open(fileName,"r")
|
11
|
+
@displayicsevent = " "
|
12
|
+
while ! fd.eof?
|
13
|
+
@displayicsevent = fd.read
|
14
|
+
end
|
15
|
+
fd.close
|
16
|
+
rescue SystemCallError, StandardError
|
17
|
+
$stderr.print "system call error: " + $!
|
18
|
+
end # exception rescue
|
19
|
+
|
20
|
+
end
|
data/configuration/rwdtinker.cnf
CHANGED
@@ -7,10 +7,10 @@ RWDFile = "rwdtinker.rwd"
|
|
7
7
|
LangDir = "lang"
|
8
8
|
TempLangHashFile = LangDir + "/" + "templangfile.rb"
|
9
9
|
LocalLangHashFile = LangDir + "/" + "xlocallangfile.rb"
|
10
|
-
CodeDir = "code"
|
11
|
-
GuiDir = "gui"
|
10
|
+
CodeDir = "code"
|
11
|
+
GuiDir = "gui"
|
12
12
|
$help_topic = "general_help"
|
13
13
|
$helptopicsarray = [ "general_help","network_help"]
|
14
|
-
$prevouswindow ="main"
|
14
|
+
$prevouswindow ="main"
|
15
15
|
$rwdcontrolports =["13713","13714","13715","13716","13717","13718"]
|
16
16
|
$port = 7705
|
@@ -1,2 +1,2 @@
|
|
1
1
|
|
2
|
-
RwdTinkerVersion = "1.
|
2
|
+
RwdTinkerVersion = "1.54"
|
@@ -1,8 +1,12 @@
|
|
1
1
|
|
2
2
|
TinkerWin2ConfigurationFileName = "tinkerwin2variables.cnf" # this file name - do not change
|
3
3
|
$zipslocation = "zips" # location of applets to add
|
4
|
-
$
|
5
|
-
|
6
|
-
|
4
|
+
$zipsarray = [""] ; $zipsarraylocal = [""]
|
5
|
+
$xpcommand = " " # Linux machines
|
6
|
+
# $xpcommand = "cmd /C " # XP machines with cmd shell
|
7
|
+
$gemdirectory_withgemfiles = "/usr/lib/ruby/gems/1.8/gems"
|
8
|
+
# $gemdirectory_withgemfiles = "c:\\ruby\\lib\\ruby\\gems\\1.8\\gems" # XP machine
|
9
|
+
# $geminstalled_directory = "/ruby/lib/ruby/gems/1.8/gems" # XP machine
|
10
|
+
$geminstalled_directory = "/usr/lib/ruby/gems/1.8/gems" # Debian Linux
|
7
11
|
|
8
12
|
|