2023-01-10 22:56:01 -08:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
from pleroma import Pleroma
|
|
|
|
|
2023-01-11 00:05:52 -08:00
|
|
|
async def main():
|
|
|
|
import os, sys
|
|
|
|
async with Pleroma(access_token=os.environ['ACCESS_TOKEN'], api_base_url=sys.argv[1]) as fedi:
|
2023-01-10 22:56:01 -08:00
|
|
|
print('Deleting...')
|
2023-01-11 00:05:52 -08:00
|
|
|
async for status in fedi.account_statuses_iter(await fedi.me(), exclude_repeats=False):
|
2023-01-10 22:56:01 -08:00
|
|
|
if status['reblog']:
|
2023-01-11 00:05:52 -08:00
|
|
|
await fedi.un_repeat(status['reblog'])
|
2023-01-10 22:56:01 -08:00
|
|
|
else:
|
2023-01-11 00:05:52 -08:00
|
|
|
await fedi.delete_status(status)
|
2023-01-10 22:56:01 -08:00
|
|
|
|
|
|
|
print('.', end='', flush=True)
|
|
|
|
|
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
import anyio
|
|
|
|
anyio.run(main)
|