diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2010-11-26 22:05:55 -0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2010-11-26 22:05:55 -0200 |
commit | 0c048dd09acd768cad10933c5d0856cadbf1298d (patch) | |
tree | 8435a72879d704d2b178b3cd610e5c0bd4df672e | |
parent | added .gitignore and a config file for the sci-electronics herd (diff) | |
download | checkbump-0c048dd09acd768cad10933c5d0856cadbf1298d.tar.gz checkbump-0c048dd09acd768cad10933c5d0856cadbf1298d.tar.bz2 checkbump-0c048dd09acd768cad10933c5d0856cadbf1298d.zip |
added license and fixed some strings
-rw-r--r-- | checkbump.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/checkbump.py b/checkbump.py index 393c45b..8332d7c 100644 --- a/checkbump.py +++ b/checkbump.py @@ -1,25 +1,35 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +""" + checkbump.py + ~~~~~~~~~~~~ + + Version bump checker for Gentoo Linux packages. + Depends on Jinja2. + + :copyright: (c) 2010 by Rafael Goncalves Martins + :license: BSD (http://www.opensource.org/licenses/bsd-license.php) +""" from ConfigParser import ConfigParser from contextlib import closing from datetime import datetime from jinja2 import Template from logging import getLogger, Formatter, StreamHandler, INFO +from portage import portagetree +from portage.versions import pkgsplit, vercmp from subprocess import Popen, PIPE from time import strftime from urllib2 import urlopen, URLError -from portage import portagetree -from portage.versions import pkgsplit, vercmp - import os, sys + # logging formatters LOG_FORMATTER = "[%(asctime)s] %(name)s.%(levelname)s: %(message)s" LOG_DATEFORMAT = "%Y-%m-%d %H:%M:%S %Z" -HTML_TEMPLATE = Template('''\ +HTML_TEMPLATE = Template("""\ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> @@ -60,7 +70,7 @@ HTML_TEMPLATE = Template('''\ <p>Last update: {{ last_update }}</p> </body> </html> -''') +""") # setup logging logger = getLogger('checkbump') |