帮助你组织图片的脚本。
picorg的Python项目详细描述
picorg
组织图片的一组脚本。如果您将图像保存在硬盘上的不同位置,并从手机手动备份图像,则这是理想的选择。
安装
pipinstallpicorg
用法
# Renames all images in the current working directory and its subdirectories. It tries to use the timestamp of when the image was taken from the EXIF data. If the script cannot find a suitable name for a file, it will be moved to a **NOK** folder and the filename will be printed to the console.picorg-arename# Checks all files in current working dir for files with the same content. If two files has the same content,# the one with the "biggest" name is moved to a *duplicates* folder. It then traverses all the files in# all the directories listed in pic_paths (in the settings file). If a file matches by name and content,# the file in current working dir will be moved to the *duplicates* folder.picorg-aduplicates
配置
在<;user_home>;/.picorg中创建一个存储用户设置的设置文件。
开发
从requirements-dev.txt文件安装依赖项
pipinstall-rrequirements-dev.txt
创建软件包并使用安装
pythonsetup.pybdist_wheelsdistpipinstall-e.
使用运行测试
pytest--cov=src--cov-reporthtml.
或使用毒物
tox
提交前
在按顺序提交之前运行脚本pre-commit.sh
,以便与格式化和排序的导入保持一致。
创建新版本。
- 通过碰撞setup.py中的版本来创建新版本。
- 承诺和推动。
- 等待travis ci生成。
- 在git中创建一个标记并推送。
- 等待travis ci生成标记。
- 使用
twine upload dist/*
将新包推送到pypi