I’m making my personal blog using Flask. The blog will use static files for blog posts, and would have no database. I’d like to be able upload the blog posts to the app via the command line.
How should I go about implementing this?
I’d need some way to authenticate, so maybe a hash stored somewhere in the app directory. Would need ssl to make sure the password isn’t snooped upon & serve the newly uploaded file – this would include showing it as the newest blog entry, and adding it to the archives.
I’ll be using either Google AppEngine, Redhat openshift or App Fog(haven’t decided yet).
Curl is probably the best for basic posts:
The
@is important to send the file as-is, check the curl manpage for details.But you might consider writing a small python application to be used on the command line. You could use it to handle the authentication and URL stuff, so the user would only need to enter in the username/password, and the post itself.