Output naming: --prefix/--suffix and safe default names beside the source
还没有人认领这个 Issue。
评估
调研方向
Read the implementations of resize and convert, along with the output naming behavior described in related issues #21 and #25. Decide how --prefix/--suffix, size suffixes beside the source, and --force should interact; the issue also raises a template flag as an alternative. Done means the chosen naming behavior is consistent and existing files are protected from overwrite unless --force is supplied.
由索引模型根据 Issue 内容生成。
描述
Problem
resize (single size) and convert keep the input's basename, so the output folder is the only thing keeping a derivative apart from its source. That is the root cause of #25: point --output at the source folder and the original is overwritten.
It also means batch scripts must rename each output afterward when they want web-ready names.
Options
--prefix/--suffix: e.g.--suffix -webgivesphoto-web.jpg. Simple, predictable, and the user picks a name that makes sense in a URL.- Default size suffix when writing beside the source. Multi-size resize already names files
photo-300.jpg(#21). Using the same-{size}suffix whenever the output dir resolves to the input's dir would make #25 impossible by default. - Datestamp (e.g.
photo-20261117-1530.jpg): guarantees uniqueness, but the names are not deterministic, re-runs pile up copies, and the stamp ends up in public image URLs (Squarespace uses the filename as the URL).
Recommendation
Do 1 and 2. Treat a datestamp as an opt-in pattern, not the default. Pair it with a hard refusal to overwrite any existing file unless --force is given, which closes #25 even if naming is misconfigured.
A small --name template ({stem}, {w}, {h}, {date}) would cover all three options with one flag, if that is not over-engineering.
Context
Related: #25 (overwrite), #21 (output naming). Hit on 2026-11-17 with ipro 1.7.0 while renaming 24 exports by hand.
— Emily
- 主要语言
- Python
- 星标
- 1
- 派生
- 0
- 平均合并
- 4 小时 13 分钟
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cadentdev/ipro 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
-
难度 4/5 3-5 天 新手友好度 42/100
-
难度 5/5 一周以上 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 52/100
-
难度 3/5 1-2 天 新手友好度 68/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
LearningCircuit/local-deep-research#10161 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
chore: contact address [email protected]可能已有人在做 @larsrollik 今天认领。 未关闭
难度 1/5 1-3 小时 新手友好度 82/100
-
bug
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
Gustavo-Galvao-e-Silva/panchi#228 ·
维护者通常 1 天内回复