Stringscan

Check-in [325cf64765]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Ready Mac release
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:325cf647653c7e6ca3cc81ddeece5bd742ddef5283a14c4fed80840c37a5fbea
User & Date: kevin 2018-05-26 21:03:45
Context
2018-05-26
21:21
Tweak error reporting check-in: 31641a2b1c user: kevin tags: trunk
21:03
Ready Mac release check-in: 325cf64765 user: kevin tags: trunk
18:54
Re-work search algorithm check-in: 4f0e359102 user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to mit.txt.

1
2
3
4
5
6
7
8
9


The MIT License (MIT)

Copyright (c) 2017 WordTech Communications LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INTHE SOFTWARE.




|





|
>
>
1
2
3
4
5
6
7
8
9
10
11
The MIT License (MIT)

Copyright (c) 2018 WordTech Communications LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Changes to scriptlibs/machelp/help.txt.

72
73
74
75
76
77
78
79
80
81

82
83
84
85
86
87
88
..
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
 * Various supporting libraries by Kevin Walzer. [https://fossil.codebykevin.com]
 * Mac version deployed via ruby2app [https://github.com/codebykevin/ruby2app]

-------------------
title: Stringscan Version History
alias: History

'''2.3 (June 1, 2018):'''
 * Migrate to new source code server. 
 * Minor bug fixes.


'''1.1 (October 1, 2017):'''
 * Add status field to indicate current activity of program.
 * Refinements to UI for better performance.

'''1.0 (August 1, 2017):''' 
 * Initial commercial release. 
................................................................................
title: License
alias: License
 
'''The MIT License (MIT)'''

Stringscan source code: [http://fossil.codebykevin.com/fossil.cgi/Stringscan/]

Copyright (c) 2017 WordTech Communications LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.








|

|
>







 







|







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
..
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
 * Various supporting libraries by Kevin Walzer. [https://fossil.codebykevin.com]
 * Mac version deployed via ruby2app [https://github.com/codebykevin/ruby2app]

-------------------
title: Stringscan Version History
alias: History

'''1.2 (June 1, 2018):'''
 * Migrate to new source code server. 
 * UI enhancements.
 * Improved search algorithm.

'''1.1 (October 1, 2017):'''
 * Add status field to indicate current activity of program.
 * Refinements to UI for better performance.

'''1.0 (August 1, 2017):''' 
 * Initial commercial release. 
................................................................................
title: License
alias: License
 
'''The MIT License (MIT)'''

Stringscan source code: [http://fossil.codebykevin.com/fossil.cgi/Stringscan/]

Copyright (c) 2018 WordTech Communications LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Changes to stringscan.rb.

43
44
45
46
47
48
49

50


51
52
53
54
55
56
57
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
        $appversion = '1.2'
        Tk.tk_call('machelp::setAppName', $appname, $appversion)
        Tk.tk_call('softwareupdate::setAppName', $appname)
        Tk.tk_call('softwareupdate::setVersion', $appname, $appversion)

        bgerror = Tk.install_cmd(proc{
            |*args|

            puts args


        })
        Tk.ip_eval("proc bgerror {args} {#{bgerror} $args}")

        if $platform == 'aqua'
            ##map ruby proc to "odoc" Apple Event
            setDir = Tk.install_cmd(proc{
                |*args|
................................................................................
            end
        end

        $grep_list = $lbox.get(0, 'end')
        num = $grep_list.count.to_s
        $bottomlabel.configure('text' => "Found #{num} matches for \"#{$searchterm}\" in #{$dirname}")
	rescue
    	puts "Directory not found.\n"
    	puts "Search complete.\n"
    end

def drawgui 
    begin
        Tk.ip_eval("console hide")
    rescue
        puts "Could not hide console.\n"
    end

    #image data
    $folderdata = 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAADFBMVEUEBwcEBwcEBwcEBwcNzGmPAAAAAXRSTlMAQObYZgAAAC1JREFUeAFjYEYABgQgXRhCowAyhNEAfmFMQFiYsJX0F6aa5xmxiTIygMQxRQEtWAMvBVlMnAAAAABJRU5ErkJggg=='

    $glassdata = 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AcSAg8sJGRWZAAAAXhJREFUOMutlL9LQlEUxz+WGRHllGNEPyAUWnLWsVYhXNpd+ldC6B/QPyDnoMXNtbnFIRAarLAn+bDU13IuHC/vPm/agQuXy/d93veec+4Bv9gGKkAbGAORrAHQBPLAOn+MAtBVMNdqARlfaEk+minAJ/AOvAEjC973gWeAnvpoCNSAfWAX2AKKQN36eWtRWhoK+grkErRXlvO8S7hjuah6pK2uwE2X6BKYiujFsx5FlfPBmkO0B6Rkf+8JfgZC2Wdd4EjtNzzBcwVzgccKfuIJzgJp2X+7RIfAjyrGkQe4pvTtpIcxUcLOgt7MSZ8bfcUFDWOebMfhvCp9btqzK7NlLspW/36ptjPrAbgDbqUVbQOFOKh++wFwLfCk4WNM9OS2scPGrA/gQODmbCIFnQpspm7TsIdPWqCPIkgJ9AZ4Uk97DFyIq3NgU7R9yf0wrliB5fZMxqI+K7FEnIpLe+5GkvMyK8SxoyArQTXcOA+XvX5SWoL/gP4Cdj2n/+OJ36AAAAAASUVORK5CYII='

................................................................................
                raise
            end
        }
    }.pack('side'=>'left','fill' => 'both', 'expand' => 'yes')
    $lbox.bind '<ListboxSelect>', proc {
        begin
            if $lbox.curselection.empty?
                puts "No selection in listbox."
            else
                highlighttext  $lbox.get($lbox.curselection[0])
            end
        rescue
            puts "Cannot get selection in listbox."
        end
    }
    $scrollframe = Tk::Frame.new($bottomleftframe).pack('side'=>'right','fill' => 'y', 'expand' => 'no')
    $listscroll = Tk::Tile::Scrollbar.new($scrollframe).pack('side'=>'right','fill' => 'y', 'expand' => 'no')
    $lbox.yscrollbar($listscroll)
    $bottomrightframe  =Tk::Tile::Frame.new($bottomframe)
    $tbox = Tk::Text::new($bottomrightframe){







>
|
>
>







 







<
<






<







 







|




|







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
...
111
112
113
114
115
116
117


118
119
120
121
122
123

124
125
126
127
128
129
130
...
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
        $appversion = '1.2'
        Tk.tk_call('machelp::setAppName', $appname, $appversion)
        Tk.tk_call('softwareupdate::setAppName', $appname)
        Tk.tk_call('softwareupdate::setVersion', $appname, $appversion)

        bgerror = Tk.install_cmd(proc{
            |*args|
             Tk::messageBox :type => 'error',
    :message => args,
    :icon => 'error', :title => 'Error',
    :parent => $root
        })
        Tk.ip_eval("proc bgerror {args} {#{bgerror} $args}")

        if $platform == 'aqua'
            ##map ruby proc to "odoc" Apple Event
            setDir = Tk.install_cmd(proc{
                |*args|
................................................................................
            end
        end

        $grep_list = $lbox.get(0, 'end')
        num = $grep_list.count.to_s
        $bottomlabel.configure('text' => "Found #{num} matches for \"#{$searchterm}\" in #{$dirname}")
	rescue


    end

def drawgui 
    begin
        Tk.ip_eval("console hide")
    rescue

    end

    #image data
    $folderdata = 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAADFBMVEUEBwcEBwcEBwcEBwcNzGmPAAAAAXRSTlMAQObYZgAAAC1JREFUeAFjYEYABgQgXRhCowAyhNEAfmFMQFiYsJX0F6aa5xmxiTIygMQxRQEtWAMvBVlMnAAAAABJRU5ErkJggg=='

    $glassdata = 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AcSAg8sJGRWZAAAAXhJREFUOMutlL9LQlEUxz+WGRHllGNEPyAUWnLWsVYhXNpd+ldC6B/QPyDnoMXNtbnFIRAarLAn+bDU13IuHC/vPm/agQuXy/d93veec+4Bv9gGKkAbGAORrAHQBPLAOn+MAtBVMNdqARlfaEk+minAJ/AOvAEjC973gWeAnvpoCNSAfWAX2AKKQN36eWtRWhoK+grkErRXlvO8S7hjuah6pK2uwE2X6BKYiujFsx5FlfPBmkO0B6Rkf+8JfgZC2Wdd4EjtNzzBcwVzgccKfuIJzgJp2X+7RIfAjyrGkQe4pvTtpIcxUcLOgt7MSZ8bfcUFDWOebMfhvCp9btqzK7NlLspW/36ptjPrAbgDbqUVbQOFOKh++wFwLfCk4WNM9OS2scPGrA/gQODmbCIFnQpspm7TsIdPWqCPIkgJ9AZ4Uk97DFyIq3NgU7R9yf0wrliB5fZMxqI+K7FEnIpLe+5GkvMyK8SxoyArQTXcOA+XvX5SWoL/gP4Cdj2n/+OJ36AAAAAASUVORK5CYII='

................................................................................
                raise
            end
        }
    }.pack('side'=>'left','fill' => 'both', 'expand' => 'yes')
    $lbox.bind '<ListboxSelect>', proc {
        begin
            if $lbox.curselection.empty?
                bgerror "No selection in listbox."
            else
                highlighttext  $lbox.get($lbox.curselection[0])
            end
        rescue
            bgerror "Cannot get selection in listbox."
        end
    }
    $scrollframe = Tk::Frame.new($bottomleftframe).pack('side'=>'right','fill' => 'y', 'expand' => 'no')
    $listscroll = Tk::Tile::Scrollbar.new($scrollframe).pack('side'=>'right','fill' => 'y', 'expand' => 'no')
    $lbox.yscrollbar($listscroll)
    $bottomrightframe  =Tk::Tile::Frame.new($bottomframe)
    $tbox = Tk::Text::new($bottomrightframe){