46 points · by nicolasvan · 13y ago · 19 comments
#!/bin/bash
for f in *.mdwn
do
pandoc "$f" -o "${f%.*}.html" --standalone
done
A bash script with a loop plus one command to convert a markdown file into a HTML file. You might choose something different than pandoc. Most likely you will have an executable called "markdown*" in your $PATH.I created PyGreen to be able to do the same thing but with an even faster startup. With it I don't need to create a base setup or copy-paste an old one. I just begin to work on the home page and exporting the style of the web site in a template takes like 10 seconds. And that's it, I spent 10 seconds on the coding of my website and I can use pygreen gen to get my static version to push on github pages.
Later, if I want, I can ditch the static version and add dynamic web pages. PyGreen does not use declarative markdown files, there is nothing that prevents you from adding completely dynamic stuff in the templates. It also uses Bottle, which is almost the same as Flask. So I can just add routes to Bottle and anything dynamic I could need then publish my app on a small server.
https://github.com/daeken/Benjen
"Benjen is a tiny static blog generator. At its heart is a <100 line Python script, which takes in your templates and blog entries and produces a static site."
You should consider adding a little more leading to your website's copy to improve readability.
No, seriously, if you want to compare with an old stuff compare with PHP because that's precisely what I copied. But as far as I know there was no other project that ported that quick&dirty approach to Python.
> if you want to compare with an old stuff compare with PHP because that's precisely what I copied. But as far as I know there was no other project that ported that quick&dirty approach to Python.
mod_python has been around for something like 13 years.Who uses easy_install these days.