read the version from __init__.py + update the licence version

This commit is contained in:
Simon
2012-05-13 23:37:44 +02:00
parent fdd4170f94
commit e1826d0f1f
5 changed files with 12 additions and 22 deletions

View File

@@ -2,6 +2,7 @@
# -*- coding:utf-8 -*-
from setuptools import setup
import sigal
import sys
requires = ['PIL', 'jinja2', 'docutils']
@@ -15,7 +16,7 @@ entry_points = {
setup(
name = 'sigal',
version = '0.1',
version = sigal.__version__,
description = 'simple static gallery generator',
long_description = open('README.rst').read(),
url = 'https://github.com/saimn/sigal',

18
sigal/__init__.py Executable file → Normal file
View File

@@ -6,7 +6,7 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@@ -28,8 +28,7 @@ sigal is yet another python script to prepare a static gallery of images:
"""
__author__ = "Saimon (contact at saimon dot org)"
__version__ = "0.1"
__date__ = "20110513"
__version__ = "0.1-dev"
__copyright__ = "Copyright (C) 2009-2012 - saimon.org"
__license__ = "GPL"
@@ -43,17 +42,15 @@ from sigal.theme import Theme
def main():
"main program"
version = "version %s, %s" % (__version__, __date__)
parser = argparse.ArgumentParser(description='simple static gallery generator.')
parser.add_argument('input_dir', help='input directory')
parser.add_argument('output_dir', help='output directory')
parser.add_argument('--version', action='version',
version="%(prog)s " + version)
version="%(prog)s version " + __version__)
parser.add_argument('-c', '--copyright',
help="copyright message added to the images")
parser.add_argument("-f", "--force", action='store_true',
help="force the reprocessing of existing images and thumbnails")
help="force the reprocessing of existing images")
args = parser.parse_args()
@@ -73,10 +70,3 @@ def main():
r = Theme(params, args.output_dir)
r.render()
return 0
if __name__ == '__main__':
status = main()
sys.exit(status)

View File

@@ -2,11 +2,11 @@
# -*- coding:utf-8 -*-
# sigal - simple static gallery generator
# Copyright (C) 2009-2011 - Simon C. (saimon.org)
# Copyright (C) 2009-2012 - Simon C. (saimon.org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@@ -199,4 +199,3 @@ class Gallery:
print "Error: metadata not copied for %s." % srcfile
return
dst.write()

View File

@@ -2,11 +2,11 @@
# -*- coding:utf-8 -*-
# sigal - simple static gallery generator
# Copyright (C) 2009-2011 - Simon C. (saimon.org)
# Copyright (C) 2009-2012 - Simon C. (saimon.org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,

View File

@@ -2,11 +2,11 @@
# -*- coding:utf-8 -*-
# sigal - simple static gallery generator
# Copyright (C) 2009-2011 - Simon C. (saimon.org)
# Copyright (C) 2009-2012 - Simon C. (saimon.org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,