Snake case

main
Bob Mottram 2022-02-21 16:58:37 +00:00
parent d2901ece12
commit afba6a4364
2 changed files with 8 additions and 7 deletions

View File

@ -178,7 +178,7 @@ def _is_happening_post(post_json_object: {}) -> bool:
def get_todays_events(base_dir: str, nickname: str, domain: str,
curr_year: int, curr_month_number: int,
currDayOfMonth: int) -> {}:
curr_day_of_month: int) -> {}:
"""Retrieves calendar events for today
Returns a dictionary of lists containing Event and Place activities
"""
@ -191,10 +191,10 @@ def get_todays_events(base_dir: str, nickname: str, domain: str,
month_number = now.month
else:
month_number = curr_month_number
if not currDayOfMonth:
if not curr_day_of_month:
day_number = now.day
else:
day_number = currDayOfMonth
day_number = curr_day_of_month
calendar_filename = \
acct_dir(base_dir, nickname, domain) + \

View File

@ -267,9 +267,11 @@ def html_calendar(person_cache: {}, css_cache: {}, translate: {},
"""
domain = remove_domain_port(domain_full)
month_number = 0
default_year = 1970
default_month = 0
month_number = default_month
day_number = None
year = 1970
year = default_year
actor = http_prefix + '://' + domain_full + path.replace('/calendar', '')
if '?' in actor:
first = True
@ -296,7 +298,7 @@ def html_calendar(person_cache: {}, css_cache: {}, translate: {},
actor = actor.split('?')[0]
curr_date = datetime.now()
if year == 1970 and month_number == 0:
if year == default_year and month_number == default_month:
year = curr_date.year
month_number = curr_date.month
@ -318,7 +320,6 @@ def html_calendar(person_cache: {}, css_cache: {}, translate: {},
year, month_number,
day_number,
person_cache)
day_events = None
events = \
get_todays_events(base_dir, nickname, domain,