看门人保守你的秘密
doorman的Python项目详细描述
门卫会保守你的秘密,但这个工具的主要目的是方便在同一个文件上工作的人不存储密码。
安装
pipinstalldoorman
用法
首先,您应该创建一个配置文件(~/.config/doorman/doorman.yml)或输入如下文本:
# social accounts /home/user/twitter.rb: twitter_password: bHc0yz private_key: 1VpzKbLDTqC1vXb /home/user/pythoncodes/githubapi.py: github_password: wKJ4cV # secret text /etc/secret.conf: my_secret: really secret thing # secret function ../settings/my_settings.py: my_func: [i for i in others if i < 3]
隐藏所有秘密;
doorman -s
# Doorman defaults to -s when no argument is given doorman
... my twitter password is {{ twitter_password }} ... ... i keep {{ my_secret }} from other ...
不隐藏所有秘密;
doorman -u
... my twitter password is bHc0yz ... ... i keep really secret thing from other ...
使用帮助;
doorman -h
usage: doorman [-h] [-s | -u] [-v] [-c CONFIG_FILE] Doorman keeps your secret things optional arguments: -h, --help show this help message and exit -u, --unsecret Open all secret things -s, --secret Hide all secret things -v, --verbose Show all messages -c CONFIG_FILE, --config CONFIG_FILE Config file
待办事项
文件打开并替换:需要完全重新写入