Created
March 3, 2019 21:15
-
-
Save laemmy/c292704d010e3d57f047eb0acd4135ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
import requests | |
import json | |
URL="https://repeatermap.de/api.php" | |
result=requests.get(URL) | |
repeater=result.json() | |
def print_csv(): | |
#print("0;num;type;callsign;dmrid;qrg;shift;cc;mix;ctcss;net;city;cnty;country;ctry;lat;lon;longcall;callext1;callext2;txcontact1;rxgroup1;txcontact2;rxgroup2;pwr;scanlist1;scanlist2;scanlistfm") | |
print ('999;',i,';','a;',channelname,tx,str(rx-tx),mode) | |
# print (call,qth,rx,tx,str(rx-tx),mode) | |
i=0 | |
for r in repeater["relais"]: | |
# Nicht alle Repeater haben lat und lon | |
# Hier sollte dann ueber Locator gefiltert | |
# werden | |
lat = r["lat"] if "lat" in r else 0 | |
lon = r["lon"] if "lon" in r else 0 | |
loc = r["locator"] | |
mode = r["mode"] | |
rx = r["rx"] | |
tx = r["tx"] | |
call=r["call"] | |
qth=r["qth"] | |
channelname = r["call"],r["tx"] | |
if mode != "FM": | |
continue | |
if loc[:4] in ["JO62","JO63"]: | |
i = i +1 | |
print_csv() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment