rwdschedule 0.98 → 0.99
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.txt +226 -400
- data/code/01rwdcore/01rwdcore.rb +16 -16
- data/code/01rwdcore/jumplinkcommand.rb +26 -0
- data/code/01rwdcore/openhelpwindow.rb +26 -26
- data/code/01rwdcore/returntomain.rb +8 -8
- data/code/01rwdcore/rundocuments.rb +10 -0
- data/code/01rwdcore/runeditconfiguration.rb +10 -0
- data/code/01rwdcore/runhelpabout.rb +10 -0
- data/code/01rwdcore/rwdtinkerversion.rb +12 -13
- data/code/01rwdcore/rwdwindowreturn.rb +3 -5
- data/code/01rwdcore/selectiontab.rb +9 -0
- data/code/01rwdcore/test_cases.rb +81 -98
- data/code/01rwdcore/test_harness.rb +8 -10
- data/code/01rwdcore/uploadreturns.rb +60 -60
- data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +89 -92
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +15 -21
- data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +19 -18
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +20 -19
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +19 -18
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +7 -7
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +48 -49
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +8 -7
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +22 -26
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +32 -31
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -13
- data/code/superant.com.rwdtinkerbackwindow/network.rb +82 -82
- data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +18 -17
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +37 -37
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +20 -20
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +33 -32
- data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +8 -9
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +10 -11
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -18
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +21 -20
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +23 -20
- data/code/superant.com.schedule/jumplinkupdate.rb +11 -0
- data/configuration/language.dist +1 -1
- data/configuration/rwdapplicationidentity.dist +2 -2
- data/configuration/rwdschedule.dist +2 -2
- data/configuration/rwdtinker.dist +3 -3
- data/configuration/tinkerwin2variables.dist +1 -1
- data/gui/00coreguibegin/applicationguitop.rwd +1 -1
- data/gui/frontwindowselectionbegin/selectiontabbegin/selectiontabbegin.rwd +2 -7
- data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd +15 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/70rwddiagnostics.rwd +0 -17
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/m01menubegin.rwd +12 -4
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m01menubegin.rwd +12 -4
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
- data/init.rb +228 -228
- data/rwd_files/HowTo_Schedule.txt +6 -0
- data/rwd_files/HowTo_Tinker.txt +11 -0
- data/rwdconfig.dist +4 -2
- data/tests/makedist.rb +36 -7
- metadata +12 -36
- data/extras/cmdline_parse +0 -47
- data/extras/config_file +0 -69
- data/extras/errorMsg +0 -19
- data/extras/makePlaylist +0 -34
- data/extras/mp3controld +0 -289
- data/extras/playlist +0 -186
- data/extras/showHelp +0 -18
- data/gui/frontwindow0/superant.com.zmenus/m01menubegin.rwd +0 -10
- data/gui/frontwindow0/superant.com.zmenus/m02menu.rwd +0 -36
- data/gui/frontwindow0/superant.com.zmenus/m03menu.rwd +0 -15
- data/gui/frontwindow0/superant.com.zmenus/m85menu.rwd +0 -21
- data/gui/frontwindow0/superant.com.zmenus/m88menu.rwd +0 -12
- data/gui/frontwindow0/superant.com.zmenus/m99menuend.rwd +0 -3
- data/gui/frontwindowselections/superant.com.rwdscheduleselectiontab/rwdschedulessyncselectiontab.rwd +0 -12
- data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +0 -12
- data/gui/frontwindowselections/superant.com.schedulebackselection/rwdscheduleiscselectiontab.rwd +0 -12
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/m02menu.rwd +0 -36
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/m03menu.rwd +0 -11
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/m85menu.rwd +0 -21
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/m88menu.rwd +0 -12
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/m99menuend.rwd +0 -3
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m02menu.rwd +0 -36
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m03menu.rwd +0 -12
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m85menu.rwd +0 -21
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m88menu.rwd +0 -12
- data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m99menuend.rwd +0 -3
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80tab1.rwd +0 -11
- data/tests/rwdtinkertestEN.rb +0 -163
- data/tests/test.result +0 -32
data/extras/playlist
DELETED
@@ -1,186 +0,0 @@
|
|
1
|
-
#!ruby
|
2
|
-
|
3
|
-
# --- Playlist class ---
|
4
|
-
#
|
5
|
-
# Author: Magnus Engstr�m
|
6
|
-
# Email: magnus@gisab.se
|
7
|
-
# File: playlist
|
8
|
-
#
|
9
|
-
# Description
|
10
|
-
# -----------
|
11
|
-
# The Playlist class handles everything a playlist should be able to manage.
|
12
|
-
# Shuffle it, unshuffle it, wrap it if desired, add new songs, find songs and
|
13
|
-
# so on. Cool huh? :)
|
14
|
-
# ----------------------
|
15
|
-
|
16
|
-
class Playlist
|
17
|
-
# create_from_file() creates a playlist from a file and returns either a Playlist instance or -1 in case of error
|
18
|
-
# This function should be used instead of the ::new, because this one
|
19
|
-
# returns -1 on file read errors, which the ::new doesn't.
|
20
|
-
def Playlist::create_from_file(filename)
|
21
|
-
# Check that the file is readable
|
22
|
-
if(FileTest::readable_real?(filename))
|
23
|
-
new(filename) # Return the Playlist class instance
|
24
|
-
else
|
25
|
-
-1 # Return -1 on error
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
# initialize reads the playlist from a file and returns the Playlist instance
|
30
|
-
def initialize(filename)
|
31
|
-
|
32
|
-
@filename = filename # Store the filename for later use
|
33
|
-
@playlist = Array::new() # This hash contains the whole playlist
|
34
|
-
@index = 0 # Playlist's current position
|
35
|
-
@wrap = false # Don't repeat the list as default
|
36
|
-
|
37
|
-
# Parse these fields, separated with double pipes (||) (songname, artist, album, year, comment, tracknum, genre_id, genre)
|
38
|
-
File::foreach(filename) { |line| # Iterate through every line in the file
|
39
|
-
foo = line.split(/\|\|/)
|
40
|
-
@playlist << { "filename" => foo[0], "songname" => foo[1], "artist" => foo[2], "album" => foo[3], "year" => foo[4], "comment" => foo[5], "tracknum" => foo[6], "genre_id" => foo[7], "genre" => foo[8] } # Add a hash to the @playlist array with all values found in the playlist file
|
41
|
-
}
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
|
-
def insert(song, placement = 0)
|
46
|
-
# Check song information
|
47
|
-
return -1 if(song.type != Hash)
|
48
|
-
song = { "filename" => song["filename"], "songname" => song["songname"], "artist" => song["artist"], "album" => song["album"], "year" => song["year"], "comment" => song["comment"], "tracknum" => song["tracknum"], "genre_id" => song["genre_id"], "genre" => song["genre"] }
|
49
|
-
|
50
|
-
# Check minimum and maximum values
|
51
|
-
placement = 0 if(placement < 0)
|
52
|
-
placement = @playlist.length() if(placement > @playlist.length() )
|
53
|
-
|
54
|
-
# Retrieve the two parts of the split playlist
|
55
|
-
first = @playlist[0...placement]
|
56
|
-
second = @playlist[placement...@playlist.length()]
|
57
|
-
|
58
|
-
# Put it together again
|
59
|
-
@playlist = Array::new()
|
60
|
-
@playlist = first
|
61
|
-
@playlist << song
|
62
|
-
@playlist.concat(second)
|
63
|
-
|
64
|
-
end
|
65
|
-
|
66
|
-
def remove(placement = 0)
|
67
|
-
# Check boundaries
|
68
|
-
placement = 0 if(placement < 0)
|
69
|
-
placement = @playlist.length()-1 if( placement >= @playlist.length() )
|
70
|
-
|
71
|
-
# Delete the item
|
72
|
-
@playlist.delete_at(placement)
|
73
|
-
end
|
74
|
-
|
75
|
-
def find(search_string, case_insensitive = false, fields = ["songname", "filename"])
|
76
|
-
case_insensitive = nil if(case_insensitive == false)
|
77
|
-
|
78
|
-
results = Array::new()
|
79
|
-
regex = Regexp::new(search_string, case_insensitive) # The regex that will be matched
|
80
|
-
|
81
|
-
# Iterate through the playlist to find one or more matching songs
|
82
|
-
@playlist.length().times { |index|
|
83
|
-
# Iterate through the user supplied list of fields to be searched
|
84
|
-
fields.each { |field|
|
85
|
-
# Make sure this is a hash, so we don't go and crash, or make someone's dog sick :)
|
86
|
-
if(@playlist[index].type == Hash)
|
87
|
-
results << index if( regex.match(@playlist[index][field]) && !(results.include?(index)) ) # If it matches, and if it doesn't already is in the results. We don't want duplicates :)
|
88
|
-
end
|
89
|
-
}
|
90
|
-
}
|
91
|
-
|
92
|
-
results # Return the results
|
93
|
-
|
94
|
-
end
|
95
|
-
|
96
|
-
def shuffle()
|
97
|
-
# Iterate through the playlist
|
98
|
-
( 0...@playlist.length() ).each { |i|
|
99
|
-
j = rand @playlist.length() # Grab a random value between 0 and @playlist.length()
|
100
|
-
|
101
|
-
# Maintain index
|
102
|
-
if(@index == j)
|
103
|
-
@index = i
|
104
|
-
elsif(@index == i)
|
105
|
-
@index = j
|
106
|
-
end
|
107
|
-
|
108
|
-
@playlist[i], @playlist[j] = @playlist[j], @playlist[i]
|
109
|
-
}
|
110
|
-
end
|
111
|
-
|
112
|
-
def re_read()
|
113
|
-
# Maintain index
|
114
|
-
current_filename = @playlist[@index]["filename"]
|
115
|
-
|
116
|
-
# Create a new playlist array
|
117
|
-
@playlist = Array::new()
|
118
|
-
@index = 0
|
119
|
-
foo_index = 0 # Just to keep the count while adding all songs to the @playlist
|
120
|
-
|
121
|
-
# Parse these fields, separated with double pipes (||) (songname, artist, album, year, comment, tracknum, genre_id, genre)
|
122
|
-
# Iterate through every line in the file
|
123
|
-
File::foreach(@filename) { |line|
|
124
|
-
foo = line.split(/\|\|/) # Separate the fields with double pipes (||)
|
125
|
-
@playlist << { "filename" => foo[0], "songname" => foo[1], "artist" => foo[2], "album" => foo[3], "year" => foo[4], "comment" => foo[5], "tracknum" => foo[6], "genre_id" => foo[7], "genre" => foo[8] } # Add a hash to the @playlist array with all values found in the playlist file
|
126
|
-
|
127
|
-
# Maintain index
|
128
|
-
@index = foo_index if(foo[0] == current_filename)
|
129
|
-
foo_index += 1
|
130
|
-
}
|
131
|
-
|
132
|
-
end
|
133
|
-
|
134
|
-
def next()
|
135
|
-
# Increase the counter and return -1 if the playlist went to far, and wrap isn't true
|
136
|
-
@index += 1
|
137
|
-
if( @index >= @playlist.length() )
|
138
|
-
if(@wrap)
|
139
|
-
@index = 0
|
140
|
-
else
|
141
|
-
@index -= 1
|
142
|
-
-1 # Return an error
|
143
|
-
end
|
144
|
-
else
|
145
|
-
@index
|
146
|
-
end
|
147
|
-
end
|
148
|
-
|
149
|
-
def prev()
|
150
|
-
# Decrease the counter and return -1 if the playlist went to far, and wrap isn't true
|
151
|
-
@index -= 1
|
152
|
-
if( @index < 0 )
|
153
|
-
if(@wrap)
|
154
|
-
@index = @playlist.length() -1
|
155
|
-
else
|
156
|
-
@index += 1
|
157
|
-
-1 # Return an error
|
158
|
-
end
|
159
|
-
else
|
160
|
-
@index
|
161
|
-
end
|
162
|
-
end
|
163
|
-
|
164
|
-
def song_info(index = @index)
|
165
|
-
@playlist[index]
|
166
|
-
end
|
167
|
-
|
168
|
-
def goto(index = 0)
|
169
|
-
if( index >= 0 && index < @playlist.length() )
|
170
|
-
@index = index
|
171
|
-
else
|
172
|
-
return -1
|
173
|
-
end
|
174
|
-
end
|
175
|
-
|
176
|
-
def length()
|
177
|
-
@playlist.length()
|
178
|
-
end
|
179
|
-
|
180
|
-
def each()
|
181
|
-
@playlist.each { |song| yield(song) }
|
182
|
-
end
|
183
|
-
|
184
|
-
attr_reader :wrap, :index, :filename
|
185
|
-
attr_writer :wrap
|
186
|
-
end
|
data/extras/showHelp
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
|
3
|
-
# --- showHelp ----
|
4
|
-
#
|
5
|
-
# Author: Magnus Engstr�m
|
6
|
-
# Email: magnus@gisab.se
|
7
|
-
# File: showHelp
|
8
|
-
#
|
9
|
-
# Description
|
10
|
-
# -----------
|
11
|
-
# This function
|
12
|
-
# print the help
|
13
|
-
# message on STDOUT
|
14
|
-
# -----------------
|
15
|
-
|
16
|
-
def showHelp()
|
17
|
-
STDOUT.puts("MaGnuX Mp3 Management server - Ruby Edition v0.2a\n-------------------------------------------------\n\n--help\t\t\tShow this message\n--debug on\t\tShow some debug data\n--configfile file\tSelect configuration file\n--daemon, -D (yes*|no)\tGo to background on startup\n\n")
|
18
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
<row> <p></row>
|
4
|
-
|
5
|
-
<horizontal>
|
6
|
-
|
7
|
-
<button caption=\"View Event\" action=\"runrwdschedulemenu1\"/>
|
8
|
-
<p>Open View Events - see data ..........................................................................................</p>
|
9
|
-
|
10
|
-
</horizontal>
|
11
|
-
|
12
|
-
<horizontal>
|
13
|
-
|
14
|
-
<button caption=\"Edit Event\" action=\"runrwdschedulemenu2\"/>
|
15
|
-
<p>Open Edit Event Screen to create new record or change data Tab......................................</p>
|
16
|
-
|
17
|
-
</horizontal>
|
18
|
-
|
19
|
-
<horizontal>
|
20
|
-
<button caption=\"Event Utilities Screen\" action=\"runrwdschedulemenu3\"/>
|
21
|
-
<p>Open Contact Utilities - rename, delete, attach photos Tab.................................</p>
|
22
|
-
</horizontal>
|
23
|
-
|
24
|
-
<horizontal>
|
25
|
-
<button caption=\"Event Data Sync Screen\" action=\"runrwdschedulemenu4\"/>
|
26
|
-
<p>Open Contact Sync - upload and download Schedule data Tab.....................</p>
|
27
|
-
</horizontal>
|
28
|
-
|
29
|
-
<horizontal>
|
30
|
-
|
31
|
-
<button caption=\"RwdSchedule Configuration Editing Screen\" action=\"runrwdschedulemenu10\"/>
|
32
|
-
<p> Open Configuration File to View or Edit Tab.....................</p>
|
33
|
-
</horizontal>
|
34
|
-
|
35
|
-
"
|
36
|
-
|
@@ -1,15 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
<row> <p></row>
|
4
|
-
|
5
|
-
<horizontal>
|
6
|
-
|
7
|
-
<button caption=\"RwdSchedule Sync Window\" action=\"runrwdschedulesyncbackwindow\"/>
|
8
|
-
<p>Open RwdSchedule Data Sync back window...........................................</p>
|
9
|
-
</horizontal>
|
10
|
-
<horizontal>
|
11
|
-
<button caption=\"Open Schedule ics file Window\" action=\"runrwdscheduleicsbackwindow\"/>
|
12
|
-
<p>Open ics file utilities back window....................................................</p>
|
13
|
-
</horizontal>"
|
14
|
-
|
15
|
-
|
@@ -1,21 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
|
4
|
-
<horizontal>
|
5
|
-
|
6
|
-
<button caption=\"Open Documents Tab\" action=\"runrwdaddressesmenu11\"/>
|
7
|
-
<p> Open RwdTinker and Rwdaddresses Documents Tab..........................................</p>
|
8
|
-
|
9
|
-
</horizontal>
|
10
|
-
|
11
|
-
<horizontal>
|
12
|
-
|
13
|
-
<button caption=#{Message[:rwdtinker_help_window]} action=\"runhelpwindow\"/>
|
14
|
-
<p> Open RwdTinker Help Window...................................................................... </p>
|
15
|
-
|
16
|
-
</horizontal>
|
17
|
-
|
18
|
-
|
19
|
-
"
|
20
|
-
|
21
|
-
|
@@ -1,36 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
<row> <p></row>
|
4
|
-
|
5
|
-
<horizontal>
|
6
|
-
|
7
|
-
<button caption=\"View Event\" action=\"runrwdschedulemenu1\"/>
|
8
|
-
<p>Open View Events - see data ..........................................................................................</p>
|
9
|
-
|
10
|
-
</horizontal>
|
11
|
-
|
12
|
-
<horizontal>
|
13
|
-
|
14
|
-
<button caption=\"Edit Event\" action=\"runrwdschedulemenu2\"/>
|
15
|
-
<p>Open Edit Event Screen to create new record or change data Tab......................................</p>
|
16
|
-
|
17
|
-
</horizontal>
|
18
|
-
|
19
|
-
<horizontal>
|
20
|
-
<button caption=\"Event Utilities Screen\" action=\"runrwdschedulemenu3\"/>
|
21
|
-
<p>Open Contact Utilities - rename, delete, attach photos Tab.................................</p>
|
22
|
-
</horizontal>
|
23
|
-
|
24
|
-
<horizontal>
|
25
|
-
<button caption=\"Event Data Sync Screen\" action=\"runrwdschedulemenu4\"/>
|
26
|
-
<p>Open Contact Sync - upload and download Schedule data Tab.....................</p>
|
27
|
-
</horizontal>
|
28
|
-
|
29
|
-
<horizontal>
|
30
|
-
|
31
|
-
<button caption=\"RwdSchedule Configuration Editing Screen\" action=\"runrwdschedulemenu10\"/>
|
32
|
-
<p> Open Configuration File to View or Edit Tab.....................</p>
|
33
|
-
</horizontal>
|
34
|
-
|
35
|
-
"
|
36
|
-
|
@@ -1,11 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
<row> <p></row>
|
4
|
-
|
5
|
-
|
6
|
-
<horizontal>
|
7
|
-
<button caption=\"Open Schedule ics file Window\" action=\"runrwdscheduleicsbackwindow\"/>
|
8
|
-
<p>Open ics file utilities back window....................................................</p>
|
9
|
-
</horizontal>"
|
10
|
-
|
11
|
-
|
@@ -1,21 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
|
4
|
-
<horizontal>
|
5
|
-
|
6
|
-
<button caption=\"Open Documents Tab\" action=\"runrwdaddressesmenu11\"/>
|
7
|
-
<p> Open RwdTinker and Rwdaddresses Documents Tab..........................................</p>
|
8
|
-
|
9
|
-
</horizontal>
|
10
|
-
|
11
|
-
<horizontal>
|
12
|
-
|
13
|
-
<button caption=#{Message[:rwdtinker_help_window]} action=\"runhelpwindow\"/>
|
14
|
-
<p> Open RwdTinker Help Window...................................................................... </p>
|
15
|
-
|
16
|
-
</horizontal>
|
17
|
-
|
18
|
-
|
19
|
-
"
|
20
|
-
|
21
|
-
|