Skip to main content

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

更新记录

Metadata

Release files for amk.kakashi 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amk.kakashi 1.0.0
File Size Uploaded
amk.kakashi-1.0.0.tar.gz 17.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for amk.kakashi 1.0.0
File Interpreter ABI Platform
amk.kakashi-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.1 kB

Release files / amk.kakashi-1.0.0.tar.gz

Download URL amk.kakashi-1.0.0.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b3a697d7b40b69db9fdcb4ad2e017a6efed573b05596b66bdac078af96a94fdb
BLAKE2b-256 checksum
How to use checksums
056e45f49e7b99d6f71e8e22e2a05e662531fe9529362b7d097992e6a9247507
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / amk.kakashi-1.0.0-py3-none-any.whl

Download URL amk.kakashi-1.0.0-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42c28edc4ad16dda60f16a33b0fdbdf4ba20c2d27cbe1be2c3ea54862ca3cbe6
BLAKE2b-256 checksum
How to use checksums
8e20b112ffad5ee6ed7d87c4562c2f6c4d65c382e6ababf8d41b0b0487996973
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page