I could share the script, but I’m lazy. Most of the code stolen and modified from exitwp.py.
It uses random.randrange if the filename exists, it puts -randomnumber in the filename. You could use a while loop that starts at 1 until it doesn’t exist. But that could take a long time, if you have 5k test files. Or find the last file with the name and add one to whatever it is.
I like the random way better. That makes it very unorganized, just like my apartment.
Oops, forgot to add “draft: false” to the headers.
There we go, it should work now.
Still requires adding the body manually, and possibly editing the title.
The URL generation should be right now. And it’s right now, after four attempts.
Everything works finally, had to fix the date header.
NGINX is a dick, it’ll download it if the url is /blog/2019/11/new_post.py-works, it ignores the -works part.