mirror of
https://github.com/on4kjm/FLEcli.git
synced 2025-01-18 13:01:09 +01:00
Generate a canonical POTA log without the --pota flag
There is no reason why a POTA log should not be generated like the canonical one without the --pota flag. Now the --pota flag turns on validation. If you forget to turn on --pota and include a MyPark header directive, POTA.app will reject your log because it is missing MY_SIG_INFO. Branch: support-pota-hunters
This commit is contained in:
parent
68754a82b1
commit
d36c6c776e
3 changed files with 8 additions and 2 deletions
|
@ -86,6 +86,6 @@ func init() {
|
|||
adifCmd.PersistentFlags().BoolVarP(&isInterpolateTime, "interpolate", "i", false, "Interpolates the missing time entries.")
|
||||
adifCmd.PersistentFlags().BoolVarP(&isWWFFcli, "wwff", "w", false, "Generates a WWFF ready ADIF file.")
|
||||
adifCmd.PersistentFlags().BoolVarP(&isSOTAcli, "sota", "s", false, "Generates a SOTA ready ADIF file.")
|
||||
adifCmd.PersistentFlags().BoolVarP(&isPOTAcli, "pota", "p", false, "Generates a POTA ready ADIF file.")
|
||||
adifCmd.PersistentFlags().BoolVarP(&isPOTAcli, "pota", "p", false, "Check if the POTA activation log is valid")
|
||||
adifCmd.PersistentFlags().BoolVarP(&isOverwrite, "overwrite", "o", false, "Overwrites the output file if it exisits")
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ func buildAdif(fullLog []LogLine, adifParams AdifParams) (adifList []string) {
|
|||
adifLine.WriteString(adifElement("SIG_INFO", logLine.WWFF))
|
||||
}
|
||||
}
|
||||
if adifParams.IsPOTA {
|
||||
if logLine.MyPOTA != "" {
|
||||
adifLine.WriteString(adifElement("MY_SIG", "POTA"))
|
||||
adifLine.WriteString(adifElement("MY_SIG_INFO", logLine.MyPOTA))
|
||||
}
|
||||
|
|
|
@ -35,6 +35,12 @@
|
|||
diff test/output/temp/sample_pota.adif test/output/POTA/sample_pota.adif --strip-trailing-cr
|
||||
}
|
||||
|
||||
@test "Is the generated POTA adif equivalent to the canonical one without the --pota flag?" {
|
||||
mkdir -p test/output/temp
|
||||
output=$(test/docker-FLEcli.sh adif -o -i test/data/sample_pota.txt test/output/temp/sample_pota.adif)
|
||||
diff test/output/temp/sample_pota.adif test/output/POTA/sample_pota.adif --strip-trailing-cr
|
||||
}
|
||||
|
||||
@test "Processing a FLE file with no QSO must fail!" {
|
||||
run test/docker-FLEcli.sh csv -o -i test/data/fle-4-no-qso.txt
|
||||
[ "$status" -eq 1 ]
|
||||
|
|
Loading…
Reference in a new issue