HermanMartinus / bearblog

Free, no-nonsense, super fast blogging.
MIT License
2.7k stars 77 forks source link

New post via CURL? #39

Closed aaronpkelly closed 1 year ago

aaronpkelly commented 4 years ago

Hey - is it possible to submit a new post programmatically - e.g. via a CURL command? Or maybe there is an API available?

HermanMartinus commented 4 years ago

Currently there isn't an api available, but I've added it to the roadmap :)

u0nel commented 3 years ago

micropub is an open protocol for creating posts.

If Micropub is implemented, you can create a post via curl like this:

curl https://aaron.bearblog.dev/micropub -H "Authorization: Bearer xxxxxxxxxx..." -d "h=entry" -d "content=some content" -d name="a title"

Here is an existing python implementation: https://github.com/bear/python-indieweb

strdr4605 commented 2 years ago

Any updates on this?

alexkolson commented 1 year ago

Hey @HermanMartinus absolutely <3 bearblog! Thank you so much for making it! Just adding my voice to others wishing for an api. For me, it is because I write in google docs, and then copy and paste everything over into bearblog. It would be really cool to automate this process, and I think a general purpose api would be perhaps one of the best ways to do so. I wouldn't be against an "Import from Google Docs" button either, but see more value as an end-user from a general-purpose api. Either way, thank you again and I realize you owe us absolutely nothing. Whatever you end up deciding, I'll be here for the ride!

HermanMartinus commented 1 year ago

Moved to the new suggestion board. Github issues reserved for bugs going forward.