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 GitHub 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 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
  -t, --term, --terminal
                        output in OSC 8 for terminal

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)

Formatting

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>`__

OSC 8 for terminal emulators

$ 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.6.0.tar.gz (11.4 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.6.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for linkotron-0.6.0.tar.gz
Algorithm Hash digest
SHA256 611fc3a534864018f66d12834f5050810ac6a2a33535367b7eb2268b5170e154
MD5 bbfb92f7d342d58eb4146b4b35d62844
BLAKE2b-256 7fffd511c9145b7e68a17e3c81264ac55fdab19e88aaad7fb645f8b62aa04ad9

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkotron-0.6.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.6.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for linkotron-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7745541708b2a95951c8ce94b20e575438fdec0d981361822c623581a020168
MD5 4c6b4a5cd3845d0411914c45dbdadace
BLAKE2b-256 95984be23eec430aec17aed72e1ed28414c95a657152b2f32609194bba688d73

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkotron-0.6.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