diff --git a/daemon.py b/daemon.py index ca2254298..e85d7064c 100644 --- a/daemon.py +++ b/daemon.py @@ -526,6 +526,7 @@ class PubServer(BaseHTTPRequestHandler): schedule_post = False event_date = None event_time = None + event_end_time = None location = None conversation_id = None city = get_spoofed_city(self.server.city, @@ -552,7 +553,7 @@ class PubServer(BaseHTTPRequestHandler): subject, schedule_post, event_date, - event_time, + event_time, event_end_time, location, False, self.server.system_language, conversation_id, @@ -18835,6 +18836,8 @@ class PubServer(BaseHTTPRequestHandler): fields['eventDate'] = None if not fields.get('eventTime'): fields['eventTime'] = None + if not fields.get('eventEndTime'): + fields['eventEndTime'] = None if not fields.get('location'): fields['location'] = None if not fields.get('languagesDropdown'): @@ -18905,6 +18908,7 @@ class PubServer(BaseHTTPRequestHandler): fields['schedulePost'], fields['eventDate'], fields['eventTime'], + fields['eventEndTime'], fields['location'], False, fields['languagesDropdown'], conversation_id, @@ -18999,6 +19003,7 @@ class PubServer(BaseHTTPRequestHandler): fields['schedulePost'], fields['eventDate'], fields['eventTime'], + fields['eventEndTime'], fields['location'], fields['languagesDropdown'], conversation_id, @@ -19162,6 +19167,7 @@ class PubServer(BaseHTTPRequestHandler): fields['schedulePost'], fields['eventDate'], fields['eventTime'], + fields['eventEndTime'], fields['location'], fields['languagesDropdown'], conversation_id, @@ -19223,6 +19229,7 @@ class PubServer(BaseHTTPRequestHandler): fields['schedulePost'], fields['eventDate'], fields['eventTime'], + fields['eventEndTime'], fields['location'], fields['languagesDropdown'], conversation_id, @@ -19296,6 +19303,7 @@ class PubServer(BaseHTTPRequestHandler): fields['schedulePost'], fields['eventDate'], fields['eventTime'], + fields['eventEndTime'], fields['location'], fields['languagesDropdown'], conversation_id, @@ -19361,6 +19369,7 @@ class PubServer(BaseHTTPRequestHandler): True, fields['schedulePost'], fields['eventDate'], fields['eventTime'], + fields['eventEndTime'], fields['location'], fields['languagesDropdown'], conversation_id, diff --git a/desktop_client.py b/desktop_client.py index 805bc2c4a..d14f0cb88 100644 --- a/desktop_client.py +++ b/desktop_client.py @@ -472,6 +472,7 @@ def _desktop_reply_to_post(session, post_id: str, say_str = 'Sending reply' event_date = None event_time = None + event_end_time = None location = None _say_command(say_str, say_str, screenreader, system_language, espeak) if send_post_via_server(signing_priv_key_pem, __version__, @@ -484,7 +485,7 @@ def _desktop_reply_to_post(session, post_id: str, cached_webfingers, person_cache, is_article, system_language, languages_understood, low_bandwidth, content_license_url, - event_date, event_time, location, + event_date, event_time, event_end_time, location, debug, post_id, post_id, conversation_id, subject) == 0: say_str = 'Reply sent' @@ -545,6 +546,7 @@ def _desktop_new_post(session, say_str = 'Sending' event_date = None event_time = None + event_end_time = None location = None _say_command(say_str, say_str, screenreader, system_language, espeak) if send_post_via_server(signing_priv_key_pem, __version__, @@ -557,7 +559,7 @@ def _desktop_new_post(session, cached_webfingers, person_cache, is_article, system_language, languages_understood, low_bandwidth, content_license_url, - event_date, event_time, location, + event_date, event_time, event_end_time, location, debug, None, None, conversation_id, subject) == 0: say_str = 'Post sent' @@ -1278,6 +1280,7 @@ def _desktop_new_dm_base(session, to_handle: str, event_date = None event_time = None + event_end_time = None location = None say_str = 'Sending' @@ -1292,7 +1295,7 @@ def _desktop_new_dm_base(session, to_handle: str, cached_webfingers, person_cache, is_article, system_language, languages_understood, low_bandwidth, content_license_url, - event_date, event_time, location, + event_date, event_time, event_end_time, location, debug, None, None, conversation_id, subject) == 0: say_str = 'Direct message sent' diff --git a/epicyon.py b/epicyon.py index 46dc0b418..68d1e61a4 100644 --- a/epicyon.py +++ b/epicyon.py @@ -130,6 +130,10 @@ parser.add_argument('--eventTime', type=str, default=None, help='Time for an event when sending a c2s post' + ' HH:MM') +parser.add_argument('--eventEndTime', type=str, + default=None, + help='Time when an event ends when sending a c2s post' + + ' HH:MM') parser.add_argument('--eventLocation', type=str, default=None, help='Location for an event when sending a c2s post') @@ -1445,7 +1449,12 @@ if args.message: if args.eventTime: if ':' not in args.eventTime or len(args.eventTime) != 5: - print('Event time format should be HH:MM') + print('Event start time format should be HH:MM') + sys.exit() + + if args.eventEndTime: + if ':' not in args.eventEndTime or len(args.eventEndTime) != 5: + print('Event end time format should be HH:MM') sys.exit() if not args.password: @@ -1523,7 +1532,8 @@ if args.message: args.language, languages_understood, args.low_bandwidth, args.content_license_url, - args.eventDate, args.eventTime, args.eventLocation, + args.eventDate, args.eventTime, args.eventEndTime, + args.eventLocation, args.debug, reply_to, reply_to, args.conversationId, subject) for i in range(10): @@ -3155,6 +3165,7 @@ if args.testdata: test_schedule_post = False test_event_date = None test_event_time = None + test_event_end_time = None test_location = None test_is_article = False conversation_id = None @@ -3171,7 +3182,8 @@ if args.testdata: test_media_type, test_image_description, test_city, test_in_reply_to, test_in_reply_to_atom_uri, test_subject, test_schedule_post, - test_event_date, test_event_time, test_location, + test_event_date, test_event_time, test_event_end_time, + test_location, test_is_article, args.language, conversation_id, low_bandwidth, args.content_license_url, languages_understood) @@ -3185,7 +3197,8 @@ if args.testdata: test_media_type, test_image_description, test_city, test_in_reply_to, test_in_reply_to_atom_uri, test_subject, test_schedule_post, - test_event_date, test_event_time, test_location, + test_event_date, test_event_time, test_event_end_time, + test_location, test_is_article, args.language, conversation_id, low_bandwidth, args.content_license_url, languages_understood) @@ -3199,7 +3212,8 @@ if args.testdata: test_media_type, test_image_description, test_city, test_in_reply_to, test_in_reply_to_atom_uri, test_subject, test_schedule_post, - test_event_date, test_event_time, test_location, + test_event_date, test_event_time, test_event_end_time, + test_location, test_is_article, args.language, conversation_id, low_bandwidth, args.content_license_url, languages_understood) @@ -3213,7 +3227,8 @@ if args.testdata: test_media_type, test_image_description, test_city, 'someone', test_in_reply_to_atom_uri, test_subject, test_schedule_post, - test_event_date, test_event_time, test_location, + test_event_date, test_event_time, test_event_end_time, + test_location, test_is_article, args.language, conversation_id, low_bandwidth, args.content_license_url, languages_understood) @@ -3228,7 +3243,8 @@ if args.testdata: 'Description of image', test_city, test_in_reply_to, test_in_reply_to_atom_uri, test_subject, test_schedule_post, - test_event_date, test_event_time, test_location, + test_event_date, test_event_time, test_event_end_time, + test_location, test_is_article, args.language, conversation_id, low_bandwidth, args.content_license_url, languages_understood) @@ -3242,7 +3258,8 @@ if args.testdata: test_media_type, test_image_description, test_city, test_in_reply_to, test_in_reply_to_atom_uri, test_subject, test_schedule_post, - test_event_date, test_event_time, test_location, + test_event_date, test_event_time, test_event_end_time, + test_location, test_is_article, args.language, conversation_id, low_bandwidth, args.content_license_url, languages_understood) @@ -3256,7 +3273,8 @@ if args.testdata: test_media_type, test_image_description, test_city, test_in_reply_to, test_in_reply_to_atom_uri, test_subject, test_schedule_post, - test_event_date, test_event_time, test_location, + test_event_date, test_event_time, test_event_end_time, + test_location, test_is_article, args.language, conversation_id, low_bandwidth, args.content_license_url, languages_understood) @@ -3270,7 +3288,8 @@ if args.testdata: test_media_type, test_image_description, test_city, test_in_reply_to, test_in_reply_to_atom_uri, test_subject, test_schedule_post, - test_event_date, test_event_time, test_location, + test_event_date, test_event_time, test_event_end_time, + test_location, test_is_article, args.language, conversation_id, low_bandwidth, args.content_license_url, languages_understood) diff --git a/inbox.py b/inbox.py index d8e443d76..c1e70a3f7 100644 --- a/inbox.py +++ b/inbox.py @@ -3185,6 +3185,7 @@ def _bounce_dm(senderPostId: str, session, http_prefix: str, schedule_post = False event_date = None event_time = None + event_end_time = None location = None conversation_id = None low_bandwidth = False @@ -3197,8 +3198,8 @@ def _bounce_dm(senderPostId: str, session, http_prefix: str, image_description, city, in_reply_to, in_reply_to_atom_uri, subject, debug, schedule_post, - event_date, event_time, location, - system_language, conversation_id, + event_date, event_time, event_end_time, + location, system_language, conversation_id, low_bandwidth, content_license_url, languages_understood, bounce_is_chat) diff --git a/maps.py b/maps.py index 27d9e4586..c4ecac990 100644 --- a/maps.py +++ b/maps.py @@ -215,7 +215,9 @@ def geocoords_from_map_link(url: str, def html_open_street_map(url: str, bounding_box_degrees: float, - translate: {}) -> str: + translate: {}, + width: str = "725", + height: str = "650") -> str: """Returns embed html for an OSM link """ osm_domain = 'openstreetmap.org' @@ -228,7 +230,8 @@ def html_open_street_map(url: str, return '' html_str = \ - '