Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<img src="logo.png">
</p>

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)
Expand Down
9 changes: 7 additions & 2 deletions recitale/autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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")
Expand Down
6 changes: 5 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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