Skip to main content

short url based on too.st

Project description

too-short-url

pytestpythonCode style: blackLicense: MITPyPI version

shorturl based on too.st

Install it

pip install too-short-url

# or pip install git+https://github.com/ffreemt/too-short-url
# or clone the repo and

Use it

Command line

too-st http://baid.com
# too.st/b

With in python

from too_short_url import too_st

print(too_st("http://baidu.com"))
# too.st/b

Docs

too-st --help

Usage: too-st [OPTIONS] URL

  Generate too.st short url.

  e.g.

  * too-st baidu.com  # https://too.st/b

  * too-st baidu.com -k abc  # https://too.st/b

  * too-st baidu.com -k abc -b  # https://too.st/abc or https://too.st/b
  dependent on whether https://too.st/abc is already taken or reserved by th
  admin of too.st.

Arguments:
  URL  url to be shortened  [required]

Options:
  -k, --keyword, --kw KEYWORD     desired keyword, e.g. https://too.st/abc for
                                  KEYWORD set to abc
  -b, --best-effort, --besteffort
                                  whether to try hard to generaet the desired
                                  shorturl https://too.st/KEYWORD
  -v, -V, --version               Show version info and exit.
  --help                          Show this message and exit.

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

too-short-url-0.1.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

too_short_url-0.1.0-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page