AtomicPress is a static blog generator for python developers.
AtomicPress is a static blog generator for python developers that don’t want the Wordpress security hassle. It is built in Flask and takes advantage of it’s awesome eco-system such as Flask-Freeze, Flask-Admin, Flask-Migrations, Flask-SQLAlchemy, to mention a few. It utilizes SQLite for its database needs.
AtomicPress can easily be installed through pip.
pip install atomicpress
pip install git+git://github.com/marteinn/AtomicPress.git@develop
To install AtomicPress you’ll need python 2.7, virtualenv and pip.
If you want a quickstart, just copy the example base-example, cd and type make init and you are ready to go.
AtomicPress uses Flask-Admin to show a admin interface, you can access it by running runserver with the argument -a (admin). Per default is located at http://localhost:5000/admin/.
AtomicPress ships with the theme minimal per default, if you would like to make your own, just specify the path in your settings file.
To make your own, just look at the theme minimal that ships with AtomicPress.
AtomicPress comes with a couple of filters you can use in the post content area.
Render a basic code snippet.
[code]var a = 1;[/code] >>> <pre class="code">var a = 1;</pre>
Embeds a more advanced code snippet through a github gist to content.
Embed image path with the [image] filter.
<img src="[image id="myimage.jpg"]" /> >>> <img src="/uploads/myimage.jpg" />
If you only want the uploads path, you can use the [uploads] filter.
<img src="[uploads]myimage.jpg" /> >>> <img src="/uploads/myimage.jpg" />
Creates the database and stores it according to the SQLALCHEMY_DATABASE_UR path.
python mange.py create_db
Removes the sqlite database file.
python mange.py drop_db
-r (remove) Remove the sqlite file when done. -f (force) Do now show the agreement promp.
Upgrading from a older version? Run this to make sure the schema is up to date.
python manage.py upgrade -d=atomicpress/migrations/
Adds initial data to the database, perfect when you want to try out AtomicPress.
python manage.py prefill fill
Creates a lightweight http server running the web application.
python manage.py runserver
-a (admin) Activate the admin area (do not do this in a production anvironment) -t (toolbar) Show debug toolbar. -d (debug) Show debug messages.
Note: Although untested, it is possible to run AtomicPress as a standard wsgi application.
AtomicPress uses wpparser to import data from wordpress export files. Just specify the path to your database export and you are ready to go.
python manage.py importer import_blog -f=./data/blog.wordpress.2014-09-25.xml
-f (file) Path to wordpress export file.
Create a static package of you blog, that are ready to be deployed.
python manage.py exporter export
Send the exported static files to a AWS S3 bucket.
python manage.py s3 sync
Send the files to your ftp account.
python manage.py ftp sync
AtomicPress uses a pluggale extension system, similar to django’s INSTALLED_APPS. To disable a plugin, define a property in your settings file and just define the ones you need.
EXTENSIONS = ( # "atomicpress.ext.importer", "atomicpress.ext.exporter", "atomicpress.ext.ftp", "atomicpress.ext.s3", "atomicpress.ext.prefill", )
Activating you own is also simple, like this extension called catpictures:
EXTENSIONS = ( "atomicpress.ext.importer", "atomicpress.ext.exporter", "atomicpress.ext.ftp", "atomicpress.ext.s3", "atomicpress.ext.prefill", "catpictures", )
To create a extension, create a module with a function called setup. Thats all you need.
Want to contribute? Awesome. Just send a pull request.
AtomicPress is released under the MIT License.