Support for empty descriptions in Syncer

Signed-off-by: Georg <georg@lysergic.dev>
This commit is contained in:
Georg Pfuetzenreuter 2021-09-13 15:12:54 +02:00
parent 6204a4b5dd
commit a76e1b9d35
Signed by: Georg
GPG Key ID: 1DAF57F49F8E8F22

View File

@ -52,6 +52,9 @@ description_local = file_content.replace('\n', '')
print(f"Description (Local): {description_local}")
if description_gitea == description_local:
print("Matches, nothing to change.")
elif not description_gitea:
print("Empty - Writing placeholder.")
Path(file_path).write_text('Untitled / Work in Progress.')
else:
print("Does not match, replacing local file.")
Path(file_path).write_text(description_gitea)