用于缩短polr链接的python cli
polr-p的Python项目详细描述
波尔
polr link shortener的python cli
- 自由软件:麻省理工学院许可证
- 文档:https://polr.readthedocs.io。
功能
- 待办事项
cli用法
polr [OPTIONS] COMMAND [ARGS]...
使用go-link缩短服务的命令。
选项:
- {TT1}$:显示此消息并退出。
命令:
- {TT2}$:检查是否已经存在与给定结尾的链接。
- shorten:使用选项缩短链接,使其具有自定义结尾。
shorten
用法:
polr shorten [OPTIONS] URL
使用选项缩短链接,使其具有自定义结尾。查看支票 如果存在给定结尾的链接。可以配置为失败 已经存在^ ^ Tt5}$。
polr shorten URL [(-e|--ending=)ending] [(-f|--fail)]`
示例:
# Use default ending $ polr shorten https://example.com http://polr.example.com/ad14gfwe # Use custom ending, if ending already exists don't return error, return link with that ending. polr shorten https://example.com -e my-custom-ending http://polr.example.com/my-custom-ending # Use custom ending, return error if it already exists. polr shorten https://example.com -e my-custom-ending -f ERROR: link with ending my-custom-ending already exists echo "$?" 1
选项:
- -e,--ending TEXT缩短链接的自定义结尾。
- ^ TT7}$如果已经存在自定义自定义结束的链接 返回错误
用法:
polr exists [OPTIONS] ENDING
检查是否有与给定结尾的链接已经存在。如果存在状态代码1,则存在状态代码
示例:
# Doesn't exist $ polr exists my-new-ending False $echo"$?"0 # Exists $ polr exists my-existing-ending True $echo"$?"1
选项:
- {TT1}$:显示此消息并退出。
学分
这个包是用Cookiecutter和audreyr/cookiecutter-pypackage项目模板创建的。
历史记录
0.1.0(2018-12-12)
- pypi上的第一个版本。