From 6a3ab31241c515b37cd647c64c543bf5c9f77b85 Mon Sep 17 00:00:00 2001 From: aga Date: Mon, 30 Mar 2026 14:29:53 +0200 Subject: [PATCH 1/6] Refine README before initial release --- README.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 045c752..5257574 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Python Photo Tools -A command-line tool for organising and processing photos using Python. +Command-line tools for organising photos by date, managing RAW/JPG pairs, and optimising images. ## Supported formats @@ -28,13 +28,7 @@ Install (macOS) brew install exiftool ``` -The application will fail if it is not installed. - -If running in a Docker container, include: - -```Dockerfile -RUN apt-get update && apt-get install -y exiftool -``` +On Linux, install via your package manager (e.g. `apt install exiftool`). ## Installation @@ -49,7 +43,8 @@ pipx install git+https://github.com/aga87/python-photo-tools.git Clone the repository and install: ```shell -pip install . +pip install -e . +pip install --group dev -e . ``` ## Usage @@ -119,7 +114,7 @@ photo-tools clean-raws - Resize images to a maximum width of `2500px` - Choose the highest quality that results in a file size ≤ `500 KB` (never below `70%`) -- Saves optimised images with prefix `lq_` in the same directory (existing files are overwritten) +- Saves optimised images with prefix `lq_` in the same directory (overwrites existing files) ```shell @@ -148,7 +143,7 @@ data/input/ You can run the CLI module directly for testing: ```shell -python -m photo_tools.cli organise-by-date ./data/input ./data/output +python -m photo_tools.cli by-date ./data/input ./data/output ``` ### Running tests From a39e8886b5dfba25408239b309a9016bf429f6b5 Mon Sep 17 00:00:00 2001 From: aga Date: Mon, 30 Mar 2026 14:45:04 +0200 Subject: [PATCH 2/6] Rename package for PyPI availability --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c77d5b9..63e5dce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" [project] -name = "photo-tools" +name = "photo-tools-cli" version = "0.1.0" description = "Python CLI tools for photography workflows" requires-python = ">=3.13" From e4bf758c2ec98deed73cf0a121109969511ca030 Mon Sep 17 00:00:00 2001 From: aga Date: Mon, 30 Mar 2026 18:09:40 +0200 Subject: [PATCH 3/6] Add README to package metadata --- pyproject.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 63e5dce..c029241 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta" name = "photo-tools-cli" version = "0.1.0" description = "Python CLI tools for photography workflows" +readme = "README.md" requires-python = ">=3.13" dependencies = [ "typer>=0.24,<1.0", @@ -14,7 +15,13 @@ dependencies = [ ] [dependency-groups] -dev = ["pytest>=9,<10", "ruff>=0.15,<1.0", "mypy>=1.19,<2.0", "build>=1.4,<2.0"] +dev = [ + "pytest>=9,<10", + "ruff>=0.15,<1.0", + "mypy>=1.19,<2.0", + "build>=1.4,<2.0", + "twine>=6.2,<7.0", +] [project.scripts] photo-tools = "photo_tools.cli:app" From 79c34c17479d1f821e20ddb90733907f0c791e13 Mon Sep 17 00:00:00 2001 From: aga Date: Mon, 30 Mar 2026 18:40:44 +0200 Subject: [PATCH 4/6] Update README --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5257574..2466248 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![CI](https://github.com/aga87/python-photo-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/aga87/python-photo-tools/actions) -# Python Photo Tools +# Photo Tools CLI Command-line tools for organising photos by date, managing RAW/JPG pairs, and optimising images. @@ -35,7 +35,14 @@ On Linux, install via your package manager (e.g. `apt install exiftool`). ### Using pipx (recommended) ```shell -pipx install git+https://github.com/aga87/python-photo-tools.git +pipx install photo-tools-cli +``` +Installs the CLI in an isolated environment and makes `photo-tools` available globally, avoiding dependency conflicts. + +### Using pip (if pipx not available) + +```shell +pip install photo-tools-cli ``` ### Local development @@ -75,7 +82,7 @@ Flags can be combined: photo-tools ... --dry-run --verbose ``` -### `by-date` +### Organise by date (`by-date`) - Organise images into date-based folders (`YYYY-MM-DD`, optional suffix) - Files are moved (not copied) into the output directory @@ -89,7 +96,7 @@ photo-tools by-date --suffix ``` -### `raws` +### Separate RAW files (`raws`) - Move RAW images into a `raws/` subfolder within the input directory - Non-RAW files are left unchanged @@ -100,7 +107,7 @@ photo-tools by-date --suffix photo-tools raws ``` -### `clean-raws` +### Clean unpaired RAW files (`clean-raws`) - Move RAW files to `raws-to-delete/` if no matching JPG (same prefix) exists - Matching is based on filename prefix (e.g. `abcd.RAF` matches `abcd_edit.jpg`) @@ -110,7 +117,7 @@ photo-tools raws photo-tools clean-raws ``` -### `optimise` +### Optimise images (`optimise`) - Resize images to a maximum width of `2500px` - Choose the highest quality that results in a file size ≤ `500 KB` (never below `70%`) From e2456531c77f084813b5f5528c17e9b9638aa5a2 Mon Sep 17 00:00:00 2001 From: aga Date: Mon, 30 Mar 2026 18:41:24 +0200 Subject: [PATCH 5/6] Add GitHub Actions workflow for publishing to PyPI on tag push --- .github/workflows/publish.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9c0c182 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,48 @@ +name: Publish to PyPI + +on: + push: + tags: + - "v*" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Install build tool + run: python -m pip install --upgrade build + + - name: Build distributions + run: python -m build + + - name: Upload dist artifacts + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ + + publish: + needs: build + runs-on: ubuntu-latest + permissions: + id-token: write + + environment: + name: pypi + + steps: + - name: Download dist artifacts + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From 6234e64c12dc602044545c6ed712f4ad9b423644 Mon Sep 17 00:00:00 2001 From: aga Date: Mon, 30 Mar 2026 18:48:15 +0200 Subject: [PATCH 6/6] Bump version to 0.1.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c029241..11f33a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "photo-tools-cli" -version = "0.1.0" +version = "0.1.1" description = "Python CLI tools for photography workflows" readme = "README.md" requires-python = ">=3.13"