Skip to content

Commit

Permalink
Fix some install issues and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffknupp committed Oct 23, 2012
1 parent f582b70 commit 8b5f97d
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 13 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
@@ -1,3 +1,4 @@
recursive-include static *
recursive-include templates *
include README.md
include config.yml
include requirements.txt
48 changes: 48 additions & 0 deletions README.txt
@@ -0,0 +1,48 @@
# Blug #

*Because "I just blogged about it" is too difficult to say*

## Intro ##

Blug is a static site generator for Markdown based blogs. It currently
uses the Octopress based theme from www.jeffknupp.com, but this will change shortly.
While Blug generates static pages, the ultimate purpose of Blug is to run as a standalone process capable of 'psuedo-dynamic' site
interaction. Today's blogs are static, so much so that static blog generation tools have become the new 'Create a Twitter Clone'
for tutorials topics. I envision Blug as an intelligent agent, a daemon able to dynamically regenerate
your site and insert content when triggered by external events. Stuff like dynamically re-generating a post to include a link
to comments on your post on HackerNews or reddit when Blug sees this event has occurred. Or re-generating to scale back the included css/javascript when Blug sees your webserver is getting hammered. These are the kinds of things I'm interested in exploring.

## Installation ##
Blug currently requires no installation, though running ```python setup.py install```
will create 'install' the blug.py script. You can also get it from pip using ```pip install blug```.

## Usage ##
Edit the ```config.yaml``` file with values appropriate for your site. They should be pretty self-explanatory.
Once done, place your posts in a directory called ```content``` (this is the default location Blug checks for
posts). Each post follows the Octopress/Jekyll naming convention for posts: year-month-day-title-of-post-as-slug.
Once you've got everything set up, there are three components to the ```blug.py``` script.

### Creating a New Post ###
```python blug.py post 'How Javascript is Ruining a Generation of Programmers' ``` This will create a new post
in your ```content``` directory with the appropriate filename and yaml front matter.

### Generating the Site ###
```python blug.py generate``` This **deletes and regenerates the current generated content**. Run this whenever you
make a change to a post or after finishing a new one. The output in the ```generated``` directory is the complete site.

### Viewing Your Site Locally ###
```python blug.py serve <port> <host> <path>``` This starts a webserver locally to allow you to preview your site. Use
```generated``` as the ```path``` argument to serve files using your generated site as the root.

## Coming Soon ##
A number of features have either been committed or are in the process of being committed

* **Live Mardown Post Editing**- Start up the included webserver and navigate to host:port/create to
create a new post with live Markdown translation. In the left pane you enter normal Markdown test. The right
pane is updated with the translated HTML in real time. No more regenerating your entire site just to see if you
remembered how to do a nested list in Markdown.

* **Git(hub)/Dropbox Integration**- Automatically deploy new posts and changes to your blog on the back of commits
to your local git repository, commit to Github, or Dropbox file uploads

* **The Blug Server**- The real reason I created Blug. Stay tuned.
1 change: 0 additions & 1 deletion master_requirements.txt → requirements.txt
Expand Up @@ -2,4 +2,3 @@ Jinja2>=2.6
Markdown>=2.2.0
PyYAML>=3.10
Pygments>=1.5
distribute>=0.6.27
15 changes: 4 additions & 11 deletions setup.py
@@ -1,25 +1,18 @@
from distutils.core import setup
import distutils.command.install_scripts
import shutil

class ScriptInstaller (distutils.command.install_scripts.install_scripts):
def run(self):
distutils.command.install_scripts.install_scripts.run(self)
for script in self.get_outputs():
if script.endswith(".py"):
shutil.move(script, script[:-3])

setup(
name = 'blug',
scripts = ['blug.py'],
version = '0.1.0',
cmdclass = {"install_scripts": ScriptInstaller },
version = '0.2.0',
description = 'Static site generator for Markdown based blogs, with a built-in webserver',
author = 'Jeff Knupp',
author_email = 'jknupp@gmail.com',
url = 'http://www.github.com/jeffknupp/blug',
keywords = ['blog', 'markdown', 'static', 'website', 'generator'],
packages = ['lib', 'test'],
scripts = ['blug.py'],
requires = ['Jinja2 (>=2.6)', 'Markdown (>=2.2.0)', 'PyYAML (>=3.10)'],
license = 'MIT License',
classifiers = [
'Programming Language :: Python',
'Programming Language :: Python :: 3',
Expand Down

0 comments on commit 8b5f97d

Please sign in to comment.