diff --git a/sigal/gallery.py b/sigal/gallery.py index ac0fd59..164e5de 100644 --- a/sigal/gallery.py +++ b/sigal/gallery.py @@ -218,7 +218,8 @@ class Album(UnicodeMixin): medias.sort(key=key, reverse=settings['medias_sort_reverse']) def __repr__(self): - return "<%s>(%r)" % (self.__class__.__name__, self.path) + return "<%s>(path=%r, title=%r)" % (self.__class__.__name__, self.path, + self.title) def __unicode__(self): return (u"{} : ".format(self.path) + @@ -251,10 +252,11 @@ class Album(UnicodeMixin): self.description = html self.meta = md.Meta.copy() else: - # default: get title from directory name - self.title = os.path.basename(self.path) self.description = '' self.meta = {} + # default: get title from directory name + self.title = os.path.basename(self.path if self.path != '.' + else self.src_path) def create_output_directories(self): """Create output directories for thumbnails and original images.""" diff --git a/sigal/writer.py b/sigal/writer.py index 56ea662..79dda1f 100644 --- a/sigal/writer.py +++ b/sigal/writer.py @@ -93,7 +93,7 @@ class Writer(object): def generate_context(self, album): """Generate the context dict for the given path.""" - self.logger.info("Output album : %s", album.dst_path) + self.logger.info("Output album : %r", album) return { 'album': album, 'index_title': self.index_title,