PhotoWall 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,35 @@
1
+ name: Upload Python Package
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ publish:
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ # 🔐 必须:用于 PyPI 的可信发布 (Trusted Publishing) 免密认证
16
+ id-token: write
17
+
18
+ steps:
19
+ # 1. 拉取代码
20
+ - uses: actions/checkout@v4
21
+
22
+ # 2. 安装并配置 uv
23
+ - name: Set up uv
24
+ uses: astral-sh/setup-uv@v8.2.0
25
+ with:
26
+ enable-cache: true
27
+
28
+ # 3. 使用 uv 构建包 (生成 dist/)
29
+ - name: Build release distributions
30
+ run: uv build
31
+
32
+ # 4. 使用 uv 直接发布到 PyPI
33
+ # uv 会自动识别 GitHub 的 id-token 并与 PyPI 完成 OIDC 握手,无需任何 Token
34
+ - name: Publish to PyPI
35
+ run: uv publish
@@ -0,0 +1,11 @@
1
+ /index.html
2
+ assets/
3
+ assets.js
4
+ tags.json
5
+ .cache/
6
+ .photowall/
7
+ __pycache__/
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+ .venv/
11
+ dist/
@@ -0,0 +1 @@
1
+ 3.14
@@ -0,0 +1,7 @@
1
+ # AGENTS.md
2
+
3
+ 一个生成照片元数据让后显示的照片墙工具。
4
+
5
+ ## 开发环境
6
+
7
+ 使用`uv`管理,`ruff`进行代码规范检查,`pytest`进行单元测试。
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Martin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,43 @@
1
+ Metadata-Version: 2.5
2
+ Name: PhotoWall
3
+ Version: 0.1.0
4
+ Summary: 一款基于预生成元数据的轻量级照片墙
5
+ Project-URL: Homepage, https://github.com/ecator/PhotoWall
6
+ Project-URL: Repository, https://github.com/ecator/PhotoWall
7
+ Author-email: Martin <qule520@126.com>
8
+ License-File: LICENSE
9
+ Requires-Python: >=3.14
10
+ Requires-Dist: huggingface-hub>=2.3.0
11
+ Requires-Dist: numpy>=2.5.4
12
+ Requires-Dist: onnxruntime-directml>=1.24.4
13
+ Requires-Dist: onnxruntime-gpu>=1.31.0
14
+ Requires-Dist: pillow>=13.0.0
15
+ Requires-Dist: tqdm>=4.70.1
16
+ Description-Content-Type: text/markdown
17
+
18
+ # 照片墙
19
+
20
+ 这是一个纯本地单页`index.html`+`assets.js`的照片墙应用,通过`photowall index`子命令扫描相册目录生成`tags.json`、`assets.js`并输出`index.html`,无需服务端即可在浏览器中展示照片。
21
+
22
+ ## 常用命令
23
+
24
+ - `photowall index`:一键全量索引。从指定相册根目录(`--home`,默认为当前工作目录)查找 `assets/` 媒体文件,自动进行 AI 打标生成 `tags.json`、提取元数据生成 `assets.js`,并输出 `index.html` 网页文件。
25
+ - `--home`:相册根目录路径(可选,默认当前目录)。
26
+ - `--title`:相册标题(可选,默认使用相册文件夹名)。
27
+ - `--force`:强制重新推理 AI 标签并重新解析所有媒体文件。
28
+ - `--skip-tags`:跳过 AI 标签生成步骤。
29
+ - `photowall tags`:仅使用 WD14 Tagger 自动为图片打标并生成 `tags.json`。
30
+ - `photowall assets`:仅扫描 `assets/` 目录并融合标签生成 `assets.js`。
31
+
32
+ ## 快速开始
33
+
34
+ 1. 安装 `photowall`:
35
+ ```bash
36
+ uv tool install photowall
37
+ ```
38
+ 2. 把图片和视频放进 `assets` 文件夹,不需要特别分门别类,直接扔进去就行。
39
+ > 最开始没有 `assets` 文件夹需要手动创建。
40
+ 3. 运行 `photowall index` 生成相册索引。
41
+ 4. 打开生成的 `index.html` 即可。
42
+ > 如果更新了 `assets` 的内容则再次运行 `photowall index` 即可。
43
+ 5. 如果想启动本地服务器也可以直接运行 `start.bat`,会自动启动本地服务器并使用浏览器打开。
@@ -0,0 +1,26 @@
1
+ # 照片墙
2
+
3
+ 这是一个纯本地单页`index.html`+`assets.js`的照片墙应用,通过`photowall index`子命令扫描相册目录生成`tags.json`、`assets.js`并输出`index.html`,无需服务端即可在浏览器中展示照片。
4
+
5
+ ## 常用命令
6
+
7
+ - `photowall index`:一键全量索引。从指定相册根目录(`--home`,默认为当前工作目录)查找 `assets/` 媒体文件,自动进行 AI 打标生成 `tags.json`、提取元数据生成 `assets.js`,并输出 `index.html` 网页文件。
8
+ - `--home`:相册根目录路径(可选,默认当前目录)。
9
+ - `--title`:相册标题(可选,默认使用相册文件夹名)。
10
+ - `--force`:强制重新推理 AI 标签并重新解析所有媒体文件。
11
+ - `--skip-tags`:跳过 AI 标签生成步骤。
12
+ - `photowall tags`:仅使用 WD14 Tagger 自动为图片打标并生成 `tags.json`。
13
+ - `photowall assets`:仅扫描 `assets/` 目录并融合标签生成 `assets.js`。
14
+
15
+ ## 快速开始
16
+
17
+ 1. 安装 `photowall`:
18
+ ```bash
19
+ uv tool install photowall
20
+ ```
21
+ 2. 把图片和视频放进 `assets` 文件夹,不需要特别分门别类,直接扔进去就行。
22
+ > 最开始没有 `assets` 文件夹需要手动创建。
23
+ 3. 运行 `photowall index` 生成相册索引。
24
+ 4. 打开生成的 `index.html` 即可。
25
+ > 如果更新了 `assets` 的内容则再次运行 `photowall index` 即可。
26
+ 5. 如果想启动本地服务器也可以直接运行 `start.bat`,会自动启动本地服务器并使用浏览器打开。
@@ -0,0 +1,43 @@
1
+ [project]
2
+ name = "PhotoWall"
3
+ dynamic = ["version"]
4
+ description = "一款基于预生成元数据的轻量级照片墙"
5
+ readme = "README.md"
6
+ authors = [{ name = "Martin", email = "qule520@126.com" }]
7
+ requires-python = ">=3.14"
8
+ dependencies = [
9
+ "huggingface-hub>=2.3.0",
10
+ "numpy>=2.5.4",
11
+ "onnxruntime-directml>=1.24.4",
12
+ "onnxruntime-gpu>=1.31.0",
13
+ "pillow>=13.0.0",
14
+ "tqdm>=4.70.1",
15
+ ]
16
+
17
+ [project.scripts]
18
+ photowall = "photowall.cli:main"
19
+
20
+
21
+ [build-system]
22
+ requires = ["hatchling", "hatch-vcs"]
23
+ build-backend = "hatchling.build"
24
+
25
+ [tool.hatch.version]
26
+ source = "vcs"
27
+
28
+ [project.urls]
29
+ Homepage = "https://github.com/ecator/PhotoWall"
30
+ Repository = "https://github.com/ecator/PhotoWall"
31
+
32
+ [dependency-groups]
33
+ dev = ["pytest>=9.1.1", "ruff>=0.17.2"]
34
+
35
+ [tool.pytest.ini_options]
36
+ testpaths = ["tests"]
37
+
38
+ [tool.ruff.lint]
39
+ ignore = [
40
+ "BLE001", # Do not catch blind exception: `Exception`
41
+ "S110", # `try`-`except`-`pass` detected
42
+ "S112", # `try`-`except`-`continue` detected
43
+ ]
@@ -0,0 +1,4 @@
1
+ from photowall import assets, index, tags
2
+ from photowall.cli import main
3
+
4
+ __all__ = ["assets", "index", "main", "tags"]