CLI to format GitHub links in a shorter format.
python3 -m pip install --upgrade linkotron
With pipx
pipx install linkotron
git clone https://github.com/hugovk/linkotron
cd linkotron
python3 -m pip install .
Run linkotron
or linky
, they do the same thing.
$ 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)
$ linky --md https://github.com/python/peps/pull/2399
Copied! [python/peps#2399](https://github.com/python/peps/pull/2399)
$ linky --rst https://github.com/python/peps/pull/2399
Copied! `python/peps#2399 <https://github.com/python/peps/pull/2399>`__