{"id":20472122,"url":"https://github.com/f321x/untrack-rs","last_synced_at":"2025-04-13T11:10:26.275Z","repository":{"id":249867221,"uuid":"832717470","full_name":"f321x/untrack-rs","owner":"f321x","description":"Rust crate to parse and remove tracking tokens from URLs contained in arbitrary text input","archived":false,"fork":false,"pushed_at":"2024-07-28T11:43:18.000Z","size":13139,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T02:21:14.926Z","etag":null,"topics":["advertising","crate","links","nostr","parsing","privacy","rust","tracking","urls"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/untrack","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f321x.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-23T15:23:29.000Z","updated_at":"2024-09-20T04:26:59.000Z","dependencies_parsed_at":"2024-07-28T12:56:55.422Z","dependency_job_id":null,"html_url":"https://github.com/f321x/untrack-rs","commit_stats":null,"previous_names":["f321x/untrack-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f321x%2Funtrack-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f321x%2Funtrack-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f321x%2Funtrack-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f321x%2Funtrack-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f321x","download_url":"https://codeload.github.com/f321x/untrack-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703199,"owners_count":21148118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advertising","crate","links","nostr","parsing","privacy","rust","tracking","urls"],"created_at":"2024-11-15T14:18:37.937Z","updated_at":"2025-04-13T11:10:26.255Z","avatar_url":"https://github.com/f321x.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# untrack crate\nThis crate is intended to remove tracking tokens from URLs contained in any text input. The crate can either substitute the URLs in place or return a Vec of cleaned urls to a given text input.\n\n## Usecase\nRemoving tracking tokens can improve the privacy of the user sharing the link containing the tokens and the consumer opening the shared link.\n\n## Supported tracking tokens\nThe crate currently supports Twitter, X, YouTube, Instagram, Substack and Spotify tracking tokens. The exact tokens can be found in ```src/parsing_params.rs```.\n\n## Example usage\n\n### fn clean_urls_from_any_text(input: \u0026String) -\u003e Option\u003cVec\u003cString\u003e\u003e\n```\nlet input = \nString::from(\"Twitter link: https://twitter.com/user/status/123?utm_source=test\u0026s=1234\");\n\nlet expected = vec![\"https://twitter.com/user/status/123\".to_string()];\n\nassert_eq!(clean_urls_from_any_text(\u0026input), Some(expected));\n```\n\n### fn replace_urls_in_place(input: \u0026mut String) -\u003e Option\u003c\u0026mut String\u003e\n```\nlet mut input = String::from(\"Multiple URLs: https://twitter.com/user/status/123?s=12 and https://www.youtube.com/watch?v=abc\u0026feature=share\");\n\nlet result = replace_urls_in_place(\u0026mut input);\n\nassert!(result.is_some());\n\nassert_eq!(input, \"Multiple URLs: https://twitter.com/user/status/123 and https://www.youtube.com/watch?v=abc\");\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff321x%2Funtrack-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff321x%2Funtrack-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff321x%2Funtrack-rs/lists"}