Browse Source

rename project to sigal

pull/9/merge
Simon 15 years ago
parent
commit
0ae1a23773
  1. 28
      README
  2. 12
      runtests.py
  3. 0
      sigal.conf
  4. 8
      sigal.py
  5. 0
      sigal/__init__.py
  6. 2
      sigal/ftp.py
  7. 2
      sigal/image.py
  8. 2
      sigal/utils.py

28
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

12
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"

0
pywiUpload.conf → sigal.conf

8
pywiUpload.py → 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)

0
pywiupload/__init__.py → sigal/__init__.py

2
pywiupload/ftp.py → 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

2
pywiupload/image.py → 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

2
pywiupload/utils.py → 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
Loading…
Cancel
Save