Skip to main content

A simple tool to customize links.

Project description

LinkMod: The Ultimate Command-Line URL Tool

LinkMod is a powerful and flexible command-line tool that enhances your URL management workflow. It offers two primary functionalities:

  1. Bitly URL Shortening: Quickly shorten long URLs using the Bitly API.
  2. Custom Link Naming: Create memorable, custom-named links in the format custom-name@your-link.com.

When you provide a long URL and a custom name, LinkMod will first shorten the URL with Bitly (if an API key is available) and then create a custom link with the shortened URL.

Features

  • Seamless Bitly Integration: Shorten URLs with a single command.
  • Secure API Key Storage: Your Bitly API key is stored securely in your system's native credential manager using the keyring library.
  • Cross-Platform: Works on Windows, macOS, and Linux.
  • User-Friendly Prompts: The tool guides you through setting up your Bitly API key for the first time.
  • Flexible Usage: Use either the URL shortening, the custom link naming, or both combined.

Installation

You can install LinkMod using pip:

pip install .

This will install the package and all its dependencies (requests and keyring).

Usage

LinkMod's functionality changes based on the number of arguments you provide.

1. Shorten a URL with Bitly

To shorten a long URL, simply provide it as a single argument:

linkMod {long_url}

Example:

linkMod https://www.github.com/Rishi-Bhati/linkmod

Output:

Short link: https://bit.ly/xxxxxxx

2. Create a Custom Link (with optional Bitly shortening)

To create a custom-named link, provide the original URL and your desired custom name:

linkMod {long_url} {custom_name}

Example:

linkMod https://www.github.com/Rishi-Bhati/linkmod my-repo

Output:

Checking for Bitly API key...
Bitly API key found. Shortening link...
Link shortened successfully.
my-repo@bit.ly/xxxxxxx

If no Bitly API key is found, the tool will use the original link:

Checking for Bitly API key...
Bitly API key not found. Using original link.
my-repo@www.github.com/Rishi-Bhati/linkmod

Setting Up Your Bitly API Key

The first time you use a feature that requires a Bitly API key, the tool will prompt you to add one:

Bitly API key not found. Would you like to add one? (y/n):

If you select y, you will be prompted to enter your API key. It will then be securely stored for all future uses.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

linkmod-1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

linkmod-1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file linkmod-1.0.tar.gz.

File metadata

  • Download URL: linkmod-1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for linkmod-1.0.tar.gz
Algorithm Hash digest
SHA256 891f474b6556859e20fbd45ff3fa74bb8b6ef8e88303f5d91281d3f9a8c6651f
MD5 25a1b89697da4ed9e2cffc41f94779ef
BLAKE2b-256 92ec3ebc256bc08d11943f8737f0e01b26dea1ce1bce0e981fd54720248653fe

See more details on using hashes here.

File details

Details for the file linkmod-1.0-py3-none-any.whl.

File metadata

  • Download URL: linkmod-1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for linkmod-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52291ed4d4ea4d16f43d9e6dbb592001ee1b7cdba8f70bc9a6ef2207085c2826
MD5 22ace94b6218d8b5cdb3d4106014fdf5
BLAKE2b-256 e308e8e9431a16261e24fdc5026a45cbf49e838f228b98fa251f265811ceaee3

See more details on using hashes here.

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