Telegram bot to fix social media link previews
Find a file
GitHub Actions 42361fe69c
Some checks are pending
Check Rust code / check (push) Waiting to run
flake.lock: Update
Flake lock file updates:

• Updated input 'advisory-db':
    'github:rustsec/advisory-db/fb0d06e8e2cc04c9aa359e51ffa0a09e3bf58822?narHash=sha256-cDl1Qf/bTILEwq6DzMaTsrv6gWYZ47TO4sy7%2BNOA8Ok%3D' (2025-09-22)
  → 'github:rustsec/advisory-db/ce9208c0021cd8a6b66ff4b345171e8eedd0441c?narHash=sha256-czXIV7Yxo4MlBnItk0h6nomIcgUbq0qmOa8a7/fzKjI%3D' (2025-10-03)
• Updated input 'crane':
    'github:ipetkov/crane/95d528a5f54eaba0d12102249ce42f4d01f4e364?narHash=sha256-NU5WaEdfwF6i8faJ2Yh%2BjcK9vVFrofLcwlD/mP65JrI%3D' (2025-09-25)
  → 'github:ipetkov/crane/c5b48a59ccd5179ea626f47b05d2828c37fb31b7?narHash=sha256-uU6Dq5OUgI9pEiMDwZZhvsoxYD%2B36xKIkYyFXDr//6A%3D' (2025-10-03)
• Updated input 'fenix':
    'github:nix-community/fenix/73494b26b031328fd959e7a3da0f9fdc8957d86c?narHash=sha256-YYIsyGsTiQ2aKoEmYaqRqe44yE3TjpzirR35Cqj50LU%3D' (2025-09-27)
  → 'github:nix-community/fenix/6ffcbf59c119b0c6384c7d98f18cea06a9af7e9c?narHash=sha256-J/rtMKVUAEqOFj0ogvcHKK8HbaKhw%2BtiNrDOpEM%2BZDY%3D' (2025-10-04)
• Updated input 'fenix/rust-analyzer-src':
    'github:rust-lang/rust-analyzer/f5e049d09dc17d0b61de2ec179b3607cf1e431b2?narHash=sha256-wxOmbk6MH6qgvShZUrD7pJnM7m2lFaoBeVJjVoNeVT8%3D' (2025-09-26)
  → 'github:rust-lang/rust-analyzer/472037b789cf593172d6adf3b8d9f7a429f6cd9b?narHash=sha256-7StxDed3v2fAWLkl%2BHse9FlpjT7Dk7Cn/4vxTFyEhIg%3D' (2025-10-01)
• Updated input 'nixpkgs':
    'github:msfjarvis/nixpkgs/62bff86ad77ecfc40cb33c001c81060f6f4e06dc?narHash=sha256-bpZ0T0H8nfokb5LXtjkFqgg/sYzNW1cbAqr1IDtc9%2BA%3D' (2025-09-28)
  → 'github:msfjarvis/nixpkgs/8fc31f4ee3e01ac8c3a9d055bc6e18ef5466f1d6?narHash=sha256-L4WsSMA3bQSowHOrxPNwrm0eCb08DfmezrwwE/S7R4M%3D' (2025-10-05)
2025-10-05 00:50:19 +00:00
.github chore(deps): update cachix/install-nix-action digest to 9280e7a 2025-10-02 16:31:21 +00:00
src refactor(instagram): use instagramez.com 2025-08-18 09:34:18 +05:30
.env.sample Revert "feat: wire up inputs for a persistent volume" 2024-12-30 18:20:43 +05:30
.envrc chore: add .envrc 2024-09-23 18:22:00 +05:30
.git-blame-ignore-revs chore: add reformat to git-blame-ignore-revs 2024-12-17 00:44:56 +05:30
.gitignore Revert "feat: wire up inputs for a persistent volume" 2024-12-30 18:20:43 +05:30
Cargo.lock fix(deps): update rust crate regex to v1.11.3 2025-09-25 13:13:09 +00:00
Cargo.toml chore(release): bump linkleaner to version 2.8.1 2025-08-18 09:48:21 +05:30
CHANGELOG.md chore(release): bump linkleaner to version 2.8.1 2025-08-18 09:48:21 +05:30
cliff.toml chore(release): add automatic changelog 2025-03-01 21:26:28 +05:30
default.nix chore: reformat all files with nixfmt-rfc-style 2024-12-17 00:44:42 +05:30
flake.lock flake.lock: Update 2025-10-05 00:50:19 +00:00
flake.nix fix(build): upgrade to Rust 1.89.0 2025-09-14 21:58:03 +05:30
fly.toml refactor(build): only deploy images to ghcr.io 2025-03-23 01:02:29 +05:30
LICENSE-APACHE License under MIT/ASL 2.0 2020-02-20 23:23:05 +05:30
LICENSE-MIT Fix license text 2020-03-11 23:47:31 +05:30
README.md refactor(instagram): use instagramez.com 2025-08-18 09:34:18 +05:30
release.toml chore(release): update changelog before release 2025-03-02 00:13:25 +05:30
rust-toolchain.toml fix(build): upgrade to Rust 1.89.0 2025-09-14 21:58:03 +05:30
shell.nix chore: reformat all files with nixfmt-rfc-style 2024-12-17 00:44:42 +05:30

linkleaner No Maintenance Intended

Telegram bot to replace social media links with their improved preview variants. The mapping of supported link types to what services are used to "fix" these links is given below.

Link type Fix mechanism
Accelerated Mobile Pages (AMP) AmputatorBot
Instagram instagramez (embedez)
Medium LibMedium
Reddit FxReddit
TikTok fxTikTok
Twitter / X TweetFix
YouTube Shorts Rewrite URL to normal YouTube player

Development

There are no external dependencies other than a nightly Rust compiler.

I personally use Nix to manage my development environment, but the repository also contains a rust-toolchain.toml for use with Rustup containing the exact version of Rust nightly the project is tested with.

Deployment

My personal copy of linkleaner is hosted on fly.io and the release workflow is designed to facilitate that.

To get set up, refer to the environment variables defined in the .env.sample file and set them on fly.io itself with the real values.

The bundled fly.toml is not a template and refers to my own deployment, make sure to swap out app for your own unique name. You can keep the image the same if you wish to keep in sync with upstream releases, or push your own Docker image.

Docker

The release CI pushes the ghcr.io/msfjarvis/linkleaner:latest image to GitHub Container Registry which can be pulled periodically for the latest code. You can run this image directly with the environment variables from .env.sample since it has a configured entrypoint.