File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,13 @@ def _cut(s, max_len=72):
120
120
return _cut (info ["display_name" ])
121
121
122
122
123
+ def format_map_url (lat , lng ):
124
+ return (
125
+ "https://www.google.com/maps/@?api=1&map_action=map&zoom=12&"
126
+ "basemap=satellite¢er={:.2f},{:.2f}" .format (lat , lng )
127
+ )
128
+
129
+
123
130
def format_lat_lng (lat , lng ):
124
131
s = ""
125
132
if lat < 0 :
@@ -339,11 +346,12 @@ def sentinel2_bot(
339
346
month = MONTHS [int (date [- 4 :- 2 ])]
340
347
year = date [:4 ]
341
348
342
- MSG = "{location} ({lat_lng}), {date}"
349
+ MSG = "{location} ({lat_lng}), {date} @ {url} "
343
350
msg = MSG .format (
344
351
date = "%s %s %s" % (day , month , year ),
345
352
lat_lng = format_lat_lng (lat , lng ),
346
353
location = get_address (lat , lng ),
354
+ url = format_map_url (lat , lng ),
347
355
)
348
356
logging .info ("Twitter message: %s" % msg )
349
357
delta = period - (time .time () - last_post )
You can’t perform that action at this time.
0 commit comments