debian/0000755000000000000000000000000012152365204007166 5ustar debian/compat0000644000000000000000000000000211473446160010372 0ustar 8 debian/patches/0000755000000000000000000000000011476446421010626 5ustar debian/patches/photon_fixes.diff0000644000000000000000000000514011473531150014154 0ustar --- a/photon +++ b/photon @@ -65,7 +65,7 @@ from tempfile import gettempdir from commands import getstatusoutput from Photon import EXIF, Video, RAW, airspeed -import md5 +import hashlib import Photon # ------------------------------------------------------------------------ @@ -513,28 +513,7 @@ npicsconverted+=1 if file_is_newer(destfile, srcfile): safe_mkdir(destdir) - # We have 2 choices use Gimp,use Python Library, or our internal parser - if options['resize_plugin'] == "gimp": - if w*h<64000: - gimp_file = (srcfile,destfile,newsize,options['resize_quality_low']) - else: - gimp_file = (srcfile,destfile,newsize,options['resize_quality_high']) - gimp_list.append(gimp_file) - elif options['resize_plugin'] == 'pil': - try: - if im.mode == 'P': # Image is in palette mode, convert it to 24bits - im = im.convert('RGB') - im.resize(newsize, Image.BICUBIC).save(destfile, 'JPEG', optimize=1, progressive=1) - except IOError, err: - print "Error while writing thumbnail, will try without optimization..." - print "Perhaps you can try to increase ImageFile.MAXBLOCK in the source file" - print err - try: # Try to save the Jpeg file without progessive option - im.resize(newsize,Image.BICUBIC).save(destfile, 'JPEG') - except IOError, err: - print "cannot create ", destfile, "(", err, ")" - else: # Use the python internal module resize method - raise("Error: resize plugin not know") + resize_image(srcfile, destfile, newsize) # Process comment for this file only commentfile = srcfile + '.comments' try: @@ -1485,7 +1464,7 @@ try: if ((options['forcecreate'] > 0) or (os.stat(existentfile)[ST_SIZE] != os.stat(newfile)[ST_SIZE]) or - (md5.new(open(existentfile).read()).digest() != md5.new(open(newfile).read()).digest())): + (hashlib.md5.new(open(existentfile).read()).digest() != hashlib.md5.new(open(newfile).read()).digest())): os.rename(newfile, existentfile) except: os.rename(newfile, existentfile) @@ -1591,7 +1570,7 @@ except IOError, err: print "cannot create ", destfile, "(", err, ")" else: # Use the python internal module resize method - raise("Error: resize plugin not know") + raise Exception("Error: resize plugin not known") # ------------------------------------------------------------------------ def make_shortcut_js(pathname): # debian/patches/photon_uppercase_fix.diff0000644000000000000000000000070211476432726015706 0ustar --- a/photon +++ b/photon @@ -486,6 +486,10 @@ else: subdir = 'original' destdir = os.path.join(options['output_directory'], relativepath, subdir) + + # uppercase filename fix by Markku Majaniemi 21-Nov-2010 + filename = re.sub('^(.*)\.[^.]+$',"\\1.jpg",filename) + destfile = os.path.join(destdir, filename) if file_is_newer(destfile, srcfile): safe_mkdir(destdir) debian/patches/debian-changes-0.4.6-20000644000000000000000000000376711473543157014221 0ustar Description: Upstream changes introduced in version 0.4.6-2 This patch has been created by dpkg-source during the package build. Here's the last changelog entry, hopefully it gives details on why those changes were made: . photon (0.4.6-2) unstable; urgency=low . * Acknowledge NMU. * debian/control: - Changed Build-Depends from python-dev to python-all, added quilt. - Bumped Standards-Version to 3.9.1. No changes. - Bumped debhelper version to 8. * debian/rules: - Change dh_clean -k to dh_prep. * Bumped debian/compat to 8. * Patch to fixed md5 deprecation warning in photon. Closes: #604901. Thanks to Kenyon Ralph for this and three other patches. * Patch to clean up redundant code with simple call to resize_image in photon and raise exception errors in photon and PxM.py. Closes: #585268. * Patch to eliminate the popen2 module deprecation warning. Closes: #604904. * Patch to fix grammar in common_footer.html. Closes: #604892. * Switch to dpkg-source 3.0 (quilt) format. . The person named in the Author field signed this changelog entry. Author: Kevin Coyner Bug-Debian: http://bugs.debian.org/585268 Bug-Debian: http://bugs.debian.org/604892 Bug-Debian: http://bugs.debian.org/604901 Bug-Debian: http://bugs.debian.org/604904 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- photon-0.4.6.orig/Photon/airspeed.py +++ photon-0.4.6/Photon/airspeed.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python + import re, operator, os debian/patches/airspeed_python_shebang.diff0000644000000000000000000000016611476446167016356 0ustar --- a/Photon/airspeed.py +++ b/Photon/airspeed.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import re, operator, os debian/patches/RAW_popen2.diff0000644000000000000000000000033511473535137013375 0ustar --- a/Photon/RAW.py +++ b/Photon/RAW.py @@ -3,7 +3,7 @@ # To do the job, we use the dcraw program, exiftool, and any ppm2xxx program # -import os, string, commands, popen2 +import os, string, commands class RAW: debian/patches/series0000644000000000000000000000020511476446255012045 0ustar photon_fixes.diff photon_uppercase_fix.diff PxM_raise_exception.diff RAW_popen2.diff common_footer.diff airspeed_python_shebang.diff debian/patches/common_footer.diff0000644000000000000000000000202311473541165014321 0ustar --- a/templates/photonv1/common_footer.html +++ b/templates/photonv1/common_footer.html @@ -25,7 +25,7 @@ ## MOVIE mode Download the movie:
$movie_filename
- Others preview:
+ Other previews:
#foreach ($res in $movie_sizelist) $res.frames_per_width x $res.frames_per_height
#end @@ -36,7 +36,7 @@ Download the raw file:
$img_raw_filename
#end - Others sizes:
+ Other sizes:
#if ($img_sizelist) #foreach ($res in $img_sizelist) $res.size
debian/patches/PxM_raise_exception.diff0000644000000000000000000000041211473533271015417 0ustar --- a/Photon/PxM.py +++ b/Photon/PxM.py @@ -11,7 +11,7 @@ def identify_P6(h): if h[0] == '#': - raise "I don't support comment in a PPM file" + raise Exception("I don't support comments in a PPM file") m = re.search("^(\d+)\s(\d+)", h) if not m: debian/rules0000755000000000000000000000212112152365157010251 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ --with quilt PYDEF := $(shell pyversions -d) build: touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs -find ./Photon/ -name "*.py" | xargs sed -i -e '1 s/^#\!.*python.*//' python setup.py install --no-compile --prefix=$(CURDIR)/debian/photon/usr --install-layout=deb install -m 644 debian/photon.override.lintian $(CURDIR)/debian/photon/usr/share/lintian/overrides/photon # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installdocs dh_installman debian/photon.1 dh_link dh_compress dh_fixperms dh_python2 dh_installdeb dh_gencontrol dh_md5sums dh_builddeb # Build architecture-dependent files here. binary-arch: build install # We have nothing to do by default. binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/docs0000644000000000000000000000002611473442133010041 0ustar BUGS README.templates debian/control0000644000000000000000000000207312152365125010575 0ustar Source: photon Section: graphics Priority: optional Maintainer: Kevin Coyner Build-Depends: debhelper (>= 8), python-all (>= 2.6.6-3~), quilt (>= 0.48) Standards-Version: 3.9.1 Homepage: http://www.saillard.org/programs_and_patches/photon/ Package: photon Architecture: all Depends: ${python:Depends}, ${misc:Depends}, python-imaging Recommends: gimp, dcraw Description: a static HTML gallery generator A Python based photo album generator with a clean design that is run from the command line. HTML output can be configured via templates. . Features: * generates static HTML pages * slideshow (use of javascript is optional) * can use gimp to resize picture * keyboard navigation between images * works in any browser (Mozilla, Netscape Navigator 4.x, Konqueror, Opera) * each image can have a comment (with HTML tags) * image information (if taken from a digital picture) can be displayed * thumbnail image size can be selected by the user * output images can be scaled down * control over the number of thumbnails in a page debian/photon.10000644000000000000000000001172111473442133010563 0ustar .\" Title: photon .\" Author: .\" Generator: DocBook XSL Stylesheets v1.71.0 .\" Date: 12/16/2006 .\" Manual: .\" Source: .\" .TH "PHOTON" "1" "12/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" photon \- generates photo albums .SH "SYNOPSIS" \fIphoton\fR [OPTIONS] [PATH] .SH "DESCRIPTION" Photon generates clean, yet configurable, static HTML photo galleries. All of the work is done from the command line, and the resulting output can easily be configured by changing the template files found in /usr/share/photon/templates. .PP To create a new template (skin), first create a new directory: .sp .RS 3n .nf mkdir \-p ${HOME}/.photon/templates/my_theme/ .fi .PP .RE Then copy the contents of /usr/share/photon/templates/photonv1/ to this new directory. Photon only needs three files to build pages: .PP index.html .RS 3n used to display the content of a folder .RE .PP image.html .RS 3n used to display the page for an image .RE .PP movie.html .RS 3n used to display the page for a movie .PP .RE If a file is missing, then photon will throw an error and will not run. .SH "HOW TO BUILD A GALLERY" .PP Quick start .RS 3n $ photon \-o myoutputdir /photos .RE .PP Use the gimp plugin .RS 3n $ photon \-\-resize\-plugin=gimp \-v \-o myoutputdir /photos .RE .PP Change the size for all images and the thumbnail and keep the original photo .RS 3n $ photon \-\-sizelist=0,1600x1200,800x600 \-\-thumbsize=320x240 \-o myoutputdir /photos .RE .PP Create a gallery from your custom template (skin) .RS 3n $ photon \-k my_theme \-o myoutputdir /photos .RE .PP See photon help .RS 3n $ photon \-\-help .RE .SH "OPTIONS" .PP \-a | \-\-awstats .RS 3n Insert Javascript for Awstats .RE .PP \-\-awstats\-url=URL .RS 3n Change default value for Awstats script url .RE .PP \-c NAME | \-\-comment .RS 3n Name of the comment file (default .comments) .RE .PP \-d NUM | \-\-display\-columns=NUM .RS 3n Number of columns in index (default 3) .RE .PP \-E | \-\-no\-exif .RS 3n Don't include EXIF information in HTML file .RE .PP \-f | \-\-force .RS 3n Overwrite non\-image generated files (html, javascript, etc) (default no) .RE .PP \-ff | \-\-force \-\-force .RS 3n Overwrite image files (default no) .RE .PP \-h | \-\-help .RS 3n Print this help .RE .PP \-I | \-\-no\-index .RS 3n Do not generate the high level index.html .RE .PP \-J | \-\-no\-javascript .RS 3n Do not use javascript (no shortcuts, \&... ) .RE .PP \-k | \-\-skin=THEME .RS 3n Skin selector (default photonv1) .RE .PP \-\-print\-skins .RS 3n Print out available skins (templates) .RE .PP \-l NUM | \-\-display\-lines=NUM .RS 3n Number of lines in index (default 5) .RE .PP \-m | \-\-movie .RS 3n Movie mode, include link to movie (*.mov) .RE .PP \-o NAME | \-\-output\-directory=NAME .RS 3n Name of the output directory .RE .PP \-s LIST | \-\-sizelist=LIST .RS 3n Image sizes (default 0,1024x768,800x600,640x480). Zero, which is the default, uses the original resolution. W x H specifies the width and height of the image in pixels. .RE .PP \-t SIZE | \-\-thumbsize=SIZE .RS 3n Size of thumbnails (default 160x120) .RE .PP \-v | \-\-verbose .RS 3n Verbosely print information .RE .PP \-V | \-\-version .RS 3n Print program version number .RE .PP \-z | \-\-compress .RS 3n Compress the original image if selected (default copy the image) .RE .PP \-\-exif\-bordercolor=COLOR .RS 3n Exif window border color (default #008000) .RE .PP \-\-exif\-bgcolor=COLOR .RS 3n Exif window background color (default #f0fff0) .RE .PP \-\-exif\-fgcolor=COLOR .RS 3n Exif window text color (default \fIblack\fR) .RE .PP \-\-body\-bgcolor=COLOR .RS 3n Body background color (default #ccccff) .RE .PP \-\-img\-bgcolor=COLOR .RS 3n Image background color (default \fIwhite\fR) .RE .PP \-\-exclude=PATTERN .RS 3n Exclude files matching PATTERN .RE .PP \-\-resize\-plugin=PLUG .RS 3n Where PLUG is the program used to create thumbnails internal: fastest method (default) gimp: use Gimp>1.x (better quality) .RE .PP \-\-resize\-quality\-low=NUM .RS 3n Quality for small image. 0 (bad) and 100 (good) .RE .PP \-\-resize\-quality\-high=NUM .RS 3n Quality for big image 0 (bad) and 100 (good) .RE .PP \-\-gimp\-program=PROG .RS 3n use PROG for gimp .RE .SH "SHORTCUTS WHILE VIEWING AN IMAGE" .sp .RS 3n .nf n/SPACE Go to the next image (with the same resolution) p/BACKSPACE Go to the previous image (with the same resolution) s Start/Stop the slideshow +/\- Increase/Decrease by one second the slideshow's period h Show shortcut and help i Show Exif information z Change to the higher resolution [NOT YET IMPLEMENTED] .fi .RE .SH "SEE ALSO" .sp .RS 3n .nf gimp(1) .fi .RE .SH "AUTHOR" .sp .RS 3n .nf Written by Luc Saillard, .fi .RE .sp .RS 3n .nf Main web site: http://www.saillard.org/programs_and_patches/photon/ .fi .RE .sp .RS 3n .nf This manual page was written by Kevin Coyner for the Debian project but may be used by others. .fi .RE debian/changelog0000644000000000000000000000531312152365204011042 0ustar photon (0.4.6-3.1) unstable; urgency=low * Non-maintainer upload. * Convert to dh_python2 (Closes: #616936). -- Luca Falavigna Sat, 01 Jun 2013 14:34:59 +0200 photon (0.4.6-3) unstable; urgency=low * Patch that enables use of fully capitalized filenames. Thanks to Markku Majaniemi. Closes: #604254. * Patch Photon/airspeed.py to remove unneeded python shebang. -- Kevin Coyner Sat, 04 Dec 2010 12:56:21 +0000 photon (0.4.6-2) unstable; urgency=low * Acknowledge NMU. * debian/control: - Changed Build-Depends from python-dev to python-all, added quilt. - Bumped Standards-Version to 3.9.1. No changes. - Bumped debhelper version to 8. * debian/rules: - Change dh_clean -k to dh_prep. * Bumped debian/compat to 8. * Patch to fixed md5 deprecation warning in photon. Closes: #604901. Thanks to Kenyon Ralph for this and three other patches. * Patch to clean up redundant code with simple call to resize_image in photon and raise exception errors in photon and PxM.py. Closes: #585268. * Patch to eliminate the popen2 module deprecation warning. Closes: #604904. * Patch to fix grammar in common_footer.html. Closes: #604892. * Switch to dpkg-source 3.0 (quilt) format. -- Kevin Coyner Thu, 25 Nov 2010 11:25:45 +0000 photon (0.4.6-1.1) unstable; urgency=low * NMU. Rebuild to move files to /usr/share/pyshared. Closes: #490481. -- Matthias Klose Fri, 18 Jul 2008 15:51:14 +0000 photon (0.4.6-1) unstable; urgency=low * New upstream release. * Moved Homepage reference out of the extended description. * Bumped Standards-Version to 3.7.3. No changes. * Fix spelling error in debian/control extended description. * Original images are copied over into an original folder, even it they are not jpg's. (Closes: #417050) * Incompatibility with Gimp in unstable. Recent Gimp versions do not have this problem. (Closes: #440277) * Added photon.override.lintian file, associated install command in debian/rules, and an override directory in debian/dirs to override warning about an empty usr/lib file in the package. -- Kevin Coyner Sun, 24 Feb 2008 14:18:55 -0500 photon (0.4.4-2) unstable; urgency=low * New e-mail address for maintainer. Changed throughout debian/* files. * debian/rules: Changed invocation of Make clean rule. -- Kevin Coyner Tue, 14 Aug 2007 14:51:45 -0400 photon (0.4.4-1) unstable; urgency=low * Initial release (Closes: #400929) * Created man page. * Repackaged upstream tarball without debian directory from upstream. -- Kevin Coyner Sat, 9 Dec 2006 15:02:23 -0500 debian/dirs0000644000000000000000000000003411473442133010051 0ustar usr/share/lintian/overrides debian/photon.override.lintian0000644000000000000000000000006211473442133013673 0ustar photon: package-contains-empty-directory usr/lib/ debian/copyright0000644000000000000000000000621411473442133011126 0ustar This package was debianized by Kevin Coyner on Sat, 9 Dec 2006 15:02:23 -0500. It was downloaded from http://www.saillard.org/programs_and_patches/photon/. Upstream Author: Luc Saillard Copyright Holder: Luc Saillard Carles Carbonell Bernado Gene Cash License (photon): Copyright (C) 2002-2005 Luc Saillard 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 (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. License (images/help.png, images/info.png, images/player_pause.png, images/player_play.png): Copyright (C) Carles Carbonell Bernado The Noia icons for KDE made by Carles Carbonell Bernado are under GNU LGPL license. On Debian systems, the complete text of the GNU Lesser General Public License can be found in /usr/share/common-licenses/LGPL file. License (EXIF.py): Copyright (C) 2002 Gene Cash This copyright license is intended to be similar to the FreeBSD license. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY GENE CASH ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This means you may do anything you want with this code, except claim you wrote it. Also, if it breaks you get to keep both pieces. The Debian packaging is (C) 2006, Kevin Coyner and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. debian/source/0000755000000000000000000000000011473543040010467 5ustar debian/source/format0000644000000000000000000000001411473543040011675 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000013111473442133010214 0ustar version=3 http://www.saillard.org/programs_and_patches/photon/files/Photon-(.*)\.tar\.gz