|
|
|
@ -53,7 +53,6 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|
|
|
|
isInferTimeFatalError := false
|
|
|
|
|
|
|
|
|
|
regexpLineComment := regexp.MustCompile(`^[[:blank:]]*#`)
|
|
|
|
|
regexpInLineComment := regexp.MustCompile(`.*#.*`)
|
|
|
|
|
regexpOnlySpaces := regexp.MustCompile(`^\s+$`)
|
|
|
|
|
regexpSingleMultiLineComment := regexp.MustCompile(`^[[:blank:]]*{.+}$`)
|
|
|
|
|
regexpStartMultiLineComment := regexp.MustCompile(`^[[:blank:]]*{`)
|
|
|
|
@ -65,6 +64,7 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|
|
|
|
regexpHeaderMySota := regexp.MustCompile(`(?i)^mysota\s+`)
|
|
|
|
|
regexpHeaderMyPota := regexp.MustCompile(`(?i)^mypota\s+`)
|
|
|
|
|
regexpHeaderMyGrid := regexp.MustCompile(`(?i)^mygrid\s+`)
|
|
|
|
|
regexpHeaderMyCounty := regexp.MustCompile(`(?i)^mycounty\s+`)
|
|
|
|
|
regexpHeaderQslMsg := regexp.MustCompile(`(?i)^qslmsg\s+`)
|
|
|
|
|
regexpHeaderNickname := regexp.MustCompile(`(?i)^nickname\s+`)
|
|
|
|
|
|
|
|
|
@ -74,6 +74,7 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|
|
|
|
headerMySOTA := ""
|
|
|
|
|
headerMyPOTA := ""
|
|
|
|
|
headerMyGrid := ""
|
|
|
|
|
headerMyCounty := ""
|
|
|
|
|
headerQslMsg := ""
|
|
|
|
|
headerNickname := ""
|
|
|
|
|
headerIsFirstLine := true
|
|
|
|
@ -106,10 +107,6 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|
|
|
|
if (len(eachline) == 0) || (regexpOnlySpaces.MatchString(eachline)) {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
// a comment starts somewhere on the line, remove the comment
|
|
|
|
|
if regexpInLineComment.MatchString(eachline) {
|
|
|
|
|
eachline = strings.Split(eachline, "#")[0]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Process multi-line comments
|
|
|
|
|
if regexpStartMultiLineComment.MatchString(eachline) {
|
|
|
|
@ -252,6 +249,16 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//My County
|
|
|
|
|
if regexpHeaderMyCounty.MatchString(eachline) {
|
|
|
|
|
myMyCountyList := regexpHeaderMyCounty.Split(eachline, -1)
|
|
|
|
|
if len(myMyCountyList[1]) > 0 {
|
|
|
|
|
headerMyCounty = myMyCountyList[1]
|
|
|
|
|
}
|
|
|
|
|
//If there is no data after the marker, we just skip the data.
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//QSL Message
|
|
|
|
|
if regexpHeaderQslMsg.MatchString(eachline) {
|
|
|
|
|
myQslMsgList := regexpHeaderQslMsg.Split(eachline, -1)
|
|
|
|
@ -291,6 +298,7 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|
|
|
|
previousLogLine.MyPOTA = headerMyPOTA
|
|
|
|
|
previousLogLine.MySOTA = headerMySOTA
|
|
|
|
|
previousLogLine.MyGrid = headerMyGrid
|
|
|
|
|
previousLogLine.MyCounty = headerMyCounty
|
|
|
|
|
previousLogLine.QSLmsg = headerQslMsg //previousLogLine.QslMsg is redundant
|
|
|
|
|
previousLogLine.Nickname = headerNickname
|
|
|
|
|
|
|
|
|
|