ghostboard / ghost-purge-images

CLI tool to display & purge the uploaded images, video and audio files that currently are not used in any post, page or meta data
MIT License
90 stars 4 forks source link

Delete profile images from unpublished authors #19

Closed Luen closed 3 years ago

Luen commented 3 years ago

If there are no published posts by an author, then the author's profile and cover photos are deleted.

I have a draft that ready to be published by a new author. The script deleted their profile and cover iamges.

dburgos commented 3 years ago

Thanks @Luen

Due the Content API does not return authors with zero published posts, this tool can not handle this

Authors that are not associated with a post are not returned. You can supply include=count.posts to retrieve the number of posts associated with an author.

I tried this param but it adds the count for authors with at least 1 post, so no way to get authors with 0 posts.

I updated the README to be clear & list this cases