Python CLI for the Polr link shortener
- Free software: MIT license
- Documentation: https://polr.readthedocs.io.
- TODO
polr [OPTIONS] COMMAND [ARGS]...
Commands for using the Go link shortening service.
Options:
--help
: Show this message and exit.
Commands:
exists
: Check to see if a link with the given ending already exists.shorten
: Shorten a link with the option to give it a custom ending.
Usage:
polr shorten [OPTIONS] URL
Shorten a link with the option to give it a custom ending. Checks to see
if a link with the given ending exists. Can be configured to fail if it
already exists with [-f|--fail]
.
polr shorten URL [(-e|--ending=)ending] [(-f|--fail)]`
Examples:
# Use default ending $ polr shorten https://example.com http://polr.example.com/ad14gfwe # Use custom ending, if ending already exists don't return error, return link with that ending. polr shorten https://example.com -e my-custom-ending http://polr.example.com/my-custom-ending # Use custom ending, return error if it already exists. polr shorten https://example.com -e my-custom-ending -f ERROR: link with ending my-custom-ending already exists echo "$?" 1
Options:
-e, --ending TEXT
A custom ending for the shortened link.-f, --fail
Return an error if a link with the desired custom ending already exists--help
Show this message and exit.
#### exists
Usage:
polr exists [OPTIONS] ENDING
Check to see if a link with the given ending already exists. Exits with status code 1 if it exists
Examples:
# Doesn't exist
$ polr exists my-new-ending
False
$ echo "$?"
0
# Exists
$ polr exists my-existing-ending
True
$ echo "$?"
1
Options:
--help
: Show this message and exit.
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.