mirror of
https://github.com/hughrun/ephemetoot
synced 2025-02-16 19:50:35 +01:00
resolve #26 add hide_skipped flag
This commit is contained in:
parent
669d276f81
commit
2263a9fc54
@ -41,6 +41,9 @@ parser.add_argument(
|
||||
parser.add_argument(
|
||||
"--datestamp", action="store_true", help="include a datetime stamp for every action (e.g. deleting a toot)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--hide_skipped", action="store_true", help="do not write to log when skipping saved toots"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--schedule", action="store", metavar="'filepath'", nargs="?", const=".", help="save and load plist file on MacOS"
|
||||
)
|
||||
|
@ -69,39 +69,43 @@ def checkToots(config, options, retry_count=0):
|
||||
toot_tags.add(tag.name)
|
||||
try:
|
||||
if keep_pinned and hasattr(toot, "pinned") and toot.pinned:
|
||||
if options.datestamp:
|
||||
print(str( datetime.now(timezone.utc).strftime('%a %d %b %Y %H:%M:%S %z') ), end=' : ')
|
||||
if not options.hide_skipped:
|
||||
if options.datestamp:
|
||||
print(str( datetime.now(timezone.utc).strftime('%a %d %b %Y %H:%M:%S %z') ), end=' : ')
|
||||
|
||||
print(
|
||||
"📌 skipping pinned toot - "
|
||||
+ str(toot.id)
|
||||
)
|
||||
print(
|
||||
"📌 skipping pinned toot - "
|
||||
+ str(toot.id)
|
||||
)
|
||||
elif toot.id in toots_to_keep:
|
||||
if options.datestamp:
|
||||
print(str( datetime.now(timezone.utc).strftime('%a %d %b %Y %H:%M:%S %z') ), end=' : ')
|
||||
|
||||
print(
|
||||
"💾 skipping saved toot - "
|
||||
+ str(toot.id)
|
||||
)
|
||||
if not options.hide_skipped:
|
||||
if options.datestamp:
|
||||
print(str( datetime.now(timezone.utc).strftime('%a %d %b %Y %H:%M:%S %z') ), end=' : ')
|
||||
|
||||
print(
|
||||
"💾 skipping saved toot - "
|
||||
+ str(toot.id)
|
||||
)
|
||||
elif toot.visibility in visibility_to_keep:
|
||||
if options.datestamp:
|
||||
print(str( datetime.now(timezone.utc).strftime('%a %d %b %Y %H:%M:%S %z') ), end=' : ')
|
||||
|
||||
print(
|
||||
"👀 skipping "
|
||||
+ toot.visibility
|
||||
+ " toot - "
|
||||
+ str(toot.id)
|
||||
)
|
||||
if not options.hide_skipped:
|
||||
if options.datestamp:
|
||||
print(str( datetime.now(timezone.utc).strftime('%a %d %b %Y %H:%M:%S %z') ), end=' : ')
|
||||
|
||||
print(
|
||||
"👀 skipping "
|
||||
+ toot.visibility
|
||||
+ " toot - "
|
||||
+ str(toot.id)
|
||||
)
|
||||
elif len(hashtags_to_keep.intersection(toot_tags)) > 0:
|
||||
if options.datestamp:
|
||||
print(str( datetime.now(timezone.utc).strftime('%a %d %b %Y %H:%M:%S %z') ), end=' : ')
|
||||
|
||||
print(
|
||||
"#️⃣ skipping toot with hashtag - "
|
||||
+ str(toot.id)
|
||||
)
|
||||
if not options.hide_skipped:
|
||||
if options.datestamp:
|
||||
print(str( datetime.now(timezone.utc).strftime('%a %d %b %Y %H:%M:%S %z') ), end=' : ')
|
||||
|
||||
print(
|
||||
"#️⃣ skipping toot with hashtag - "
|
||||
+ str(toot.id)
|
||||
)
|
||||
elif cutoff_date > toot.created_at:
|
||||
if hasattr(toot, "reblog") and toot.reblog:
|
||||
if options.datestamp:
|
||||
|
Loading…
x
Reference in New Issue
Block a user