Skip to main content

Really simple static website URL shortener

Project description

sus is a static site based URL shortener. Simple idea: generate a static site with a bunch of redirect-slug-goes-here/index.html files with nothing but an HTML redirect in them.

https://github.com/nkantar/sus/workflows/Automated%20Checks/badge.svg

Installation

pip install sus

Usage

  1. Install package

  2. Have an input file ready

  3. Run sus in the same directory as input

  4. Voilà—your results are in the output/ directory

Input

sus expects to find a file named input in the current directory, and each row consists of the redirect slug and destination URL, separated by a pipe (|).

E.g.,

nk|https://nkantar.com
sus|https://github.com/nkantar/sus

If I were serve the output/ on https://sus-example.nkantar.com, then https://sus-example.nkantar.com/nk would redirect to https://nkantar.com and https://sus-example.nkantar.com/sus would redirect to https://github.com/nkantar/sus.

Note: That example site exists, and its repository can be found at https://github.com/nkantar/sus-example.nkantar.com.

Development

The project by default uses Poetry, and make install should get you up and running with all the dev dependencies. After that see other make commands for convenience. They correspond to CI checks required for changes to be merged in.

The main branch is the bleeding edge version. Git tags correspond to releases.

Contributing Guidelines

Contributions of all sorts are welcome, be they bug reports, patches, or even just feedback. Creating a new issue or pull request is probably the best way to get started.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

This project is licensed under the MIT license. See 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

sus-1.0.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

sus-1.0.0-py3-none-any.whl (6.2 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