From 23635d8fcc2fe75aef0d730872ebb4cd41eb1e40 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 5 Nov 2023 19:26:47 +0000 Subject: [PATCH] Add notes --- image_processing.py | 7 ++++++- main.py | 4 ++-- publish_pixelfed.py | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/image_processing.py b/image_processing.py index 18a4f9a..4689918 100644 --- a/image_processing.py +++ b/image_processing.py @@ -19,4 +19,9 @@ def get_image_data(path: str): 'alt': alt_text, 'tags': tags } - return image_data \ No newline at end of file + 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 \ No newline at end of file diff --git a/main.py b/main.py index 0a73f38..02b143d 100644 --- a/main.py +++ b/main.py @@ -7,8 +7,8 @@ import os, sys # CURRENT ISSUES #### # -# Pixelfed API doesn't honour newlines. -# Pixelfed publishing is missing date +# Pixelfed API doesn't honour newlines. - Possibly look at HTML formatting? +# Pixelfed publishing is missing date - Needs parsing and appending to description def main(): diff --git a/publish_pixelfed.py b/publish_pixelfed.py index d78edab..5a690d9 100644 --- a/publish_pixelfed.py +++ b/publish_pixelfed.py @@ -15,7 +15,7 @@ def formatPost(file: dict): tag_string = formatTags(file['tags']) if 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): formatted_tags = ['#' + tag.title().replace(' ', '') for tag in tags]