rwdmpd 0.07 → 0.08

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/code/01rwdcore/01rwdcore.rb +5 -4
  2. data/code/01rwdcore/02helptexthashbegin.rb +13 -11
  3. data/code/01rwdcore/jumplinkcommand.rb +1 -0
  4. data/code/01rwdcore/openhelpwindow.rb +7 -0
  5. data/code/01rwdcore/runhelpabout.rb +6 -1
  6. data/code/01rwdcore/selectiontab.rb +2 -0
  7. data/code/01rwdcore/setuphelpaboutoptions.rb +2 -0
  8. data/code/01rwdcore/setuptinkerdocuments.rb +1 -0
  9. data/code/01rwdcore/uploadreturns.rb +3 -0
  10. data/code/dd0viewphoto/dd0viewphoto.rb +2 -0
  11. data/code/superant.com.podhandler/clearnotescreen.rb +7 -0
  12. data/code/superant.com.podhandler/listdirectories3.rb +24 -0
  13. data/code/superant.com.podhandler/listpodfiles.rb +22 -0
  14. data/code/superant.com.podhandler/loadeditfile.rb +22 -0
  15. data/code/superant.com.podhandler/pausepodnumber.rb +43 -0
  16. data/code/superant.com.podhandler/playpodnumber.rb +28 -0
  17. data/code/superant.com.podhandler/resetpodfile.rb +16 -0
  18. data/code/superant.com.podhandler/saveeditfoldrecord.rb +22 -0
  19. data/code/superant.com.rwdmp3/0uninstallapplet.rb +3 -0
  20. data/code/superant.com.rwdmp3/controlmpd.rb +4 -4
  21. data/code/superant.com.rwdmp3/helptexthashload.rb +21 -0
  22. data/code/superant.com.rwdmp3/mpd_seek.rb +2 -2
  23. data/code/superant.com.rwdmp3/openhelpwindowrwdmp3.rb +9 -2
  24. data/code/superant.com.rwdmp3/pausempd.rb +14 -0
  25. data/code/superant.com.rwdmp3/plaympd.rb +15 -0
  26. data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +0 -1
  27. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +2 -0
  28. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +2 -0
  29. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +3 -1
  30. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +2 -0
  31. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +3 -1
  32. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +1 -0
  33. data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +8 -5
  34. data/code/zz0applicationend/zz0end.rb +2 -1
  35. data/configuration/rwdtinker.dist +3 -3
  36. data/configuration/rwdwmpd.dist +5 -3
  37. data/gui/00coreguibegin/applicationguitop.rwd +6 -1
  38. data/gui/tinkerbackwindows/superant.com.rwdmp3/20rwdmpd.rwd +11 -2
  39. data/gui/tinkerbackwindows/superant.com.rwdmp3/27podhandler.rwd +53 -0
  40. data/gui/tinkerbackwindows/superant.com.rwdmp3/28podedit.rwd +31 -0
  41. data/init.rb +7 -1
  42. data/installed/rwdwmpd.inf +6 -0
  43. data/lang/en/rwdcore/en.po +16 -0
  44. data/lang/es/rwdcore/es.po +16 -13
  45. data/lang/fr/rwdcore/fr.po +4 -1
  46. data/lang/hi/rwdcore/hi.po +39 -36
  47. data/lang/ja/rwdcore/ja.po +3 -0
  48. data/lang/nl/rwdcore/nl.po +4 -1
  49. data/rwd_files/HowTo_Tinker.txt +4 -0
  50. data/rwd_files/Tinkerhelptexthash.txt +3 -2
  51. data/rwd_files/helptexthashmpd.txt +57 -0
  52. data/rwd_files/mpd.COMMANDS +275 -0
  53. data/rwd_files/podfolds/podfold03.fld +25 -0
  54. data/rwd_files/rwdapplications.html +23 -1
  55. data/tests/makedist-rwdwmpd.rb +1 -1
  56. data/tests/makedist.rb +1 -1
  57. data/zips/rwdwfoldeditor-0.06.zip +0 -0
  58. data/zips/{rwdwmpd-0.07.zip → rwdwmpd-0.08.zip} +0 -0
  59. metadata +20 -7
  60. data/code/superant.com.rwdmp3/helptexthashrwdmp3.rb +0 -41
  61. data/tests/makedist-tinkerbellw.rb +0 -58
  62. data/zips/rwdwfoldeditor-0.05.zip +0 -0
  63. data/zips/rwdwhypernote-0.15.zip +0 -0
@@ -1,8 +1,5 @@
1
1
  # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
- # This application is a framework for writing programs from RubyWebDialogs
3
- # http://www.erikveen.dds.nl/rubywebdialogs/index.html
4
- # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
5
- # This class is the top class for the RwdTinker application
2
+
6
3
 
7
4
  $DEBUG=false
8
5
  $VERBOSE=false
@@ -27,3 +24,7 @@ class RwdTinker < RWDialog
27
24
  "#{$rwdapplicationidentity}"
28
25
  end
29
26
 
27
+
28
+ # for original RWD work see: http://www.erikveen.dds.nl/rubywebdialogs/index.html
29
+ # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
30
+ # This class is the top class for the RwdTinker application
@@ -1,14 +1,16 @@
1
-
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
2
 
3
- Helptext = Hash.new { |hh, kk| hh[kk] = "ERROR: Identificador de mensaje desconocido: #{kk.inspect}."; hh[kk] }
3
+ Helptext = Hash.new { |hh, kk| hh[kk] = "ERROR: Message-ID Unknown: #{kk.inspect}."; hh[kk] }
4
4
  helpmessage = {
5
- :general_help => "You can work with Applets: go to 'Selection tab', <br>
6
- On that back screen you will find:<br>
7
- List Applets: you can see and delete installed applets<br>
8
- List Zips: you can see lists of applets that you can install<br>
9
- Edit Configuration: You can view the rwdtinker configuration and change it<br>
10
- Diagnostic Tab: You can view the environments variables that rwdtinker is running with<br>
11
- "
12
-
5
+ :tinker_help => "rwdtinker is the core application for the
6
+ rwdapplications. "
7
+
13
8
  }
14
- helpmessage.each { |kk, vv| Helptext[kk] = vv }
9
+ helpmessage.each { |kk, vv| Helptext[kk] = vv }
10
+
11
+
12
+ =begin
13
+ this is to set up the help buttons
14
+ this uses a hash
15
+ =end
16
+
@@ -1,3 +1,4 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # Bind message passing socket to rwdtinker application
2
3
 
3
4
  locationlink = {
@@ -1,4 +1,7 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # this code is to call the help window
3
+ # for RwdTinker core
4
+
2
5
  def runhelpwindow
3
6
  $helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing","applet_tinkerbackeditconfiguration"]
4
7
 
@@ -29,3 +32,7 @@ def choosenewhelptopic(inffile)
29
32
  end
30
33
 
31
34
 
35
+
36
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
37
+ # this code is to call the help window
38
+ # for RwdTinker core
@@ -7,4 +7,9 @@
7
7
  @rwd_window = "rwdtinkerhelpwindow"
8
8
 
9
9
  end
10
-
10
+
11
+ =begin
12
+ This def runtinkerhelpabout
13
+ is to call the rwdtinkerhelpwindow
14
+ =end
15
+
@@ -1,4 +1,6 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # this code is to return to the window back from the help window
3
+
2
4
  def runselectiontab
3
5
 
4
6
 
@@ -1,4 +1,6 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # help about option setup for rwdtinker application
3
+
2
4
  def setuphelpaboutoptions
3
5
 
4
6
  @rwd_window = "tinkerhelpabout"
@@ -1,3 +1,4 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # Bind document names to rwdtinker document tab
2
3
  def setuptinkerdocuments
3
4
 
@@ -1,3 +1,6 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # return information to the author
3
+
1
4
  def uploadreturnsfile
2
5
  require 'net/ftp'
3
6
  BasicSocket.do_not_reverse_lookup = true
@@ -1,3 +1,5 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+
1
3
  def viewphoto
2
4
  @rwd_window = "photo"
3
5
  end
@@ -0,0 +1,7 @@
1
+ # this method clears the on screen variables
2
+
3
+ def clearmpdpodview3
4
+ @a_mpdpodfold = ""
5
+
6
+
7
+ end
@@ -0,0 +1,24 @@
1
+ # this code is to list the directories
2
+ def rwdmpdpodfolderdirectoryview
3
+
4
+
5
+
6
+ if $temp_rwdmpdpodfolder_directory == nil
7
+ temp_dir = $rwdmpdpodfolder_directory
8
+ $temp_rwdmpdpodfolder_directory = $rwdmpdpodfolder_directory
9
+ else
10
+ temp_dir = $temp_rwdmpdpodfolder_directory
11
+ end
12
+
13
+
14
+
15
+
16
+
17
+
18
+ fileList = Dir.new(temp_dir).entries.sort.delete_if { |x| ! (x =~ /fld/) }
19
+
20
+
21
+ @mpdpodchoicepulldown = fileList.rwd_options
22
+
23
+
24
+ end
@@ -0,0 +1,22 @@
1
+ # this code is to list the directories
2
+ def saglistmpdpodfiles
3
+
4
+ if $temp_rwdmpdpodfolder_directory == nil
5
+ temp_dir = $rwdmpdpodfolder_directory
6
+ $temp_rwdmpdpodfolder_directory = $rwdmpdpodfolder_directory
7
+ else
8
+ temp_dir = $temp_rwdmpdpodfolder_directory
9
+ end
10
+
11
+ fileName = File.join(temp_dir, @a_mpdpodchoice3)
12
+ podList = []
13
+ File.open(fileName).each { |line|
14
+ podList << line.chomp
15
+ }
16
+
17
+
18
+
19
+
20
+ @podhandlerdirectoriesresultA = podList.rwd_options
21
+
22
+ end
@@ -0,0 +1,22 @@
1
+ # this method puts the file on the screen
2
+ def sagloadmpdpodfiles
3
+
4
+ require 'fileutils'
5
+
6
+
7
+
8
+
9
+ begin # exception trapped block
10
+
11
+ Dir.chdir($progdir)
12
+ fileName = File.join($rwdmpdpodfolder_directory, @a_mpdpodchoice3)
13
+
14
+
15
+ fd = File.open(fileName,"r")
16
+ @a_mpdpodfold = fd.read
17
+ fd.close
18
+ rescue SystemCallError, StandardError
19
+ $stderr.print "system call error: " + $!
20
+ end # exception rescue
21
+
22
+ end
@@ -0,0 +1,43 @@
1
+ #part of rwdtinker (c) by Steven Gibson smalllinux@gmail.com
2
+
3
+ def pausepodnumber3a
4
+ require 'lib/librmpd'
5
+ require 'thread'
6
+
7
+ mpd = MPD.new
8
+ mpd.connect
9
+
10
+ if $temp_rwdmpdpodfolder_directory == nil
11
+ temp_dir = $rwdmpdpodfolder_directory
12
+ $temp_rwdmpdpodfolder_directory = $rwdmpdpodfolder_directory
13
+ else
14
+ temp_dir = $temp_rwdmpdpodfolder_directory
15
+ end
16
+
17
+ @a_mpdpoddata3 = controlmpd("pause")
18
+ @a_mpdpodhandlerdata3 = controlmpd("status")
19
+ tmparray1 = @a_mpdpodhandlerdata3.split("\n")
20
+ tmpstring = tmparray1.at(2)
21
+ tmpstring2 = tmpstring.delete("time => ")
22
+ tmparray2 = tmpstring2.split(":")
23
+ location = tmparray2.at(0).to_i
24
+ temp = $currentmpdpod + " #{location} \n"
25
+
26
+
27
+ fileName = File.join(temp_dir, @a_mpdpodchoice3)
28
+
29
+ podListstring = ""
30
+ tmpfile = File.open(fileName).each { |line|
31
+ if ! line.include? $currentmpdpod
32
+ podListstring += line
33
+ end
34
+ }
35
+ podListstring += temp
36
+ tmpfile.close
37
+ tmpfile = File.open(fileName,'w')
38
+ tmpfile.write(podListstring)
39
+ tmpfile.close
40
+
41
+ $stderr.puts location
42
+ end
43
+
@@ -0,0 +1,28 @@
1
+ #part of rwdtinker (c) by Steven Gibson smalllinux@gmail.com
2
+
3
+ def playpodnumber3a
4
+ require 'lib/librmpd'
5
+ require 'thread'
6
+
7
+ mpd = MPD.new
8
+ mpd.connect
9
+
10
+ $stderr.puts @a_mpdpodinput3a
11
+
12
+ mpd.send(:clear)
13
+ mpd.send(:load, "tmppodcast")
14
+ tmparray = @a_mpdpodinput3a.split(" ")
15
+
16
+ tmpmpdfilename = tmparray.at(0).strip
17
+ $currentmpdpod = tmpmpdfilename
18
+ mpd.send(:add, tmpmpdfilename )
19
+ @a_mpdpoddata3 = controlmpd("play", 1)
20
+ if tmparray.at(1) == nil
21
+ $stderr.puts tmparray.at(1).to_i
22
+ else
23
+ mpd.send(:seek, 1, tmparray.at(1).to_i)
24
+ end
25
+ @a_mpdpodhandlerdata3 = controlmpd("status")
26
+
27
+ end
28
+
@@ -0,0 +1,16 @@
1
+ #part of rwdtinker (c) by Steven Gibson smalllinux@gmail.com
2
+
3
+ def rwdmpdpodresetfile
4
+ require 'lib/librmpd'
5
+ require 'thread'
6
+
7
+ mpd = MPD.new
8
+ mpd.connect
9
+
10
+
11
+ mpd.send(:seek, 1, 1)
12
+
13
+ @a_mpdpodhandlerdata3 = controlmpd("status")
14
+
15
+ end
16
+
@@ -0,0 +1,22 @@
1
+ # this method saves configuration record
2
+ def saverwdmpdpodfile
3
+ require 'fileutils'
4
+
5
+
6
+
7
+ newdata = @a_mpdpodfold
8
+
9
+ begin # exception trapped block
10
+
11
+ Dir.chdir($progdir)
12
+ fileName = File.join($rwdmpdpodfolder_directory, @a_mpdpodchoice3)
13
+
14
+ fd = File.open(fileName,"w")
15
+ fd.print(newdata) # save the record info to the file
16
+ fd.close
17
+
18
+ rescue SystemCallError, StandardError
19
+ $stderr.print "system call error: " + $!
20
+ end # exception rescue
21
+
22
+ end
@@ -4,6 +4,9 @@ $tinkerdocumentsarray.delete_if {|x| x == "HowTo_Mpd.txt"}
4
4
  $tinkerhelpaboutarray.delete_if {|x| x == "RwdMpd"}
5
5
  Helptext.delete_if {|key, value| key == :rwdmpd_help}
6
6
  Helptext.delete_if {|key, value| key == :rwdmpd_generalhelp }
7
+ Helptext.delete_if {|key, value| key == :mpdpodedit_help }
8
+ Helptext.delete_if {|key, value| key == :mpdpodhandler_help }
9
+ Helptext.delete_if {|key, value| key == :mpdplaylist_help }
7
10
 
8
11
  $rwdjumplink.delete_if {|x| x == "RwdMpd"}
9
12
 
@@ -65,7 +65,7 @@ require 'thread'
65
65
  mpd.disconnect
66
66
  return tmpstats
67
67
  when 'play'
68
- mpd.play argopts
68
+ tmpreturn = mpd.play argopts
69
69
  tmpresulthash = mpd.current_song
70
70
  tmpstats = ""
71
71
  tmpresulthash.each_pair do |key, value|
@@ -73,9 +73,9 @@ require 'thread'
73
73
  tmpstats = tmpstats + "#{key} => #{value}\n"
74
74
  end
75
75
  mpd.disconnect
76
- return tmpstats
76
+ return tmpstats, tmpreturn
77
77
  when 'pause'
78
- mpd.pause = !mpd.paused?
78
+ tmpreturn = mpd.pause = !mpd.paused?
79
79
  tmpresulthash = mpd.current_song
80
80
  tmpstats = ""
81
81
  tmpresulthash.each_pair do |key, value|
@@ -83,7 +83,7 @@ require 'thread'
83
83
  tmpstats = tmpstats + "#{key} => #{value}\n"
84
84
  end
85
85
  mpd.disconnect
86
- return tmpstats
86
+ return tmpstats, tmpreturn
87
87
  when 'stop'
88
88
  mpd.stop
89
89
  when 'next'
@@ -0,0 +1,21 @@
1
+ # this code loads the help text
2
+
3
+
4
+ tmphelpfilename = "helptexthashmpd.txt"
5
+ tmphelpdir = "rwd_files"
6
+
7
+ begin # exception trapped block
8
+
9
+
10
+ fileName = File.join(tmphelpdir ,tmphelpfilename )
11
+
12
+
13
+ fd = File.open(fileName,"r")
14
+ tmphelptext = fd.read
15
+ fd.close
16
+ eval tmphelptext
17
+ rescue SystemCallError, StandardError
18
+ $rwdtinkerlog.error "rwdwmpd help file load: system call error: "
19
+ end # exception rescue
20
+
21
+
@@ -1,8 +1,8 @@
1
1
  #
2
2
  def runmpdseekcommand
3
- commandtext = @a_mpdseekcommandinput.to_s
3
+ commandtext = @a_mpdseekcommandinput.to_s
4
4
 
5
- @mpdseekcommandresult = controlmpd(commandtext , @a_mpdseekname)
5
+ @mpdseekcommandresult, @mpdcommandresult01 = controlmpd(commandtext , @a_mpdseekname)
6
6
 
7
7
  @lastmpdseekcommand = commandtext
8
8
  # Close the socket after use
@@ -10,8 +10,15 @@ def runhelpwindowrwdmp3
10
10
  end
11
11
  if @rwd_tab == "superantcomeditplaylistfile"
12
12
  $help_topic = "mpdplaylist_help"
13
- end
14
- $helptopicsarray = $helptopicsarray | ["rwdmpd_generalhelp","rwdmpd_help","mpdplaylist_help"]
13
+ end
14
+ if @rwd_tab == "superantcommpd03"
15
+ $help_topic = "mpdpodhandler_help"
16
+ end
17
+ if @rwd_tab == "superantcommpd04"
18
+ $help_topic = "mpdpodedit_help"
19
+ end
20
+
21
+ $helptopicsarray = $helptopicsarray | ["rwdmpd_generalhelp","rwdmpd_help","mpdplaylist_help","mpdpodedit_help", "mpdpodhandler_help"]
15
22
 
16
23
 
17
24
 
@@ -0,0 +1,14 @@
1
+ #part of rwdtinker (c) by Steven Gibson smalllinux@gmail.com
2
+
3
+ def mpdpausebutton
4
+ require 'lib/librmpd'
5
+ require 'thread'
6
+
7
+ mpd = MPD.new
8
+ mpd.connect
9
+
10
+
11
+ @mpdseekcommandresult = controlmpd("pause")
12
+ mpd.disconnect
13
+ end
14
+
@@ -0,0 +1,15 @@
1
+ #part of rwdtinker (c) by Steven Gibson smalllinux@gmail.com
2
+
3
+ def mpdplaybutton
4
+ require 'lib/librmpd'
5
+ require 'thread'
6
+
7
+ mpd = MPD.new
8
+ mpd.connect
9
+
10
+
11
+
12
+ @mpdseekcommandresult = controlmpd("play", 1)
13
+ mpd.disconnect
14
+ end
15
+