Add notes

This commit is contained in:
Fred Boniface 2023-11-05 19:26:47 +00:00
parent d75046c77f
commit 23635d8fcc
3 changed files with 9 additions and 4 deletions

View File

@ -20,3 +20,8 @@ def get_image_data(path: str):
'tags': tags 'tags': tags
} }
return image_data return image_data
def add_watermark(file_data):
## Create a new image file in the same directory as the file_data['path'] and return
## a new file_data dictionary with the new image in place of file_data['path']
return file_data

View File

@ -7,8 +7,8 @@ import os, sys
# CURRENT ISSUES # CURRENT ISSUES
#### ####
# #
# Pixelfed API doesn't honour newlines. # Pixelfed API doesn't honour newlines. - Possibly look at HTML formatting?
# Pixelfed publishing is missing date # Pixelfed publishing is missing date - Needs parsing and appending to description
def main(): def main():

View File

@ -15,7 +15,7 @@ def formatPost(file: dict):
tag_string = formatTags(file['tags']) tag_string = formatTags(file['tags'])
if load_config.config['pixelfed']['add_to_description']: if load_config.config['pixelfed']['add_to_description']:
file['description'] = file['description'] + load_config.config['pixelfed']['add_to_description'] file['description'] = file['description'] + load_config.config['pixelfed']['add_to_description']
return f"{file['title']} | {file['description']}\n{tag_string}" return f"{file['title']} | {file['description']}\n{tag_string}" # Date needs adding
def formatTags(tags: list): def formatTags(tags: list):
formatted_tags = ['#' + tag.title().replace(' ', '') for tag in tags] formatted_tags = ['#' + tag.title().replace(' ', '') for tag in tags]