跳转到主要内容

CLI用于格式化链接

项目描述

linkotron

PyPI version Supported Python versions PyPI downloads Test Codecov Licence Code style: Black

CLI用于格式化GitHub链接为更短格式。

安装

从PyPI

python3 -m pip install --upgrade linkotron

使用pipx

pipx install linkotron

从源代码

git clone https://github.com/hugovk/linkotron
cd linkotron
python3 -m pip install .

用法

运行linkotronlinky,它们做同样的事情。

$ linky --help
usage: linky [-h] [-V] [--no-copy] [-m | -r] input

linkotron: CLI to format GitHub links in a shorter format.

positional arguments:
  input                 text containing GitHub links to shorten

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --no-copy             do not copy output to clipboard

formatters:
  -m, --md, --markdown  output in Markdown
  -r, --rst, --restructuredtext
                        output in reStructuredText

链接仓库

$ linky https://github.com/python/peps
Copied! python/peps

链接问题

$ linky https://github.com/python/peps/issues/1012
Copied! python/peps#1012

链接拉取请求

$ linky https://github.com/python/peps/pull/2399
Copied! python/peps#2399

链接提交

$ linky https://github.com/hugovk/cpython/commit/28b23555030d58fdb52b74a547cc621c49690de0
Copied! hugovk/cpython#28b2355

链接评论

$ linky https://github.com/python/peps/pull/2399#issuecomment-1063409480
Copied! python/peps#2399 (comment)

格式化

Markdown

$ linky --md https://github.com/python/peps/pull/2399
Copied! [python/peps#2399](https://github.com/python/peps/pull/2399)

reStructuredText

$ linky --rst https://github.com/python/peps/pull/2399
Copied! `python/peps#2399 <https://github.com/python/peps/pull/2399>`__

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪一个,请了解更多关于 安装包 的信息。

源代码分发

linkotron-0.3.0.tar.gz (10.7 kB 查看哈希值)

上传时间 源代码

构建分发

linkotron-0.3.0-py3-none-any.whl (6.4 kB 查看哈希值)

上传时间 Python 3

支持者