def ask_for_configs():
remote_path = click.prompt("Remote path", default="~/remote/path")
ssh_host = click.prompt("SSH host", default="ssh_host")
ssh_user = click.prompt("SSH username or enter '-' to skip",
default="ssh_user")
ignores = click.prompt("Files or folders to ignore "
"(separated by space)", default=" ")
if ssh_user == "-":
ssh_user = None
if ignores.strip():
ignores = ignores.split(" ")
else:
ignores = []
return psync.generate_config(ssh_user=ssh_user,
ssh_host=ssh_host,
remote_path=remote_path,
ignores=ignores)
评论列表
文章目录