===========================
Saturday, December 27, 2014
===========================

New Year is approaching 
=======================

My family and I have tagged "the best pictures of 2014" in our photo
collection. Now I noticed that `shotwell2blog.py` needs some more
features: (1) make sure they are sorted by exposure time and (2)
optional new output format as :rst:dir:`sigal_image` directives.

The `shotwell2blog.py` script was included with :mod:`atelier` until
now, which was rather nonsense. Now I created `a separate project on
GitHub for it <https://github.com/lsaffre/shotwell2blog>`_ and removed
it from the :mod:`atelier` repo.  This is my first single-script
project.

And here is the result: http://luc.saffre-rumma.net/blog/2014/1227/

TODO: write some textbetween the pictures, make a separate list of the
top 10 because nobody has time to watch 150 photos,...

While doing the above, I stumbled over a discussion about `Python
string formatting: % vs. .format
<https://stackoverflow.com/questions/5082452/python-string-formatting-vs-format>`_,
and learned about :pep:`3101`. I didn't realize until now that this
PEP exists.  That's why my projects are full of ``%`` string
formatting.  I'll do my best to get used to the new notation. Better
late than never.


Released :mod:`atelier` version 0.0.9
=====================================

Two optimizations in :mod:`atelier` (thanks to Mahmoud who fell into
these traps):

- The command :cmd:`fab blog` failed when the user had only
  :envvar:`VISUAL` and not :envvar:`EDITOR` set. But it seems that
  "Nowadays, you can leave :envvar:`EDITOR` unset or set it to ``vi
  -e``" (according to `andcoz
  <http://unix.stackexchange.com/questions/4859/visual-vs-editor-whats-the-difference>`_). So
  I changed :mod:`atelier.fablib` to handle this situation.  New
  :func:`atelier.utils.get_visual_editor`.

- The command :cmd:`fab blog` failed when the directory for the
  current year didn't yet exist.  Now it automatically wishes "Happy
  New Year" and creates both the directory and the default :file:`index.rst`
  file for that year (containing the :rst:dir:`blogger_year`
  directive).