# linkotron
[![PyPI version](https://img.shields.io/pypi/v/linkotron.svg?logo=pypi&logoColor=FFE873)](https://pypi.org/project/linkotron/)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/linkotron.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/linkotron/)
[![PyPI downloads](https://img.shields.io/pypi/dm/linkotron.svg)](https://pypistats.org/packages/linkotron)
[![Test](https://github.com/hugovk/linkotron/actions/workflows/test.yml/badge.svg)](https://github.com/hugovk/linkotron/actions)
[![Codecov](https://codecov.io/gh/hugovk/linkotron/branch/main/graph/badge.svg)](https://codecov.io/gh/hugovk/linkotron)
[![Licence](https://img.shields.io/github/license/hugovk/linkotron.svg)](LICENSE.txt)
[![Code style: Black](https://img.shields.io/badge/code%20style-Black-000000.svg)](https://github.com/psf/black)
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.
<!-- [[[cog
from linkotron.scripts.run_command import run
run("linky --help")
]]] -->
```console
$ 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
```
<!-- [[[end]]] -->
### Linkify a repo
<!-- [[[cog
run("linky https://github.com/python/peps")
]]] -->
```console
$ linky https://github.com/python/peps
Copied! python/peps
```
<!-- [[[end]]] -->
### Linkify an issue
<!-- [[[cog
run("linky https://github.com/python/peps/issues/1012")
]]] -->
```console
$ linky https://github.com/python/peps/issues/1012
Copied! python/peps#1012
```
<!-- [[[end]]] -->
### Linkify a pull request
<!-- [[[cog
run("linky https://github.com/python/peps/pull/2399")
]]] -->
```console
$ linky https://github.com/python/peps/pull/2399
Copied! python/peps#2399
```
<!-- [[[end]]] -->
### Linkify a commit
<!-- [[[cog
run("linky https://github.com/hugovk/cpython/commit/28b23555030d58fdb52b74a547cc621c49690de0")
]]] -->
```console
$ linky https://github.com/hugovk/cpython/commit/28b23555030d58fdb52b74a547cc621c49690de0
Copied! hugovk/cpython#28b2355
```
<!-- [[[end]]] -->
### Linkify a comment
<!-- [[[cog
run("linky https://github.com/python/peps/pull/2399#issuecomment-1063409480")
]]] -->
```console
$ linky https://github.com/python/peps/pull/2399#issuecomment-1063409480
Copied! python/peps#2399 (comment)
```
<!-- [[[end]]] -->
### Formatting
#### Markdown
<!-- [[[cog
run("linky --md https://github.com/python/peps/pull/2399")
]]] -->
```console
$ linky --md https://github.com/python/peps/pull/2399
Copied! [python/peps#2399](https://github.com/python/peps/pull/2399)
```
<!-- [[[end]]] -->
#### reStructuredText
<!-- [[[cog
run("linky --rst https://github.com/python/peps/pull/2399")
]]] -->
```console
$ linky --rst https://github.com/python/peps/pull/2399
Copied! `python/peps#2399 <https://github.com/python/peps/pull/2399>`__
```
<!-- [[[end]]] -->
Raw data
{
"_id": null,
"home_page": "",
"name": "linkotron",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "link,markdown,md,restructuredtext,rst",
"author": "Hugo van Kemenade",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/b7/0a/96c1a7ef136089a880406b270e233eef34aff196aa1c0457bb12afc1c3f1/linkotron-0.2.0.tar.gz",
"platform": null,
"description": "# linkotron\n\n[![PyPI version](https://img.shields.io/pypi/v/linkotron.svg?logo=pypi&logoColor=FFE873)](https://pypi.org/project/linkotron/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/linkotron.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/linkotron/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/linkotron.svg)](https://pypistats.org/packages/linkotron)\n[![Test](https://github.com/hugovk/linkotron/actions/workflows/test.yml/badge.svg)](https://github.com/hugovk/linkotron/actions)\n[![Codecov](https://codecov.io/gh/hugovk/linkotron/branch/main/graph/badge.svg)](https://codecov.io/gh/hugovk/linkotron)\n[![Licence](https://img.shields.io/github/license/hugovk/linkotron.svg)](LICENSE.txt)\n[![Code style: Black](https://img.shields.io/badge/code%20style-Black-000000.svg)](https://github.com/psf/black)\n\nCLI to format GitHub links in a shorter format.\n\n## Installation\n\n### From PyPI\n\n```bash\npython3 -m pip install --upgrade linkotron\n```\n\n### With [pipx][pipx]\n\n```bash\npipx install linkotron\n```\n\n[pipx]: https://github.com/pypa/pipx\n\n### From source\n\n```bash\ngit clone https://github.com/hugovk/linkotron\ncd linkotron\npython3 -m pip install .\n```\n\n## Usage\n\nRun `linkotron` or `linky`, they do the same thing.\n\n<!-- [[[cog\nfrom linkotron.scripts.run_command import run\nrun(\"linky --help\")\n]]] -->\n\n```console\n$ linky --help\nusage: linky [-h] [-V] [--no-copy] [-m | -r] input\n\nlinkotron: CLI to format GitHub links in a shorter format.\n\npositional arguments:\n input text containing GitHub links to shorten\n\noptions:\n -h, --help show this help message and exit\n -V, --version show program's version number and exit\n --no-copy do not copy output to clipboard\n\nformatters:\n -m, --md, --markdown output in Markdown\n -r, --rst, --restructuredtext\n output in reStructuredText\n```\n\n<!-- [[[end]]] -->\n\n### Linkify a repo\n\n<!-- [[[cog\nrun(\"linky https://github.com/python/peps\")\n]]] -->\n\n```console\n$ linky https://github.com/python/peps\nCopied! python/peps\n```\n\n<!-- [[[end]]] -->\n\n### Linkify an issue\n\n<!-- [[[cog\nrun(\"linky https://github.com/python/peps/issues/1012\")\n]]] -->\n\n```console\n$ linky https://github.com/python/peps/issues/1012\nCopied! python/peps#1012\n```\n\n<!-- [[[end]]] -->\n\n### Linkify a pull request\n\n<!-- [[[cog\nrun(\"linky https://github.com/python/peps/pull/2399\")\n]]] -->\n\n```console\n$ linky https://github.com/python/peps/pull/2399\nCopied! python/peps#2399\n```\n\n<!-- [[[end]]] -->\n\n### Linkify a commit\n\n<!-- [[[cog\nrun(\"linky https://github.com/hugovk/cpython/commit/28b23555030d58fdb52b74a547cc621c49690de0\")\n]]] -->\n\n```console\n$ linky https://github.com/hugovk/cpython/commit/28b23555030d58fdb52b74a547cc621c49690de0\nCopied! hugovk/cpython#28b2355\n```\n\n<!-- [[[end]]] -->\n\n### Linkify a comment\n\n<!-- [[[cog\nrun(\"linky https://github.com/python/peps/pull/2399#issuecomment-1063409480\")\n]]] -->\n\n```console\n$ linky https://github.com/python/peps/pull/2399#issuecomment-1063409480\nCopied! python/peps#2399 (comment)\n```\n\n<!-- [[[end]]] -->\n\n### Formatting\n\n#### Markdown\n\n<!-- [[[cog\nrun(\"linky --md https://github.com/python/peps/pull/2399\")\n]]] -->\n\n```console\n$ linky --md https://github.com/python/peps/pull/2399\nCopied! [python/peps#2399](https://github.com/python/peps/pull/2399)\n```\n\n<!-- [[[end]]] -->\n\n#### reStructuredText\n\n<!-- [[[cog\nrun(\"linky --rst https://github.com/python/peps/pull/2399\")\n]]] -->\n\n```console\n$ linky --rst https://github.com/python/peps/pull/2399\nCopied! `python/peps#2399 <https://github.com/python/peps/pull/2399>`__\n```\n\n<!-- [[[end]]] -->\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CLI to format links",
"version": "0.2.0",
"project_urls": {
"Changelog": "https://github.com/hugovk/linkotron/releases",
"Homepage": "https://github.com/hugovk/linkotron",
"Source": "https://github.com/hugovk/linkotron"
},
"split_keywords": [
"link",
"markdown",
"md",
"restructuredtext",
"rst"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5015e474def6831ef2dc3146e729ea649f783e31e3a15390ac56d3e3b27f0226",
"md5": "f22e52d61e73beb1057089ea1943b6ed",
"sha256": "ff8842742950e8a83fd6c6af66caa2e5fa7bbe6f851634cdd3d16cc0e79d57b3"
},
"downloads": -1,
"filename": "linkotron-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f22e52d61e73beb1057089ea1943b6ed",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 5989,
"upload_time": "2024-01-30T16:09:51",
"upload_time_iso_8601": "2024-01-30T16:09:51.796151Z",
"url": "https://files.pythonhosted.org/packages/50/15/e474def6831ef2dc3146e729ea649f783e31e3a15390ac56d3e3b27f0226/linkotron-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b70a96c1a7ef136089a880406b270e233eef34aff196aa1c0457bb12afc1c3f1",
"md5": "a5e6334000c0d9d24919180187f04df0",
"sha256": "1c59b668607af539485c15544a9a244dfca08b75384b44920dd00f406a0bf970"
},
"downloads": -1,
"filename": "linkotron-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "a5e6334000c0d9d24919180187f04df0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 10062,
"upload_time": "2024-01-30T16:09:53",
"upload_time_iso_8601": "2024-01-30T16:09:53.612006Z",
"url": "https://files.pythonhosted.org/packages/b7/0a/96c1a7ef136089a880406b270e233eef34aff196aa1c0457bb12afc1c3f1/linkotron-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-30 16:09:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hugovk",
"github_project": "linkotron",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "linkotron"
}