轻松激活和停用配置文件
ActDeact的Python项目详细描述
一个非常简单的配置文件激活器
此工具通过添加和删除预定义的前缀和后缀来重命名文件它的用途是快速激活和停用配置文件。
安装
$ pip install ActDeact
用法
Usage: actDeact [options] args
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-a, --activate Activate file(s)
-d, --deactivate Deactivate file(s)
-v, --verbose Verbose output
-c, --config Show the filename of the config file for editing
还提供了两个助手程序act
和deact
。它们是actDeact -d
和actDeact -a
的别名,并将每个参数直接传递给这些程序。
示例
actDeact -d foo
默认情况下将foo
重命名为foo_bak
。这相当于deact foo
。
actDeact -a foo
默认情况下将foo_bak
重命名为foo
。这相当于act foo
。
配置
actDeact -c
显示配置文件的文件名。其默认内容为:
[Main]
Prefix=
Suffix=_bak
在此文件中,可以设置前缀和后缀。