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 sigal_image
directives.
The shotwell2blog.py script was included with atelier
until
now, which was rather nonsense. Now I created a separate project on
GitHub for it and removed
it from the 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,
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 atelier
version 0.0.9¶
Two optimizations in atelier
(thanks to Mahmoud who fell into
these traps):
The command
fab blog
failed when the user had onlyVISUAL
and notEDITOR
set. But it seems that “Nowadays, you can leaveEDITOR
unset or set it tovi -e
” (according to andcoz). So I changedatelier.fablib
to handle this situation. Newatelier.utils.get_visual_editor()
.The command
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 defaultindex.rst
file for that year (containing theblogger_year
directive).