Rename Photos With Date
Project description
Rename Photos With Date
背景
文件的排序方式 通常只有【创建时间、修改时间、标题】,但问题是:
- 照片的标题通常是无效的(固定前缀+编号,甚至是无意义字符串)
- 时间也是不准的(创建时间、修改时间 其实与照片的拍摄时间 是不一致的),
所以就需要基于现有排序方式 修改相关信息,以便能够已正确的排序显示
因此,我就写了这个工具:读取照片的拍摄时间,将其重命名,以便【在以标题排序显示时 是符合预期的】
为了避免命名重复,所以命名规则为「年月日时分秒+3位随机数,共15位数字」,示例如下:
202204062217.699.png
201601011713.247.JPG
201602251612.551.JPG
201712311343.878.JPG
202204041615.719.HEIC
202204041615.813.HEIC
202204041710.478.HEIC
202204041710.595.JPG
202204041710.749.HEIC
202204041710.750.HEIC
安装
可通过如下命令 快速安装:
$ pip install rpwd
使用
查看说明
$ rpwd -h
usage: rpwd [-h] [-d] [-v] [-l] path
Rename Photos With Date
positional arguments:
path 待重命名的「文件/目录」的路径
optional arguments:
-h, --help show this help message and exit
-d, --debug 启用调试模式
-v, --verbose 显示详细日志
-l, --list 仅列表显示可能的处理,但不执行具体操作,以便检查
查看将要执行的操作
$ rpwd ./photos -l
或是指定 -v
以查看很多信息:
$ rpwd ./photos -lv
执行重命名
# 可追加 -v、-d 以启用详情、调试模式,以查看更多信息
$ rpwd ./photos
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rpwd-0.1.2.tar.gz
(17.9 kB
view details)
Built Distribution
rpwd-0.1.2-py3-none-any.whl
(18.0 kB
view details)
File details
Details for the file rpwd-0.1.2.tar.gz
.
File metadata
- Download URL: rpwd-0.1.2.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67abeef1bcd41afbf76f37bc07432f3c8e7c3b314fbc70383355aef9d6732b30 |
|
MD5 | 49a33a0ddd5c4b397e78d479d3fde2aa |
|
BLAKE2b-256 | da480c249aa0274c855d25d51eb13e9f18cabb3daac1616feea5a9c027d5b642 |
File details
Details for the file rpwd-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: rpwd-0.1.2-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25c1f6304e42d3c327e1cfc5f3e6c5b7e15cdfc3b1b24e4ace6e12ae15b7ff6c |
|
MD5 | 47a02b21b7e0676ed4ff75638b2e2294 |
|
BLAKE2b-256 | e4a34c34af811f244922b2c6845f83eaac908ec3fdf584e8429e9e5d2cecb3dd |