在保留原文件/目录结构的同时,批量替换指定文本,以快速创建文件分身
Project description
kakashi - File Doppelganger
kakashi
,《火影忍者》中的天才忍者,因使用写轮眼复制了上千种忍术而被称为“拷贝忍者”,
该工具借用其名,以体现「快速创建文件分身」的功能,即:
在保留原文件/目录结构的同时,批量替换指定文本,以生成另一份
安装
pip install amk.kakashi
使用
- 显示帮助
$ kks
usage: kakashi [-h] [-d] [-v] [-V] [-f FROM_PATH] [-t TO_PATH] [-m MAP_PATH] [-r]
在保留原文件/目录结构的同时,批量替换指定文本,以快速创建文件分身
optional arguments:
-h, --help show this help message and exit
-d, --debug 启用调试模式
-v, --verbose 显示详细日志
-V, --version 查看当前版本号
-f FROM_PATH, --from_path FROM_PATH
准备分身的文件或目录的路径
-t TO_PATH, --to_path TO_PATH
文件或目录分身后保存的路径
-m MAP_PATH, --map_path MAP_PATH
分身时需要替换的内容映射文件路径,每一行为一条映射,每条映射的格式须为"旧文本 => 新文本"
-r, --remove_if_exist
若保存的路径已存在文件,则直接将其删除
- 使用方法
$ kks -f <from_path> -t <to_path> -m <map_path> [-[d|v]]
# 示例(效果如图所示)
$ kks -f test_proj -t test_proj_2 -m test_proj_map.txt -dv
更新记录
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
amk.kakashi-1.0.0.tar.gz
(17.9 kB
view details)
Built Distribution
File details
Details for the file amk.kakashi-1.0.0.tar.gz
.
File metadata
- Download URL: amk.kakashi-1.0.0.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 | b3a697d7b40b69db9fdcb4ad2e017a6efed573b05596b66bdac078af96a94fdb |
|
MD5 | 771a9db13ff6c283f4d7a14ec6484c97 |
|
BLAKE2b-256 | 056e45f49e7b99d6f71e8e22e2a05e662531fe9529362b7d097992e6a9247507 |
File details
Details for the file amk.kakashi-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: amk.kakashi-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.2 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 | 42c28edc4ad16dda60f16a33b0fdbdf4ba20c2d27cbe1be2c3ea54862ca3cbe6 |
|
MD5 | 1aede39782d0dddf518eb0ecf09660ef |
|
BLAKE2b-256 | 8e20b112ffad5ee6ed7d87c4562c2f6c4d65c382e6ababf8d41b0b0487996973 |