Skip to main content

CLI to format links

Project description

linkotron

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

CLI to format links in a shorter format.

Installation

From PyPI

python3 -m pip install --upgrade linkotron

With pipx

pipx install linkotron

From source

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

Usage

Run linkotron or linky, they do the same thing.

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

linkotron: CLI to format links in a shorter format.

positional arguments:
  input                 text containing 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
  -t, --term, --terminal
                        output in OSC 8 for terminal

Linkify a URL

$ linky https://hugovk.dev/blog/2026/faster-pillow/
Copied! hugovk.dev/blog/2026/faster-pillow/

Linkify a repo

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

Linkify an issue

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

Linkify a pull request

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

Linkify a commit

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

Linkify a comment

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

Linkify a GitHub security advisory

$ linky https://github.com/python/cpython/security/advisories/GHSA-SGVs-bG9I-dWdv
Copied! python/cpython#GHSA-SGVs-bG9I-dWdv
$ linky https://github.com/advisories/GHSA-2mp6-9mjc-p6jg
Copied! GHSA-2mp6-9mjc-p6jg

Formatting

Markdown

$ linky --md https://hugovk.dev/blog/2026/faster-pillow/
Copied! [hugovk.dev/blog/2026/faster-pillow/](https://hugovk.dev/blog/2026/faster-pillow/)
$ linky --md https://github.com/python/peps/pull/2399
Copied! [python/peps#2399](https://github.com/python/peps/pull/2399)

reStructuredText

$ linky --rst https://hugovk.dev/blog/2026/faster-pillow/
Copied! `hugovk.dev/blog/2026/faster-pillow/ <https://hugovk.dev/blog/2026/faster-pillow/>`__
$ linky --rst https://github.com/python/peps/pull/2399
Copied! `python/peps#2399 <https://github.com/python/peps/pull/2399>`__

OSC 8 for terminal emulators

$ linky --terminal
Copied! \033]8;;https://hugovk.dev/blog/2026/faster-pillow/\033\\hugovk.dev/blog/2026/faster-pillow/\033]8;;\033\\
$ linky --terminal https://github.com/python/peps/pull/2399
Copied! \033]8;;https://github.com/python/peps/pull/2399\033\\python/peps#2399\033]8;;\033\\

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linkotron-0.7.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linkotron-0.7.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file linkotron-0.7.0.tar.gz.

File metadata

  • Download URL: linkotron-0.7.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for linkotron-0.7.0.tar.gz
Algorithm Hash digest
SHA256 72d5a15dfa415d63b1ec62f3a33253977fa75ddcb12bf6fb6a62b874bdf2ba55
MD5 d99b69cbac2318bbde208d7962b8c1ee
BLAKE2b-256 06fbac26167e2343f745af44b878aaba5e50076bfb92ddda3c95497aa4152bdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkotron-0.7.0.tar.gz:

Publisher: deploy.yml on hugovk/linkotron

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file linkotron-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: linkotron-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for linkotron-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d337bb0667fcbb6d3c6adbaee444404d562ba44aae3f51b25f9fd6de7dd65940
MD5 bf985e86a49c5e108ac25a82bdae9fdb
BLAKE2b-256 f13c40a2e813c568f426e4bed766155c1627dd4b914e4b82e346fc9bfb736ac4

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkotron-0.7.0-py3-none-any.whl:

Publisher: deploy.yml on hugovk/linkotron

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page