Browse Source

Update changelog and doc.

pull/70/merge
Simon Conseil 12 years ago
parent
commit
e46c8d5b12
  1. 1
      README.rst
  2. 12
      docs/changelog.rst
  3. 15
      docs/getting_started.rst
  4. 12
      sigal/__init__.py
  5. 3
      sigal/templates/sigal.conf.py

1
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. * Generate HTML pages using jinja2 templates.
* Relative links for a portable output. * Relative links for a portable output.
* Support themes, videos, EXIF tags, zip download. * Support themes, videos, EXIF tags, zip download.
* Parallel processing.
* MIT licensed. * MIT licensed.
The idea behind Sigal is to ease the use of the javascript librairies like The idea behind Sigal is to ease the use of the javascript librairies like

12
docs/changelog.rst

@ -7,7 +7,17 @@ Version 0.6.dev
Released on 2013-xx-xx. 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 Version 0.5.1
~~~~~~~~~~~~~ ~~~~~~~~~~~~~

15
docs/getting_started.rst

@ -14,11 +14,11 @@ Init
Build Build
After adapting the configuration to your needs, put your images in After adapting the configuration to your needs, put your images in
a sub-directory (``pictures`` by default) and run ``sigal build <your images a sub-directory and run ``sigal build <your images directory>``. The next
directory>``. The next time you run ``sigal build``, only the new images will time you run ``sigal build``, only the new images will be processed. Use the
be processed. Use the ``-f`` flag to force the reprocessing of all the ``-f`` flag to force the reprocessing of all the images. Images (resp.
images. Images that are smaller than the size specified by the ``img_size`` videos) that are smaller than the size specified by the ``img_size`` (resp.
setting will not be resized. ``video_size``) setting will not be resized.
Serve Serve
To visualize your gallery, you can use ``sigal serve`` which runs a basic 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] [source] [destination]
Required arguments: Required arguments:
@ -64,3 +64,6 @@ Optional arguments:
``-t THEME, --theme THEME`` ``-t THEME, --theme THEME``
Specify a theme directory, or a theme name for the themes included with Sigal 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)

12
sigal/__init__.py

@ -67,13 +67,12 @@ def init(path):
@arg('-f', '--force', help="Force the reprocessing of existing images") @arg('-f', '--force', help="Force the reprocessing of existing images")
@arg('-v', '--verbose', help="Show all messages") @arg('-v', '--verbose', help="Show all messages")
@arg('-d', '--debug', help="Show all message, including debug messages") @arg('-d', '--debug', help="Show all message, including debug messages")
@arg('-c', '--config', help="Configuration file (default: sigal.conf.py in " @arg('-c', '--config', help="Configuration file")
"the current working directory)")
@arg('-t', '--theme', help="Specify a theme directory, or a theme name for " @arg('-t', '--theme', help="Specify a theme directory, or a theme name for "
"the themes included with Sigal") "the themes included with Sigal")
@arg('-n', '--ncpu', help="Number of cpu to use (default: all)") @arg('-n', '--ncpu', help="Number of cpu to use (default: all)")
def build(source, destination, debug=False, verbose=False, force=False, 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. """ """Run sigal to process a directory. """
level = ((debug and logging.DEBUG) or (verbose and logging.INFO) 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__) logger = logging.getLogger(__name__)
start_time = time.time() start_time = time.time()
settings_file = config or _DEFAULT_CONFIG_FILE if not os.path.isfile(config):
if not os.path.isfile(settings_file): logger.error("Settings file not found: %s", config)
logger.error("Settings file not found: %s", settings_file)
sys.exit(1) sys.exit(1)
settings = read_settings(settings_file) settings = read_settings(config)
if source: if source:
settings['source'] = os.path.abspath(source) settings['source'] = os.path.abspath(source)

3
sigal/templates/sigal.conf.py

@ -69,7 +69,8 @@ thumb_size = (280, 210)
# Webm options # Webm options
# Options used in ffmpeg to encode the webm video. You may want to read # Options used in ffmpeg to encode the webm video. You may want to read
# http://ffmpeg.org/trac/ffmpeg/wiki/vpxEncodingGuide # 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', # webm_options = ['-crf', '10', '-b:v', '1.6M',
# '-qmin', '4', '-qmax', '63'], # '-qmin', '4', '-qmax', '63'],

Loading…
Cancel
Save