From 0ae1a23773703deb140c042ecb4c48143dabc6d9 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 11 Apr 2011 21:47:00 +0200 Subject: [PATCH] rename project to sigal --- README | 28 +++++++--------------------- runtests.py | 12 ++++++------ pywiUpload.conf => sigal.conf | 0 pywiUpload.py => sigal.py | 8 ++++---- {pywiupload => sigal}/__init__.py | 0 {pywiupload => sigal}/ftp.py | 2 +- {pywiupload => sigal}/image.py | 2 +- {pywiupload => sigal}/utils.py | 2 +- 8 files changed, 20 insertions(+), 34 deletions(-) rename pywiUpload.conf => sigal.conf (100%) rename pywiUpload.py => sigal.py (95%) rename {pywiupload => sigal}/__init__.py (100%) rename {pywiupload => sigal}/ftp.py (98%) rename {pywiupload => sigal}/image.py (99%) rename {pywiupload => sigal}/utils.py (96%) diff --git a/README b/README index 7c056b6..e5b4419 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ -pywiUpload - Prepare a gallery of images for Piwigo -=================================================== +sigal - simple gallery generator +================================ -This Python script prepares a gallery of images for [Piwigo]() gallery script. +This python script prepares a gallery of images for [Piwigo]() gallery script. It resizes images, creates thumbnails with some options (rename images, squared thumbs, ...), and upload images to a FTP server. @@ -14,39 +14,25 @@ Dependencies - exiv2 (for exif datas) - ConfigObj -on Ubuntu: +on Ubuntu : > sudo apt-get install python-imaging python-pyexiv2 python-configobj -on Fedora (as root): +on Fedora : > yum install python-imaging pyexiv2 python-configobj The script should also work on other system (Windows, Mac) but this has not be tested yet. -Installation ------------- - -- unzip files where you want - Usage ----- go in the directory of images to process and launch the script: - > cd /path/to/images - > /path/to/pywiUpload/pywiUpload.py - -Options: -- launch the script with the directory of images to process in argument: - > cd /path/to/pywiUpload/ - > ./pywiUpload.py -i /path/to/images -- you can also provides a config file (useful if you have different settings) - > cd /path/to/pywiUpload/ - > ./pywiUpload.py -c mypywiUpload.conf -i /path/to/images + > /path/to/sigal/sigal.py input_dir output_dir Settings -------- -Adapt setting to your needs in the configuration file (`pywiUpload.conf`): +Adapt setting to your needs in the configuration file (`sigal.conf`): - Size of images and thumbnails - JPG quality - Thumbnails prefix diff --git a/runtests.py b/runtests.py index fdb474b..69e2980 100755 --- a/runtests.py +++ b/runtests.py @@ -1,7 +1,7 @@ #! /usr/bin/env python2 # -*- coding:utf-8 -*- -# pywiUpload - Piwigo gallery generator +# sigal - Piwigo gallery generator # Copyright (C) 2009-2011 - saimon.org # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program; If not, see http://www.gnu.org/licenses/ -"""Run tests for pywiUpload +"""Run tests for sigal This script allows to test quickly the creation of a gallery, and prints additionnal information for debugging purpose. @@ -25,15 +25,15 @@ additionnal information for debugging purpose. import os import sys -import pywiUpload -from pywiupload.image import Gallery +import sigal +from sigal.image import Gallery if __name__ == '__main__': # read params from config file - config_file = os.path.join(sys.path[0], 'pywiUpload.conf') + config_file = os.path.join(sys.path[0], 'sigal.conf') print ":: Reading parameters ..." - params = pywiUpload.read_params(config_file) + params = sigal.read_params(config_file) print "\n".join(["%s=%s" % (k, v) for k, v in params.items()]) print "\n" diff --git a/pywiUpload.conf b/sigal.conf similarity index 100% rename from pywiUpload.conf rename to sigal.conf diff --git a/pywiUpload.py b/sigal.py similarity index 95% rename from pywiUpload.py rename to sigal.py index 0f70f16..ce5fbe2 100755 --- a/pywiUpload.py +++ b/sigal.py @@ -1,7 +1,7 @@ #! /usr/bin/env python2 # -*- coding:utf-8 -*- -# pywiUpload - Piwigo gallery generator +# sigal - Piwigo gallery generator # Copyright (C) 2009-2011 - saimon.org # # This program is free software; you can redistribute it and/or modify @@ -33,8 +33,8 @@ import os import sys from configobj import ConfigObj from optparse import OptionParser -from pywiupload.ftp import FtpUpload -from pywiupload.image import Gallery +from sigal.ftp import FtpUpload +from sigal.image import Gallery def read_params(config_file): @@ -88,7 +88,7 @@ def main(): # read params from config file config_file = options.config if options.config \ - else os.path.join(sys.path[0], 'pywiUpload.conf') + else os.path.join(sys.path[0], 'sigal.conf') print "Reading parameters ..." params = read_params(config_file) diff --git a/pywiupload/__init__.py b/sigal/__init__.py similarity index 100% rename from pywiupload/__init__.py rename to sigal/__init__.py diff --git a/pywiupload/ftp.py b/sigal/ftp.py similarity index 98% rename from pywiupload/ftp.py rename to sigal/ftp.py index 80cc01c..26689f4 100644 --- a/pywiupload/ftp.py +++ b/sigal/ftp.py @@ -1,7 +1,7 @@ #! /usr/bin/env python2 # -*- coding:utf-8 -*- -# pywiUpload - Piwigo gallery generator +# sigal - Piwigo gallery generator # Copyright (C) 2009, 2011 - saimon.org # # This program is free software; you can redistribute it and/or modify diff --git a/pywiupload/image.py b/sigal/image.py similarity index 99% rename from pywiupload/image.py rename to sigal/image.py index 101656a..9584cf8 100644 --- a/pywiupload/image.py +++ b/sigal/image.py @@ -1,7 +1,7 @@ #! /usr/bin/env python2 # -*- coding:utf-8 -*- -# pywiUpload - Piwigo gallery generator +# sigal - Piwigo gallery generator # Copyright (C) 2009-2011 Simon - saimon.org # # This program is free software; you can redistribute it and/or modify diff --git a/pywiupload/utils.py b/sigal/utils.py similarity index 96% rename from pywiupload/utils.py rename to sigal/utils.py index ef30175..52f3385 100644 --- a/pywiupload/utils.py +++ b/sigal/utils.py @@ -1,7 +1,7 @@ #! /usr/bin/env python2 # -*- coding:utf-8 -*- -# pywiUpload - Piwigo gallery generator +# sigal - Piwigo gallery generator # Copyright (C) 2009-2011 Simon - saimon.org # # This program is free software; you can redistribute it and/or modify