codicocodes / dotfyle

Find the best Neovim plugins
https://dotfyle.com
MIT License
600 stars 29 forks source link

Remove old media from plugin? #128

Open scottmckendry opened 3 months ago

scottmckendry commented 3 months ago

I have a plugin in Dotfyle where there is an image that no longer exists on the main branch but persists on the plugin page.

It would be good (as an author) to have an option to clean up old media. Or even if there was some additional logic in the media indexer to remove legacy images etc.

codicocodes commented 3 months ago

Makes sense, I know of the issue but haven't gotten to it!

There will be some issues with previously published TWiN issues containing stale image urls -> but I'm not sure how to solve that without storing the images myself, which I will not do at this time.

I'd likely go with deleting stale images that are no longer available in the readme, this would be the relevant code if anyone wants to pick this up

https://github.com/codicocodes/dotfyle/blob/637f333b9acd9b5add0f95a5c2b316f98c276d98/src/lib/server/sync/plugins/sync.ts#L91-L104

slugbyte commented 1 month ago

I tried making a patch for this issue in PR #140, but I ran a few more testes and realized I still need to do some more work on it, because my delete query is crashing the seeder. I closed the PR for now because Its not working code

I'll try and work on it more tomorrow.