From 10287e3885a0e8a507aef84de43d65c139a8ab32 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Tue, 13 Dec 2022 01:35:39 -0500 Subject: [PATCH] Removed old gist posting in favor of just creating the geojson file. --- maps/ips_to_maps.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/maps/ips_to_maps.py b/maps/ips_to_maps.py index 7b2dc65..2193eaa 100644 --- a/maps/ips_to_maps.py +++ b/maps/ips_to_maps.py @@ -437,22 +437,9 @@ if __name__ == '__main__': if opts.map == 'Geo': geojson = get_geojson_dict(geo_json) print("\n") + geojson_file = '{}.geojson'.format(''.join(opts.filename)) + with open(geojson_file, 'w') as fp: + json.dump(geojson, fp, indent=4, sort_keys=True) - r = requests.post("https://api.github.com/gists", - json={ - "description": title_string, - "files": { - '{}.geojson'.format(filename): { - "content": json.dumps(geojson, indent=4) - } - } - }, - headers={ - 'Content-Type': 'application/json' - }) - - print(r.json()['html_url']) - if not opts.headless: - webbrowser.open(r.json()['html_url']) else: draw_map(opts.map, geo_json, filename, opts.headless, opts.legend)