aprs-python icon indicating copy to clipboard operation
aprs-python copied to clipboard

Add function to clean WIDEn-N and * from path, leaving just digi callsigns

Open wsmitchell3 opened this issue 7 years ago • 1 comments

Added a function to turn a digi path list into a list of digis through which the packet passed. Path: ['K0ABC-1','WIDE1*','W0DEF-2','N0GHI-1*'] becomes digi path: ['K0ABC-1','W0DEF-2','N0GHI-1'] This is useful for anyone interested in getting just the digipeaters in the path without the extraneous routing info.

wsmitchell3 avatar Apr 04 '18 03:04 wsmitchell3

Hi @wsmitchell3, thanks for the contribution, but I feel this doesn't need to part of the package. It can be reduced to single line path = list(filter(lambda x: not re.match(r'WIDE[0-9\-\*]+$', x), path)). I'm not sure how useful this could be in general, but it could be put under like aprslib.util module as helper function.

rossengeorgiev avatar Apr 05 '18 23:04 rossengeorgiev