URL Shortener using s.lain.la API.
Project description
lain.la-link-shortener
URL Shortener using s.lain.la API.
Installation
Via PyPI (Recommended)
# Basic installation
pip install lain-shorten
# With clipboard support (recommended for desktop)
pip install lain-shorten[default]
From Source (Development)
git clone git@github.com:NecRaul/lain.la-link-shortener.git
cd lain-la-link-shortener
pip install -e .[dev]
Usage
Simply provide a URL. The tool automatically handles protocol validation and formatting.
# Standard usage
lain-shorten https://kuroneko.dev
# Protocol-less (automatically prepends https://)
lain-shorten kuroneko.dev
Dependencies
Optional
- pyperclip - copy the shortened URL to the clipboard. (optional)
How it works
The s.lain.la service allows shortening URLs via a POST request. This tool automates the process to avoid typing long curl strings:
The Manual Way
curl -X POST -d 'url=https://kuroneko.dev' https://s.lain.la
The lain-shorten way
- Validation: Uses
urllib3to ensure the URL is formatted correctly. - Normalization: Automatically adds
https://if missing. - API Request: Sends the
POSTrequest viarequests. - Clipboard (Optional): If
pyperclipis installed, the result is instantly copied to your clipboard.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lain_shorten-1.14.tar.gz.
File metadata
- Download URL: lain_shorten-1.14.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04b52df4b0add9ca7df862b9614c78afdcf5cc33fa3b7cec1417ca68aba857b2
|
|
| MD5 |
8b93384e577fc00261fa3bb933f69a92
|
|
| BLAKE2b-256 |
887d93bf57c2388522911cf4b30cc1c952dee44489a08559c19a8390e6f1448f
|
Provenance
The following attestation bundles were made for lain_shorten-1.14.tar.gz:
Publisher:
publish.yml on NecRaul/lain.la-link-shortener
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lain_shorten-1.14.tar.gz -
Subject digest:
04b52df4b0add9ca7df862b9614c78afdcf5cc33fa3b7cec1417ca68aba857b2 - Sigstore transparency entry: 790856134
- Sigstore integration time:
-
Permalink:
NecRaul/lain.la-link-shortener@35e1361e381f4cafa9d3fcfc87c669115098f16b -
Branch / Tag:
refs/heads/release - Owner: https://github.com/NecRaul
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@35e1361e381f4cafa9d3fcfc87c669115098f16b -
Trigger Event:
push
-
Statement type:
File details
Details for the file lain_shorten-1.14-py3-none-any.whl.
File metadata
- Download URL: lain_shorten-1.14-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
279d1cf830c7f0152925591dbccd0a19cc30a126afe37b41bb0e18af4eb9fedf
|
|
| MD5 |
bf3c81a2feaf3f5544e0d70dec6ee41c
|
|
| BLAKE2b-256 |
b189a862fd8ac7b096299f356a46aecaebd20faa8440add9788d86f6869144a2
|
Provenance
The following attestation bundles were made for lain_shorten-1.14-py3-none-any.whl:
Publisher:
publish.yml on NecRaul/lain.la-link-shortener
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lain_shorten-1.14-py3-none-any.whl -
Subject digest:
279d1cf830c7f0152925591dbccd0a19cc30a126afe37b41bb0e18af4eb9fedf - Sigstore transparency entry: 790856146
- Sigstore integration time:
-
Permalink:
NecRaul/lain.la-link-shortener@35e1361e381f4cafa9d3fcfc87c669115098f16b -
Branch / Tag:
refs/heads/release - Owner: https://github.com/NecRaul
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@35e1361e381f4cafa9d3fcfc87c669115098f16b -
Trigger Event:
push
-
Statement type: