diff --git a/photoapp/ingest.py b/photoapp/ingest.py index d68d488..8731a38 100644 --- a/photoapp/ingest.py +++ b/photoapp/ingest.py @@ -29,6 +29,7 @@ def batch_ingest(library, files): # group by extension byext = {k: [] for k in known_extensions} + print("processing {} items".format(len(files))) print("Pre-sorting files") for item in files: if not os.path.isfile(item): diff --git a/photoapp/library.py b/photoapp/library.py index 00ed025..1688a99 100644 --- a/photoapp/library.py +++ b/photoapp/library.py @@ -94,7 +94,6 @@ class PhotoLibrary(object): thumb_width = min(thumb_width, i_width if i_width > 0 else 999999999) # TODO do we even have photo.width if PIL can't read the image? thumb_height = min(thumb_height, i_height if i_height > 0 else 999999999) # TODO this seems bad - print("thumb final wxh is {}x{}".format(thumb_width, thumb_height)) p = Process(target=self.gen_thumb, args=(os.path.join(self.path, photo.path), dest, thumb_width, thumb_height, photo.orientation)) p.start() p.join() diff --git a/requirements.txt b/requirements.txt index d488134..b50e975 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,16 @@ +backports.functools-lru-cache==1.5 +cheroot==6.5.2 +CherryPy==18.0.0 +contextlib2==0.5.5 +jaraco.functools==1.20 +Jinja2==2.10 +MarkupSafe==1.0 +more-itertools==4.3.0 Pillow==5.2.0 +portend==2.3 python-magic==0.4.15 +pytz==2018.5 +six==1.11.0 SQLAlchemy==1.2.11 +tempora==1.13 +zc.lockfile==1.3.0 diff --git a/templates/feed.html b/templates/feed.html index a255024..97a47fd 100644 --- a/templates/feed.html +++ b/templates/feed.html @@ -7,11 +7,12 @@
- {% set locals.im_year = 0 %} + {% set locals.im_date = "" %} {% for item in images %} - {% if item.date.year != locals.im_year %} - {% set locals.im_year = item.date.year %} -

{{ locals.im_year }}

+ {% set newdate = item.date.strftime("%b %d, %Y") %} + {% if newdate != locals.im_date %} + {% set locals.im_date = newdate %} +

{{ locals.im_date }}

{% endif %}
@@ -20,7 +21,7 @@
{% endfor %}
-
Next + {% if page > 0 %}Previous {% endif %}Next
{% include "page-bottom.html" %} diff --git a/templates/photo.html b/templates/photo.html index 5318057..8f0708b 100644 --- a/templates/photo.html +++ b/templates/photo.html @@ -36,7 +36,7 @@ {{ img.path | basename }}
- {{ img.size | filesizeformat }} - {{ img.width }} x {{ img.height }} + {{ img.size | filesizeformat }}{% if img.width %} - {{ img.width }} x {{ img.height }}{% endif %}
{% if img.orientation > 0 %}