Python blog generator for hackers.
CSS Python HTML JavaScript
Latest commit 64f4dd0 Feb 14, 2016 @glushchenko Update README.md
Failed to load latest commit information.
init 404 error page Feb 26, 2015
LICENSE.txt 0.1.1 Nov 10, 2013
MANIFEST.in 0.1.1 Nov 10, 2013
README.md Update README.md Feb 14, 2016
micropress S3 watcher fix + init meta fix Feb 14, 2016
setup.py OS X 10.11 installation fix Feb 14, 2016

README.md

Micropress

Micropress – Python blog generator for hackers.

  • open source
  • jinja templates
  • configurable directories and configs
  • smart file tree organization
  • markdown markup
  • auto detect changes and generation
  • auto upload
  • auto filling post time
  • live preview at http://127.0.0.1:8080

Install

sudo pip install micropress
micropress init — install default (~/.microrc) and default templates (~/Documents/Micropress/) directory.

Config

vim ~/.microrc

[system]
author = fluder
host = fluder.co
name = Geek Blog
timezone_offset = 120
post_per_page = 10
exclude_category = How-to

[storage]
build = ~/.build/micropress
public = ~/Documents/Micropress/public
templates = ~/Documents/Micropress/templates
pages = ~/Documents/Micropress/sources/pages
posts = ~/Documents/Micropress/sources/posts

[sync]
to = remote.host.name:/path/to/www # rsync path
key = ~/.ssh/id_rsa # ssh key for autosync feature

[locale]
month = January, February, March, April, May, June, July, August, September, October, November, December
days = Mon, Tue, Wed, Thu, Fri, Sat, Sun

Usage

micropress add post-name then just write post, save and exit, working like a charm.

Linux

micropress preview — start webserver preview
micropress watch — start file changes watcher

Manual mode

micropress generate — save public and generated content into build directory.
micropress sync — upload content on production server.

Uninstall

pip uninstall micropress
rm ~/.microrc
rm -r ~/Documents/Micropress
launchctl unload -w co.fluder.micropress.watcher.plist
launchctl unload -w co.fluder.micropress.preview.plist
rm -r ~/Library/LaunchAgents/co.fluder.micropress.watcher.plist
rm -r ~/Library/LaunchAgents/co.fluder.micropress.preview.plist

Templates

Template engine is Jinja2, full support features.

Headers

---
title: ""
categories: View name/Link name
time: -        # automatic change on save if autosync enabled
autosync: true # automatic upload after edit
---

Sync options

S3

[sync] type = s3
bucket = BUCKET_NAME
access_key_id = ACCESS_KEY_ID
secret_access_key = SECRET_ACCESS_KEY

RSync

[sync]
to = remote.host.name:/path/to/www # rsync path
key = ~/.ssh/id_rsa # ssh key for autosync feature