From e46c8d5b12dcf233ca8ee9ee52882d37d8822ea2 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Thu, 26 Dec 2013 17:59:57 +0100 Subject: [PATCH] Update changelog and doc. --- README.rst | 1 + docs/changelog.rst | 12 +++++++++++- docs/getting_started.rst | 15 +++++++++------ sigal/__init__.py | 12 +++++------- sigal/templates/sigal.conf.py | 3 ++- 5 files changed, 28 insertions(+), 15 deletions(-) diff --git a/README.rst b/README.rst index 1ca4854..6811e24 100644 --- a/README.rst +++ b/README.rst @@ -12,6 +12,7 @@ and it allows to build a static gallery of images with the following features: * 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 librairies like diff --git a/docs/changelog.rst b/docs/changelog.rst index 9cf35d6..bac302c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,7 +7,17 @@ Version 0.6.dev Released on 2013-xx-xx. -- Add support for Python 3.3 +- Add support for Python 3.3. +- Parallel processing (new command-line option ``-n|--ncpu``, uses all cores by + default). +- Adding keyboard shortcuts for the galleria theme. +- Include symlinked directories in the source directory. +- New setting to use symbolic links for original files (``orig_link``). +- New setting for the video size (``video_size``). +- Avoid issues with corrupted exif data. +- Add a colored formatter for verbose and debug modes. +- ``webm_options`` is now a list with ffmpeg options, to allow better + flexibility and compatibility with avconv. Version 0.5.1 ~~~~~~~~~~~~~ diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 002a86d..68b1ecb 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -14,11 +14,11 @@ Init Build After adapting the configuration to your needs, put your images in - a sub-directory (``pictures`` by default) and run ``sigal build ``. 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. Images that are smaller than the size specified by the ``img_size`` - setting will not be resized. + a sub-directory and run ``sigal build ``. 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. Images (resp. + videos) that are smaller than the size specified by the ``img_size`` (resp. + ``video_size``) setting will not be resized. Serve To visualize your gallery, you can use ``sigal serve`` which runs a basic @@ -33,7 +33,7 @@ Help of the ``sigal build`` command :: - $ sigal build [-h] [-d] [-v] [-f] [-c CONFIG] [-t THEME] + $ sigal build [-h] [-d] [-v] [-f] [-c CONFIG] [-t THEME] [-n NCPU] [source] [destination] Required arguments: @@ -64,3 +64,6 @@ Optional arguments: ``-t THEME, --theme THEME`` Specify a theme directory, or a theme name for the themes included with Sigal + +``-n NCPU, --ncpu NCPU`` + Number of cpu to use (default: all) diff --git a/sigal/__init__.py b/sigal/__init__.py index 5f4df59..91349fe 100644 --- a/sigal/__init__.py +++ b/sigal/__init__.py @@ -67,13 +67,12 @@ def init(path): @arg('-f', '--force', help="Force the reprocessing of existing images") @arg('-v', '--verbose', help="Show all messages") @arg('-d', '--debug', help="Show all message, including debug messages") -@arg('-c', '--config', help="Configuration file (default: sigal.conf.py in " - "the current working directory)") +@arg('-c', '--config', help="Configuration file") @arg('-t', '--theme', help="Specify a theme directory, or a theme name for " "the themes included with Sigal") @arg('-n', '--ncpu', help="Number of cpu to use (default: all)") def build(source, destination, debug=False, verbose=False, force=False, - config=None, theme=None, ncpu=None): + config=_DEFAULT_CONFIG_FILE, theme=None, ncpu=None): """Run sigal to process a directory. """ level = ((debug and logging.DEBUG) or (verbose and logging.INFO) @@ -82,11 +81,10 @@ def build(source, destination, debug=False, verbose=False, force=False, logger = logging.getLogger(__name__) start_time = time.time() - settings_file = config or _DEFAULT_CONFIG_FILE - if not os.path.isfile(settings_file): - logger.error("Settings file not found: %s", settings_file) + if not os.path.isfile(config): + logger.error("Settings file not found: %s", config) sys.exit(1) - settings = read_settings(settings_file) + settings = read_settings(config) if source: settings['source'] = os.path.abspath(source) diff --git a/sigal/templates/sigal.conf.py b/sigal/templates/sigal.conf.py index 25ef396..bf64730 100644 --- a/sigal/templates/sigal.conf.py +++ b/sigal/templates/sigal.conf.py @@ -69,7 +69,8 @@ thumb_size = (280, 210) # Webm options # Options used in ffmpeg to encode the webm video. You may want to read # http://ffmpeg.org/trac/ffmpeg/wiki/vpxEncodingGuide -# Be aware of the fact these options need to be passed as strings. +# Be aware of the fact these options need to be passed as strings. If you are +# using avconv (for example with Ubuntu), you will need to adapt the settings. # webm_options = ['-crf', '10', '-b:v', '1.6M', # '-qmin', '4', '-qmax', '63'],