rwdfoldeditor 0.05 → 0.07

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. data/code/01rwdcore/01rwdcore.rb +5 -4
  2. data/code/01rwdcore/02helptexthashbegin.rb +14 -2
  3. data/code/01rwdcore/03helptexthash.rb +18 -20
  4. data/code/01rwdcore/jumplinkcommand.rb +1 -0
  5. data/code/01rwdcore/openhelpwindow.rb +7 -0
  6. data/code/01rwdcore/runhelpabout.rb +6 -1
  7. data/code/01rwdcore/runopentinkerdocument.rb +1 -1
  8. data/code/01rwdcore/selectiontab.rb +2 -0
  9. data/code/01rwdcore/setuphelpaboutoptions.rb +2 -0
  10. data/code/01rwdcore/setuptinkerdocuments.rb +1 -0
  11. data/code/01rwdcore/uploadreturns.rb +3 -0
  12. data/code/dd0viewphoto/dd0viewphoto.rb +2 -0
  13. data/code/superant.com.foldeditor/0uninstallapplet.rb +8 -1
  14. data/code/superant.com.foldeditor/addzipfiles.rb +45 -0
  15. data/code/superant.com.foldeditor/helptexthashload.rb +22 -0
  16. data/code/superant.com.foldeditor/launchfoldeditorurl.rb +5 -3
  17. data/code/superant.com.foldeditor/openhelpwindowrwdhyernote.rb +6 -2
  18. data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +30 -102
  19. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +2 -0
  20. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +2 -0
  21. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +3 -1
  22. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +2 -0
  23. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +3 -1
  24. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +1 -0
  25. data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +8 -5
  26. data/code/zz0applicationend/zz0end.rb +2 -1
  27. data/configuration/rwdtinker.dist +3 -2
  28. data/configuration/rwdwfoldeditor.dist +7 -5
  29. data/configuration/tinkerwin2variables.dist +5 -9
  30. data/gui/tinkerbackwindows/superant.com.foldeditor/60zipfoldfiles.rwd +31 -0
  31. data/gui/tinkerbackwindows/superant.com.slideshow/10appletbegin.rwd +4 -0
  32. data/gui/tinkerbackwindows/superant.com.slideshow/11viewnamedata.rwd +19 -0
  33. data/gui/tinkerbackwindows/superant.com.slideshow/13listnamerecordfiles.rwd +21 -0
  34. data/gui/tinkerbackwindows/superant.com.slideshow/16editrecord.rwd +39 -0
  35. data/gui/tinkerbackwindows/superant.com.slideshow/17viewvcardrecord.rwd +32 -0
  36. data/gui/tinkerbackwindows/superant.com.slideshow/18contactutilities.rwd +34 -0
  37. data/gui/tinkerbackwindows/superant.com.slideshow/81jumplinkcommands.rwd +17 -0
  38. data/gui/tinkerbackwindows/{superant.com.foldwords/z9end.rwd → superant.com.slideshow/9end.rwd} +0 -0
  39. data/init.rb +61 -164
  40. data/installed/rwdwfoldeditor.inf +3 -8
  41. data/lang/en/rwdcore/en.po +182 -0
  42. data/lang/en/rwdfoldeditor/en.po +28 -0
  43. data/lang/es/rwdcore/es.po +175 -0
  44. data/lang/fr/rwdcore/fr.po +169 -0
  45. data/lang/hi/rwdcore/hi.po +173 -0
  46. data/lang/ja/rwdcore/ja.po +171 -0
  47. data/lang/nl/rwdcore/nl.po +169 -0
  48. data/lib/rwdtinker/rwdcodedir.rb +56 -0
  49. data/lib/rwdtinker/rwdguidir.rb +57 -0
  50. data/lib/rwdtinker/rwdlangdir.rb +60 -0
  51. data/lib/rwdtinker/rwdtinkertools.rb +2 -1
  52. data/rwd_files/HowTo_FoldEditor.txt +9 -0
  53. data/rwd_files/HowTo_Tinker.txt +24 -6
  54. data/rwd_files/Tinkerhelptexthash.txt +82 -0
  55. data/rwd_files/rubylinks.fld +6 -0
  56. data/rwd_files/rwdapplications.html +23 -1
  57. data/rwd_files/rwdfoldeditorhelpfiles.txt +17 -0
  58. data/tests/makedist-rwdwfoldeditor.rb +1 -1
  59. data/tests/makedist.rb +1 -1
  60. data/zips/rwdwfoldeditor-0.07.zip +0 -0
  61. data/zips/rwdwmovies-0.98.zip +0 -0
  62. data/zips/rwdwmpd-0.07.zip +0 -0
  63. data/zips/temp.rb +1 -0
  64. data/zips/tinkerbellw-0.03.zip +0 -0
  65. data/zips/{wrubyslippers-1.07.zip → wrubyslippers-1.08.zip} +0 -0
  66. metadata +33 -29
  67. data/code/01rwdcore/04helptextend.rb +0 -6
  68. data/code/superant.com.foldback/clearhttpview3.rb +0 -9
  69. data/code/superant.com.foldback/dictlookup.rb +0 -20
  70. data/code/superant.com.foldback/eliza.rb +0 -8
  71. data/code/superant.com.foldback/helptexthashrwdhypernote.rb +0 -19
  72. data/code/superant.com.foldback/listwordlookup.rb +0 -37
  73. data/code/superant.com.foldback/openhelpwindowrwdhyernote.rb +0 -13
  74. data/code/superant.com.foldback/runrwdshellwindow.rb +0 -12
  75. data/code/superant.com.foldeditor/helptexthashrwdhypernote.rb +0 -38
  76. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +0 -61
  77. data/gui/tinkerbackwindows/superant.com.foldwords/1appname.rwd +0 -4
  78. data/gui/tinkerbackwindows/superant.com.foldwords/1dictionary.rwd +0 -19
  79. data/gui/tinkerbackwindows/superant.com.foldwords/3ai.rwd +0 -22
  80. data/gui/tinkerbackwindows/superant.com.foldwords/4thesaurus.rwd +0 -36
  81. data/gui/tinkerbackwindows/superant.com.foldwords/77jumplinkcommands.rwd +0 -17
  82. data/lang/en/rwdcore/languagefile.rb +0 -59
  83. data/lang/es/rwdcore/languagefile-es.rb +0 -63
  84. data/lang/fr/rwdcore/languagefile.rb +0 -65
  85. data/lang/jp/rwdcore/languagefile.rb +0 -73
  86. data/lang/nl/rwdcore/languagefile.rb +0 -76
  87. data/lib/dict.rb +0 -438
  88. data/lib/oothesaurus.rb +0 -76
  89. data/zips/rwdwgutenberg-0.11.zip +0 -0
  90. data/zips/rwdwhypernote-0.15.zip +0 -0
@@ -1,36 +0,0 @@
1
- $rwdguivar=
2
- "
3
- <tab name=\"superantcomthesaurus\" caption=\"Thesaurus View\">
4
-
5
- <table>
6
-
7
- <table>
8
- <row> <p align=\"right\">Word:</p> <text name=\"a_thesaurusinput\"/> </row>
9
-
10
-
11
-
12
- <row> <p> </row>
13
-
14
- </table>
15
- <horizontal>
16
- <button caption=\"Display word results\" action=\"listwordresults\"/>
17
-
18
- <button caption=\"Clear file list\" action=\"clearthesaurus\"/>
19
-
20
- <button caption=\"Help\" action=\"runhelpwindowrwdthesaurus\"/>
21
-
22
- </horizontal>
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
- <table>
32
- <p>%%a_thesaurusdata%%</p>
33
-
34
-
35
- </table>
36
- </tab>"
@@ -1,17 +0,0 @@
1
- $rwdguivar=
2
- "
3
- <tab name=RwdwordsMenu caption=Menu>
4
- <horizontal>
5
- <button caption=\"Show Jump Links\" action=\"showjumplinkoptions\"/>
6
-
7
- </horizontal>
8
- <table>
9
- <select name=\"a_jumplinkinput\"> %%jumplinkoptions%% </select>
10
-
11
- </table>
12
-
13
- <horizontal>
14
- <button caption=\"Jump to Application Location\" action=\"runjumplinkcommand\"/>
15
- </horizontal>
16
- </tab>
17
- "
@@ -1,59 +0,0 @@
1
- # English Language files for RwdTinker core
2
-
3
- :applet_installed => '"applet installed!"',
4
- :application_version => '"Application Version"',
5
- :clear => "Clear",
6
- :cancel => "Cancel",
7
- :clickfor_version => "Click for Version" ,
8
- :clickbelowtoviewlistof_zip => '"click below to view lists of zips"',
9
- :documents => '"Documents"',
10
- :edit => "edit" ,
11
- :file_name => '"File Name:"',
12
- :fill_record => '"Fill Record"',
13
- :help => '"Help"',
14
- :help_about => '"Help About"',
15
- :install_applet => '"install (rwdtinker) applet"',
16
- :jumptoapplication_location => '"Jump to Application Location"',
17
- :list_applets => '"Remove Applets"',
18
- :listappletsinthegem_directory => '"List applets in the Gem Directory"',
19
- :listappletsavailablefor_installation => "List applets available for installation",
20
- :list_files => '"List Files"',
21
- :list_installed_gems => '"List installed Gems"' ,
22
- :list_photos => '"List Photos"',
23
- :list_zips => '"List Zips"',
24
- :listzipdirappletsavailable => '"List (zip directory) applets available for installation"',
25
- :menu_panel => '"Menu Panel"',
26
- :module_unknown => '"Unknown Module"',
27
- :next => '"Next"',
28
- :open => "Open",
29
- :open_document => '"Open Document"',
30
- :openselectedhelp_about => '"Open selected help about"',
31
- :reload_variables => '"Reload Variables"' ,
32
- :remove_applet => '"remove applet"',
33
- :return => "Return",
34
- :rwdtinker_window_2 => "RwdTinker Window 2",
35
- :rwdtinker => "RwdTinker",
36
- :rwdtinker_back_window => '"RwdTinker Back Window"',
37
- :rwdtinker_help => '"RwdTinker Help"',
38
- :rwdtinker_help_window => '"RwdTinker Help Window"',
39
- :showjump_links => '"Show Jump Links"',
40
- :showdocument_list => '"Show Document List"',
41
- :showhelpabout_links => '"Show Help About Links"',
42
-
43
- :save => "Save" ,
44
- :save_changes => '"Save Changes"',
45
- :selection_panel => '"Menu Panel"',
46
- :selection_tab => '"Menu Tab"',
47
- :tinker_logo => "Tinker Logo",
48
- :tinkerback_window => '"Tinker Back Window"',
49
- :viewapplet_contents => '"View Applet Contents"',
50
- :viewalreadyinstalled_applications => '"View already installed GEM applications"',
51
- :viewinstalled_text => '"View Install Text"',
52
- :view_platform => '"view platform"',
53
- :viewplatform_information => '"View Platform Information"',
54
- :viewlogger_information => '"View Logger Information"',
55
- :view_event => '"View event"',
56
- :viewinstall_text => '"View Install Text"' ,
57
- :viewlistinstall_files => '"View List of Installed Files"',
58
- :view_photo => '"View Photo"',
59
- :window => "Window" ,
@@ -1,63 +0,0 @@
1
- # Spanish Language files for RwdTinker core
2
-
3
- :applet_installed => '"applet instalado!"',
4
- :application_version => '"Application Version"',
5
- :clear => "Clear",
6
- :cancel => "Cancelaci�n",
7
- :clickfor_version => '"click para version"' ,
8
- :clickbelowtoviewlistof_zip => '"click abajo a ver lista de zips"',
9
- :documents => '"Documentos"',
10
- :edit => "Editar" ,
11
- :file_name => '"Fila Nombre:"',
12
- :fill_record => '"Fill Record"',
13
- :help => '"Ayuda"',
14
- :help_about => '"Ayuda sobre"',
15
- :install_applet => '"instale (rwdtinker) applet"',
16
- :jumptoapplication_location => '"Jump to Application Location"',
17
- :list_applets => '"List Applets"',
18
- :listappletsavailablefor_installation => "List applets available for installation",
19
- :listappletsinthegem_directory => '"List applets in the Gem Directory"',
20
-
21
- :list_files => '"Lista de Archivos"',
22
- :list_installed_gems => '"Lista de Instalado Gems"' ,
23
- :list_photos => '"Lista de Photos"',
24
- :list_zips => '"List Zips"',
25
- :listzipdirappletsavailable => '"Lista (zip directory) applets available for installation"',
26
- :menu_panel => '"panel de herramientas"',
27
- :module_unknown => '"Module desconocido"',
28
- :next => "Siguiente",
29
- :open => "Abrir",
30
- :open_document => '"Abrir documento"',
31
- :openselectedhelp_about => '"Open selected help about"',
32
- :reload_variables => '"Reload Variables"' ,
33
- :remove_applet => '"remove applet"',
34
- :return => "anterior",
35
- :rwdtinker_window_2 => '"RwdTinker Window 2"',
36
- :rwdtinker => "RwdTinker",
37
- :rwdtinker_back_window => '"RwdTinker Ventana Trasera"',
38
- :rwdtinker_help => '"RwdTinker Ayuda"',
39
- :rwdtinker_help_window => '"RwdTinker Ventana Ayuda"',
40
- :showdocument_list => '"Show Document List"',
41
- :showhelpabout_links => '"Show Help About Links"',
42
-
43
- :showjump_links => '"Mostrar enlace saltar"',
44
-
45
- :save => "Guardar" ,
46
- :save_changes => '"Guardar los cambios"',
47
- :rwdtinker => "RwdTinker",
48
- :selection_panel => '"Panel de Selecci�n"',
49
-
50
- :tinker_logo => '"Insignia de Tinker"',
51
- :selection_tab => '"Selection Tab"',
52
- :tinkerback_window => '"Tinker Back Window"',
53
- :viewapplet_contents => '"View Applet Contents"',
54
- :viewalreadyinstalled_applications => '"View already installed GEM applications"',
55
- :viewinstalled_text => '"View Install Text"',
56
- :view_platform => '"view platform"',
57
- :viewplatform_information => '"View Platform Information"',
58
- :viewlogger_information => '"View Logger Information"',
59
- :view_event => '"Ver evento"',
60
- :viewinstall_text => '"Ver Texto"' ,
61
- :viewlistinstall_files => '"View List of Installed Files"',
62
- :view_photo => '"Ver Photo"' ,
63
- :window => "Ventana" ,
@@ -1,65 +0,0 @@
1
- # English Language files for RwdTinker core
2
-
3
- :applet_installed => '"applet installed!"',
4
- :application_version => '"Application Version"',
5
- :clear => "Clear",
6
- :cancel => "Cancel",
7
- :clickfor_version => "Click for Version" ,
8
- :clickbelowtoviewlistof_zip => '"click below to view lists of zips"',
9
- :documents => '"Documents"',
10
- :edit => "edit" ,
11
- :file_name => '"File Name:"',
12
- :fill_record => '"Fill Record"',
13
- :gemcommands => '"Gem Commands"',
14
- :gemfiles => '"Gem Files"' ,
15
- :gemdocs => '"Gem Documents"' ,
16
- :gem_name => '"Gem Name"' ,
17
- :help => '"Help"',
18
- :help_about => '"Help About"',
19
- :installgem => '"Install Gem"' ,
20
- :install_applet => '"install (rwdtinker) applet"',
21
- :jumptoapplication_location => '"Jump to Application Location"',
22
- :list_applets => '"List Applets"',
23
- :listappletsinthegem_directory => '"List applets in the Gem Directory"',
24
- :listappletsavailablefor_installation => "List applets available for installation",
25
- :list_files => '"List Files"',
26
- :list_installed_gems => '"List installed Gems"' ,
27
- :list_photos => '"List Photos"',
28
- :list_zips => '"List Zips"',
29
- :listzipdirappletsavailable => '"List (zip directory) applets available for installation"',
30
- :menu_panel => '"Menu Panel"',
31
- :module_unknown => '"Unknown Module"',
32
- :next => '"Next"',
33
- :open => "Open",
34
- :open_document => '"Open Document"',
35
- :openselectedhelp_about => '"Open selected help about"',
36
- :reload_variables => '"Reload Variables"' ,
37
- :remove_applet => '"remove applet"',
38
- :return => "Return",
39
- :rwdtinker_window_2 => "RwdTinker Window 2",
40
- :rwdtinker => "RwdTinker",
41
- :rwdtinker_back_window => '"RwdTinker Back Window"',
42
- :rwdtinker_help => '"RwdTinker Help"',
43
- :rwdtinker_help_window => '"RwdTinker Help Window"',
44
- :showjump_links => '"Show Jump Links"',
45
- :showdocument_list => '"Show Document List"',
46
- :showhelpabout_links => '"Show Help About Links"',
47
-
48
- :save => "Save" ,
49
- :save_changes => '"Save Changes"',
50
- :selection_panel => '"Selection Panel"',
51
- :selection_tab => '"Selection Tab"',
52
- :tinker_logo => "Tinker Logo",
53
- :tinkerback_window => '"Tinker Back Window"',
54
- :viewapplet_contents => '"View Applet Contents"',
55
- :viewalreadyinstalled_applications => '"View already installed GEM applications"',
56
- :viewinstalled_text => '"View Install Text"',
57
- :view_platform => '"view platform"',
58
- :viewplatform_information => '"View Platform Information"',
59
- :viewlogger_information => '"View Logger Information"',
60
- :view_event => '"View event"',
61
- :view_gem => '"View Gem"',
62
- :viewinstall_text => '"View Install Text"' ,
63
- :viewlistinstall_files => '"View List of Installed Files"',
64
- :view_photo => '"View Photo"',
65
- :window => "Window" ,
@@ -1,73 +0,0 @@
1
- # Japanese Language files for RwdTinker core
2
- :cancel => "とりけし",
3
- :open => "あける",
4
- :view_event => "けんかい ぎょうじょ",
5
- :edit_event => "しゅうろく",
6
- :install_gem => "インストール",
7
- :list_installed_gems => "かきつらねる",
8
- :view_gem => "けんかい",
9
- :edit => "しゅうろく",
10
- :gem_commands => "コマンド",
11
- :gem_files => "ファイル",
12
- :gem_docs => "しょるい",
13
- :gem_name => "こうもくめい",
14
- :selection_panel => "&#12379;&#12435;&#12383;&#12367",
15
- :documents => "&#12458;&#12531;&#12521;&#12452;&#12531;&#12510;&#12491;&#12517;&#12450;&#12523",
16
-
17
- # English Language files for RwdTinker core
18
-
19
- :applet_installed => '"applet installed!"',
20
- :application_version => '"Application Version"',
21
- :clear => "Clear",
22
- :clickfor_version => "Click for Version" ,
23
- :clickbelowtoviewlistof_zip => '"click below to view lists of zips"',
24
-
25
- :file_name => '"File Name:"',
26
- :fill_record => '"Fill Record"',
27
- :help => '"Help"',
28
- :help_about => '"Help About"',
29
-
30
- :install_applet => '"install (rwdtinker) applet"',
31
- :jumptoapplication_location => '"Jump to Application Location"',
32
- :list_applets => '"List Applets"',
33
- :listappletsinthegem_directory => '"List applets in the Gem Directory"',
34
- :listappletsavailablefor_installation => "List applets available for installation",
35
- :list_files => '"List Files"',
36
-
37
- :list_photos => '"List Photos"',
38
- :list_zips => '"List Zips"',
39
- :listzipdirappletsavailable => '"List (zip directory) applets available for installation"',
40
- :menu_panel => '"Menu Panel"',
41
- :module_unknown => '"Unknown Module"',
42
- :next => '"Next"',
43
-
44
- :open_document => '"Open Document"',
45
- :openselectedhelp_about => '"Open selected help about"',
46
- :reload_variables => '"Reload Variables"' ,
47
- :remove_applet => '"remove applet"',
48
- :return => "Return",
49
- :rwdtinker_window_2 => "RwdTinker Window 2",
50
- :rwdtinker => "RwdTinker",
51
- :rwdtinker_back_window => '"RwdTinker Back Window"',
52
- :rwdtinker_help => '"RwdTinker Help"',
53
- :rwdtinker_help_window => '"RwdTinker Help Window"',
54
- :showjump_links => '"Show Jump Links"',
55
- :showdocument_list => '"Show Document List"',
56
- :showhelpabout_links => '"Show Help About Links"',
57
-
58
- :save => "Save" ,
59
- :save_changes => '"Save Changes"',
60
-
61
- :selection_tab => '"Selection Tab"',
62
- :tinker_logo => "Tinker Logo",
63
- :tinkerback_window => '"Tinker Back Window"',
64
- :viewapplet_contents => '"View Applet Contents"',
65
- :viewalreadyinstalled_applications => '"View already installed GEM applications"',
66
- :viewinstalled_text => '"View Install Text"',
67
- :view_platform => '"view platform"',
68
- :viewplatform_information => '"View Platform Information"',
69
- :viewlogger_information => '"View Logger Information"',
70
- :viewinstall_text => '"View Install Text"' ,
71
- :viewlistinstall_files => '"View List of Installed Files"',
72
- :view_photo => '"View Photo"',
73
- :window => "Window" ,
@@ -1,76 +0,0 @@
1
- # English Language files for RwdTinker core
2
-
3
- :cancel => '"Annuleren"',
4
- :open => '"Openen"',
5
- :save => '"Opslaan"',
6
- :window => '"Venster"',
7
- :applet_installed => '"Applet geinstalleerd"',
8
- :clickfor_version => '"Klier hier voor de Versie"',
9
- :documents => '"Documenten"',
10
- :help => '"Help"',
11
- :module_unknown => '"Module onbekend"',
12
- :next => '"Volgende"',
13
- :rwdtinker => '"RWDTinker"',
14
- :rwdtinker_help_window => '"RWDTinker Help Venster"',
15
- :rwdtinker_help => '"RWDTinker Help"',
16
- :rwdtinker_window_2 => '"RWDTinker Venster 2"',
17
- :rwdtinker_back_window => '"RwdTinker Back Venster"',
18
- :tinker_logo => '"RWDTinker Logo"',
19
- :selection_panel => '"Selectie Paneel"',
20
- # English Language files for RwdTinker core
21
-
22
-
23
- :applet_installed => '"applet installed!"',
24
- :application_version => '"Application Version"',
25
- :clear => "Clear",
26
- :clickfor_version => "Click for Version" ,
27
- :clickbelowtoviewlistof_zip => '"click below to view lists of zips"',
28
-
29
- :edit => "edit" ,
30
- :file_name => '"File Name:"',
31
- :fill_record => '"Fill Record"',
32
- :help => '"Help"',
33
- :help_about => '"Help About"',
34
- :install_applet => '"install (rwdtinker) applet"',
35
- :jumptoapplication_location => '"Jump to Application Location"',
36
- :list_applets => '"List Applets"',
37
- :listappletsinthegem_directory => '"List applets in the Gem Directory"',
38
- :listappletsavailablefor_installation => "List applets available for installation",
39
- :list_files => '"List Files"',
40
- :list_installed_gems => '"List installed Gems"' ,
41
- :list_photos => '"List Photos"',
42
- :list_zips => '"List Zips"',
43
- :listzipdirappletsavailable => '"List (zip directory) applets available for installation"',
44
- :menu_panel => '"Menu Panel"',
45
-
46
-
47
- :open_document => '"Open Document"',
48
- :openselectedhelp_about => '"Open selected help about"',
49
- :reload_variables => '"Reload Variables"' ,
50
- :remove_applet => '"remove applet"',
51
- :return => "Return",
52
- :rwdtinker_window_2 => "RwdTinker Window 2",
53
- :rwdtinker => "RwdTinker",
54
- :rwdtinker_back_window => '"RwdTinker Back Window"',
55
- :rwdtinker_help => '"RwdTinker Help"',
56
- :rwdtinker_help_window => '"RwdTinker Help Window"',
57
- :showjump_links => '"Show Jump Links"',
58
- :showdocument_list => '"Show Document List"',
59
- :showhelpabout_links => '"Show Help About Links"',
60
-
61
-
62
- :save_changes => '"Save Changes"',
63
- :selection_tab => '"Selection Tab"',
64
- :tinker_logo => "Tinker Logo",
65
- :tinkerback_window => '"Tinker Back Window"',
66
- :viewapplet_contents => '"View Applet Contents"',
67
- :viewalreadyinstalled_applications => '"View already installed GEM applications"',
68
- :viewinstalled_text => '"View Install Text"',
69
- :view_platform => '"view platform"',
70
- :viewplatform_information => '"View Platform Information"',
71
- :viewlogger_information => '"View Logger Information"',
72
- :view_event => '"View event"',
73
- :viewinstall_text => '"View Install Text"' ,
74
- :viewlistinstall_files => '"View List of Installed Files"',
75
- :view_photo => '"View Photo"',
76
-
data/lib/dict.rb DELETED
@@ -1,438 +0,0 @@
1
- # dict.rb - a client-side implementation of the DICT protocol (RFC 2229)
2
- #
3
- # $Id: dict.rb,v 1.25 2003/04/19 06:53:41 ianmacd Exp $
4
- #
5
- # Version : 0.9.2
6
- # Author : Ian Macdonald <ian@caliban.org>
7
- #
8
- # Copyright (C) 2002-2003 Ian Macdonald
9
- #
10
- # This program is free software; you can redistribute it and/or modify
11
- # it under the terms of the GNU General Public License as published by
12
- # the Free Software Foundation; either version 2, or (at your option)
13
- # any later version.
14
- #
15
- # This program is distributed in the hope that it will be useful,
16
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- # GNU General Public License for more details.
19
- #
20
- # You should have received a copy of the GNU General Public License
21
- # along with this program; if not, write to the Free Software Foundation,
22
- # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
-
24
- =begin
25
-
26
- = NAME
27
- Ruby/DICT - client-side DICT protocol library
28
- = SYNOPSIS
29
-
30
- require 'dict'
31
-
32
- dict = DICT.new('dict.org', DICT::DEFAULT_PORT)
33
- dict.client('a Ruby/DICT client')
34
- definitions = dict.define(DICT::ALL_DATABASES, 'ruby')
35
-
36
- if definitions
37
- definitions.each do |d|
38
- printf("From %s [%s]:\n\n", d.description, d.database)
39
- d.definition.each { |line| print line }
40
- end
41
- end
42
-
43
- dict.disconnect
44
-
45
- = DESCRIPTION
46
- Ruby/DICT is a client-side library implementation of the DICT protocol,
47
- as described in ((<RFC 2229|URL:ftp://ftp.isi.edu/in-notes/rfc2229.txt>)).
48
- = CLASS METHODS
49
- --- DICT.new(hosts, port = DICT::DEFAULT_PORT, debug = false, verbose = false)
50
- This creates a new instance of the DICT class. A DICT object has four
51
- instance variables: ((|capabilities|)), ((|code|)), ((|message|)) and
52
- ((|msgid|)). ((|capabilities|)) is an array of Strings relating to
53
- capabilities implemented on the server, ((|code|)) is the last status
54
- code returned by the server, ((|message|)) is the text of the message
55
- related to ((|code|)), and ((|msgid|)) is the message ID returned by the
56
- server.
57
- = INSTANCE METHODS
58
- --- DICT#disconnect
59
- Disconnect from the server.
60
- --- DICT#define(database, word)
61
- Obtain definitions for ((|word|)) from ((|database|)). A list of valid
62
- databases can be obtained using DICT#show(DICT::DATABASES).
63
-
64
- To show just the first definition found, use ((|DICT::FIRST_DATABASE|))
65
- as the database name. To show definitions from all databases, use
66
- ((|DICT::ALL_DATABASES|)).
67
-
68
- On success, this returns an array of Struct:Definition objects.
69
- ((*nil*)) is returned on failure.
70
- --- DICT#match(database, strategy, word)
71
- Obtain matches for ((|word|)) from ((|database|)) using ((|strategy|)).
72
-
73
- On success, a hash of arrays is returned. The keys of the hash are the
74
- database names and the values are arrays of word matches that were found
75
- in that database. ((*nil*)) is returned on failure.
76
- --- DICT#show_server
77
- This method retrieves information on the server itself.
78
-
79
- A String is returned on success, while ((*nil*)) is returned on failure.
80
- --- DICT#show_db
81
- This method retrieves information on the databases offered by the server.
82
-
83
- A Hash indexed on database name and containing database descriptions
84
- is returned on success, while ((*nil*)) is returned on failure.
85
- --- DICT#show_info(database)
86
- This method retrieves information on a particular database offered by
87
- the server.
88
-
89
- A String is returned on success, while ((*nil*)) is returned on failure.
90
- --- DICT#show_strat
91
- This method retrieves information on the strategies offered by the server.
92
-
93
- A Hash indexed on strategy name and containing strategy descriptions
94
- is returned on success, while ((*nil*)) is returned on failure.
95
- --- DICT#status
96
- This method returns a single line String of status information from the
97
- server.
98
- --- DICT#help
99
- This method returns a String of help information from the server,
100
- describing the commands it implements.
101
- --- DICT#client
102
- This method sends a single line String of information describing a client
103
- application to the server.
104
- --- DICT#auth(user, secret)
105
- This method attempts to authenticate ((|user|)) to the server using
106
- ((|secret|)). Note that ((|secret|)) is not literally passed to the server.
107
- = CONSTANTS
108
- Ruby/DICT uses a lot of constants, mostly for the status codes
109
- returned by DICT servers. See the source for details.
110
-
111
- Some of the more interesting other constants:
112
- : DICT::FIRST_DATABASE
113
- Define or match, stopping at first database where match is found
114
- : DICT::ALL_DATABASES
115
- Define or match, gathering matches from all databases
116
- : DICT::DEFAULT_MATCH_STRATEGY
117
- Match using a server-dependent default strategy, which should be the best
118
- strategy available for interactive spell checking
119
- : DICT::DEFAULT_PORT
120
- The default port used by DICT servers, namely 2628
121
- : DICT::ERROR
122
- A Regex constant matching any server status code indicating an error
123
- = EXCEPTIONS
124
- Exception classes are subclasses of the container class DICTError, which is,
125
- itself, a subclass of RuntimeError
126
- --- ConnectError.new(message, code = 2)
127
- A ConnectError is raised if DICT::new is unable to connect to the chosen
128
- DICT server for any reason. Program execution will terminate.
129
- --- ProtocolError.new(message, code = 3)
130
- A ProtocolError exception can be used if a server operation returns a
131
- status code matching DICT::ERROR. This does not happen automatically. The
132
- code is stored in the ((|code|)) attribute of the instance of the DICT
133
- object. Program execution will terminate.
134
- = AUTHOR
135
- Written by Ian Macdonald <ian@caliban.org>
136
- = COPYRIGHT
137
- Copyright (C) 2002-2003 Ian Macdonald
138
-
139
- This is free software; see the source for copying conditions.
140
- There is NO warranty; not even for MERCHANTABILITY or FITNESS
141
- FOR A PARTICULAR PURPOSE.
142
- = SEE ALSO
143
- * ((<"Ruby/DICT home page - http://www.caliban.org/ruby/"|URL:http://www.caliban.org/ruby/>))
144
- * ((<"The DICT development group - http://www.dict.org/"|URL:http://www.dict.org/>))
145
- * ((<"RFC 2229 - ftp://ftp.isi.edu/in-notes/rfc2229.txt"|URL:ftp://ftp.isi.edu/in-notes/rfc2229.txt>))
146
- = BUGS
147
- Send all bug reports, enhancement requests and patches to the
148
- author.
149
- = HISTORY
150
- $Id: dict.rb,v 1.25 2003/04/19 06:53:41 ianmacd Exp $
151
-
152
- =end
153
-
154
-
155
- require 'socket'
156
- require 'md5'
157
-
158
-
159
- # lines that start with .. need to be reduced to .
160
- #
161
- class String
162
- def undot!
163
- sub!(/^\.\./, '.')
164
- end
165
- end
166
-
167
-
168
- # a basic exception class for DICT errors
169
- #
170
- class DICTError < RuntimeError
171
- def initialize(message, code = 1)
172
- $stderr.puts message
173
- exit code
174
- end
175
- end
176
-
177
-
178
- # deal with connection errors
179
- #
180
- class ConnectError < DICTError
181
- def initialize(message, code = 2)
182
- super
183
- end
184
- end
185
-
186
-
187
- # deal with status code errors
188
- #
189
- class ProtocolError < DICTError
190
- def initialize(message, code = 3)
191
- super
192
- end
193
- end
194
-
195
- # a structure for definitions
196
- #
197
- Definition = Struct.new('Definition', :word, :definition, :database,
198
- :description)
199
-
200
- class DICT
201
- attr_reader :capabilities, :code, :message, :msgid
202
-
203
- DATABASES_PRESENT = '110'
204
- STRATEGIES_AVAILABLE = '111'
205
- DATABASE_INFORMATION = '112'
206
- HELP_TEXT = '113'
207
- SERVER_INFORMATION = '114'
208
- CHALLENGE_FOLLOWS = '130'
209
- DEFINITIONS_RETRIEVED = '150'
210
- WORD_DEFINITION = '151'
211
- MATCHES_PRESENT = '152'
212
- STATUS_RESPONSE = '210'
213
- CONNECTION_ESTABLISHED = '220'
214
- CLOSING_CONNECTION = '221'
215
- AUTHENTICATION_SUCCESSFUL = '230'
216
- OK = '250'
217
- SEND_RESPONSE = '330'
218
- TEMPORARILY_UNAVAILABLE = '420'
219
- SHUTTING_DOWN = '421'
220
- UNRECOGNISED_COMMAND = '500'
221
- ILLEGAL_PARAMETERS = '501'
222
- COMMAND_NOT_IMPLEMENTED = '502'
223
- PARAMETER_NOT_IMPLEMENTED = '503'
224
- ACCESS_DENIED = '530'
225
- AUTH_DENIED = '531'
226
- UNKNOWN_MECHANISM = '532'
227
- INVALID_DATABASE = '550'
228
- INVALID_STRATEGY = '551'
229
- NO_MATCH = '552'
230
- NO_DATABASES_PRESENT = '554'
231
- NO_STRATEGIES_AVAILABLE = '555'
232
-
233
- ALL_DATABASES = '*'
234
- DEFAULT_MATCH_STRATEGY = '.'
235
- DEFAULT_PORT = 2628
236
- ERROR = /^[45]/
237
- FIRST_DATABASE = '!'
238
- MAX_LINE_LENGTH = 1024
239
- PAIR = /^(\S+)\s"(.+)"\r$/
240
- REPLY_CODE = /^\d\d\d/
241
-
242
- def initialize(hosts, port = DEFAULT_PORT, debug = false, verbose = false)
243
- hosts.each do |host|
244
- @debug = debug
245
- @verbose = verbose
246
- printf("Attempting to connect to %s:%d...\n", host, port) if @verbose
247
-
248
- begin
249
- @sock = TCPSocket.open(host, port)
250
- rescue
251
- next # cycle through list of servers, if more than one
252
- end
253
-
254
- break # continue if connection to this host succeeded
255
- end
256
-
257
- # catch failure
258
- raise ConnectError, 'Unable to connect to host' unless defined? @sock
259
-
260
- # check status line on connect
261
- line = get_line
262
- raise ConnectError, line if line =~ ERROR
263
-
264
- caps, @msgid = /<(.+?)>\s(<.+>)/.match(line)[1..2]
265
- @capabilities = caps.split(/\./)
266
- if @verbose
267
- printf("Capabilities: %s\n", @capabilities.join(', '))
268
- printf("Msgid: %s\n", @msgid)
269
- end
270
- end
271
-
272
- private
273
-
274
- # output a line to the server
275
- #
276
- def send_line(command)
277
- line = command + "\r\n"
278
- $stderr.printf("SEND: %s", line) if @debug
279
- @sock.print(line)
280
- end
281
-
282
- # get a line of input from the server
283
- #
284
- def get_line
285
- line = @sock.readline("\r\n")
286
- $stderr.printf("RECV: %s", line) if @debug
287
- line
288
- end
289
-
290
- # send a command and get a response
291
- #
292
- def exec_cmd(command)
293
- send_line(command)
294
- line = get_line
295
- @code, @message = /^(\d\d\d)\s(.*)$/.match(line)[1..2]
296
- # remember the command just executed
297
- @command = command
298
- end
299
-
300
- # determine whether we're at the end of this response
301
- #
302
- def end_of_text?(line)
303
- line =~ /^\.\r$/ ? true : false
304
- end
305
-
306
- # generic method to issue command and parse response
307
- #
308
- def parse_response
309
- return nil if @code =~ ERROR
310
-
311
- while line = get_line
312
- # on first pass through loop, create list as either a hash
313
- # or a string, depending # on what data looks like
314
- list ||= line =~ PAIR ? Hash.new : ''
315
-
316
- # check for end of data
317
- return list if line =~ REPLY_CODE
318
-
319
- if ! end_of_text? line
320
- line.undot!
321
- (list << line; next) if list.is_a?(String) # list is just text
322
-
323
- # list is a hash of data pairings
324
- name, desc = PAIR.match(line)[1..2]
325
- if @command =~ /^MATCH/
326
- list[name] = Array.new unless list[name]
327
- list[name] << desc
328
- else
329
- list[name] = desc
330
- end
331
-
332
- end
333
- end
334
- end
335
-
336
- public
337
-
338
- # QUIT from the server
339
- #
340
- def disconnect
341
- exec_cmd('QUIT')
342
- @sock.close
343
- end
344
-
345
- # DEFINE a word
346
- #
347
- def define(db, word)
348
- definitions = Array.new
349
- d = Definition.new
350
- d.word = word
351
- d.definition = Array.new
352
-
353
- exec_cmd('DEFINE %s "%s"' % [ db, word ])
354
-
355
- return nil if @code =~ ERROR
356
-
357
- while line = get_line
358
- return definitions if line =~ /^#{OK}/
359
-
360
- if line =~ /^#{WORD_DEFINITION}/
361
- word, d.database, d.description =
362
- /^\d\d\d\s"(.+?)"\s(\S+)\s"(.+)"\r$/.match(line)[1..3]
363
- elsif end_of_text? line # finish definition and start a new one
364
- definitions << d
365
- d = Definition.new
366
- d.word = word
367
- d.definition = Array.new
368
- else
369
- line.undot!
370
- d.definition << line
371
- end
372
-
373
- end
374
- end
375
-
376
- # MATCH a word
377
- #
378
- def match(db, strategy, word)
379
- exec_cmd('MATCH %s %s "%s"' % [ db, strategy, word ])
380
- parse_response
381
- end
382
-
383
- # get database list
384
- #
385
- def show_db
386
- exec_cmd("SHOW DB")
387
- parse_response
388
- end
389
-
390
- # get strategy list
391
- #
392
- def show_strat
393
- exec_cmd("SHOW STRAT")
394
- parse_response
395
- end
396
-
397
- # get information on database
398
- #
399
- def show_info(db)
400
- exec_cmd('SHOW INFO %s' % db)
401
- parse_response
402
- end
403
-
404
- # get server information
405
- #
406
- def show_server
407
- exec_cmd("SHOW SERVER")
408
- parse_response
409
- end
410
-
411
- # request server STATUS information
412
- #
413
- def status
414
- exec_cmd('STATUS')
415
- @message
416
- end
417
-
418
- # request server-side HELP
419
- #
420
- def help
421
- exec_cmd('HELP')
422
- parse_response
423
- end
424
-
425
- # send CLIENT information
426
- #
427
- def client(info)
428
- exec_cmd('CLIENT %s' % info)
429
- end
430
-
431
- # AUTHorise user
432
- #
433
- def auth(user, secret)
434
- auth = MD5::new(@msgid + secret).hexdigest
435
- exec_cmd('AUTH %s %s' % [ user, auth ])
436
- end
437
-
438
- end