refactor: modernize to Python 3 with OOP structure and comprehensive tests (#2)

* feat: full upgrade to python3, tests, etc.

* chore: saving the wip state

* chore(lint): fixed pyright errors, tests

* chore(ci): install deps

* chore(lint): fix linting

* chore(lint): more linting fixes

* chore(ci): upgrade workflows

* fix(test): fix tests, tweak editorconfig

* test: add helper path test and stub requests (#4)

* fix: update paths and workflow (#5)

* fix: update python version and improve cross-platform paths (#6)

* fix: resolve MegaLinter YAML and markdown lint failures (#7)

* fix: implement all CodeRabbit review comments (#8)

* fix: apply CodeRabbit auto-fixes

Fixed 3 file(s) based on 3 unresolved review comments.

* fix: resolve MegaLinter editorconfig and pylint/pyright failures (#9)

* feat: migrate to uv-managed project (#10)

* feat: migrate to uv-managed project

* fix: align Python version in pyproject.toml and CI setup-uv config

* fix: ignore uv.lock in editorconfig, disable PYTHON_PYLINT/PYRIGHT in mega-linter, use uv for dep install (#11)

* fix: ignore uv.lock in editorconfig and disable PYTHON_PYLINT/PYRIGHT in mega-linter

* fix: update outdated comment in mega-linter config

* fix: use uv instead of pip to install deps in mega-linter config

* chore(deps): upgrade workflows

* chore(ci): mega-linter config tweaks

* chore(ci): mega-linter config tweaks

* feat(deps): add pyright and pylint with non-overlapping config

Add pyright>=1.1.0 and pylint>=3.0.0 as dev dependencies. Configure
pyright for basic type checking (py3.13) and refine pylint message
disables to avoid overlap with ruff's enabled rule sets.

* feat(ci): re-enable pyright and pylint in mega-linter

Remove PYTHON_PYLINT and PYTHON_PYRIGHT from DISABLE_LINTERS so
mega-linter runs all three linters: ruff, pyright, and pylint.

* fix: resolve pyright/pylint findings and apply ruff formatting

Add encoding="utf-8" to read_text() calls in tests (pylint W1514).
Apply ruff-format double-quote style consistently across both files.

* chore(hooks): add editorconfig-checker and fix lines exceeding 80 chars

Add editorconfig-checker pre-commit hook to catch line-length
violations locally. Shorten docstrings in aeonview.py and
aeonview_test.py that exceeded the 80-character editorconfig limit.
Remove double-quote-string-fixer hook that conflicted with ruff-format.

* fix(ci): configure mega-linter to use project configs for pyright/pylint

Point mega-linter at pyproject.toml for both linters so they use our
config instead of mega-linter's defaults. Add venvPath/venv to pyright
so it resolves imports from the uv-created .venv. Disable pylint
import-error since import checking is handled by pyright.
This commit is contained in:
2026-03-13 15:31:04 +02:00
committed by GitHub
parent 6aa17ba957
commit 2b68767f0d
20 changed files with 2628 additions and 238 deletions

108
README.md
View File

@@ -1,20 +1,98 @@
_)
_` | -_) _ \ \ \ \ / | -_) \ \ \ /
\__,_| \___| \___/ _| _| \_/ _| \___| \_/\_/
aeonview - a simple timelapse tool
# aeonview
aeonview is a tool for automagical timelapse-video generation.
it works as a glue between different linux programs to produce
videos of elapsing time. works best with webcam-images from the net.
```markdown
# _)
# _` | -_) _ \ \ \ \ / | -_) \ \ \ /
# \__,_| \___| \___/ _| _| \_/ _| \___| \_/\_/
# aeonview - a simple timelapse tool
```
sample:
http://www.youtube.com/watch?v=SnywvnjHpUk
**aeonview** is a Python-based tool for generating timelapse videos
from webcam images using `ffmpeg`. It supports automated image
downloading, video stitching, and is fully scriptable via CLI.
Includes developer tooling and tests.
[![CI][ci-b]][ci-l] [![ruff][cc-b]][cc-l] [![MIT][lm-b]][lm-l]
Needed components:
Low-quality sample: [aeonview 2min preview/Tampere Jan. 2008][sample]
* Python
* curl
* mencoder
* lots of harddrive space
* cron
## Features
- Timelapse image capture (`--mode image`)
- Video generation (`--mode video`)
- Support for daily, monthly, yearly video runs *(daily implemented)*
- Uses `ffmpeg` and Python `requests`
- Fully tested with `pytest`
- Linting and formatting via `ruff`
- Pre-commit hooks and CI-ready
## Requirements
- Python 3.13+
- `ffmpeg` (system tool)
- [uv](https://docs.astral.sh/uv/) for dependency management
- lots of hard drive space
## Installation
```bash
# Clone the repo
git clone https://github.com/ivuorinen/aeonview.git
cd aeonview
# Install dependencies (creates .venv automatically)
uv sync --all-groups
# Install pre-commit hooks
uv run pre-commit install
```
## Usage
```bash
# Capture an image
uv run python aeonview.py \
--mode image \
--project example \
--url "https://example.com/webcam.jpg"
# Generate a video from yesterday's images
uv run python aeonview.py --mode video --project example
```
## Development
```bash
# Format code
make format
# Lint code
make lint
# Run tests
make test
# Lint and test with pre-commit
uv run pre-commit run --files <changed files>
```
## System Setup for ffmpeg
```bash
sudo apt update
sudo apt install ffmpeg
```
## License
MIT License © 2025 Ismo Vuorinen
[ci-b]: https://github.com/ivuorinen/aeonview/actions/workflows/python-tests.yml/badge.svg
[ci-l]: https://github.com/ivuorinen/aeonview/actions/workflows/python-tests.yml
[cc-b]: https://img.shields.io/badge/code%20style-ruff-blueviolet
[cc-l]: https://github.com/astral-sh/ruff
[lm-b]: https://img.shields.io/badge/License-MIT-yellow.svg
[lm-l]: https://opensource.org/licenses/MIT
[sample]: https://www.youtube.com/watch?v=SnywvnjHpUk
<!-- vim: set sw=2 ts=2 tw=72 fo=cqt wm=0 et: -->