https://github.com/hugovk/linkotron
CLI to format GitHub links in a shorter format
https://github.com/hugovk/linkotron
cli command-line formatter github hacktoberfest link links
Last synced: about 1 year ago
JSON representation
CLI to format GitHub links in a shorter format
- Host: GitHub
- URL: https://github.com/hugovk/linkotron
- Owner: hugovk
- License: mit
- Created: 2023-07-01T05:16:38.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-07T20:21:07.000Z (about 1 year ago)
- Last Synced: 2025-04-07T21:28:25.127Z (about 1 year ago)
- Topics: cli, command-line, formatter, github, hacktoberfest, link, links
- Language: Python
- Homepage: https://pypi.org/project/linkotron/
- Size: 780 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# linkotron
[](https://pypi.org/project/linkotron/)
[](https://pypi.org/project/linkotron/)
[](https://pypistats.org/packages/linkotron)
[](https://github.com/hugovk/linkotron/actions)
[](https://codecov.io/gh/hugovk/linkotron)
[](LICENSE.txt)
[](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.
```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
```
### Linkify a repo
```console
$ linky https://github.com/python/peps
Copied! python/peps
```
### Linkify an issue
```console
$ linky https://github.com/python/peps/issues/1012
Copied! python/peps#1012
```
### Linkify a pull request
```console
$ linky https://github.com/python/peps/pull/2399
Copied! python/peps#2399
```
### Linkify a commit
```console
$ linky https://github.com/hugovk/cpython/commit/28b23555030d58fdb52b74a547cc621c49690de0
Copied! hugovk/cpython#28b2355
```
### Linkify a comment
```console
$ linky https://github.com/python/peps/pull/2399#issuecomment-1063409480
Copied! python/peps#2399 (comment)
```
### Formatting
#### Markdown
```console
$ linky --md https://github.com/python/peps/pull/2399
Copied! [python/peps#2399](https://github.com/python/peps/pull/2399)
```
#### reStructuredText
```console
$ linky --rst https://github.com/python/peps/pull/2399
Copied! `python/peps#2399 `__
```