diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml index 2225e188..02a9be8f 100644 --- a/.github/workflows/devel.yml +++ b/.github/workflows/devel.yml @@ -2,12 +2,12 @@ on: [push, pull_request] jobs: tox: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: '3.13' - name: Install dependencies run: | set -xe @@ -23,12 +23,12 @@ jobs: verbose: true build-example: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: '3.13' - name: Install dependencies run: | set -xe diff --git a/README.md b/README.md index 7579d40f..802cea34 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@

+PLEP + ![GitHub](https://img.shields.io/github/license/recitale/recitale?color=brightgreen) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/recitale) ![PyPI - Status](https://img.shields.io/pypi/status/recitale) diff --git a/recitale/autogen.py b/recitale/autogen.py index a5ee288e..568e0a24 100644 --- a/recitale/autogen.py +++ b/recitale/autogen.py @@ -42,9 +42,12 @@ def get_exif(filename): # DateTimeOriginal, DateTimeDigitized, DateTime(DateTimeModified) ctime = exif.get(0x9003, exif.get(0x9004, exif.get(0x0132))) if ctime is not None: + logger.error('%s: ctime %s' % (filename, ctime)) return ctime - return strftime(TIME_FORMAT, gmtime(os.path.getmtime(filename))) + s = strftime(TIME_FORMAT, gmtime(os.path.getmtime(filename))) + logger.error('%s: mtime: %s' % (filename, s)) + return s def build_template(folder, force): @@ -68,7 +71,9 @@ def build_template(folder, force): files_grabbed.extend(Path(folder).glob(files)) template = Template(DATA, trim_blocks=True) - files = sorted(files_grabbed, key=get_exif) + for file in files_grabbed: + logger.error('%s exif: %s' % (file, get_exif(file))) + files = files_grabbed cover = gallery_settings.get("cover", files[0].name) date = gallery_settings.get("date") diff --git a/tox.ini b/tox.ini index b7d784d1..349408ba 100644 --- a/tox.ini +++ b/tox.ini @@ -48,4 +48,8 @@ commands = bandit -s B404,B603,B701 -r recitale [testenv:pytest] extras = tests -commands = pytest --cov={envsitepackagesdir}/recitale/ --cov-report=xml +commands = pytest --cov={envsitepackagesdir}/recitale/ --cov-report=xml -vv + +[pytest] +log_cli = True +log_level = DEBUG