Small, dependency-free, fast Nim package and CLI tool for removing tracking fields from URLs.
Find a file
2022-03-02 17:33:59 -03:00
.github/workflows Revert "Drop support for Nim 1.4" 2022-03-02 16:03:27 -03:00
external Update CA bundle 2022-02-18 17:40:25 -03:00
src Minor changes 2022-03-02 17:33:59 -03:00
tests Code refactoring 2022-01-22 16:56:06 -03:00
.gitignore Update .gitignore 2021-11-28 16:45:06 -03:00
config.nims Minor refactoring 2021-11-28 16:34:28 -03:00
LICENSE create readme and add license 2020-10-17 22:10:15 -03:00
README.md Revert "Drop support for Nim 1.4" 2022-03-02 16:03:27 -03:00
unalix.nimble Revert "Drop support for Nim 1.4" 2022-03-02 16:03:27 -03:00

Unalix

Unalix is a library and CLI tool written in Nim, it implements the specification used by the ClearURLs addon for removing tracking fields from URLs.

Installation

Install using nimble:

nimble install --accept 'unalix'

Note: Unalix requires Nim 1.4.0 or higher.

Usage:

Removing tracking fields:

import unalix

const url: string = "https://deezer.com/track/891177062?utm_source=deezer"
let result: string = clearUrl(url = url)

assert result == "https://deezer.com/track/891177062"

Resolving shortened URL:

import unalix

const url: string = "https://bitly.is/Pricing-Pop-Up"
let result: string = unshortUrl(url = url)

assert result == "https://bitly.com/pages/pricing"

Tip: The unshortUrl() proc will strip tracking fields from any URL before following a redirect, so you don't need to manually call clearUrl() for it's return value.

Downloads

You can get prebuilt static executables of the CLI tool for Linux and Android here.

Contributing

If you have discovered a bug in this library and know how to fix it, fork this repository and open a Pull Request.

Third party software

Unalix includes some third party software in its codebase. See them below: