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.

@ -12,4 +12,6 @@ echo "--------------------------"
./FLEcli -i test/data/ON4KJM@ONFF-025920200524.txt load
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!"
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,12 +1,12 @@
ADIF Export for Fast Log Entry by DF3CB
<PROGRAMID:3>FLE
<ADIF_VER:5>3.1.0
<EOH>
<STATION_CALLSIGN:5>G3WGV <CALL:5>G4ELZ <QSO_DATE:8>20160424 <TIME_ON:4>1202 <BAND:3>40m <MODE:2>CW <RST_SENT:3>599 <RST_RCVD:3>599 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:5>G3NOH <QSO_DATE:8>20160424 <TIME_ON:4>1204 <BAND:3>40m <MODE:2>CW <RST_SENT:3>599 <RST_RCVD:3>599 <COMMENT:14>PSE QSL Direct <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:6>GW4GTE <QSO_DATE:8>20160424 <TIME_ON:4>1227 <BAND:2>2m <MODE:2>FM <RST_SENT:2>59 <RST_RCVD:2>59 <NAME:4>Dave <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:8>GW0TLK/M <QSO_DATE:8>20160424 <TIME_ON:4>1228 <BAND:2>2m <MODE:2>FM <RST_SENT:2>59 <RST_RCVD:2>59 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <SIG:4>WWFF <SIG_INFO:9>GWFF-0021 <MY_SOTA_REF:8>G/LD-008 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:6>GM0AAA <QSO_DATE:8>20160603 <TIME_ON:4>1404 <BAND:3>40m <MODE:2>CW <RST_SENT:3>539 <RST_RCVD:3>579 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:7>ON4CK/P <QSO_DATE:8>20160603 <TIME_ON:4>1405 <BAND:3>40m <MODE:2>CW <RST_SENT:3>529 <RST_RCVD:3>599 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <SOTA_REF:9>ON/ON-018 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:8>DL0DAN/P <QSO_DATE:8>20160603 <TIME_ON:4>1407 <BAND:3>40m <MODE:2>CW <RST_SENT:3>599 <RST_RCVD:3>599 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <SIG:4>WWFF <SIG_INFO:9>DLFF-0002 <MY_SOTA_REF:8>G/LD-008 <SOTA_REF:9>DL/AL-044 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:5>YU7LS <QSO_DATE:8>20160603 <TIME_ON:4>1410 <BAND:3>20m <MODE:2>CW <RST_SENT:3>599 <RST_RCVD:3>599 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <EOR>
ADIF Export for Fast Log Entry by DF3CB
<PROGRAMID:3>FLE
<ADIF_VER:5>3.1.0
<EOH>
<STATION_CALLSIGN:5>G3WGV <CALL:5>G4ELZ <QSO_DATE:8>20160424 <TIME_ON:4>1202 <BAND:3>40m <MODE:2>CW <RST_SENT:3>599 <RST_RCVD:3>599 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:5>G3NOH <QSO_DATE:8>20160424 <TIME_ON:4>1204 <BAND:3>40m <MODE:2>CW <RST_SENT:3>599 <RST_RCVD:3>599 <COMMENT:14>PSE QSL Direct <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:6>GW4GTE <QSO_DATE:8>20160424 <TIME_ON:4>1227 <BAND:2>2m <MODE:2>FM <RST_SENT:2>59 <RST_RCVD:2>59 <NAME:4>Dave <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:8>GW0TLK/M <QSO_DATE:8>20160424 <TIME_ON:4>1228 <BAND:2>2m <MODE:2>FM <RST_SENT:2>59 <RST_RCVD:2>59 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <SIG:4>WWFF <SIG_INFO:9>GWFF-0021 <MY_SOTA_REF:8>G/LD-008 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:6>GM0AAA <QSO_DATE:8>20160603 <TIME_ON:4>1404 <BAND:3>40m <MODE:2>CW <RST_SENT:3>539 <RST_RCVD:3>579 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:7>ON4CK/P <QSO_DATE:8>20160603 <TIME_ON:4>1405 <BAND:3>40m <MODE:2>CW <RST_SENT:3>529 <RST_RCVD:3>599 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <SOTA_REF:9>ON/ON-018 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:8>DL0DAN/P <QSO_DATE:8>20160603 <TIME_ON:4>1407 <BAND:3>40m <MODE:2>CW <RST_SENT:3>599 <RST_RCVD:3>599 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <SIG:4>WWFF <SIG_INFO:9>DLFF-0002 <MY_SOTA_REF:8>G/LD-008 <SOTA_REF:9>DL/AL-044 <EOR>
<STATION_CALLSIGN:5>G3WGV <CALL:5>YU7LS <QSO_DATE:8>20160603 <TIME_ON:4>1410 <BAND:3>20m <MODE:2>CW <RST_SENT:3>599 <RST_RCVD:3>599 <MY_SIG:4>WWFF <MY_SIG_INFO:8>GFF-0014 <MY_SOTA_REF:8>G/LD-008 <EOR>

@ -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