Giter VIP home page Giter VIP logo

mastopurge's People

Contributors

cdzombak avatar pstorch avatar thehowl avatar thomasleister avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mastopurge's Issues

Posts not deleted when run non-interactive

I have posts older than May, 30th. However, they are not deleted.

pi@raspberrypi:~ $ cd /home/pi/Programs/mastopurge && ./mastopurge --noninteractive --maxage "30 days"
2021/06/29 16:27:07 MastoPurge configuration found! Reading config.
2021/06/29 16:27:07 Requesting access to Mastodon account
2021/06/29 16:27:07 Access GRANTED :-)
2021/06/29 16:27:07 >>> Account ID: 000000
2021/06/29 16:27:07 >>> Username: xxxxxx
2021/06/29 16:27:07 Posts older than May 30, 2021 at 4:27:07 PM CEST will be deleted!
2021/06/29 16:27:07 ========== Fetching pinned statuses ==========
2021/06/29 16:27:07 Found 0 pinned statuses, which will not be deleted.
2021/06/29 16:27:07 ========== Fetching new statuses until status 0 ==========
2021/06/29 16:27:08 No posts to be deleted on this page. Trying next page ...
2021/06/29 16:27:08 ========== Fetching new statuses until status 00000000000000000 ==========
2021/06/29 16:27:08 0 statuses were successfully deleted.

Mastopurge reports Status could not be deleted, but delete was successfull

Mastopurge reports "Status xyz could not be deleted :(", but delete was actually successfull.

Example log:

Welcome to ...
                     _                                   
 _ __ ___   __ _ ___| |_ ___  _ __  _   _ _ __ __ _  ___ 
| '_ ` _ \ / _` / __| __/ _ \| '_ \| | | | '__/ _` |/ _ \
| | | | | | (_| \__ \ || (_) | |_) | |_| | | | (_| |  __/
|_| |_| |_|\__,_|___/\__\___/| .__/ \__,_|_|  \__, |\___|
                             |_|              |___/      
    ... add German Datenhygiene to your Mastodon-Account!


2019/08/26 21:25:00 Version 1.1.0
2019/08/26 21:25:00 MastoPurge configuration found! Reading config.
2019/08/26 21:25:00 Requesting access to Mastodon account
2019/08/26 21:25:00 Access GRANTED :-)
>>> Account ID: 137231
>>> Username: storchp

Enter the maximum age of the posts you want to KEEP, e.g. "30 days". Older posts will be deleted. Allowed units: hours, days, weeks, months.
[Maximum post age]: 90 days
Okay, let's do it! 
Posts older than 2019-05-28 21:25:05.380842714 +0200 CEST m=-7775994.827013465 will be deleted!
Loading gun ........................................

2019/08/26 21:25:09 ========== Fetching new statuses until status 0 ==========
2019/08/26 21:25:09 No posts to be deleted on this page. Trying next page ...
2019/08/26 21:25:09 ========== Fetching new statuses until status 102444455599... ==========
2019/08/26 21:25:10 No posts to be deleted on this page. Trying next page ...
2019/08/26 21:25:10 ========== Fetching new statuses until status 102185670564... ==========
2019/08/26 21:25:10 Status 10162535146... could not be deleted :(
2019/08/26 21:25:11 Status 10162038453... could not be deleted :(
2019/08/26 21:25:11 Status 10161511149... could not be deleted :(
2019/08/26 21:25:11 Status 10161510716... could not be deleted :(
2019/08/26 21:25:11 Status 10161155067... could not be deleted :(
...
2019/08/26 21:25:13 Status 10153531623... could not be deleted :(
2019/08/26 21:25:13 Status 10152979584... could not be deleted :(
2019/08/26 21:25:13 Status 10152407220... could not be deleted :(
2019/08/26 21:25:13 Status 10152353359... could not be deleted :(
>>>>>> Server has run hot and is throttling. We have to wait for 286 seconds until it has cooled down. Please be patient ...
...
2019/08/26 23:00:02 0 statuses deleted.
2019/08/26 23:00:03 ========== Fetching new statuses until status 101331659697995104 ==========
>>>>>>  0 statuses were successfully deleted.

But actually it deleted over 100.

Feature Request: Export Function

It would be very nice if you could optionally export the posts to be deleted before. Just because you basically want to minimize your traces on the internet doesn't mean that you don't want to keep some good conversations or especially helpful ones.

Don’t delete toots that exceed an interaction threshold

Optionally, don’t delete toots with more than a configurable number of interactions (boosts, replies, favourites). People should have the option to get rid of their unpopular toots and preserve their best receive/most impactful toots.

Limit/filter by visibility of toots?

Use case: Cleanup only "private" toots, leaving public toots intact.

I only want to delete toots, that are non-public, i.e. unlisted, followers-only or a DM.

Could you integrate this filter? Maybe just as a checkbox "keep public toots"?

Throttling not always detected

Normal:

{"error":"Throttled"}

Sometimes in german:

2017/11/28 09:48:41 ========== Fetching new statuses ==========
{"error":"Du wurdest gedrosselt"}
2017/11/28 09:48:41 json: cannot unmarshal object into Go value of type []main.Status
[thomas@thomas-nb]~/Downloads%

Throttling is then not detected and Mastopurge crashes.

Noninteractive mode

It'd be great if mastopurge could be run non-interactively, e.g. through a cron job. Either the max duration could be saved in the config file or provided through a command-line flag.

Show progress

Show how many statuses have been processed e.g.

102 of 1200 statuses processed. (xx %)

Client.Timeout exceeded while awaiting headers

Sometimes mastopurge will need to be restarted, erroring out on the follow message:

2020/08/02 02:00:15 Get [URL REMOVED]: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

It'd be nice if something was in place to handle timeouts and retry rather than mastopurge just exiting.

Better performance

  • Start searching from the oldest posts (low IDs to high IDs)
  • Introduce parallel status searching and destroying (multithreaded)

MastoPurge not working with Mastodon v2.0

From 2.0.0rc1 release notes:

All id attributes in the REST API responses, including attributes that end in _id, are now returned as strings instead of integers. This is because large integers cannot be encoded in JSON losslessly, and all IDs in Mastodon are now bigint. Some apps will not work with this release until they are updated

Does this affect Mastopurge?

`invalid character "\r" in host name` on Windows

I built 1.1.0 on Windows with "go build" and got the following error after typing my instance name.

2018/07/25 09:20:53 Version 1.1.0
2018/07/25 09:20:53 MastoPurge configuration file .mastopurgesettings does not exist or is not accessible.

First we need to connect MastoPurge to your Mastodon account.
Enter the domain of your Mastodon home instance: (e.g. "metalhead.club")
[Mastodon home instance]: retro.social
2018/07/25 09:20:58 >>>>>> Registering MastoPurge App on retro.social
/api/v1/apps: invalid character "\r" in host name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.