rwdaddresses 0.93 → 0.94

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/Readme.txt +187 -37
  2. data/code/{ag1core → 00rwdtinkercore}/aa0begin.rb +0 -0
  3. data/code/{ag1core → 00rwdtinkercore}/rwdtinkerversion.rb +0 -0
  4. data/code/{xb1rwdtinkerbackwindow → rwdtinkerbackwindow}/diagnostictab.rb +0 -0
  5. data/code/{xb1rwdtinkerbackwindow → rwdtinkerbackwindow}/installapplet.rb +3 -2
  6. data/code/{xb1rwdtinkerbackwindow → rwdtinkerbackwindow}/listinstalledfiles.rb +0 -0
  7. data/code/{xb1rwdtinkerbackwindow → rwdtinkerbackwindow}/listzips.rb +5 -3
  8. data/code/rwdtinkerbackwindow/loadconfigurationrecord.rb +32 -0
  9. data/code/rwdtinkerbackwindow/loadconfigurationvariables.rb +13 -0
  10. data/code/{xb1rwdtinkerbackwindow → rwdtinkerbackwindow}/openappletname.rb +0 -0
  11. data/code/{xb1rwdtinkerbackwindow → rwdtinkerbackwindow}/removeapplet.rb +0 -0
  12. data/code/{xb1rwdtinkerbackwindow → rwdtinkerbackwindow}/rwdtinkerwin2version.rb +0 -0
  13. data/code/rwdtinkerbackwindow/saveconfigurationrecord.rb +18 -0
  14. data/code/{xa5rwdtinkercallable → rwdtinkercallable}/callable.rb +0 -0
  15. data/code/{gl3addresses/gm5attachtmpcontactphoto.rb → superant.com.rwdaddresses/attachtmpcontactphoto.rb} +0 -0
  16. data/code/{gl3addresses/gl7clearscreendisplay.rb → superant.com.rwdaddresses/clearscreendisplay.rb} +0 -0
  17. data/code/{gl3addresses/gl5createnewnamerecord.rb → superant.com.rwdaddresses/createnewnamerecord.rb} +0 -0
  18. data/code/{gl3addresses/gm3deletecontactrecord.rb → superant.com.rwdaddresses/deletecontactrecord.rb} +0 -0
  19. data/code/superant.com.rwdaddresses/downloadrwdaddressfiles.rb +34 -0
  20. data/code/{gl3addresses/gl4listnamerecord.rb → superant.com.rwdaddresses/listnamerecord.rb} +2 -0
  21. data/code/{gl3addresses/gl6loadnamerecord.rb → superant.com.rwdaddresses/loadnamerecord.rb} +0 -0
  22. data/code/{gl3addresses → superant.com.rwdaddresses}/renamecontact.rb +0 -0
  23. data/code/{gl3addresses → superant.com.rwdaddresses}/runaddresseswindow.rb +0 -0
  24. data/code/superant.com.rwdaddresses/runrwdaddresssyncbackwindow.rb +9 -0
  25. data/code/{gl3addresses → superant.com.rwdaddresses}/rwdaddresseshelpabout.rb +0 -0
  26. data/code/superant.com.rwdaddresses/syncrwdaddress.rb +30 -0
  27. data/code/superant.com.rwdaddresses/uploadrwdaddressfiles.rb +30 -0
  28. data/code/{gl3addresses → superant.com.rwdaddresses}/viewaddressconfiguration.rb +0 -0
  29. data/code/{gl3addresses/gl3viewnamedata.rb → superant.com.rwdaddresses/viewnamedata.rb} +0 -0
  30. data/code/{gl3addresses/gl4viewphoto.rb → superant.com.rwdaddresses/viewphoto.rb} +0 -0
  31. data/code/{gl3addresses/gl8viewtmpcontactphoto.rb → superant.com.rwdaddresses/viewtmpcontactphoto.rb} +0 -0
  32. data/configuration/rwdaddresses.cnf +6 -1
  33. data/configuration/rwdaddressesversion.cnf +1 -1
  34. data/configuration/rwdplayscriptsversion.cnf +2 -0
  35. data/configuration/rwdtinker.cnf +7 -7
  36. data/configuration/rwdtinkerversion.cnf +1 -1
  37. data/configuration/tinkerwin2variables.cnf +8 -0
  38. data/configuration/tinkerwin2version.cnf +1 -1
  39. data/gui/00coreguibegin/applicationguitop.rwd +4 -0
  40. data/gui/{gg3rwdaddresses/gl3viewnamedata.rwd → frontwindow0/superant.com.rwdaddresses/11viewnamedata.rwd} +0 -0
  41. data/gui/{gg3rwdaddresses/gl4listnamerecordfiles.rwd → frontwindow0/superant.com.rwdaddresses/13listnamerecordfiles.rwd} +0 -0
  42. data/gui/{gg3rwdaddresses/gl6editrecord.rwd → frontwindow0/superant.com.rwdaddresses/16editrecord.rwd} +0 -0
  43. data/gui/{gg3rwdaddresses/gl8contactutilities.rwd → frontwindow0/superant.com.rwdaddresses/18contactutilities.rwd} +0 -0
  44. data/gui/{gg3rwdaddresses/hviewconfiguration.rwd → frontwindow0/superant.com.rwdaddresses/22viewconfiguration.rwd} +0 -0
  45. data/gui/{ll1selectiontabbegin → frontwindowselectionbegin/selectiontabbegin}/selectiontabbegin.rwd +0 -0
  46. data/gui/frontwindowselections/superant.com.rwdaddressessyncselectiontab/rwdaddressessyncselectiontab.rwd +12 -0
  47. data/gui/{ll5rwdtinkerwin2selectiontab → frontwindowselections/superant.com.rwdtinkerwin2selectiontab}/rwdwin2selectiontab.rwd +0 -0
  48. data/gui/{lz1selectiontabend/endselectiontab.rwd → frontwindowselectionzend/viewselectionzend/viewselectionend.rwd} +0 -0
  49. data/gui/{tt0documentsbegin → frontwindowtdocumentbegin/superant.com.documentsbegin}/tt0documentbegin.rwd +0 -0
  50. data/gui/{uu8addresses → frontwindowtdocuments/superant.com.addressesdocuments}/uu8doc_rwdschedule.rwd +0 -0
  51. data/gui/{uu5rwddocuments → frontwindowtdocuments/superant.com.documents}/uu5documents.rwd +0 -0
  52. data/gui/frontwindowtdocuments/superant.com.rwdaddresses/uu8doc_rwdschedule.rwd +5 -0
  53. data/gui/{uu6rwdtinkerwin2documents → frontwindowtdocuments/superant.com.tinkerwin2documents}/uu5documents.rwd +0 -0
  54. data/gui/{ww0documentsend → frontwindowtdocumentzend/superant.com.documentsend}/ww0documentend.rwd +0 -0
  55. data/gui/{wz6finaltabs → frontwindowz1end/frontwindowend}/xx0rwdfirsttab.rwd +0 -0
  56. data/gui/{ya1helpaboutbegin → helpaboutbegin/superant.com.helpaboutbegin}/ya0helpscreenstart.rwd +0 -0
  57. data/gui/{yl3rwdaddresseshelpabout → helpaboutinstalled/superant.com.rwdaddresseshelpabout}/1appname.rwd +0 -0
  58. data/gui/{yg5rwdhelpabout → helpaboutinstalled/superant.com.rwdaddresseshelpabout}/3copyright.rwd +0 -0
  59. data/gui/{yl3rwdaddresseshelpabout → helpaboutinstalled/superant.com.rwdaddresseshelpabout}/5version.rwd +0 -0
  60. data/gui/{yg6rwdwin2helpabout → helpaboutinstalled/superant.com.rwdwin2helpabout}/1appname.rwd +0 -0
  61. data/gui/{yg6rwdwin2helpabout → helpaboutinstalled/superant.com.rwdwin2helpabout}/3copyright.rwd +0 -0
  62. data/gui/{yg6rwdwin2helpabout → helpaboutinstalled/superant.com.rwdwin2helpabout}/5version.rwd +0 -0
  63. data/gui/{yg5rwdhelpabout → helpaboutinstalled/superant.com.tinkerhelpabout}/1appname.rwd +0 -0
  64. data/gui/{yl3rwdaddresseshelpabout → helpaboutinstalled/superant.com.tinkerhelpabout}/3copyright.rwd +0 -0
  65. data/gui/{yg5rwdhelpabout → helpaboutinstalled/superant.com.tinkerhelpabout}/5version.rwd +0 -0
  66. data/gui/{yy5helpaboutend → helpaboutzend/superant.com.helpaboutend}/helpscreenend.rwd +0 -0
  67. data/gui/{yy7addressesphotowindow → tinkerbackwindows/superant.com.addressesphotowindow}/yy7addressesphoto.rwd +0 -0
  68. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/1appname.rwd +5 -0
  69. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/20downloadftp.rwd +41 -0
  70. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/22viewconfiguration.rwd +16 -0
  71. data/gui/{xb1rwdtinkerbackwindow/3arwddiagnostics.rwd → tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/70rwddiagnostics.rwd} +0 -0
  72. data/gui/{xb1rwdtinkerbackwindow/2tab1.rwd → tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/80returntab.rwd} +0 -0
  73. data/gui/{xb1rwdtinkerbackwindow/9backend.rwd → tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/zvbackend.rwd} +0 -0
  74. data/gui/{xa5rwdtinkercallablewindow → tinkerbackwindows/superant.com.tinercallablewindow}/1appname.rwd +0 -0
  75. data/gui/{xa5rwdtinkercallablewindow → tinkerbackwindows/superant.com.tinercallablewindow}/9end.rwd +0 -0
  76. data/gui/{xb1rwdtinkerbackwindow → tinkerbackwindows/superant.com.tinkerbackwindow}/1appname.rwd +0 -0
  77. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/3arwddiagnostics.rwd +33 -0
  78. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40editconfiguration.rwd +36 -0
  79. data/gui/{xb1rwdtinkerbackwindow/4arwdlistapplets.rwd → tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd} +0 -0
  80. data/gui/{xb1rwdtinkerbackwindow/4arwdlistzips.rwd → tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistzips.rwd} +0 -0
  81. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80tab1.rwd +11 -0
  82. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
  83. data/gui/{xa1versionwindow → tinkerbackwindows/superant.com.versionwindow}/1appname.rwd +0 -0
  84. data/gui/{za1applicationend → zzcoreguiend/tinkerapplicationguiend}/yy9rwdend.rwd +0 -0
  85. data/init.rb +6 -6
  86. data/installed/rwdviewlogo-0.4.inf +4 -0
  87. data/rwd_files/HowTo_Addresses.txt +33 -3
  88. data/rwd_files/HowTo_Tinker.txt +46 -24
  89. data/rwd_files/contacttmp.jpg +0 -0
  90. data/rwd_files/tinker.png +0 -0
  91. data/updates/AnaiIbarra.nam +1 -0
  92. metadata +103 -65
  93. data/configuration/tinkerwin2.cnf +0 -3
  94. data/gui/aa2core/aa0rwdtop.rwd +0 -4
  95. data/installed/rwdaddresses-0.93.inf +0 -13
data/Readme.txt CHANGED
@@ -1,57 +1,207 @@
1
- rwdapplications are web brower applications
1
+ = Rwd Address Book
2
2
 
3
- The GUI interface used is RubyWebDialogs
4
3
 
5
- RubyWebDialogs is a platform independent graphical user interface for Ruby applications. It generates HTML and serves it with an internal HTTP server, so you can use your favorite web browser as the front end for your Ruby application. All this means, that it can be used on almost every platform, like Ruby itself. http://www.erikveen.dds.nl/rubywebdialogs/
4
+ == How to Use the Address Book (rwdaddresses)
6
5
 
6
+ There are two ways to add records to rwdaddresses address book.
7
7
 
8
- Start the program by:
9
- changing to the directory and
10
- ruby init.rb
8
+ == Adding Records
11
9
 
12
- Then point your web browser to:
13
- http://localhost:7705/
10
+ 1. Use the "New File" tab
11
+ The first field is the most important. It is the filename that
12
+ will be created. I use the person's name with caps and no spaces
13
+ RingoStarr
14
14
 
15
- Or to the port that shows on the console or in the config.cnf file
15
+ The following lines for entry are for you to fill in as you want.
16
+ When you are finished press the CreateFile button
16
17
 
17
- Requirements:
18
- RubyWebDialogs - I am using 0.0.11 2004-3-9
19
- This package you downloaded should have a runtime version of
20
- the needed rubywebdialog files
18
+ 2. Manually add an entry for a person record
19
+ You can use a text editor to create a record
20
+ put information on separate lines. You can have as many lines as you want
21
+ name the file with caps and no spaces and end with .nam
22
+ RingoStarr.nam<
21
23
 
22
- Ruby I am using version 1.8.2
24
+ Save your file to the names/ subdirectory
25
+
23
26
 
24
- I have tested this under Linux-Debian kernel 2.6.9
27
+ This is similar to how you add a photo to the book.
25
28
 
26
- Operation:
27
- The code files reside in the code directory and are combined before
28
- the main Class is loaded
29
29
 
30
- The rwd files in gui are combined before the gui is activated
30
+ == Viewing an address book entry:
31
31
 
32
- Trouble shooting:
33
32
 
34
- untar the file
35
- tar zxvf rwdapplication-x.y.tar.gz
36
- then cd to the directory
37
- cd rwdapplication-x.y
38
- then start the init.rb program file
39
- ruby init.rb
33
+ Go to "View Contact" tab
40
34
 
35
+ Type in the name of the contact you want.
36
+
37
+ Type it as the record file is saved: (caps, no space)
38
+ StevenGibson
39
+
40
+ Then click the "Open" button
41
+
42
+ If it finds the record it will open it. It displays the record as text under the search box.
41
43
 
42
- If the program is not working, try looking at the ev subdirectory. That is where
43
- the runtime of rubywebdialogs are.
44
44
 
45
- for long term installation, I would suggest putting most files in a lib directory
46
- like /usr/lib/rwdshell
47
- then make a writable directory the local directory for command files to be written
48
- like ~/rwdshell
49
45
 
46
+ == Viewing Photo
50
47
 
51
- Closing the browser doesn't terminate the application. You have to use the application's close-button And terminating the application doesn't terminate the application when running in network mode. You just log out.
52
48
 
53
- Don't use the back-button of the browser! Strange and unpredictable things may and will happen!
49
+ Click on the ? at the top right of window
54
50
 
55
- Steven Gibson
56
- stevengibson@superant.com
57
- http://rwdapplications.rubyforge.org/
51
+
52
+ If it finds a photo for the person it will replace the window with the photo
53
+
54
+
55
+ it will look for the same name as the record with the extension .png
56
+
57
+
58
+ To return to the address book, click on back arrows at the top right.
59
+
60
+ For now you need to add photos manually.
61
+
62
+ add them to the names/ directory
63
+
64
+ == List Files
65
+
66
+ Click on "List Files"
67
+
68
+
69
+
70
+ clicking on the "ListFiles" button will list all
71
+ the files found in the names/ directory
72
+
73
+
74
+ == Add Info
75
+
76
+ For edits to records go to the contacts utilities tab
77
+ You can
78
+ Rename contacts
79
+ Delete contacts
80
+ attach photos to contacts
81
+
82
+ == Attach photo
83
+ on the Contacts Utilities tab
84
+ select the name record,
85
+ put a png photo in the /tmp directory
86
+ select the photo
87
+ click on Attach photo, it will rename the photo and copy it to the
88
+ addresses directory
89
+
90
+ == Sync for multiple computers
91
+
92
+ If you are like me, you have more than one system
93
+ I use rwdTinker at home on my Linux laptop
94
+ at work I use it on XP
95
+ on the go I use rwdtinker on my Zaurus PDA
96
+ So I am adding contact record on different machines.
97
+ There is a function to help sync the separate systems
98
+
99
+ in "Selection Panel" click on "Open Schedule Sync Window"
100
+
101
+ First you need your ftp details set in the
102
+ configuration/rwdaddresses.cnf file
103
+
104
+ you can upload your contacts from your local names directory to the ftp site
105
+ you can download contacts from the ftp site to your local updates directory
106
+ you can perform a sync which finds remote contacts and adds them to your local
107
+ names directory
108
+
109
+ == Change to using png photos instead of jpg
110
+
111
+ If you want to
112
+ Need to change one line in file rwdaddresses.cnf
113
+ Need to add nophoto.png in names
114
+
115
+ == Documents
116
+
117
+
118
+ when you click on a document name, the document should pop up in a
119
+ browser window, or in another browser tab.
120
+
121
+ == Using over a Network
122
+
123
+ To serve the application over your local LAN,change the last line in the
124
+ init.rb file to something like:
125
+ RwdTinker.file(RWDFile).serve(8080, "-r" ? ".rwduids" : nil)
126
+ Then you should be able to login at: http://yourhostname:8080
127
+
128
+ You have to authorize yourself. The .rwuids example is a string with
129
+ the name of the authorization file, relative to the home directory
130
+ of the user that started the service. This file has to be in the form of:
131
+
132
+ user1 = password
133
+ user2 = pass phrase
134
+
135
+ Thus the file .rwduids might contain:
136
+
137
+ erik = secret
138
+
139
+ == Contacts
140
+ For more information see:
141
+ http://rwdapplications.rubyforge.org/wiki/wiki.pl
142
+
143
+
144
+ For more information about RubyWebDialogs see:
145
+ http://www.erikveen.dds.nl/rubywebdialogs/index.html
146
+
147
+ Thanks, Steven Gibson
148
+
149
+ == Changelog
150
+ version 0.94
151
+ updated for rwdtinker 1.44 - refactored gui files
152
+ Changed gui directory names - more like Java package titles
153
+ added back window for sync tasks
154
+ added configuration viewing
155
+ added ftp file download for sync
156
+ added ftp file upload for sync
157
+ add update files and addresses sync compares
158
+
159
+ version 0.93
160
+ updated for rwdtinker 1.42 - semi-live updating
161
+
162
+ version 0.92
163
+ updated for rwdtinker 1.41
164
+ updated some l10n data
165
+ switched to jpg for contact photos
166
+ fixed rename for nil new name
167
+
168
+ version 0.91
169
+ updated for rwdtinker 1.4
170
+ Added configuration viewing
171
+
172
+ version 0.9
173
+ added edit commands to change contact record
174
+ Rename contacts
175
+ Delete contacts
176
+ attach photos to contacts
177
+
178
+ version 0.8
179
+ updated for version 1.23 of rwdtinker
180
+
181
+ version 0.7
182
+ changed directory structure for rwdtinker 0.9 and later
183
+ added conf file for name record directory location
184
+ split inf file for sample data
185
+ update HowTo_Addresses.html with info on serving over a LAN
186
+ improved name selection on the main screen
187
+
188
+ version 0.6
189
+ update handling of photo, when none found
190
+ reduced sizes of sample photos
191
+
192
+ version 0.5
193
+ revised to fit into rwdtinker framework
194
+
195
+ Version 0.4
196
+ Corrected photo xml
197
+ changed order of action buttons
198
+ added help-about window
199
+
200
+ Version 0.3
201
+ split code into sections - moved to code directory
202
+ added license file
203
+ split rwd gui file into sections
204
+ Photos added
205
+
206
+ Version 0.2
207
+ first public version released
File without changes
@@ -3,9 +3,10 @@
3
3
  nametext = "%s" % [@a_installapplet]
4
4
 
5
5
  begin # exception trapped block
6
- fileName = "zips/" + nametext + ".zip"
6
+ fullname = nametext + ".zip"
7
+ fileName = File.join($zipslocation,fullname)
7
8
 
8
- commandline = "unzip -o " + fileName
9
+ commandline = $unzipprogram + fileName
9
10
  system( commandline+' > temp.output' )
10
11
 
11
12
 
@@ -1,7 +1,9 @@
1
1
  # this code is to list the zipped applets that can be installed
2
- def listzipfilestoinstall
3
- fileList = Dir.new("zips").entries.sort.reverse.delete_if { |x| ! (x =~ /zip$/) }
4
- @zipslistresult = fileList.rwd_method("fillziptoinstallname")
2
+ def listzipfilestoinstall
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
5
7
  end
6
8
 
7
9
  def fillziptoinstallname(inffile)
@@ -0,0 +1,32 @@
1
+ # this method views an existing address record
2
+ def loadconfigurationrecord
3
+
4
+ require 'fileutils'
5
+ if TinkerWin2ConfigurationFileName
6
+ @a_configurationfilename = TinkerWin2ConfigurationFileName
7
+ end
8
+
9
+ begin # exception trapped block
10
+
11
+ Dir.chdir($progdir)
12
+ fileName = File.join(ConfigurationDir, TinkerWin2ConfigurationFileName)
13
+
14
+ fd = File.open(fileName,"r")
15
+ @a_configline1= fd.readline.chomp
16
+ @a_configline2 = fd.readline.chomp
17
+ @a_configline3 = fd.readline.chomp
18
+ @a_configline4 = fd.readline.chomp
19
+ @a_configline5 = fd.readline.chomp
20
+ @a_configline6 = fd.readline.chomp
21
+ @a_configline7 =fd.readline.chomp
22
+ @a_configline8 = fd.readline.chomp
23
+
24
+ while ! fd.eof?
25
+ @extraconfigdatadisplay = fd.readline
26
+ end
27
+ fd.close
28
+ rescue SystemCallError, StandardError
29
+ $stderr.print "system call error: " + $!
30
+ end # exception rescue
31
+
32
+ end
@@ -0,0 +1,13 @@
1
+ # this method clears the on screen variables
2
+ def loadconfigurationvariables
3
+
4
+ configfiletoload = File.join(ConfigurationDir,TinkerWin2ConfigurationFileName)
5
+ begin
6
+ load configfiletoload
7
+ @extraconfigdatadisplay = ""
8
+ @newconfigurationresult = "Config Variables loaded"
9
+ rescue
10
+ @extraconfigdatadisplay = ""
11
+ @newconfigurationresult = "loading error"
12
+ end
13
+ end
@@ -0,0 +1,18 @@
1
+ # this method adds a new address record
2
+ def saveconfigurationrecord
3
+ require 'fileutils'
4
+ if @a_configurationfilename
5
+ newname = "%s" % [@a_configurationfilename] # grab the filename to create
6
+ newdata =@a_configline1.to_s + "\n" + @a_configline2.to_s + "\n" + @a_configline3.to_s + "\n" + @a_configline4.to_s + "\n" + @a_configline5.to_s + "\n" + @a_configline6.to_s + "\n" + @a_configline7.to_s + "\n" + @a_configline8.to_s + "\n"
7
+
8
+ begin # exception trapped block
9
+ fileName = File.join( ConfigurationDir, newname )
10
+ fd = File.open(fileName,"w")
11
+ fd.print(newdata) # save the record info to the file
12
+ fd.close
13
+ @newconfigurationresult=newdata # show the record info in the browser
14
+ rescue SystemCallError, StandardError
15
+ $stderr.print "system call error: " + $!
16
+ end # exception rescue
17
+ end
18
+ end
@@ -0,0 +1,34 @@
1
+ def downloadrwdaddressfiles
2
+ require 'net/ftp'
3
+ BasicSocket.do_not_reverse_lookup = true
4
+ @rwdaddressesftpdisplays = ""
5
+ begin
6
+ ftp = Net::FTP::new($rwdaddresses_ftpsite)
7
+ @rwdaddressesftpdisplay = "files downloaded" + "\n"
8
+ ftp.debug_mode = false
9
+ ftp.login($rwdaddresses_ftplogin, $rwdaddresses_ftppassword)
10
+ ftp.chdir($rwdaddresses_ftpdirectory)
11
+ print "I'm in the directory ", ftp.pwd(), "\n"
12
+ schfiles = ftp.nlst($rwdaddresses_ftpdirectory)
13
+ schfiles.each do |x|
14
+ #adjust the filters to the files you want to see...
15
+ if(!test(?d,x))
16
+ if x =~ /nam/
17
+ lastslash = x.rindex('/')+1
18
+ newstring = x.slice!(lastslash..256)
19
+ localupdatefile = File.join($rwdaddresses_updatedirectory, "#{newstring}")
20
+ ftp.getbinaryfile("#{newstring}" , localupdatefile )
21
+ @rwdaddressesftpdisplay = @rwdaddressesftpdisplay + newstring + "\n"
22
+ end
23
+ end
24
+
25
+ end
26
+ ftp.close
27
+
28
+ rescue
29
+ if ftp
30
+ ftp.close
31
+ end
32
+ @rwdaddressesftpdisplay = "ftp error"
33
+ end
34
+ end
@@ -1,8 +1,10 @@
1
1
  # this code is to list the contact names
2
2
  def listnamerecordfiles
3
+ if File.exist?($addressfiles_directory)
3
4
  fileList = Dir.new($addressfiles_directory).entries.sort.delete_if { |x| ! (x =~ /nam$/) }
4
5
  @listphotosfromtmp = ""
5
6
  @listnamerecordfilesresult = fileList.rwd_method("fillcontactrecordname")
7
+ end
6
8
  end
7
9
 
8
10
  # this method is to help fill in list of names
@@ -0,0 +1,9 @@
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 runrwdaddressessyncbackwindow
7
+ @rwd_window = "rwdaddressessyncwindow"
8
+ end
9
+
@@ -0,0 +1,30 @@
1
+ def syncrwdaddressdata
2
+ require 'fileutils'
3
+ @rwdaddressessyncresult = ""
4
+ begin
5
+
6
+ @rwdaddressessyncresult = "updating local files" + "\n"
7
+ Dir.chdir($progdir)
8
+
9
+ localfileListarray = Dir.new($addressfiles_directory).entries.sort.delete_if { |tmpfile| ! (tmpfile =~ /nam$/) }
10
+ remotefileListarray = Dir.new($rwdaddresses_updatedirectory ).entries.sort.delete_if { |tmpfile| ! (tmpfile =~ /nam$/) }
11
+
12
+ tempupdatefilelistarray = remotefileListarray - localfileListarray
13
+
14
+ if tempupdatefilelistarray
15
+ tempupdatefilelistarray.each do |temp|
16
+ tmpfilenametosync = File.join($rwdaddresses_updatedirectory,temp)
17
+ tmpfilenamecopied = File.join($addressfiles_directory,temp)
18
+ FileUtils.cp( tmpfilenametosync, tmpfilenamecopied)
19
+ @rwdaddressessyncresult = @rwdaddressessyncresult + temp + "\n"
20
+
21
+ end
22
+ end
23
+
24
+
25
+ rescue
26
+
27
+
28
+ print "sync error"
29
+ end
30
+ end