equal
deleted
inserted
replaced
1 from degal.commands import command |
1 from degal.command import command |
2 from degal import templates |
2 from degal import templates |
3 |
3 |
4 def render_image (ctx, image) : |
4 def render_image (ctx, image) : |
5 """ |
5 """ |
6 Render the thumbnails and .html for one image |
6 Render the thumbnails and .html for one image |
7 """ |
7 """ |
8 |
8 |
9 # log image path |
9 # log image path |
10 ctx.log_debug("%s", image) |
10 ctx.log_info("%s", image) |
11 |
11 |
12 # render output |
12 # render output |
13 tpl = templates.master(ctx.gallery, image.title, image.html, |
13 tpl = templates.master(ctx.gallery, image.title, image.html, |
14 templates.image_page(image) |
14 templates.image_page(image) |
15 ) |
15 ) |
21 """ |
21 """ |
22 Render the .html output for one folder, recursively |
22 Render the .html output for one folder, recursively |
23 """ |
23 """ |
24 |
24 |
25 # log folder path |
25 # log folder path |
26 ctx.log_debug("%s", folder) |
26 ctx.log_info("%s", folder) |
27 |
27 |
28 # render folder index |
28 # render folder index |
29 for page in xrange(folder.page_count) : |
29 for page in xrange(folder.page_count) : |
30 # output .html page |
30 # output .html page |
31 html_file = folder.html_file(page) |
31 html_file = folder.html_file(page) |