Giter Site home page Giter Site logo

saimn / sigal Goto Github PK

View Code? Open in Web Editor NEW
862.0 32.0 170.0 7.54 MB

yet another simple static gallery generator

Home Page: http://sigal.saimon.org/

License: MIT License

Python 16.31% CSS 7.11% HTML 2.11% JavaScript 74.47%
python gallery static-site-generator galleria

sigal's Introduction

Sigal - Simple Static Gallery Generator

CI Status

codecov.io

Sigal is yet another simple static gallery generator. It's written in Python and it allows to build a static gallery of images with the following features:

  • Process directories recursively.
  • Generate HTML pages using Jinja2 templates.
  • Relative links for a portable output.
  • Support themes, videos, EXIF tags, zip download.
  • Parallel processing.
  • MIT licensed.

The idea behind Sigal is to ease the use of the javascript libraries like galleria. These libraries do a great job to display the images, Sigal does what is missing: resize images, create thumbnails, generate HTML pages.

Sigal requires Python 3.9+.

  • Latest documentation on the website
  • Source, issues and pull requests on GitHub
  • Releases on PyPI

Themes & Demo

Sigal comes with three themes, based on the colorbox, galleria and photoswipe Javascript libraries:

sigal's People

Contributors

abdul avatar anarcat avatar chmduquesne avatar dbw9580 avatar dsschult avatar edwinsteele avatar franek avatar glandos avatar j0nes2k avatar jasuarez avatar jdn06 avatar jrstarke avatar jvoisin avatar kaibutsux avatar ksfeldman avatar matze avatar narnaud avatar pitrou avatar rassie avatar riton avatar saimn avatar t-animal avatar thekad avatar thomasdn avatar tohojo avatar trapperhoney avatar tudacs avatar ubergeek42 avatar webratz avatar xouillet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sigal's Issues

Installation procedure

Salut,

J'ai découvert ton code via ton récent article. Il a l'air alléchant. Merci pour ton partage.

But, I have a couple issues/comments/requests with the installation procedure.

  • python2-argparse is missing in requirements.
  • in requirements, I think it is worth to specify that it concerns python modules. It might be confusing for markdown for instance.
  • Is it compatible with python 3? Could you also specify that? (Note: pillow will support python3 very very soon)
  • About the installation procedure, you detail only the usage of pip. Packagers (like me on archlinux) appreciate manual installation procedures ;)
  • My package actually fails because it does not install the templates directory in /usr/lib/python*/sigal/

This is minor comments, but it must enhance user experience a lot.

Many thanks.

Incompatibility with Jinja 2.6

Hi, I'm using sigal from a debian stable with jinja2 installed from repo.

python
Python 2.7.3 (default, Jan 2 2013, 13:56:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import jinja2
jinja2.version
'2.6'

sigal build victoria
Traceback (most recent call last):
File "/usr/local/bin/sigal", line 9, in
load_entry_point('sigal==0.4.1', 'console_scripts', 'sigal')()
File "/usr/local/lib/python2.7/dist-packages/sigal-0.4.1-py2.7.egg/sigal/init.py", line 156, in main
parser.dispatch()
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.2-py2.7.egg/argh/helpers.py", line 53, in dispatch
return dispatch(self, _args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.2-py2.7.egg/argh/dispatching.py", line 123, in dispatch
for line in lines:
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.2-py2.7.egg/argh/dispatching.py", line 199, in _execute_command
for line in result:
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.2-py2.7.egg/argh/dispatching.py", line 182, in _call
result = args.function(_positional, *_keywords)
File "/usr/local/lib/python2.7/dist-packages/sigal-0.4.1-py2.7.egg/sigal/init.py", line 121, in build
gal = Gallery(settings, force=force, theme=theme)
File "/usr/local/lib/python2.7/dist-packages/sigal-0.4.1-py2.7.egg/sigal/gallery.py", line 162, in init
theme=theme)
File "/usr/local/lib/python2.7/dist-packages/sigal-0.4.1-py2.7.egg/sigal/writer.py", line 77, in init
lstrip_blocks=True
TypeError: init() got an unexpected keyword argument 'lstrip_blocks'

index.html missing

This is not an issue, if the whole directory tree is browsed through a web server, but if you do it locally, the index.html is missing in the links to sub-albums as well as the whole gallery. Since I do use this gallery locally on my tablet, this is rather annoying.

Extra feature: ignore subdirectories

Hi Simon,

I've added support to ignore a directory (including subdirectories) in a fork (https://github.com/Timmmy/sigal/tree/Testbranch2). (Code needs some cleanup though)

When a file with the name '.sigalignore' is detected in a directory, it will ignore this directory and all subdirectories. I use this because we store all our pictures in one filetree, but we don't want all the pictures in the album.

Are you interested in including this feature in your repo?

Kind regards,

Tim

More graceful handling of video encoding errors

I still have instances in which, for whatever reason, ffmpeg throws an error (such as below). Maybe it'd be better to catch these and continue, and then at the end of the build warn that the following files could not be transcoded?

urd:~$ ffmpeg -i /home/reagle/f/photo/hires/2010/03/28-1133-amsterdam-zaandijk-mill.avi -y -b 885k -r 23.976 -threads 2 -preset medium -ab 127k -vf 'scale=trunc(oh*a/2)*2:480' /home/reagle/f/photo/gallery/2010/03/28-1133-amsterdam-zaandijk-mill.webm
ffmpeg version 0.8.9-6:0.8.9-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:09:46 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Input #0, avi, from '/home/reagle/f/photo/hires/2010/03/28-1133-amsterdam-zaandijk-mill.avi':
  Duration: 00:00:16.00, start: 0.000000, bitrate: 4849 kb/s
    Stream #0.0: Video: mpeg4 (Simple Profile), yuv420p, 480x640 [PAR 1:1 DAR 3:4], 30 tbr, 30 tbn, 30 tbc
    Stream #0.1: Audio: pcm_u8, 11024 Hz, 1 channels, u8, 88 kb/s
[buffer @ 0x1cde600] w:480 h:640 pixfmt:yuv420p
[scale @ 0x1cf5040] w:480 h:640 fmt:yuv420p -> w:360 h:480 fmt:yuv420p flags:0x4
Incompatible sample format 'u8' for codec 'libvorbis', auto-selecting format 's16'
[libvpx @ 0x1cddb20] v1.2.0
[libvorbis @ 0x1cf43a0] oggvorbis_encode_init: init_encoder failed
Output #0, webm, to '/home/reagle/f/photo/gallery/2010/03/28-1133-amsterdam-zaandijk-mill.webm':
    Stream #0.0: Video: libvpx, yuv420p, 360x480 [PAR 1:1 DAR 3:4], q=-1--1, 885 kb/s, 90k tbn, 23.98 tbc
    Stream #0.1: Audio: libvorbis, 11024 Hz, 1 channels, s16, 127 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

Default config file - comma at wrong place?

Hi!

In the default config file, at the end of the second line of the webm options, a comma is added after the array.

Shouldn't that line just end with "]" ?

Kind regards,

Timmmy

Feature request: Pages for tags

Since you seem to take some inspiration from pelican, synthetic pages for tags would be cool.

import pyexiv2
metadata = pyexiv2.ImageMetadata(fn)
metadata.read()
tags = metadata.get('Iptc.Application2.Keywords', '')

URI with HTTP cause issue on HTTPS

Hello,

It seems like generated page has hardcoded HTTP URI

<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Molengo">
...
...
<!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

which cause the warning / font does not get rendered properly while using generated gallery over HTTPS.
can that be converted to to https, as it should work without issue.

Reverse order of directories

I've many photographs over many years, hence the most recent years have fallen off the bottom of the page, it would be nice if there was an option to put the more recent directories (reverse sort when years) at the top.

AttributeError: _getexif

Hi,

A backtrace :) I have not investigated.

Pictures come from my photos edited with gimp and saved as png. I guess there is an issue with metadata.

fr@archbang /tmp/test % sigal build in4                                                                                    -I-
Traceback (most recent call last): ] 0/3
  File "/usr/bin/sigal", line 9, in <module>
    load_entry_point('sigal==0.3.1', 'console_scripts', 'sigal')()
  File "/usr/lib/python2.7/site-packages/sigal/__init__.py", line 154, in main
    parser.dispatch()
  File "/usr/lib/python2.7/site-packages/argh/helpers.py", line 47, in dispatch
    return dispatch(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/argh/dispatching.py", line 121, in dispatch
    for line in lines:
  File "/usr/lib/python2.7/site-packages/argh/dispatching.py", line 197, in _execute_command
    for line in result:
  File "/usr/lib/python2.7/site-packages/argh/dispatching.py", line 180, in _call
    result = args.function(*positional, **keywords)
  File "/usr/lib/python2.7/site-packages/sigal/__init__.py", line 120, in build
    gal.build()
  File "/usr/lib/python2.7/site-packages/sigal/gallery.py", line 182, in build
    label_width=label_width)
  File "/usr/lib/python2.7/site-packages/sigal/gallery.py", line 218, in process_dir
    (f, outpath, self.settings)).get(9999)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 528, in get
    raise self._value
AttributeError: _getexif

Example sigal.conf does not work

Error:

15:01:51 > sigal . ../tb/
Traceback (most recent call last):
File "/usr/local/epd/bin/sigal", line 9, in
load_entry_point('sigal==0.1-dev', 'console_scripts', 'sigal')()
File "/usr/local/epd/lib/python2.7/site-packages/sigal-0.1_dev-py2.7.egg/sigal/init.py", line 98, in main
_DEFAULT_CONFIG_FILE))
File "/usr/local/epd/lib/python2.7/site-packages/sigal-0.1_dev-py2.7.egg/sigal/settings.py", line 64, in read_settings
config.read(filename)
File "/usr/local/epd/lib/python2.7/ConfigParser.py", line 305, in read
self._read(fp, filename)
File "/usr/local/epd/lib/python2.7/ConfigParser.py", line 512, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: ./sigal.conf, line: 2
'theme = default\n'
Exit 1

version: 0.1-dev as received by git clone.

Side info: the currently downloadable tar file from pypi does not install because of misssing README.rst

OSError: No such file or directory

Sporadic i'm getting an error message:

public/2008/07. Юли       [################################] 278/278 - 00:00:00
Traceback (most recent call last):                          ] 0/1 - 00:00:00
  File "/usr/local/bin/sigal", line 9, in 
    load_entry_point('sigal==0.5.1', 'console_scripts', 'sigal')()
  File "/usr/local/lib/python2.7/dist-packages/sigal/__init__.py", line 158, in main
    parser.dispatch()
  File "/usr/local/lib/python2.7/dist-packages/argh/helpers.py", line 53, in dispatch
    return dispatch(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 124, in dispatch
    for line in lines:
  File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 200, in _execute_command
    for line in result:
  File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 183, in _call
    result = args.function(*positional, **keywords)
  File "/usr/local/lib/python2.7/dist-packages/sigal/__init__.py", line 124, in build
    gal.build()
  File "/usr/local/lib/python2.7/dist-packages/sigal/gallery.py", line 209, in build
    label_width=label_width)
  File "/usr/local/lib/python2.7/dist-packages/sigal/gallery.py", line 257, in process_dir
    process_video(f, outpath, self.settings)
  File "/usr/local/lib/python2.7/dist-packages/sigal/gallery.py", line 313, in process_video
    settings['webm_options'])
  File "/usr/local/lib/python2.7/dist-packages/sigal/video.py", line 56, in generate_video
    w_src, h_src = vid_size(source)
  File "/usr/local/lib/python2.7/dist-packages/sigal/video.py", line 36, in vid_size
    stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I've removed the folder, which caused the problem, but then i get the same error on a directory, which previous was created completly.

I'm generating my album on a RaspberryPi with OS raspbian.

Any suggestions?

IndexError: index out of range

Hello

During build process i have encountered error. and i am not able to make anything out of it.

I have both version of sigal installed. (0.5.1) and (0.6.0-dev).

==== error on 0.6.0 ====

Traceback (most recent call last): [############## ] 31/69 - 00:00:00
File "/usr/lib/python3.3/site-packages/PIL/ImageFile.py", line 200, in load
s = read(self.decodermaxblock)
File "/usr/lib/python3.3/site-packages/PIL/PngImagePlugin.py", line 424, in load_read
cid, pos, len = self.png.read()
File "/usr/lib/python3.3/site-packages/PIL/PngImagePlugin.py", line 99, in read
len = i32(s)
File "/usr/lib/python3.3/site-packages/PIL/_binary.py", line 38, in i32be
return (i8(c[o])<<24) | (i8(c[o+1])<<16) | (i8(c[o+2])<<8) | i8(c[o+3])
IndexError: index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/sigal", line 9, in
load_entry_point('sigal==0.6.0-dev', 'console_scripts', 'sigal')()
File "/usr/lib/python3.3/site-packages/sigal-0.6.0_dev-py3.3.egg/sigal/init.py", line 158, in main
parser.dispatch()
File "/usr/lib/python3.3/site-packages/argh-0.23.3-py3.3.egg/argh/helpers.py", line 53, in dispatch
File "/usr/lib/python3.3/site-packages/argh-0.23.3-py3.3.egg/argh/dispatching.py", line 123, in dispatch
File "/usr/lib/python3.3/site-packages/argh-0.23.3-py3.3.egg/argh/dispatching.py", line 199, in _execute_command
File "/usr/lib/python3.3/site-packages/argh-0.23.3-py3.3.egg/argh/dispatching.py", line 182, in _call
File "/usr/lib/python3.3/site-packages/sigal-0.6.0_dev-py3.3.egg/sigal/init.py", line 123, in build
gal.build()
File "/usr/lib/python3.3/site-packages/sigal-0.6.0_dev-py3.3.egg/sigal/gallery.py", line 211, in build
label_width=label_width)
File "/usr/lib/python3.3/site-packages/sigal-0.6.0_dev-py3.3.egg/sigal/gallery.py", line 257, in process_dir
process_image(f, outpath, self.settings)
File "/usr/lib/python3.3/site-packages/sigal-0.6.0_dev-py3.3.egg/sigal/gallery.py", line 295, in process_image
image.generate_image(filepath, outname, settings, options=options)
File "/usr/lib/python3.3/site-packages/sigal-0.6.0_dev-py3.3.egg/sigal/image.py", line 86, in generate_image
img = processor.process(img)
File "/usr/lib/python3.3/site-packages/pilkit-1.1.6-py3.3.egg/pilkit/processors/resize.py", line 227, in process
img = Resize(new_dimensions[0], new_dimensions[1], upscale=self.upscale).process(img)
File "/usr/lib/python3.3/site-packages/pilkit-1.1.6-py3.3.egg/pilkit/processors/resize.py", line 23, in process
img = img.convert('RGBA')
File "/usr/lib/python3.3/site-packages/PIL/Image.py", line 699, in convert
self.load()
File "/usr/lib/python3.3/site-packages/PIL/ImageFile.py", line 205, in load
raise IndexError(ie)
IndexError: index out of range

==== error on 0.5.1 ====

Traceback (most recent call last): [############## ] 31/69 - 00:00:00
File "/srv/http/Sigal/bin/sigal", line 9, in
load_entry_point('sigal==0.5.1', 'console_scripts', 'sigal')()
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/init.py", line 158, in main
parser.dispatch()
File "/srv/http/Sigal/lib/python2.7/site-packages/argh/helpers.py", line 53, in dispatch
return dispatch(self, _args, *_kwargs)
File "/srv/http/Sigal/lib/python2.7/site-packages/argh/dispatching.py", line 123, in dispatch
for line in lines:
File "/srv/http/Sigal/lib/python2.7/site-packages/argh/dispatching.py", line 199, in _execute_command
for line in result:
File "/srv/http/Sigal/lib/python2.7/site-packages/argh/dispatching.py", line 182, in _call
result = args.function(_positional, *_keywords)
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/init.py", line 124, in build
gal.build()
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/gallery.py", line 209, in build
label_width=label_width)
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/gallery.py", line 255, in process_dir
process_image(f, outpath, self.settings)
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/gallery.py", line 292, in process_image
sigal.image.generate_image(filepath, outname, settings, options=options)
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/image.py", line 84, in generate_image
img = processor.process(img)
File "/srv/http/Sigal/lib/python2.7/site-packages/pilkit/processors/resize.py", line 227, in process
img = Resize(new_dimensions[0], new_dimensions[1], upscale=self.upscale).process(img)
File "/srv/http/Sigal/lib/python2.7/site-packages/pilkit/processors/resize.py", line 23, in process
img = img.convert('RGBA')
File "/srv/http/Sigal/lib/python2.7/site-packages/PIL/Image.py", line 699, in convert
self.load()
File "/srv/http/Sigal/lib/python2.7/site-packages/PIL/ImageFile.py", line 205, in load
raise IndexError(ie)
IndexError: string index out of range

Init Gallery failure on Gallery Index

On the index page of the Gallery, I do get the following error:

Init failed: Galleria could not find the element "#gallery".

Since there are no real pictures on my front-page, I delted the following lines from this index.html and all is fine:

<script src="static/js/galleria-1.2.8.min.js"></script>
<script src="static/js/galleria.classic.min.js"></script>
<script>
Galleria.configure({
    imageCrop: false,
    transition: "fade"
});
Galleria.run("#gallery");
</script>

Exceptions from PIL

Hi,

While generating a gallery I got some exceptions from PIL (signed integer is greater than maximum). I reported it to PIL via mailing list.

I also added try/excepts in image.py for save_image(img, outname, format, options=options, autoconvert=autoconvert) and for img = PILImage.open(source)

BUT this does not completly fix the bug, as sigal generate a gallery with missing thumbnails, it whine a runtime (Image not found thumbnails/…)

So we may want to report the error (return a value from generate_thumbnail) and exclude the image from the gallery. But as there's an option to not generate_thumbnails, we'll not detect un-thumbnailable images...

If you want to give it a try, here is an image that PIL can't resize : http://mandark.fr/art/art/2011/01/16/2011-01-16-14-54-22.jpg

It may be a bit costly but we may run PILImage.open(source) systematically to check if PIL succeed opening it.

Master is broken (transition to python3?)

I downloaded master to test the fix to #49 but it's not working. It looks like your transitioning to Python3? For instance, below it should be encoding='utf-8', and there are other string vs unicode bugs I'm seeing.

File "/home/reagle/.src/sigal/sigal/__init__.py", line 58, in init
    with io.open('sigal.conf.py', 'w', 'utf-8') as f:

Should I hold off from using master for some time?

Video generate thumbnail called on non-existent video.

Following issue #53, video.generate_thumbnail is causing an exception (that it's hard to debug since the exception is being muddled by pool). The problem is that you're calling ffmpeg (to create a thumbnail) on a source video file that doesn't exist.

    subprocess.call(['ffmpeg', '-i', source, '-an', '-r', '1',
                        '-vframes', '1', '-y', tmpfile], stderr=devnull)

Issue with a lot of pictures

I am trying to create a holiday gallery with a lot of pictures. After a couple of sub directories, python starts to complain about IOError: [Errno 2] No such file or directory: u'/home/xyz/Bilder/generated/24/DSC00947.JPG'.

Problem is on the first couple of errors, I could rename the folder (e.g. 21 to 21_) and all goes find, but after some more tries even this does not work anymore. any hints on this one?

Failed to create a thumbnail

I'm picking up from issue #68 as I think this is different. I have a few directories for which it can't create thumbnails, but I'm not yet sure why.

It looks like ffmpeg is being called to create a thumbnail? But there are no videos there...


INFO: Output path : /home/reagle/f/photo/gallery/1972-1995/00
INFO: Output path : /home/reagle/f/photo/gallery/1972-1995
DEBUG: Thumbnail path : /home/reagle/f/photo/gallery/1972-1995/00/thumbnails/family-brothers.jpg
INFO: Output path : /home/reagle/f/photo/gallery/1972/02
INFO: Output path : /home/reagle/f/photo/gallery/1972/01
INFO: Output path : /home/reagle/f/photo/gallery/1972
DEBUG: Thumbnail path : /home/reagle/f/photo/gallery/1972/01/thumbnails/family-brothers.jpg
DEBUG: Thumbnail path : /home/reagle/f/photo/gallery/1972/02/thumbnails/03-abp-chess.jpg
INFO: Output path : /home/reagle/f/photo/gallery
DEBUG: Thumbnail path : /home/reagle/f/photo/gallery/1972/thumbnails/
DEBUG: Generating thumbnail for /home/reagle/f/photo/gallery/1972/
ERROR: Failed to create a thumbnail for /home/reagle/f/photo/gallery/1972/
DEBUG: STDOUT:

DEBUG: STDERR:
 ffmpeg version 0.8.9-6:0.8.9-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:09:46 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
/home/reagle/f/photo/gallery/1972/: Operation not permitted



Log to file?

Hi

What is the best way to write the output (including error traceback when a crash occurs) to a file?

Thank you in advance!

Kind regards,

Timmmy

exif data can not get displayed

Hello,

Not sure what is up with this. there is two image one display exif but other does not.
Images in questions are attached.

Here is the exif information from converted image by sigal.

Exif Printed in gallery
IMG_0001.JPG
ISO: 100, Focal: 17, Exposure: 1/200, Fstop: 5.9
Date: Tuesday, 24. December 2013

img_0001

exiv2 pr IMG_0001.JPG

Image size : 1024 x 768
Camera make : Canon
Camera model : Canon PowerShot A3300 IS
Image timestamp : 2013:12:24 18:53:35
Image number : 101-0001
Exposure time : 1/200 s
Aperture : F5.9
Exposure bias : 0 EV
Flash : No, auto
Flash bias : 0 EV
Focal length : 16.9 mm
Subject distance: 248
ISO speed : 100
Exposure mode : Easy shooting (Auto)
Metering mode : Multi-segment
Macro mode : Off
Image quality : Fine
Exif Resolution : 4608 x 3456
White balance : Auto
Thumbnail : image/jpeg, 3736 Bytes
Copyright :
Exif comment :

Exif Printed in gallery
IMG_5247.JPEG
IMG_5247.JPEG

img_5247

exiv2 pr IMG_5247.JPEG

File name : IMG_5247.JPEG
File size : 191218 Bytes
MIME type : image/jpeg
Image size : 1024 x 682
Camera make : Canon
Camera model : Canon EOS REBEL T3i
Image timestamp : 2013:12:25 18:03:09
Image number :
Exposure time : 1/400 s
Aperture : F6.3
Exposure bias : 0 EV
Flash : No, compulsory
Flash bias : 0 EV
Focal length : 135.0 mm
Subject distance: 0
ISO speed : 100
Exposure mode : Auto
Metering mode : Multi-segment
Macro mode : Off
Image quality : RAW
Exif Resolution : 5184 x 3456
White balance : Auto
Thumbnail : image/jpeg, 14336 Bytes
Copyright :
Exif comment :

Title of gallery

It'd be nice to specify a title for a gallery rather than simply using the name of the source directory.

Cannot generate any gallery

My system is a debian sid up-to-date, with python-2.7. My variable is set to fr_FR.UTF-8, and all my system is using UTF8. I tried to run the last version of sigal (installed using easy_install), but it seems that PIL (installed version: 1.1.7-4) does not like unicode filenames, as seen on the following traceback:

Traceback (most recent call last): ] 0/73
File "/usr/local/bin/sigal", line 9, in
load_entry_point('sigal==0.4.1', 'console_scripts', 'sigal')()
File "/usr/local/lib/python2.7/dist-packages/sigal-0.4.1-py2.7.egg/sigal/init.py", line 156, in main
parser.dispatch()
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.3-py2.7.egg/argh/helpers.py", line 53, in dispatch
return dispatch(self, _args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.3-py2.7.egg/argh/dispatching.py", line 123, in dispatch
for line in lines:
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.3-py2.7.egg/argh/dispatching.py", line 199, in _execute_command
for line in result:
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.3-py2.7.egg/argh/dispatching.py", line 182, in _call
result = args.function(_positional, *_keywords)
File "/usr/local/lib/python2.7/dist-packages/sigal-0.4.1-py2.7.egg/sigal/init.py", line 122, in build
gal.build()
File "/usr/local/lib/python2.7/dist-packages/sigal-0.4.1-py2.7.egg/sigal/gallery.py", line 192, in build
label_width=label_width)
File "/usr/local/lib/python2.7/dist-packages/sigal-0.4.1-py2.7.egg/sigal/gallery.py", line 227, in process_dir
process_image(f, outpath, self.settings)
File "/usr/local/lib/python2.7/dist-packages/sigal-0.4.1-py2.7.egg/sigal/gallery.py", line 252, in process_image
method=settings['img_processor'])
File "/usr/local/lib/python2.7/dist-packages/sigal-0.4.1-py2.7.egg/sigal/image.py", line 68, in generate_image
save_image(img, outname, format, options=options, autoconvert=autoconvert)
File "/usr/local/lib/python2.7/dist-packages/pilkit-1.1.3-py2.7.egg/pilkit/utils.py", line 199, in save_image
save(wrapper)
File "/usr/local/lib/python2.7/dist-packages/pilkit-1.1.3-py2.7.egg/pilkit/utils.py", line 191, in save
img.save(fp, format, **options)
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1439, in save
save_handler(self, fp, filename)
File "/usr/lib/python2.7/dist-packages/PIL/JpegImagePlugin.py", line 471, in _save
ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, rawmode)])
File "/usr/lib/python2.7/dist-packages/PIL/ImageFile.py", line 487, in _save
fp.write(d)
File "/usr/local/lib/python2.7/dist-packages/pilkit-1.1.3-py2.7.egg/pilkit/utils.py", line 155, in getattr
return getattr(self._wrapped, name)
AttributeError: 'unicode' object has no attribute 'write'

ERROR: ncpu should be an integer value

Running from git. The default value doesn't seem to be working as it leads to an exception. It still works, though I get the ERROR message that can be avoided if I specify an integer on the command line. Also, is this an option that can be specified in the config file?

rd:~/f/photo$ sigal build -f test-in test-out-85
ERROR: ncpu should be an integer value
-> . : 1 files
.
Done.
Processed 1 images (0 skipped) and 0 videos (0 skipped) in 0.75 seconds.

Autorotate gallery images

sigal seems smart enough to orient portrait images when it is within its own HTML framing. However, the actual jpgs (thumbnail and gallery images) are not rotated. I'd prefer the actual images be rotated so that if I want to use the image or thumbnail elsewhere on my website, it's in the correct orientation.

utf-8 support in directory names

Hi,

When processing pictures in a directory with accents, sigal fails with the following error. I might be wrong, but I suspect that the error is in writer.py / generate_context() where you would be missing a few .encode() calls. Here is a backtrace:

Traceback (most recent call last):
  File "/usr/local/bin/sigal", line 9, in <module>
    load_entry_point('sigal==0.4.0', 'console_scripts', 'sigal')()
  File "/usr/local/lib/python2.7/dist-packages/sigal/__init__.py", line 156, in main
    parser.dispatch()
  File "/usr/local/lib/python2.7/dist-packages/argh/helpers.py", line 53, in dispatch
    return dispatch(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 123, in dispatch
    for line in lines:
  File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 199, in _execute_command
    for line in result:
  File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 182, in _call
    result = args.function(*positional, **keywords)
  File "/usr/local/lib/python2.7/dist-packages/sigal/__init__.py", line 122, in build
    gal.build()
  File "/usr/local/lib/python2.7/dist-packages/sigal/gallery.py", line 185, in build
    self.writer.write(self.db, path)
  File "/usr/local/lib/python2.7/dist-packages/sigal/writer.py", line 171, in write
    page = self.template.render(paths[relpath], **ctx)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/sigal/themes/galleria/templates/index.html", line 22, in top-level template code
    <h1><a href="{{ index_url }}">{{ index_title }}</a></h1>

build: IOError: not enough data

Hi,

I got this traceback on a dir containing jpg files.
I tried to replace pictures with another set coming from elsewhere and I didn't encountered the error. So, it seems to be quite specific to these photos.

sigal build test
Traceback (most recent call last): ] 0/2
  File "/usr/bin/sigal", line 9, in <module>
    load_entry_point('sigal==0.3.2', 'console_scripts', 'sigal')()
  File "/usr/lib/python2.7/site-packages/sigal/__init__.py", line 151, in main
    parser.dispatch()
  File "/usr/lib/python2.7/site-packages/argh/helpers.py", line 47, in dispatch
    return dispatch(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/argh/dispatching.py", line 121, in dispatch
    for line in lines:
  File "/usr/lib/python2.7/site-packages/argh/dispatching.py", line 197, in _execute_command
    for line in result:
  File "/usr/lib/python2.7/site-packages/argh/dispatching.py", line 180, in _call
    result = args.function(*positional, **keywords)
  File "/usr/lib/python2.7/site-packages/sigal/__init__.py", line 117, in build
    gal.build()
  File "/usr/lib/python2.7/site-packages/sigal/gallery.py", line 182, in build
    label_width=label_width)
  File "/usr/lib/python2.7/site-packages/sigal/gallery.py", line 218, in process_dir
    (f, outpath, self.settings)).get(9999)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 528, in get
    raise self._value
IOError: not enough data

sigal -v                                                                                
0.3.2

jpg_options and webm_options ignored

When I uncomment and change the jpg and webm options in sigal.conf.py the built gallery doesn't change. I am confident the conf file is being read because changing the theme does result in a change.

sigal build fails

sigal build fails with the next error:

~/playground/web/anseme_pics sigal build -d  soj/
INFO - Reading settings ...
INFO - Theme path : /Library/Python/2.7/site-packages/sigal/themes/galleria
INFO - Generate gallery in /Users/andrey/playground/web/anseme_pics/_build ...
INFO - :: Processing '.' [1 images]
INFO - IMG_0083.JPG
INFO - IMG_0083.JPG
Traceback (most recent call last):
  File "/usr/local/bin/sigal", line 9, in <module>
    load_entry_point('sigal==0.3.3', 'console_scripts', 'sigal')()
  File "/Library/Python/2.7/site-packages/sigal/__init__.py", line 151, in main
    parser.dispatch()
  File "/Library/Python/2.7/site-packages/argh/helpers.py", line 47, in dispatch
    return dispatch(self, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/argh/dispatching.py", line 121, in dispatch
    for line in lines:
  File "/Library/Python/2.7/site-packages/argh/dispatching.py", line 197, in _execute_command
    for line in result:
  File "/Library/Python/2.7/site-packages/argh/dispatching.py", line 180, in _call
    result = args.function(*positional, **keywords)
  File "/Library/Python/2.7/site-packages/sigal/__init__.py", line 117, in build
    gal.build()
  File "/Library/Python/2.7/site-packages/sigal/gallery.py", line 182, in build
    label_width=label_width)
  File "/Library/Python/2.7/site-packages/sigal/gallery.py", line 218, in process_dir
    (f, outpath, self.settings)).get(9999)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 522, in get
    raise self._value
TypeError: function takes at most 11 arguments (13 given)

sigal==0.3.3

sigal crashes with AttributeError: _getexif

I am running sigal on a lucid32 vagrant base box with dependencies installed in virtual env. Sigal crashes with attribute error on _getexif():

(venv)vagrant@lucid32:~$ sigal build backup/views site
/home/vagrant/venv/lib/python2.6/site-packages/argparse.py:1575: DeprecationWarning: The "version" argument to ArgumentParser is deprecated. Please use "add_argument(..., action='version', version="N", ...)" instead
  """instead""", DeprecationWarning)
/home/vagrant/venv/lib/python2.6/site-packages/argh/completion.py:86: UserWarning: Bash completion not available. Install argcomplete.
  warnings.warn('Bash completion not available. Install argcomplete.')
Traceback (most recent call last): ] 4/20
  File "/home/vagrant/venv/bin/sigal", line 9, in <module>
    load_entry_point('sigal==0.3.1', 'console_scripts', 'sigal')()
  File "/home/vagrant/venv/lib/python2.6/site-packages/sigal/__init__.py", line 154, in main
    parser.dispatch()
  File "/home/vagrant/venv/lib/python2.6/site-packages/argh/helpers.py", line 47, in dispatch
    return dispatch(self, *args, **kwargs)
  File "/home/vagrant/venv/lib/python2.6/site-packages/argh/dispatching.py", line 121, in dispatch
    for line in lines:
  File "/home/vagrant/venv/lib/python2.6/site-packages/argh/dispatching.py", line 197, in _execute_command
    for line in result:
  File "/home/vagrant/venv/lib/python2.6/site-packages/argh/dispatching.py", line 180, in _call
    result = args.function(*positional, **keywords)
  File "/home/vagrant/venv/lib/python2.6/site-packages/sigal/__init__.py", line 120, in build
    gal.build()
  File "/home/vagrant/venv/lib/python2.6/site-packages/sigal/gallery.py", line 182, in build
    label_width=label_width)
  File "/home/vagrant/venv/lib/python2.6/site-packages/sigal/gallery.py", line 218, in process_dir
    (f, outpath, self.settings)).get(9999)
  File "/usr/lib/python2.6/multiprocessing/pool.py", line 422, in get
    raise self._value
AttributeError: _getexif

The dependencies:

(venv)vagrant@lucid32:~/backup/views$ pip freeze
Jinja2==2.6
Markdown==2.2.1
Pillow==1.7.8
argh==0.23.1
argparse==1.2.1
clint==0.3.1
distribute==0.6.10
sigal==0.3.1
wsgiref==0.1.2

The folder of images I am running on is here:

https://www.dropbox.com/sh/80srr3qrfohe8qh/eHhnR_11P8

The conf file:

(venv)vagrant@lucid32:~$ cat sigal.conf.py 
# -*- coding: utf-8 -*-
#
# All configuration values have a default; values that are commented out serve
# to show the default. Default values are specified when modified in this
# example config file

# Theme :
# - colorbox (default), galleria, or the path to a custom theme directory
theme = 'colorbox'

# Size of resized image
img_size = (800, 600)

# Generate thumbnails
make_thumbs = True

# Subdirectory of the thumbnails
thumb_dir = 'thumbnails'

# Prefix and/or suffix for thumbnail names (default: '')
# thumb_prefix =
# thumb_suffix = '.tn'

# Thumbnail size (default: (200, 150))
# For the galleria theme, use 280 px for the width
# For the colorbox theme, use 200 px for the width
thumb_size = (200, 150)

# Crop the image to fill the box
thumb_fit = True

webm_options and dependency on ffmpeg problematic on Ubuntu

Following up from issue #49 I can confirm that the webm options are correctly passed and invoked. Unfortunately, my problem results from the idiotic ffmpeg vs avconv wars. I'm running Ubuntu and its ffmpeg is actually an alias to avconv. Sadly, the old/real ffmpeg command options don't work with the avconv version. IF I could only pass the bitrate, it would probably work, but since you provide the crf, qmin,and qmax options by default, those nullify the bitrate.

I once converted my own encoding script from ffmpeg to avonv and these two commands were roughly equivalent.

ffmpeg -i test.mp4 -b 885k -r 23.976 -vcodec libx264 -threads 2 -crf 24 -vpre medium -vpre ipod640 -acodec libfaac -ab 127k test-renc.mp4'
avconv -i test.mp4 -b 885k -r 23.976 -threads 2 -preset medium -c:a libvo_aacenc -ab 127k test-renc.mp4

PIL "MemoryError"

Hello,
When building site, I get an error when resizing some pictures (trackback at the end) : MemoryError
I don't get the particularity of images wich causes this problem, as I tried to lower the resolution wothout sucess, and others pictures with higher resolution do not produce this error...
Has anyone got some ideas ?
thank you.
Traceback :

DEBUG - Save resized image to /usr/www/SIGAL/_build/2013_07_18_14_16/resized_IMG_0700.jpg (JPEG)
Traceback (most recent call last):
  File "/usr/local/bin/sigal", line 9, in <module>
    load_entry_point('sigal==0.4.0', 'console_scripts', 'sigal')()
  File "/usr/local/lib/python2.6/dist-packages/sigal/__init__.py", line 156, in main
    parser.dispatch()
  File "/usr/local/lib/python2.6/dist-packages/argh/helpers.py", line 53, in dispatch
    return dispatch(self, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/argh/dispatching.py", line 123, in dispatch
    for line in lines:
  File "/usr/local/lib/python2.6/dist-packages/argh/dispatching.py", line 199, in _execute_command
    for line in result:
  File "/usr/local/lib/python2.6/dist-packages/argh/dispatching.py", line 182, in _call
    result = args.function(*positional, **keywords)
  File "/usr/local/lib/python2.6/dist-packages/sigal/__init__.py", line 122, in build
    gal.build()
  File "/usr/local/lib/python2.6/dist-packages/sigal/gallery.py", line 182, in build
    label_width=label_width)
  File "/usr/local/lib/python2.6/dist-packages/sigal/gallery.py", line 217, in process_dir
    process_image(f, outpath, self.settings)
  File "/usr/local/lib/python2.6/dist-packages/sigal/gallery.py", line 242, in process_image
    method=settings['img_processor'])
  File "/usr/local/lib/python2.6/dist-packages/sigal/image.py", line 68, in generate_image
    save_image(img, outname, format, options=options, autoconvert=autoconvert)
  File "/usr/local/lib/python2.6/dist-packages/pilkit/utils.py", line 175, in save_image
    img.save(outfile, format, **options)
  File "/usr/local/lib/python2.6/dist-packages/PIL/Image.py", line 1437, in save
    save_handler(self, fp, filename)
  File "/usr/local/lib/python2.6/dist-packages/PIL/JpegImagePlugin.py", line 471, in _save
    ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, rawmode)])
  File "/usr/local/lib/python2.6/dist-packages/PIL/ImageFile.py", line 499, in _save
    s = e.encode_to_file(fh, bufsize)
MemoryError

Copy htaccess files and other misc

In my source directory (and subdirectories) I have htaccess files governing the serving of the files (e.g., password protected). It'd be nice if sigal could copy those over to the destination as well.

IOError: cannot identify image file

I've started the build with debug parameters, the output is:

Traceback (most recent call last):
  File "/usr/local/bin/sigal", line 9, in 
    load_entry_point('sigal==0.6.0', 'console_scripts', 'sigal')()
  File "/usr/local/lib/python2.7/dist-packages/sigal/__init__.py", line 154, in main
    parser.dispatch()
  File "/usr/local/lib/python2.7/dist-packages/argh/helpers.py", line 53, in dispatch
    return dispatch(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 124, in dispatch
    for line in lines:
  File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 200, in _execute_command
    for line in result:
  File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 183, in _call
    result = args.function(*positional, **keywords)
  File "/usr/local/lib/python2.7/dist-packages/sigal/__init__.py", line 109, in build
    gal.build()
  File "/usr/local/lib/python2.7/dist-packages/sigal/gallery.py", line 239, in build
    process_file(files)
  File "/usr/local/lib/python2.7/dist-packages/sigal/gallery.py", line 311, in process_file
    return process_image(*args[1:])
  File "/usr/local/lib/python2.7/dist-packages/sigal/image.py", line 136, in process_image
    generate_image(filepath, outname, settings, options=options)
  File "/usr/local/lib/python2.7/dist-packages/sigal/image.py", line 64, in generate_image
    img = PILImage.open(source)
  File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 2025, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file

I have no idea, what cause the problem :)

issue while building gallery

i am no expert in python but here is what i have received as an error.
File it is trying to process is "100_1998.MOV" if that helps

Traceback (most recent call last): [############### ] 27/55 - 00:00:00
File "/srv/http/Sigal/bin/sigal", line 9, in
load_entry_point('sigal==0.5.1', 'console_scripts', 'sigal')()
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/init.py", line 158, in main
parser.dispatch()
File "/srv/http/Sigal/lib/python2.7/site-packages/argh/helpers.py", line 53, in dispatch
return dispatch(self, _args, *_kwargs)
File "/srv/http/Sigal/lib/python2.7/site-packages/argh/dispatching.py", line 123, in dispatch
for line in lines:
File "/srv/http/Sigal/lib/python2.7/site-packages/argh/dispatching.py", line 199, in _execute_command
for line in result:
File "/srv/http/Sigal/lib/python2.7/site-packages/argh/dispatching.py", line 182, in _call
result = args.function(_positional, *_keywords)
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/init.py", line 124, in build
gal.build()
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/gallery.py", line 209, in build
label_width=label_width)
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/gallery.py", line 257, in process_dir
process_video(f, outpath, self.settings)
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/gallery.py", line 319, in process_video
fit=settings['thumb_fit'], options=settings['jpg_options'])
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/video.py", line 97, in generate_thumbnail
sigal.image.generate_thumbnail(tmpfile, outname, box, fit, options)
File "/srv/http/Sigal/lib/python2.7/site-packages/sigal/image.py", line 102, in generate_thumbnail
img = PILImage.open(source)
File "/srv/http/Sigal/lib/python2.7/site-packages/PIL/Image.py", line 1974, in open
fp = builtins.open(fp, "rb")
IOError: [Errno 2] No such file or directory: u'/srv/http/vedi/albums/vedi/vedi seven month/thumbnails/100_1998.jpg.tmp.jpg'

Please help me fixing

External assets support

Hi,

First, thank you for this useful media library, the only one lightweight and efficient !

I was just wondering if you will implement some support for photos uploaded on an another host, eg. from Amazon S3 or some apache/nginx server.

It will be very useful to use the library with a datastorage server ;)

MG

Support for relative paths in index.md thumbnail?

In my photo/hires/1999 I have the index.html below.

'''
Title: 1999
Thumbnail: 11/21-bri.jpg

And a description with Markdown syntax.
'''

However, when I run sigal build hires gallery in photo it doesn't find use the thumbnail. Can I use relative paths in index.md? If so, what is it relative to?

Error with Pilow (thumbnail check/generation fails)

Hi,

First of all, thank you for creating this great program.

I've used Sigal in the past and never had a problem, but with an install today on Ubuntu 13.10 there's an issue.

On checking the thumbnails (during build), the imaging library returns an error, see below (I replaced the path in the dump).

It happens with the newest versions as wel as with olders (onces that I've used succesfully in the past). Whether it's a first build or a rebuild makes no difference

Any ideas?

Thank you in advance,

Timmmy

Traceback (most recent call last):
File "/usr/local/bin/sigal", line 9, in
load_entry_point('sigal==0.6.0-dev', 'console_scripts', 'sigal')()
File "/usr/local/lib/python2.7/dist-packages/sigal-0.6.0_dev-py2.7.egg/sigal/init.py", line 147, in main
parser.dispatch()
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.3-py2.7.egg/argh/helpers.py", line 53, in dispatch
return dispatch(self, _args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.3-py2.7.egg/argh/dispatching.py", line 123, in dispatch
for line in lines:
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.3-py2.7.egg/argh/dispatching.py", line 199, in _execute_command
for line in result:
File "/usr/local/lib/python2.7/dist-packages/argh-0.23.3-py2.7.egg/argh/dispatching.py", line 182, in _call
result = args.function(_positional, *_keywords)
File "/usr/local/lib/python2.7/dist-packages/sigal-0.6.0_dev-py2.7.egg/sigal/init.py", line 107, in build
gal = Gallery(settings, force=force, theme=theme, ncpu=ncpu)
File "/usr/local/lib/python2.7/dist-packages/sigal-0.6.0_dev-py2.7.egg/sigal/gallery.py", line 199, in init
self.settings['vid_ext_list'])
File "/usr/local/lib/python2.7/dist-packages/sigal-0.6.0_dev-py2.7.egg/sigal/gallery.py", line 83, in init
self.build()
File "/usr/local/lib/python2.7/dist-packages/sigal-0.6.0_dev-py2.7.egg/sigal/gallery.py", line 127, in build
self.check_thumbnail(path)
File "/usr/local/lib/python2.7/dist-packages/sigal-0.6.0_dev-py2.7.egg/sigal/gallery.py", line 163, in check_thumbnail
im = PILImage.open(join(self.basepath, path, f))
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1988, in open
fp = builtins.open(fp, "rb")
IOError: [Errno 20] Not a directory: u'PATHTOFILE/DSC_0001.JPG'

Embed video error (filename with space)

Hi,

I'm experiencing an issue in adding video's with a space in the filename. Encoding works fine, but the url that's embedded in the browser is incomplete. Only the first part is used.

For example if a video called "paris 001.avi" is added in the directory "travel", it adds a link to "travel/paris" (" 001.webm" is missing).

If the file is renamed to "paris001.avi", it works fine.
Spaces in directory names and image names are processed correctly. It only affects video's. It also affects both themes.

This is the case in version 0.5.0 (I couldn't check this with the latest version (other issues which I still need to investigate))

Am I doing something wrong or could this be an issue?

Thank you in advance!

Kind regards,

Timmmy

Thumbnail crop should be higher

I believe the cropping used to make thumbnails is centered within the image, but this cuts off a lot of heads. I think the crop should be moved up a bit within the image.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.