Add notes
This commit is contained in:
		
							parent
							
								
									d75046c77f
								
							
						
					
					
						commit
						23635d8fcc
					
				@ -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
 | 
				
			||||||
							
								
								
									
										4
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								main.py
									
									
									
									
									
								
							@ -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():
 | 
				
			||||||
 | 
				
			|||||||
@ -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]
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user