System.Data.SQLite

Check-in [343a18aca8]
Login

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

Overview
Comment:Tighten up the regular expressions used to update the download page.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | preRelease
Files: files | file ages | folders
SHA1: 343a18aca8777a22a4eadb2691f4b7d7d6dc53bc
User & Date: mistachkin 2019-03-03 21:38:08.489
Context
2019-03-03
21:44
Another minor correction. check-in: 3429e51d53 user: mistachkin tags: preRelease
21:38
Tighten up the regular expressions used to update the download page. check-in: 343a18aca8 user: mistachkin tags: preRelease
21:04
Update master release archive manifest. check-in: be53ffd847 user: mistachkin tags: preRelease
Changes
Unified Diff Show Whitespace Changes Patch
Changes to Setup/updateFileInfo.tcl.
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
    [string length $outputDirectory] == 0} then {
  set outputDirectory [file join $path Output]
}

#
# NOTE: Setup the regular expression patterns with the necessary captures.
#       These patterns are mostly non-greedy; however, at the end we need to
#       match exactly 40 hexadecimal characters.  In theory, in Tcl, this could
#       have an undefined result due to the mixing of greedy and non-greedy
#       quantifiers; however, in practice, this seems to work properly.  Also,
#       this pattern assumes a particular structure for the [HTML] file to be
#       updated.
#
set pattern1 {<a\
    href=".*?/(.*?\.(?:exe|zip|nupkg))">.*?\((\d+?\.\d+?) MiB\).*?sha1:\
    ([0-9A-F]{40})}

set pattern2 {<a\
    href=".*?/package/.*?/\d+\.\d+\.\d+\.\d+">(.*?)</a>.*?\((\d+?\.\d+?)\
    MiB\).*?sha1: ([0-9A-F]{40})}

set pattern3 {href="/downloads/(.*?)"}
set pattern4 {\(sha1: ([0-9A-F]{40})\)}
set pattern5 {\((\d+?\.\d+?) MiB\)}

#
# NOTE: Grab all the data from the file to be updated.
#
set data [readFile $updateFileName]







|


|



|



|


|







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
    [string length $outputDirectory] == 0} then {
  set outputDirectory [file join $path Output]
}

#
# NOTE: Setup the regular expression patterns with the necessary captures.
#       These patterns are mostly non-greedy; however, at the end we need to
#       match exactly 40 hexadecimal characters.  In theory, in Tcl, this can
#       have an undefined result due to the mixing of greedy and non-greedy
#       quantifiers; however, in practice, this seems to work properly.  Also,
#       these patterns assume a particular structure for the [HTML] file to be
#       updated.
#
set pattern1 {<a\
    href=".*?/([^"]*?\.(?:exe|zip|nupkg))">.*?\((\d+?\.\d+?) MiB\).*?sha1:\
    ([0-9A-F]{40})}

set pattern2 {<a\
    href="[^"]*?/package/[^"]*?/\d+\.\d+\.\d+\.\d+">(.*?)</a>.*?\((\d+?\.\d+?)\
    MiB\).*?sha1: ([0-9A-F]{40})}

set pattern3 {href="/downloads/([^"]*?)"}
set pattern4 {\(sha1: ([0-9A-F]{40})\)}
set pattern5 {\((\d+?\.\d+?) MiB\)}

#
# NOTE: Grab all the data from the file to be updated.
#
set data [readFile $updateFileName]