resolve #16 - keep toots based on visibility
This commit is contained in:
parent
1497d96270
commit
23e907d595
|
@ -52,10 +52,12 @@ timeline = mastodon.account_statuses(user_id, limit=40)
|
|||
def checkToots(timeline, deleted_count=0):
|
||||
for toot in timeline:
|
||||
try:
|
||||
if config.save_pinned and hasattr(toot, "pinned") and toot.pinned:
|
||||
if config.keep_pinned and hasattr(toot, "pinned") and toot.pinned:
|
||||
print("📌 skipping pinned toot - " + str(toot.id))
|
||||
elif toot.id in config.toots_to_save:
|
||||
elif toot.id in config.toots_to_keep:
|
||||
print("💾 skipping saved toot - " + str(toot.id))
|
||||
elif toot.visibility in config.visibility_to_keep:
|
||||
print("👀 skipping " + toot.visibility + " toot - " + str(toot.id))
|
||||
elif cutoff_date > toot.created_at:
|
||||
if hasattr(toot, "reblog") and toot.reblog:
|
||||
print(
|
||||
|
@ -122,7 +124,7 @@ def checkToots(timeline, deleted_count=0):
|
|||
else:
|
||||
if options.test:
|
||||
print(
|
||||
"Test run. This would have removed "
|
||||
"Test run completed. This would have removed "
|
||||
+ str(deleted_count)
|
||||
+ " toots."
|
||||
)
|
||||
|
|
|
@ -2,4 +2,5 @@ access_token = 'YOUR_ACCESS_TOKEN_HERE'
|
|||
base_url = 'https://ausglam.space'
|
||||
days_to_keep = 30
|
||||
save_pinned = True
|
||||
toots_to_save = []
|
||||
toots_to_save = []
|
||||
visibility_to_keep = [] # options are: 'public', 'unlisted', 'private', 'direct'
|
Loading…
Reference in New Issue