Following csv

main
Bob Mottram 2022-12-09 18:50:24 +00:00
parent 2d54823784
commit 9f7fd3293b
2 changed files with 5 additions and 5 deletions

View File

@ -176,7 +176,7 @@ def save_event_post(base_dir: str, handle: str, post_id: str,
with open(calendar_filename, 'a+', encoding='utf-8') as calendar_file: with open(calendar_filename, 'a+', encoding='utf-8') as calendar_file:
calendar_file.write(post_id + '\n') calendar_file.write(post_id + '\n')
except OSError: except OSError:
print('EX: unable to append ' + calendar_filename) print('EX: unable to append to calendar ' + calendar_filename)
# create a file which will trigger a notification that # create a file which will trigger a notification that
# a new event has been added # a new event has been added

View File

@ -113,8 +113,6 @@ def csv_following_list(following_filename: str,
for following_address in following_list: for following_address in following_list:
if not following_address: if not following_address:
continue continue
if following_list_csv:
following_list_csv += '\n'
following_nickname = \ following_nickname = \
get_nickname_from_actor(following_address) get_nickname_from_actor(following_address)
@ -139,9 +137,11 @@ def csv_following_list(following_filename: str,
person_notes = person_notes.replace('"', "'") person_notes = person_notes.replace('"', "'")
person_notes = person_notes.replace('\n', '<br>') person_notes = person_notes.replace('\n', '<br>')
person_notes = person_notes.replace(' ', ' ') person_notes = person_notes.replace(' ', ' ')
if not following_list_csv:
following_list_csv = \
'Account address,Show boosts,' + \
'Notify on new posts,Languages,Notes\n'
following_list_csv += \ following_list_csv += \
'Account address,Show boosts,' + \
'Notify on new posts,Languages,Notes\n' + \
following_address + ',' + \ following_address + ',' + \
str(announce_is_allowed).lower() + ',' + \ str(announce_is_allowed).lower() + ',' + \
notify_on_new + ',' + \ notify_on_new + ',' + \