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.
Install using nimble
:
nimble install --accept 'unalix'
Note: Unalix requires Nim 1.4.0 or higher.
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/#-Pop-Up"
let result: string = unshortUrl(url = url)
assert result == "https://bitly.com/pages/#"
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.
You can get prebuilt static executables of the CLI tool for Linux and Android here.
If you have discovered a bug in this library and know how to fix it, fork this repository and open a Pull Request.
Unalix includes some third party software in its codebase. See them below:
-
ClearURLs
- Author: Kevin Röbert
- Repository: ClearURLs/Rules
- License: GNU Lesser General Public License v3.0
-
Requests
- Author: Kenneth Reitz
- Repository: psf/requests
- License: Apache v2.0
-
libandroid-glob
- Author: Many authors
- Repository: termux/termux-packages
- License: BSD 3-Clause