Linkotron

Latest version: v0.3.1

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.1

Fixed

* Convert review discussion into '(comment)' (26) hugovk

0.3.0

Added

* Add support for Python 3.13 (19) hugovk

Changed

* Speedup x 2.15: Generate `__version__` at build to avoid slow `importlib.metadata` import (24) hugovk
* Name the regex groups (23) hugovk
* Replace Flake8 with Ruff (18) hugovk

0.2.0

Added

* Linkify repo URLs (14) hugovk
* Add py.typed (9) hugovk
* Copy successfully transformed output to the clipboard, disable with `--no-copy` (6) hugovk

Changed

* CLI: group `--md` and `--rst` as mutually exclusive (8) hugovk

Fixed

* Handle trailing slash on URL (7) hugovk

0.1.1

Fixed

* No copying yet, pyperclip dependency not needed (5) hugovk

0.1.0

Added

* Initial commit (2) hugovk

CLI to format GitHub links in a shorter format.

Installation

From PyPI

bash
python3 -m pip install --upgrade linkotron


With [pipx][pipx]

bash
pipx install linkotron


[pipx]: https://github.com/pypa/pipx

From source

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


Usage

Run `linkotron` or `linky`, they do the same thing.

console
$ linky --help
usage: linky [-h] [-V] [-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
-m, --md, --markdown Output Markdown
-r, --rst, --restructuredtext
Output reStructuredText


Linkify an issue

console
$ linky https://github.com/python/peps/issues/1012
python/peps1012


Linkify a pull request

console
$ linky https://github.com/python/peps/pull/2399
python/peps2399


Linkify a commit

console
$ linky https://github.com/hugovk/cpython/commit/28b23555030d58fdb52b74a547cc621c49690de0
hugovk/cpython28b2355


Linkify a comment

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


Formatting

Markdown

console
$ linky --md https://github.com/python/peps/pull/2399
[python/peps2399](https://github.com/python/peps/pull/2399)


reStructuredText

console
$ linky --rst https://github.com/python/peps/pull/2399
`python/peps2399 <https://github.com/python/peps/pull/2399>`__

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.