Improve docs and change the default thumb size.
This commit is contained in:
@@ -74,9 +74,10 @@ sub-directory and run ``sigal build <your images directory>``. The next time
|
||||
you run ``sigal build``, only the new images will be processed. Use the ``-f``
|
||||
flag to force the reprocessing of all the images.
|
||||
|
||||
To visualize your gallery, you can either use ``sigal serve`` which runs a
|
||||
basic web server, or you can use the ``index_in_url = True`` setting which
|
||||
will add ``index.html`` to the urls to allow browsing without the server.
|
||||
To visualize your gallery, you can use ``sigal serve`` which runs a basic web
|
||||
server. This server should only be used for local browsing, not in production.
|
||||
Another option is to use the ``index_in_url = True`` setting, which will add
|
||||
``index.html`` to the urls to allow browsing without a server.
|
||||
|
||||
|
||||
Help of the ``sigal build`` command
|
||||
@@ -135,7 +136,7 @@ and is shown below. This file is copied to the current directory with the
|
||||
Album information
|
||||
-----------------
|
||||
|
||||
Information on an album can be given in a file using the markdown syntax,
|
||||
Information on an album can be given in a file using the `markdown`_ syntax,
|
||||
named ``index.md`` :
|
||||
|
||||
::
|
||||
@@ -148,6 +149,7 @@ named ``index.md`` :
|
||||
If this file does not exist the directory's name is used for the title, and
|
||||
the first image of the directory is used as thumbnail.
|
||||
|
||||
.. _markdown: http://daringfireball.net/projects/markdown/
|
||||
|
||||
Changelog
|
||||
---------
|
||||
@@ -158,9 +160,8 @@ Version 0.3
|
||||
Released on 2013-xx-xx.
|
||||
|
||||
- Fix packaging issues.
|
||||
- Add a setting to optionally add `index.html` to the URLs.
|
||||
- Add a setting to specify a list of links and adapt the themes to show the
|
||||
links.
|
||||
- New setting ``index_in_url`` to optionally add `index.html` to the URLs.
|
||||
- New setting ``links`` to specify a list of links.
|
||||
- Use EXIF info to fix orientation.
|
||||
- Replace the ``jpg_quality`` setting with a dict of options.
|
||||
- Manage directories with only sub-directories and add some checks.
|
||||
|
||||
@@ -50,11 +50,11 @@ _DEFAULT_CONFIG_FILE = 'sigal.conf.py'
|
||||
|
||||
|
||||
def init_logging(level=logging.INFO):
|
||||
""" Logging config
|
||||
"""Logging config
|
||||
|
||||
Set the level and create a more detailed formatter for debug mode.
|
||||
"""
|
||||
|
||||
"""
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.setLevel(level)
|
||||
|
||||
|
||||
@@ -41,6 +41,13 @@ DESCRIPTION_FILE = "index.md"
|
||||
|
||||
|
||||
class PathsDb(object):
|
||||
"""Container for all the information on the directory structure.
|
||||
|
||||
All the info is stored in a dictionnary, `self.db`. This class also has
|
||||
methods to build this dictionnary.
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, path, ext_list):
|
||||
self.basepath = path
|
||||
self.ext_list = ext_list
|
||||
|
||||
@@ -20,11 +20,6 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
"""
|
||||
Prepare images: resize images, and create thumbnails with some options
|
||||
(squared thumbs, ...).
|
||||
"""
|
||||
|
||||
from __future__ import division
|
||||
|
||||
import logging
|
||||
@@ -39,9 +34,10 @@ EXIF_ORIENTATION_TAG = 274
|
||||
|
||||
|
||||
class Image(object):
|
||||
""" Image container
|
||||
"""Image container
|
||||
|
||||
resize, thumbnail, ...
|
||||
Prepare images: resize images, and create thumbnails with some options
|
||||
(squared thumbs, ...).
|
||||
|
||||
:param filename: path to an image
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ _DEFAULT_CONFIG = {
|
||||
'make_thumbs': True,
|
||||
'thumb_prefix': '',
|
||||
'thumb_suffix': '',
|
||||
'thumb_size': (150, 112),
|
||||
'thumb_size': (200, 150),
|
||||
'thumb_dir': 'thumbnails',
|
||||
'thumb_fit': True,
|
||||
'keep_orig': False,
|
||||
|
||||
@@ -21,7 +21,7 @@ img_size = (800, 600)
|
||||
# thumb_prefix =
|
||||
# thumb_suffix = '.tn'
|
||||
|
||||
# Thumbnail size (default: (150, 112))
|
||||
# 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 = (280, 210)
|
||||
|
||||
@@ -20,10 +20,6 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
"""
|
||||
Generate html pages for each directory of images.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import codecs
|
||||
|
||||
Reference in New Issue
Block a user