# # vx2.py # # Create .csv file for VX-2 commander (www.kc8unj.com/index.html) # from repeaters.csv (www.ukrepeater.net). # # Pat Galea, 2006 # dudegalea.co.uk # fIn=open('C:/work/ham/repeaterlist.csv','r') file=fIn.readlines() out=open('C:/work/ham/vx2.csv','w') out.write("Tag,Freq,Name,Mode,Scn Md,Step,Masked,RPT SH,Shift,TS/DCS,Tone,DCS,TX Pwr,Dev,Clk Sh\r") for line in file: band=0 items=line.split(',') call=items[0] try: freq=float(items[2]) except: continue tone=items[8] if (freq>140) and (freq<150): band=2 step="12.5 KHz" rptsh="-RPT" shift="0.600" if (freq>430) and (freq<440): band=70 step="25 KHz" rptsh="+RPT" shift="1.600" if band==0: continue tone=tone.split(' ')[1] out.write(call+','+'%3.3f' % freq+',ALPHA,NFM,OFF,'+step+',NO,'+rptsh+','+shift+',TONE,'+tone+',023,HIGH,NORM,OFF\r')