baranovskypd / goodpress

WIP!! :warning: R Package to Write Posts from R Markdown to Wordpress :warning:
https://maelle.github.io/goodpress/
Other
34 stars 5 forks source link

Improve media upload #2

Open maelle opened 4 years ago

maelle commented 4 years ago

Current workflow that works but could be improved because it's so fragile

maelle commented 4 years ago

In each folder after the first upload maybe keep track of post ID and hash+name of figures, in .wordpress.yml, in order to see

Since images are now uploaded with the post as parent, I could also list existing images (in the WordPress gallery) that have the post as parent, and remove those that are no longer needed.

It is very important to not keep old files, because bloating the gallery doesn't sound like a good idea.

mdingemanse commented 1 year ago

Juggling files through the WP REST API is beyond me but just want to report that the first point in OP doesn't seem to be what happens now: I iterated over a couple versions of a post and did get my gallery bloated. Would be happier with the (brute force) method of deleting, then re-adding everything.