on4kjm / FLEcli

Multi-platform "Fast Log Entry"(FLE) processing tool
MIT License
32 stars 9 forks source link

Support for POTA prefix ending with a digit #108

Closed yu3fms closed 11 months ago

yu3fms commented 12 months ago

Hi all, right now FLECli throws error when parsing a pota reference whose prefix ends with a digit.

Processing errors: Parsing error at line 7: Unable to make sense of [HB0-0005]. Parsing error at line 8: Unable to make sense of [E7-0005]. Parsing error at line 9: Unable to make sense of [T9-0005].

So the line at https://github.com/on4kjm/FLEcli/blob/9f0664d0caff81b005cd6b319f9e784d87f35a34/fleprocess/validate.go#L54

should be var validPotaRegexp = regexp.MustCompile(^[\d]{0,1}[A-Z]{1,2}[\d]{0,1}-[\d]{4,5}$)

Rebuild with this change solves the issue. Someone with better knowledge of go regex then mine should look into this.

jmMeessen commented 11 months ago

Thank you for reporting this issue, OM.

Could someone more active than me in POTA activations, point me to the official reference rules documentation? Could maybe kill several flies in one clap.

jmMeessen commented 11 months ago

fixed and released v0.1.7 , @yu3fms

jmMeessen commented 11 months ago

FYI @thomasrussellmurphy if your want to do your Macports magic...

yu3fms commented 11 months ago

Smooth man, thanks!

thomasrussellmurphy commented 11 months ago

I've updated my request on the MacPorts side. Thanks for the updates!

yu3fms commented 11 months ago

Thank you for reporting this issue, OM.

Could someone more active than me in POTA activations, point me to the official reference rules documentation? Could maybe kill several flies in one clap.

Sorry for late response. Rules and docs are officially on https://docs.pota.app I have received list of all the current active unique park references. I will take time this weekend to make a dummy txt file with this data and run a FLECli through it and I will report back with everything.

w1mt commented 11 months ago

Looks like the prefix can be very varied. Look at Sovereign Military Order of Malta for instance 1A0KM is the prefix. The regex to contain all the possibilities is going to be a very complicated object.

yu3fms commented 11 months ago

Heh, indeed the test has not passed with one error. Here are the files:

pota_prefix_test_log.txt flecli_pota_test_log_output.txt

jmMeessen commented 11 months ago

Thank you very much for your interest and providing me test data. I propose to open a new issue (#111) to improve(and finalize) the POTA reference . This will help to keep things tidy (I am experimenting with changelog generation).

yu3fms commented 11 months ago

Thank you for writing this fine piece :) K, we'll move the discussion to #111