Minor comment adjustemnts

This commit is contained in:
Fred Boniface 2023-11-17 11:53:30 +00:00
parent 4f33221208
commit e912b72382

View File

@ -3,22 +3,17 @@ import image_processing
import os, sys, time import os, sys, time
####
# CURRENT ISSUES
####
#
# Pixelfed API doesn't honour newlines. - Possibly look at HTML formatting?
# Pixelfed publishing is missing date - Needs parsing and appending to description
def main(): def main():
if len(sys.argv) < 2: if len(sys.argv) < 2:
print("Usage: social-photos <directory_or_file_path>") print("Usage: social-photos <directory_or_file_path>", file=sys.stderr)
sys.exit(1)
else: else:
path = sys.argv[1] path = sys.argv[1]
# Check whether path points to a file or a directory. If neither, exit.
if not os.path.exists(path): if not os.path.exists(path):
print(f"'{path}' does not exist.") print(f"'{path}' does not exist.", file=sys.stderr)
sys.exit(1) sys.exit(1)
elif os.path.isfile(path): elif os.path.isfile(path):
print(f"'{path}' is a file.") print(f"'{path}' is a file.")
@ -27,7 +22,7 @@ def main():
print(f"'{path}' is a directory.") print(f"'{path}' is a directory.")
files = list_files_in_directory(path) files = list_files_in_directory(path)
else: else:
print(f"'{path}' is neither a file nor a directory.") print(f"'{path}' is neither a file nor a directory.", file=sys.stderr)
sys.exit(1) sys.exit(1)
print("These files will be uploaded:") print("These files will be uploaded:")