Auto-update: Fri Nov 15 09:30:59 PST 2024

This commit is contained in:
sanj 2024-11-15 09:30:59 -08:00
parent a7c52fec65
commit 0de289101c

View file

@ -321,7 +321,7 @@ Obsidian helper. Takes a datetime and creates a new daily note. Note: it uses th
fm_day = date_time.strftime("%Y-%m-%d") fm_day = date_time.strftime("%Y-%m-%d")
_, weather_path = assemble_journal_path(date_time, filename="Weather", extension=".md", no_timestamp = True) _, weather_path = assemble_journal_path(date_time, filename="Weather", extension=".md", no_timestamp = True)
weather_note = await update_dn_weather(date_time) weather_note = await update_dn_weather(date_time, force_refresh=True)
weather_embed = f"![[{weather_path}]]\n" weather_embed = f"![[{weather_path}]]\n"
events = await update_daily_note_events(date_time) events = await update_daily_note_events(date_time)
@ -568,7 +568,7 @@ async def note_weather_get(
@note.post("/update/note/{date}") @note.post("/update/note/{date}")
async def post_update_daily_weather_and_calendar_and_timeslips(date: str, refresh: str="False") -> PlainTextResponse: async def post_update_daily_weather_and_calendar_and_timeslips(date: str, refresh: str="True") -> PlainTextResponse:
date_time = await gis.dt(date) date_time = await gis.dt(date)
l.debug(f"Using {date_time.strftime('%Y-%m-%d %H:%M:%S')} as our dt_datetime in post_update_daily_weather_and_calendar_and_timeslips.") l.debug(f"Using {date_time.strftime('%Y-%m-%d %H:%M:%S')} as our dt_datetime in post_update_daily_weather_and_calendar_and_timeslips.")
force_refresh_weather = refresh == "True" force_refresh_weather = refresh == "True"
@ -578,6 +578,7 @@ async def post_update_daily_weather_and_calendar_and_timeslips(date: str, refres
return f"[Refresh]({Sys.URL}/update/note/{date_time.strftime('%Y-%m-%d')}" return f"[Refresh]({Sys.URL}/update/note/{date_time.strftime('%Y-%m-%d')}"
async def update_dn_weather(date_time: dt_datetime, force_refresh: bool = False, lat: float = None, lon: float = None): async def update_dn_weather(date_time: dt_datetime, force_refresh: bool = False, lat: float = None, lon: float = None):
l.debug(f"Using {date_time.strftime('%Y-%m-%d %H:%M:%S')} as our datetime in update_dn_weather.") l.debug(f"Using {date_time.strftime('%Y-%m-%d %H:%M:%S')} as our datetime in update_dn_weather.")
try: try: