Some further tweaking

pull/2/head
Jean-Marc MEESSEN 4 years ago
parent 8c35ac4650
commit 12c892c6b0

2
.gitignore vendored

@ -5,7 +5,7 @@
*.so
*.dylib
FLEcli
executables/*
#executables/*
test/output/temp/*
# Test binary, built with `go test -c`

@ -1,4 +1,4 @@
package cmd
//VersionString is the version that will be displayed with the -v switch
const VersionString = "v0.0.0.0-12-geec547e (2020-07-16)"
const VersionString = "v0.0.0.0-15-g8c35ac4 (2020-07-16)"

@ -71,6 +71,10 @@ func processAdifCommand() {
fmt.Println("Missing MY-WWFF reference. Aborting...")
return
}
if loadedLogFile[0].Operator == "" {
fmt.Println("Missing Operator. Aborting...")
return
}
}
if isSOTAcli {
if loadedLogFile[0].MySOTA == "" {

@ -27,8 +27,6 @@ import (
// outputAdif generates and writes data in ADIF format
func outputAdif(outputFile string, fullLog []LogLine, isWWFF bool, isSOTA bool) {
//TODO: validate input data for combination
//convert the log data to an in-memory ADIF file
adifData := buildAdif(fullLog, isWWFF, isSOTA)
@ -57,8 +55,14 @@ func buildAdif(fullLog []LogLine, isWWFF bool, isSOTA bool) (adifList []string)
}
adifLine.WriteString(adifElement("RST_SENT", logLine.RSTsent))
adifLine.WriteString(adifElement("RST_RCVD", logLine.RSTrcvd))
if logLine.Comment != "" {
adifLine.WriteString(adifElement("COMMENT", logLine.Comment))
}
if logLine.OMname != "" {
adifLine.WriteString(adifElement("NAME", logLine.OMname))
}
if logLine.QSLmsg != "" {
adifLine.WriteString(adifElement("QSLMSG", logLine.RSTrcvd))
adifLine.WriteString(adifElement("QSLMSG", logLine.QSLmsg))
}
if isWWFF {
adifLine.WriteString(adifElement("MY_SIG", "WWFF"))
@ -103,7 +107,7 @@ func writeFile(outputFile string, adifData []string) {
checkFileError(err)
lineCount++
}
fmt.Printf("\nSuccessfully wrote %d lines to file \"%s\"", lineCount, outputFile)
fmt.Printf("\nSuccessfully wrote %d lines to file \"%s\"\n", lineCount, outputFile)
}
// adifElement generated the ADIF sub-element

Binary file not shown.

@ -13,3 +13,5 @@ echo "--------------------------"
echo "--------------------------"
./FLEcli -i test/FLE-sample/sota_wwff.txt csv -o=test/output/temp/sota_wwff.csv --interpolate --overwrite
diff test/output/temp/sota_wwff.csv test/FLE-sample/sota_wwff.csv --strip-trailing-cr && echo "no difference" || echo "differences!"
echo "--------------------------"
./FLEcli -i test/FLE-sample/sota_wwff.txt adif -o=test/output/temp/sota_wwff.adif --interpolate --overwrite --wwff --sota

@ -1,7 +1,7 @@
{ Sample WWFF and SOTA log }
# Header
mycall g3wgv
operator
mycall g3wgv/p
operator g3wgv
mywwff gff-0014
mysota g/ld-008

Loading…
Cancel
Save