Allow to exclude posts from deletion #4

Closed
opened 2024-08-04 17:57:20 +00:00 by fl4nn · 6 comments

Namely it would be nice if pinned posts would not be deleted, as well as posts faved by the author.

Namely it would be nice if pinned posts would not be deleted, as well as posts faved by the author.
Owner

@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 and Pinned.

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?

@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` and `Pinned`. 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`?
Author

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.

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.
decentral1se referenced this issue from a commit 2024-08-05 21:47:42 +00:00
Owner

@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 🙃

@fl4nn sounds like a plan! didn't have time to test much but just blasted in https://git.coopcloud.tech/decentral1se/blurp/commit/9383cce16d0b755f2c041a14729758dbcf8f8cc1 if you re-download and give it a shot, i'd love to hear if it works 🙃
Author

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.

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.
Owner

Thanks for testing 😌 I've made some pinned posts and will try fix/test in the coming days 🙏

Thanks for testing 😌 I've made some pinned posts and will try fix/test in the coming days 🙏
Owner

@fl4nn aight this should be good! I've done some manual testing. I've also added that neat -w 0 trick to the delete -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.)

@fl4nn aight this should be good! I've done some manual testing. I've also added that neat `-w 0` trick to the `delete -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.)
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: decentral1se/blurp#4
No description provided.