bigtinker 0.96 → 0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/code/01rwdcore/02helptexthashbegin.rb +10 -0
- data/code/01rwdcore/03helptexthash.rb +18 -20
- data/code/01rwdcore/runopentinkerdocument.rb +1 -1
- data/code/superant.com.foldeditor/0uninstallapplet.rb +17 -0
- data/code/superant.com.foldeditor/changehypernotename.rb +21 -0
- data/code/superant.com.foldeditor/chooselinkfile.rb +6 -0
- data/code/superant.com.foldeditor/choosenotefile.rb +6 -0
- data/code/superant.com.foldeditor/clearnotescreen.rb +7 -0
- data/code/superant.com.foldeditor/createnewnotehtml.rb +31 -0
- data/code/superant.com.foldeditor/helptexthashload.rb +22 -0
- data/code/superant.com.foldeditor/hyperlinkcreatelinkfile.rb +19 -0
- data/code/superant.com.foldeditor/launchfoldeditorurl.rb +19 -0
- data/code/superant.com.foldeditor/listfoldeditorfiles.rb +7 -0
- data/code/{superant.com.rwdaddresses → superant.com.foldeditor}/loadconfigurationrecord.rb +4 -4
- data/code/superant.com.foldeditor/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.foldeditor/loadfolddocument.rb +18 -0
- data/code/superant.com.foldeditor/loadnextnote.rb +32 -0
- data/code/superant.com.foldeditor/loadprevnote.rb +32 -0
- data/code/superant.com.foldeditor/loadrwdfoldeditlinkfile.rb +19 -0
- data/code/superant.com.foldeditor/openhelpwindowrwdhyernote.rb +30 -0
- data/code/superant.com.foldeditor/runrwdapplet.rb +10 -0
- data/code/superant.com.foldeditor/rwddisplayfoldlinks.rb +41 -0
- data/code/{superant.com.rwdaddresses/rwdaddresseshelpabout.rb → superant.com.foldeditor/rwdtinkerversion.rb} +4 -4
- data/code/superant.com.foldeditor/saveconfigurationrecord.rb +20 -0
- data/code/superant.com.foldeditor/savefoldlinkfile.rb +20 -0
- data/code/superant.com.foldeditor/savehtmlhypernoterecord.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +30 -105
- data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +1 -3
- data/configuration/bigtinker.dist +2 -2
- data/configuration/rwdtinker.dist +3 -3
- data/configuration/rwdwfoldeditor.dist +16 -0
- data/configuration/tinkerwin2variables.dist +7 -2
- data/gui/tinkerbackwindows/superant.com.foldeditor/10appletbegin.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.foldeditor/10aviewnote.rwd +36 -0
- data/gui/tinkerbackwindows/superant.com.foldeditor/15htmlview.rwd +43 -0
- data/gui/tinkerbackwindows/superant.com.foldeditor/56viewfold.rwd +43 -0
- data/gui/tinkerbackwindows/superant.com.foldeditor/67viewconfiguration.rwd +27 -0
- data/gui/tinkerbackwindows/superant.com.foldeditor/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.refreshwindow/rwdrefresh.rwd +13 -0
- data/gui/tinkerbackwindows/superant.com.refreshwindow/rwdrefreshacpi.rwd +11 -0
- data/gui/tinkerbackwindows/{superant.com.rwdaddressessyncbackwindow/zvbackend.rwd → superant.com.slideshow/9end.rwd} +1 -1
- data/init.rb +54 -163
- data/installed/rwdwfoldeditor.inf +11 -0
- data/lang/en/rwdcore/en.po +166 -0
- data/lang/es/rwdcore/es.po +172 -0
- data/lang/fr/rwdcore/fr.po +166 -0
- data/lang/hi/rwdcore/hi.po +170 -0
- data/lang/ja/rwdcore/ja.po +168 -0
- data/lang/nl/rwdcore/nl.po +166 -0
- data/lib/rwdtinker/rwdcodedir.rb +56 -0
- data/lib/rwdtinker/rwdguidir.rb +57 -0
- data/lib/rwdtinker/rwdlangdir.rb +60 -0
- data/lib/rwdtinker/rwdtinkertools.rb +2 -1
- data/rwd_files/HowTo_BigTinker.txt +3 -0
- data/rwd_files/HowTo_FoldEditor.txt +131 -0
- data/rwd_files/HowTo_Tinker.txt +20 -6
- data/rwd_files/Tinkerhelptexthash.txt +81 -0
- data/rwd_files/default.fld +9 -0
- data/rwd_files/rubylinks.fld +6 -0
- data/rwd_files/rwdfoldeditorhelpfiles.txt +42 -0
- data/rwd_files/rwdhypernote-0.13.fld +202 -0
- data/tests/{makedist-rwdwaddesses.rb → makedist-rwdwfoldeditor.rb} +8 -4
- data/tests/makedist.rb +1 -1
- data/zips/rwdwfoldeditor-0.06.zip +0 -0
- data/zips/rwdwmovies-0.98.zip +0 -0
- data/zips/tinkerbellw-0.03.zip +0 -0
- data/zips/{wrubyslippers-1.07.zip → wrubyslippers-1.08.zip} +0 -0
- metadata +67 -83
- data/code/01rwdcore/04helptextend.rb +0 -6
- data/code/superant.com.rwdaddresses/0uninstallapplet.rb +0 -14
- data/code/superant.com.rwdaddresses/attachtmpcontactphoto.rb +0 -24
- data/code/superant.com.rwdaddresses/clearscreendisplay.rb +0 -15
- data/code/superant.com.rwdaddresses/createnewnamerecord.rb +0 -19
- data/code/superant.com.rwdaddresses/deletecontactrecord.rb +0 -25
- data/code/superant.com.rwdaddresses/deleterwdaddressesupdatefiles.rb +0 -19
- data/code/superant.com.rwdaddresses/downloadrwdaddressfiles.rb +0 -36
- data/code/superant.com.rwdaddresses/helptexthashrwdaddresses.rb +0 -69
- data/code/superant.com.rwdaddresses/listnamerecord.rb +0 -15
- data/code/superant.com.rwdaddresses/listvcardrecord.rb +0 -15
- data/code/superant.com.rwdaddresses/loadconfigurationvariables.rb +0 -15
- data/code/superant.com.rwdaddresses/loadnamerecord.rb +0 -30
- data/code/superant.com.rwdaddresses/openhelpwindowrwdaddresses.rb +0 -30
- data/code/superant.com.rwdaddresses/renamecontact.rb +0 -15
- data/code/superant.com.rwdaddresses/runaddresseswindow.rb +0 -10
- data/code/superant.com.rwdaddresses/runrwdaddressesmenu1.rb +0 -34
- data/code/superant.com.rwdaddresses/runrwdaddresssyncbackwindow.rb +0 -10
- data/code/superant.com.rwdaddresses/rwdaddressesbackwindow.rb +0 -10
- data/code/superant.com.rwdaddresses/saveconfigurationrecord.rb +0 -20
- data/code/superant.com.rwdaddresses/savevcardrecord.rb +0 -76
- data/code/superant.com.rwdaddresses/syncrwdaddress.rb +0 -28
- data/code/superant.com.rwdaddresses/test_cases.rb +0 -45
- data/code/superant.com.rwdaddresses/uploadrwdaddressfiles.rb +0 -30
- data/code/superant.com.rwdaddresses/viewaddressconfiguration.rb +0 -21
- data/code/superant.com.rwdaddresses/viewnamedata.rb +0 -28
- data/code/superant.com.rwdaddresses/viewphoto.rb +0 -4
- data/code/superant.com.rwdaddresses/viewrwdaddressesconfiguration.rb +0 -23
- data/code/superant.com.rwdaddresses/viewtmpcontactphoto.rb +0 -12
- data/code/superant.com.rwdaddresses/viewvcarddata.rb +0 -22
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +0 -61
- data/configuration/language.dist +0 -8
- data/configuration/rwdapplicationidentity.dist +0 -3
- data/configuration/rwdwaddresses.dist +0 -24
- data/gui/tinkerbackwindows/superant.com.addressesphotowindow/yy7addressesphoto.rwd +0 -6
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/1appname.rwd +0 -5
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/20downloadftp.rwd +0 -45
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/70rwddiagnostics.rwd +0 -23
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/87viewconfiguration.rwd +0 -34
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/94selectiontab.rwd +0 -11
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/95jumplink.rwd +0 -15
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/97selectionend.rwd +0 -3
- data/installed/rwdaddressesdata2.inf +0 -7
- data/installed/rwdwaddresses.inf +0 -13
- data/lang/en/rwdcore/languagefile.rb +0 -59
- data/lang/es/rwdcore/languagefile-es.rb +0 -63
- data/lang/fr/rwdcore/languagefile.rb +0 -65
- data/lang/jp/rwdcore/languagefile.rb +0 -73
- data/lang/nl/rwdcore/languagefile.rb +0 -76
- data/names/Angelina Jolie.jpg +0 -0
- data/names/Angelina Jolie.nam +0 -8
- data/names/Angelina Jolie.vcf +0 -8
- data/names/Steven Gibson.jpg +0 -0
- data/names/Steven Gibson.nam +0 -5
- data/names/elektra.jpg +0 -0
- data/names/elektra.nam +0 -7
- data/names/nophoto.jpg +0 -0
- data/rwd_files/HowTo_Addresses.txt +0 -272
- data/rwd_files/contacttmp.jpg +0 -0
- data/updates/temp.rb +0 -1
- data/zips/rwdwaddresses-1.07.zip +0 -0
- data/zips/rwdwfoldeditor-0.05.zip +0 -0
- data/zips/rwdwgutenberg-0.11.zip +0 -0
- data/zips/rwdwhypernote-0.15.zip +0 -0
- data/zips/rwdwtorrent-0.07.zip +0 -0
- /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.foldeditor}/9end.rwd +0 -0
- /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/10appletbegin.rwd +0 -0
- /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/11viewnamedata.rwd +0 -0
- /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/13listnamerecordfiles.rwd +0 -0
- /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/16editrecord.rwd +0 -0
- /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/17viewvcardrecord.rwd +0 -0
- /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/18contactutilities.rwd +0 -0
- /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/81jumplinkcommands.rwd +0 -0
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# this code is to delete update files
|
|
2
|
-
def deleterwdaddressesupdatefiles
|
|
3
|
-
# exception begin
|
|
4
|
-
begin
|
|
5
|
-
fileListarray = Dir.new($rwdaddresses_updatedirectory).entries.sort.delete_if { |x| ! (x =~ /nam$/) }
|
|
6
|
-
#loop through and get the files names
|
|
7
|
-
|
|
8
|
-
fileListarray.each do |x|
|
|
9
|
-
filetodelete = File.join($rwdaddresses_updatedirectory,x)
|
|
10
|
-
if File.exist?(filetodelete)
|
|
11
|
-
File.delete(filetodelete)
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
@rwdaddressesftpdisplay = "update files deleted"
|
|
15
|
-
rescue
|
|
16
|
-
@rwdaddressesftpdisplay = "error opening schedule update directory"
|
|
17
|
-
end # end of error function
|
|
18
|
-
end
|
|
19
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# down load address
|
|
2
|
-
def downloadrwdaddressfiles
|
|
3
|
-
require 'net/ftp'
|
|
4
|
-
BasicSocket.do_not_reverse_lookup = true
|
|
5
|
-
@rwdaddressesftpdisplays = ""
|
|
6
|
-
begin
|
|
7
|
-
ftp = Net::FTP::new($rwdaddresses_ftpsite)
|
|
8
|
-
@rwdaddressesftpdisplay = "files downloaded" + "\n"
|
|
9
|
-
ftp.debug_mode = false
|
|
10
|
-
ftp.login($rwdaddresses_ftplogin, $rwdaddresses_ftppassword)
|
|
11
|
-
ftp.chdir($rwdaddresses_ftpdirectory)
|
|
12
|
-
print "I'm in the directory ", ftp.pwd(), "\n"
|
|
13
|
-
schfiles = ftp.nlst($rwdaddresses_ftpdirectory)
|
|
14
|
-
schfiles.each do |x|
|
|
15
|
-
#adjust the filters to the files you want to see...
|
|
16
|
-
|
|
17
|
-
if x =~ /nam/
|
|
18
|
-
newstring = x
|
|
19
|
-
localupdatefile = File.join($rwdaddresses_updatedirectory, "#{x}")
|
|
20
|
-
ftp.getbinaryfile("#{x}" , localupdatefile )
|
|
21
|
-
|
|
22
|
-
@rwdaddressesftpdisplay = @rwdaddressesftpdisplay + newstring + "\n"
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
end
|
|
27
|
-
ftp.close
|
|
28
|
-
|
|
29
|
-
rescue
|
|
30
|
-
if ftp
|
|
31
|
-
ftp.close
|
|
32
|
-
end
|
|
33
|
-
@rwdaddressesftpdisplay = "ftp error"
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Helptext.update(:viewaddresses_help => " Type in the name of the contact you want.
|
|
4
|
-
|
|
5
|
-
Type it as the record file is saved or click on the list
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Then click the 'Open' button
|
|
9
|
-
|
|
10
|
-
If it finds the record it will open it. It displays the record as text under the search box.
|
|
11
|
-
",
|
|
12
|
-
|
|
13
|
-
:editcontact_help => " Use the 'Edit Contact' tab
|
|
14
|
-
this is where you can add records.
|
|
15
|
-
The first field is the filename that will be created.
|
|
16
|
-
You can use the person's name, Ringo Starr
|
|
17
|
-
|
|
18
|
-
The following lines for entry are for you to fill in as you want.
|
|
19
|
-
|
|
20
|
-
When you are finished press the Save Changes button
|
|
21
|
-
|
|
22
|
-
You use this same screen for editing an already saved event
|
|
23
|
-
|
|
24
|
-
For the 'Fill Record' button to work, you need to select an existing record on 'view contact' tab
|
|
25
|
-
",
|
|
26
|
-
:contactutilities_help => "
|
|
27
|
-
on the Contacts Utilities tab you can
|
|
28
|
-
rename records
|
|
29
|
-
delete records
|
|
30
|
-
or attach photos
|
|
31
|
-
|
|
32
|
-
select the name record,
|
|
33
|
-
put a jpg photo in the /tmp directory
|
|
34
|
-
select the photo
|
|
35
|
-
click on Attach photo, it will rename the photo and copy it to the
|
|
36
|
-
addresses directory",
|
|
37
|
-
|
|
38
|
-
:rwdaddresses_configuration => " click on 'Edit Configuration'
|
|
39
|
-
You can view the configuration file
|
|
40
|
-
|
|
41
|
-
You can edit the configuration
|
|
42
|
-
|
|
43
|
-
Remember to reload the configuration variables if you want your
|
|
44
|
-
changes used.",
|
|
45
|
-
:rwdaddresses_sync => "Sync for multiple computers
|
|
46
|
-
|
|
47
|
-
If you are like me, you have more than one system
|
|
48
|
-
I use rwdTinker at home on my Linux laptop
|
|
49
|
-
at work I use it on XP
|
|
50
|
-
on the go I use rwdtinker on my Zaurus PDA
|
|
51
|
-
So I am adding contacts on different machines.
|
|
52
|
-
There is a function to help sync the separate systems
|
|
53
|
-
|
|
54
|
-
in 'Selection Panel' click on 'Open Addresses Sync Window'
|
|
55
|
-
|
|
56
|
-
First you need your ftp details set in the
|
|
57
|
-
configuration/rwdaddresses.cnf file
|
|
58
|
-
|
|
59
|
-
you can upload your events from your local names directory to the ftp site
|
|
60
|
-
you can download contacts from the ftp site to your local updates directory
|
|
61
|
-
you can perform a sync which finds remote contacts and adds them to your local
|
|
62
|
-
names directory
|
|
63
|
-
|
|
64
|
-
There is a button to delete the update directory when finished"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
)
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# this code is to list the contact names
|
|
2
|
-
def listnamerecordfiles
|
|
3
|
-
if File.exist?($addressfiles_directory)
|
|
4
|
-
fileList = Dir.new($addressfiles_directory).entries.sort.delete_if { |x| ! (x =~ /nam$/) }
|
|
5
|
-
@listphotosfromtmp = ""
|
|
6
|
-
@listnamerecordfilesresult = fileList.rwd_method("fillcontactrecordname")
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
# this method is to help fill in list of names
|
|
11
|
-
def fillcontactrecordname(inffile)
|
|
12
|
-
applet = inffile.gsub(/\.nam$/, "")
|
|
13
|
-
@a_viewnamedata = applet
|
|
14
|
-
end
|
|
15
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# this code is to list the vcard names
|
|
2
|
-
def listvcardrecordfiles
|
|
3
|
-
if File.exist?($addressfiles_directory)
|
|
4
|
-
fileList = Dir.new($addressfiles_directory).entries.sort.delete_if { |x| ! (x =~ /vcf$/) }
|
|
5
|
-
|
|
6
|
-
@listvcardrecordfilesresult = fileList.rwd_method("fillvcardrecordname")
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
# this method is to help fill in list of names
|
|
11
|
-
def fillvcardrecordname(inffile)
|
|
12
|
-
applet = inffile.gsub(/\.vcf$/, "")
|
|
13
|
-
@a_viewvcarddata = applet
|
|
14
|
-
end
|
|
15
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# this method loads the on screen variables into the running class
|
|
2
|
-
def loadrwdaddressesconfigurationvariables
|
|
3
|
-
|
|
4
|
-
tempfilename = "rwdwaddresses.cnf"
|
|
5
|
-
configfiletoload = File.join( ConfigurationDir , tempfilename )
|
|
6
|
-
begin
|
|
7
|
-
load configfiletoload
|
|
8
|
-
@extraadconfigdatadisplay = ""
|
|
9
|
-
@newadconfigurationresult = "Config Variables loaded"
|
|
10
|
-
rescue
|
|
11
|
-
@extraadconfigdatadisplay = ""
|
|
12
|
-
@newadconfigurationresult = "loading error"
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# this method views an existing address record
|
|
2
|
-
def loadnamerecord
|
|
3
|
-
|
|
4
|
-
require 'fileutils'
|
|
5
|
-
@a_filename = $currentnametext
|
|
6
|
-
|
|
7
|
-
begin # exception trapped block
|
|
8
|
-
|
|
9
|
-
fileName = $addressfiles_directory + "/" + $currentnametext + ".nam"
|
|
10
|
-
|
|
11
|
-
fd = File.open(fileName,"r")
|
|
12
|
-
@a_name = fd.readline.chomp
|
|
13
|
-
@a_address = fd.readline.chomp
|
|
14
|
-
@a_citystatezip = fd.readline.chomp
|
|
15
|
-
@a_phone = fd.readline.chomp
|
|
16
|
-
@a_email = fd.readline.chomp
|
|
17
|
-
@a_comment1 = fd.readline.chomp
|
|
18
|
-
@a_comment2 =fd.readline.chomp
|
|
19
|
-
@a_comment3 = fd.readline.chomp
|
|
20
|
-
|
|
21
|
-
while ! fd.eof?
|
|
22
|
-
@extranamedatadisplay = fd.readline
|
|
23
|
-
end
|
|
24
|
-
fd.close
|
|
25
|
-
rescue SystemCallError, StandardError
|
|
26
|
-
$stderr.print "system call error: " + $!
|
|
27
|
-
end # exception rescue
|
|
28
|
-
|
|
29
|
-
end
|
|
30
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# this code is to call the help window
|
|
2
|
-
def runhelpwindowrwdaddresses
|
|
3
|
-
|
|
4
|
-
$help_topic = "viewaddresses_help"
|
|
5
|
-
if @rwd_tab == "Viewnamedata"
|
|
6
|
-
$help_topic = "viewaddresses_help"
|
|
7
|
-
end
|
|
8
|
-
if @rwd_tab == "viewaddressesconfiguration"
|
|
9
|
-
$help_topic = "rwdaddresses_configuration"
|
|
10
|
-
end
|
|
11
|
-
if @rwd_tab == "editnamerecordfile"
|
|
12
|
-
$help_topic = "editcontact_help"
|
|
13
|
-
end
|
|
14
|
-
if @rwd_tab == "contactutilitiesrwdaddresses"
|
|
15
|
-
$help_topic = "contactutilities_help"
|
|
16
|
-
end
|
|
17
|
-
if @rwd_tab == "rwdaddressessynctasks"
|
|
18
|
-
$help_topic = "rwdaddresses_sync"
|
|
19
|
-
end
|
|
20
|
-
$helptopicsarray = $helptopicsarray | ["viewaddresses_help","editcontact_help","rwdaddresses_configuration","rwdaddresses_sync"]
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if @rwd_window != "rwdtinkerhelpwindow"
|
|
24
|
-
$previouswindow = @rwd_window
|
|
25
|
-
$previoustab = @rwd_tab
|
|
26
|
-
end
|
|
27
|
-
runhelpwindow
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# this code is to change the contact name
|
|
2
|
-
def changenamedata
|
|
3
|
-
oldName = $addressfiles_directory + "/" + @a_viewnamedata + ".nam"
|
|
4
|
-
if ! @a_changenamedata.empty?
|
|
5
|
-
|
|
6
|
-
newName = $addressfiles_directory + "/" + @a_changenamedata + ".nam"
|
|
7
|
-
File.rename(oldName, newName)
|
|
8
|
-
oldphotoName = $addressfiles_directory + "/" + @a_viewnamedata + ".jpg"
|
|
9
|
-
newphotoName = $addressfiles_directory + "/" + @a_changenamedata + ".jpg"
|
|
10
|
-
if File.exist?(oldphotoName)
|
|
11
|
-
File.rename(oldphotoName, newphotoName)
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Application RwdAddresses orginally (c) 2004 Steven Gibson under GPL.
|
|
2
|
-
# This application is a contact book
|
|
3
|
-
# For information see http://www.rubyforge.net/projects/rwdapplications
|
|
4
|
-
|
|
5
|
-
# call the window
|
|
6
|
-
def runrwdaddresseswindow
|
|
7
|
-
@rwd_window = "rwdaddresseswindow"
|
|
8
|
-
@rwd_tab = "Viewnamedata"
|
|
9
|
-
end
|
|
10
|
-
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Application RwdAddresses orginally (c) 2004 Steven Gibson under GPL.
|
|
2
|
-
#
|
|
3
|
-
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
|
4
|
-
|
|
5
|
-
# call the window
|
|
6
|
-
def runrwdaddressesmenu1
|
|
7
|
-
@rwd_window = "rwdaddresseswindow"
|
|
8
|
-
@rwd_tab = "Viewnamedata"
|
|
9
|
-
end
|
|
10
|
-
def runrwdaddressesmenu2
|
|
11
|
-
@rwd_window = "rwdaddresseswindow"
|
|
12
|
-
@rwd_tab = "editnamerecordfile"
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def runrwdaddressesmenu3
|
|
17
|
-
@rwd_window = "rwdaddresseswindow"
|
|
18
|
-
@rwd_tab = "contactutilitiesrwdaddresses"
|
|
19
|
-
end
|
|
20
|
-
def runrwdaddressesmenu4
|
|
21
|
-
@rwd_window = "rwdaddressessyncwindow"
|
|
22
|
-
@rwd_tab = "rwdaddressessynctasks"
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def runrwdaddressesmenu10
|
|
26
|
-
@rwd_window = "rwdaddressessyncwindow"
|
|
27
|
-
@rwd_tab = "viewaddressesconfiguration"
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def runrwdaddressesmenu11
|
|
31
|
-
@rwd_window = "rwdaddresseswindow"
|
|
32
|
-
@rwd_tab = "documentsrwdtinkerone"
|
|
33
|
-
end
|
|
34
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Application RwdAddresses orginally (c) 2004 Steven Gibson under GPL.
|
|
2
|
-
# This application is a contact book
|
|
3
|
-
# For information see http://www.rubyforge.net/projects/rwdapplications
|
|
4
|
-
|
|
5
|
-
# call the window
|
|
6
|
-
def runrwdaddressessyncbackwindow
|
|
7
|
-
@rwd_window = "rwdaddressessyncwindow"
|
|
8
|
-
@rwd_tab = "rwdaddressessynctasks"
|
|
9
|
-
end
|
|
10
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Application RwdAddresses orginally (c) 2004 Steven Gibson under GPL.
|
|
2
|
-
# This application is a contact book
|
|
3
|
-
# For information see http://www.rubyforge.net/projects/rwdapplications
|
|
4
|
-
|
|
5
|
-
# call the window
|
|
6
|
-
def runrwdaddressesbackwindow
|
|
7
|
-
@rwd_window = "rwdaddressessyncwindow"
|
|
8
|
-
@rwd_tab="rwdaddressessynctasks"
|
|
9
|
-
end
|
|
10
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# this method adds a new address record
|
|
2
|
-
def saverwdaddressesconfiguration
|
|
3
|
-
require 'fileutils'
|
|
4
|
-
|
|
5
|
-
newname = "rwdwaddresses.cnf" # grab the filename to create
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
newdata = @a_adconfigurationfile
|
|
9
|
-
|
|
10
|
-
begin # exception trapped block
|
|
11
|
-
fileName = File.join( ConfigurationDir, newname )
|
|
12
|
-
fd = File.open(fileName,"w")
|
|
13
|
-
fd.print(newdata) # save the record info to the file
|
|
14
|
-
fd.close
|
|
15
|
-
@newconfigurationresult=newdata # show the record info in the browser
|
|
16
|
-
rescue SystemCallError, StandardError
|
|
17
|
-
$stderr.print "system call error: " + $!
|
|
18
|
-
end # exception rescue
|
|
19
|
-
|
|
20
|
-
end
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# this method adds a new record
|
|
2
|
-
def savevcardrecord
|
|
3
|
-
Dir.chdir($progdir)
|
|
4
|
-
require 'fileutils'
|
|
5
|
-
require 'extras/vpim/maker/vcard'
|
|
6
|
-
if ! @a_filename.empty?
|
|
7
|
-
newname = "%s" % [@a_filename] # grab the new filename to create
|
|
8
|
-
|
|
9
|
-
fullnewname = newname + ".vcf"
|
|
10
|
-
if ! @a_name.empty?
|
|
11
|
-
contactnameText = @a_name.to_s
|
|
12
|
-
else
|
|
13
|
-
contactnameText = @a_filename.to_s
|
|
14
|
-
end
|
|
15
|
-
card = Vpim::Maker::Vcard.make(contactnameText) do |card|
|
|
16
|
-
card.add_name do |name|
|
|
17
|
-
name.family = contactnameText
|
|
18
|
-
|
|
19
|
-
end
|
|
20
|
-
if ! @a_address.empty?
|
|
21
|
-
addressText = @a_address.to_s
|
|
22
|
-
else
|
|
23
|
-
addressText = " "
|
|
24
|
-
end
|
|
25
|
-
if ! @a_citystatezip.empty?
|
|
26
|
-
localityText = @a_citystatezip.to_s
|
|
27
|
-
else
|
|
28
|
-
localityText = " "
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
card.add_addr do |addr|
|
|
32
|
-
addr.preferred = true
|
|
33
|
-
addr.location = 'home'
|
|
34
|
-
addr.street = addressText
|
|
35
|
-
addr.locality = localityText
|
|
36
|
-
addr.country = 'rwdaddress'
|
|
37
|
-
end
|
|
38
|
-
if ! @a_phone.empty?
|
|
39
|
-
phoneText = @a_phone.to_s
|
|
40
|
-
else
|
|
41
|
-
phoneText = " "
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
card.add_tel(phoneText) do |tel|
|
|
46
|
-
tel.location = 'home'
|
|
47
|
-
|
|
48
|
-
end
|
|
49
|
-
if ! @a_email.empty?
|
|
50
|
-
emailText = @a_email.to_s
|
|
51
|
-
else
|
|
52
|
-
emailText = " "
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
card.add_email(emailText) { |e| e.location = 'home' }
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
end # end of vcard creation
|
|
61
|
-
|
|
62
|
-
end
|
|
63
|
-
vCardString = card.to_s
|
|
64
|
-
p vCardString
|
|
65
|
-
|
|
66
|
-
begin # exception trapped block
|
|
67
|
-
fileName = File.join($addressfiles_directory, fullnewname )
|
|
68
|
-
fd = File.open(fileName,"w")
|
|
69
|
-
fd.print( vCardString ) # save the record info to the file
|
|
70
|
-
fd.close
|
|
71
|
-
@createnewnamerecorddisplay= vCardString # show the record info in the browser
|
|
72
|
-
rescue SystemCallError, StandardError
|
|
73
|
-
$stderr.print "system call error: " + $!
|
|
74
|
-
end # exception rescue
|
|
75
|
-
|
|
76
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
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
|
-
print "sync error"
|
|
27
|
-
end
|
|
28
|
-
end
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# test harness
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
require 'test/unit/testcase'
|
|
5
|
-
require 'test/unit/assertions'
|
|
6
|
-
|
|
7
|
-
def rwdaddresses_all_tests
|
|
8
|
-
print "in rwdaddresses all tests\n"
|
|
9
|
-
$testrwdaddressestestcase = TestSuite.new
|
|
10
|
-
test_runrwdaddresses
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def test_runrwdaddresses
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
begin
|
|
17
|
-
testasserts = 0
|
|
18
|
-
print "Starting rwdaddresses tests!\n"
|
|
19
|
-
runselectiontab
|
|
20
|
-
assert_equal("selectiontab",@rwd_tab) ; testasserts += 1
|
|
21
|
-
runrwdaddressesmenu10
|
|
22
|
-
assert_equal("viewaddressesconfiguration",@rwd_tab) ; testasserts += 1
|
|
23
|
-
loadrwdaddressesconfiguration
|
|
24
|
-
assert_equal("rwdaddresses.cnf",@a_adconfigurationfilename) ; testasserts += 1
|
|
25
|
-
|
|
26
|
-
$stderr.print "tests completed succesfully!\n"
|
|
27
|
-
$stderr.print testasserts, " asserts performed\n"
|
|
28
|
-
|
|
29
|
-
rescue NotImplementedError, Exception
|
|
30
|
-
$stderr.print $!
|
|
31
|
-
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def teststobedown
|
|
39
|
-
runtinkerhelpabout
|
|
40
|
-
assert_equal("rwdtinkerhelpwindow",@rwd_tab) ; testasserts += 1
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
def uploadrwdaddressfiles
|
|
2
|
-
require 'net/ftp'
|
|
3
|
-
BasicSocket.do_not_reverse_lookup = true
|
|
4
|
-
@rwdaddressftpdisplays = ""
|
|
5
|
-
begin
|
|
6
|
-
ftp = Net::FTP::new($rwdaddresses_ftpsite)
|
|
7
|
-
@rwdaddressesftpdisplay = "files uploaded" + "\n"
|
|
8
|
-
|
|
9
|
-
fileListarray = Dir.new($addressfiles_directory).entries.sort.delete_if { |tmpfile| ! (tmpfile =~ /nam$/) }
|
|
10
|
-
if fileListarray
|
|
11
|
-
ftp.debug_mode = false
|
|
12
|
-
ftp.login($rwdaddresses_ftplogin, $rwdaddresses_ftppassword)
|
|
13
|
-
ftp.chdir($rwdaddresses_ftpdirectory)
|
|
14
|
-
print "I'm in the directory ", ftp.pwd(), "\n"
|
|
15
|
-
fileListarray.each do |temp|
|
|
16
|
-
tmpfilenametoupload = File.join($addressfiles_directory,temp)
|
|
17
|
-
ftp.puttextfile(tmpfilenametoupload , temp)
|
|
18
|
-
@rwdaddressesftpdisplay = @rwdaddressesftpdisplay + temp + "\n"
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
ftp.close
|
|
22
|
-
|
|
23
|
-
rescue
|
|
24
|
-
|
|
25
|
-
if ftp
|
|
26
|
-
ftp.close
|
|
27
|
-
end
|
|
28
|
-
print "ftp error"
|
|
29
|
-
end
|
|
30
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
def viewaddressesconfiguration
|
|
2
|
-
require 'fileutils'
|
|
3
|
-
begin # exception trapped block
|
|
4
|
-
|
|
5
|
-
Dir.chdir($progdir)
|
|
6
|
-
rwdaddrssesconfigurationfile = File.join( "configuration", "rwdaddresses.cnf" )
|
|
7
|
-
if File.exist?(rwdaddrssesconfigurationfile)
|
|
8
|
-
fd = File.open(rwdaddrssesconfigurationfile,"r")
|
|
9
|
-
@rwdaddressesconfigurationtext = " "
|
|
10
|
-
while ! fd.eof?
|
|
11
|
-
@rwdaddressesconfigurationtext = fd.read
|
|
12
|
-
end
|
|
13
|
-
fd.close
|
|
14
|
-
else
|
|
15
|
-
@rwdaddressesconfigurationtext = "File error"
|
|
16
|
-
end
|
|
17
|
-
rescue SystemCallError, StandardError
|
|
18
|
-
$stderr.print "system call error: " + $!
|
|
19
|
-
@rwdaddressesconfigurationtext = "File error"
|
|
20
|
-
end # exception rescue
|
|
21
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#view name
|
|
2
|
-
def viewnamedata
|
|
3
|
-
require 'fileutils'
|
|
4
|
-
$currentnametext = "%s" % [@a_viewnamedata]
|
|
5
|
-
photoname = $currentnametext + ".jpg"
|
|
6
|
-
begin # exception trapped block
|
|
7
|
-
path_to = File.join( "rwd_files", "contacttmp.jpg" )
|
|
8
|
-
path_from = File.join($addressfiles_directory, photoname )
|
|
9
|
-
if ! File.exist?(path_from)
|
|
10
|
-
path_from = File.join($addressfiles_directory,"nophoto.jpg" )
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
Dir.chdir($progdir)
|
|
14
|
-
FileUtils.cp(path_from, path_to)
|
|
15
|
-
sleep $photodelay
|
|
16
|
-
fileName = $addressfiles_directory + "/" + $currentnametext + ".nam"
|
|
17
|
-
|
|
18
|
-
fd = File.open(fileName,"r")
|
|
19
|
-
@viewnamedatadisplay = " "
|
|
20
|
-
while ! fd.eof?
|
|
21
|
-
@viewnamedatadisplay = fd.read
|
|
22
|
-
end
|
|
23
|
-
fd.close
|
|
24
|
-
rescue SystemCallError, StandardError
|
|
25
|
-
$stderr.print "system call error: " + $!
|
|
26
|
-
end # exception rescue
|
|
27
|
-
|
|
28
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#view configuration
|
|
2
|
-
def viewrwdaddressesconfiguration
|
|
3
|
-
require 'fileutils'
|
|
4
|
-
begin # exception trapped block
|
|
5
|
-
|
|
6
|
-
Dir.chdir($progdir)
|
|
7
|
-
rwdaddressesconfigurationfile = File.join( "configuration", "rwdaddresses.cnf" )
|
|
8
|
-
if File.exist?(rwdaddressesconfigurationfile)
|
|
9
|
-
fd = File.open(rwdaddressesconfigurationfile,"r")
|
|
10
|
-
@rwdaddressesconfigurationtext = " "
|
|
11
|
-
while ! fd.eof?
|
|
12
|
-
@rwdaddressesconfigurationtext = fd.read
|
|
13
|
-
end
|
|
14
|
-
fd.close
|
|
15
|
-
else
|
|
16
|
-
@rwdaddressesconfigurationtext = "File error"
|
|
17
|
-
end
|
|
18
|
-
rescue SystemCallError, StandardError
|
|
19
|
-
$stderr.print "system call error: " + $!
|
|
20
|
-
@rwdaddressesconfigurationtext = "File error"
|
|
21
|
-
end # exception rescue
|
|
22
|
-
end
|
|
23
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# this code is to list the photo names
|
|
2
|
-
def viewtmpcontactphoto
|
|
3
|
-
fileList = Dir.new($tmpphoto_directory).entries.sort.delete_if { |x| ! (x =~ /jpg$/) }
|
|
4
|
-
@listnamerecordfilesresult = ""
|
|
5
|
-
@listphotosfromtmp = fileList.rwd_method("filltmpcontactphoto")
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def filltmpcontactphoto(inffile)
|
|
9
|
-
applet = inffile.gsub(/\.nam$/, "")
|
|
10
|
-
@a_tmpphotoname = applet
|
|
11
|
-
end
|
|
12
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#view name
|
|
2
|
-
def viewvcarddata
|
|
3
|
-
require 'fileutils'
|
|
4
|
-
$currentnametext = "%s" % [@a_viewvcarddata]
|
|
5
|
-
|
|
6
|
-
begin # exception trapped block
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fileName = $addressfiles_directory + "/" + $currentnametext + ".vcf"
|
|
11
|
-
|
|
12
|
-
fd = File.open(fileName,"r")
|
|
13
|
-
@viewvcarddatadisplay = " "
|
|
14
|
-
while ! fd.eof?
|
|
15
|
-
@viewvcarddatadisplay = fd.read
|
|
16
|
-
end
|
|
17
|
-
fd.close
|
|
18
|
-
rescue SystemCallError, StandardError
|
|
19
|
-
$stderr.print "system call error: " + $!
|
|
20
|
-
end # exception rescue
|
|
21
|
-
|
|
22
|
-
end
|