fediverse-blocklist-tool/mastodon_blocklist_deploy/helpers.py

6 lines
343 B
Python
Raw Normal View History

2023-01-29 14:24:16 +00:00
from mastodon_blocklist_deploy.models import Instance
def blocklist_to_markdown(blocklist:[Instance]):
markdown_string = "| Instance | Status | Reason |\n | --- | --- | --- |\n"
for instance in blocklist:
markdown_string += f"| {instance.domain} | {instance.severity} | {instance.public_comment} |\n"
return markdown_string