Allow to exclude posts from deletion #4
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Namely it would be nice if pinned posts would not be deleted, as well as posts faved by the author.
@fl4nn Heya 👋 Yeh nice, i was thinking about this a bit. There are a couple of things to filter by (favourites, boosts, pins, etc.) which I've avoided having any design problems with by deleting them all 🫠
On https://pkg.go.dev/git.coopcloud.tech/decentral1se/gtslib@v0.0.0-20240801205943-6bd88e34a77e/client/accounts#AccountStatusesParams I can filter by:
ExcludeReblogs
,ExcludeReplies
,OnlyPublic
andPinned
.To filter on favourites, I need to look at the status itself https://pkg.go.dev/git.coopcloud.tech/decentral1se/gtslib@v0.0.0-20240801205943-6bd88e34a77e/models#Status
All doable.
I'm wondering, do you have some idea of what you'd like to see in terms of CLI flags?
Currently "delete everything" is enabled but I'm open to perhaps default everything to "not delete" except your own local posts (?) and then you need to pass
--pinned
,--favourites
, etc. to cover those too? Or maintain the "delete everything" and flags could be--no-pinned
?I think given the nature of the tool it makes sense to keep the default of "delete everything" and use flags to exclude certain things, but that's only my opinion.
@fl4nn sounds like a plan! didn't have time to test much but just blasted in
9383cce16d
if you re-download and give it a shot, i'd love to hear if it works 🙃Took me a bit to get around to it and had to cheat a bit by using
-w 0
but skipping favourites seems to work according to a dry run, skipping pinned does not though.Thanks for testing 😌 I've made some pinned posts and will try fix/test in the coming days 🙏
@fl4nn aight this should be good! I've done some manual testing. I've also added that neat
-w 0
trick to thedelete -h
example documentation. I was wondering how to do "--all" without adding an additional flag 🙃 Thanks! (And feel free to re-open if it's not fixed on your end.)