Skip to content

Zilmill/PythonCmdTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PythonCmdTools

常用的一些批处理等

使用

基于 https://github.com/tiangolo/typer 使用

# 确认python 和 pip 版本为3.x

# 安装
pip install "typer[all]"
# 示例

import typer

app = typer.Typer()


@app.command()
def hello(name: str):
    print(f"Hello {name}")


@app.command()
def goodbye(name: str, formal: bool = False):
    if formal:
        print(f"Goodbye Ms. {name}. Have a good day.")
    else:
        print(f"Bye {name}!")


if __name__ == "__main__":
    app()

rename1 批量修改名称等

python searchMacApp/index.py s "" "" && python searchMacApp/index.py w "parallels-desktop"

About

常用的一些批处理等

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages