{"id":18258118,"url":"https://github.com/sidneys/shorten-anonymize-url","last_synced_at":"2025-04-08T22:47:19.997Z","repository":{"id":57358760,"uuid":"92495045","full_name":"sidneys/shorten-anonymize-url","owner":"sidneys","description":"Shorten and anonymize (derefer) URLs at the same time. Supports Commandline and programmatic usage. Enables right-click URL shortening on macOS via Automator.","archived":false,"fork":false,"pushed_at":"2017-06-22T20:39:51.000Z","size":1071,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T21:17:52.017Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/sidneys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-26T09:29:32.000Z","updated_at":"2017-05-26T09:30:29.000Z","dependencies_parsed_at":"2022-09-06T22:21:43.649Z","dependency_job_id":null,"html_url":"https://github.com/sidneys/shorten-anonymize-url","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Fshorten-anonymize-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Fshorten-anonymize-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Fshorten-anonymize-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Fshorten-anonymize-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sidneys","download_url":"https://codeload.github.com/sidneys/shorten-anonymize-url/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247941719,"owners_count":21022037,"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":[],"created_at":"2024-11-05T10:29:08.050Z","updated_at":"2025-04-08T22:47:19.974Z","avatar_url":"https://github.com/sidneys.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shorten-anonymize-url [![Beta](https://img.shields.io/badge/status-beta-red.svg?style=flat)]() [![npm](https://img.shields.io/npm/v/shorten-anonymize-url.svg?style=flat-square)](https://npmjs.com/package/shorten-anonymize-url) [![dependencies](https://img.shields.io/david/sidneys/shorten-anonymize-url.svg?style=flat-square)](https://npmjs.com/package/shorten-anonymize-url) [![devDependencies](https://img.shields.io/david/dev/sidneys/shorten-anonymize-url.svg?style=flat-square)](https://npmjs.com/package/desktop-dimmer)\n\n------\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eShorten and anonymize (\u003ca href=\"https://en.wikipedia.org/wiki/URL_redirection#Removing_referer_information\"\u003ederefer\u003c/a\u003e)\u003c/b\u003e URLs at the same time.\u003cbr\u003e\n   Supports Commandline and programmatic usage.\u003cbr\u003e\n  Uses \u003ca href=\"https://goo.gl\"\u003egoo.gl\u003c/a\u003e, \u003ca href=\"https://bit.ly\"\u003ebit.ly\u003c/a\u003e and \u003ca href=\"https://dereferer.me\"\u003edereferer.me\u003c/a\u003e under the hood.\u003cbr\u003e\u003cbr\u003e\n  \u003cb\u003eEnables right-click URL shortening on macOS.\u003c/b\u003e\u003cbr\u003e\n  Includes the required \u003ca href=\"https://en.wikipedia.org/wiki/List_of_macOS_components#Automator\"\u003eAutomator Service\u003c/a\u003e and installation toolset.\u003cbr\u003e\u003cbr\u003e\n  Available for macOS, Windows and Linux.\n\u003c/p\u003e\n\n------\n\n\n## Contents\n\n1. [Commandline Usage](#commandline_usage)\n1. ['Right-Click' URL Shortener (macOS)](#right-click_url_shortener_(macos))\n1. [Programmatic Usage](#programmatic_usage)\n1. [Platform Support](#platform_support)\n1. [Roadmap](#roadmap)\n1. [Contribute](#contribute)\n1. [Author](#author)\n\n\n## \u003ca name=\"commandline_usage\"/\u003e\u003c/a\u003e Commandline Usage\n\n### Installation\n\n```bash\n$ npm install --global shorten-anonymize-url\n```\n\n### Usage\n\n```bash\n$ shorten-anonymize-url \"\u003curl\u003e\"\n```\n\n⚠️ Enclose URLs in quotes to handle special characters like as question marks ⚠️\n\n### Show Help and Options\n\n```bash\n$ shorten-anonymize-url --help\n```\n\n### Example\n\n```bash\n$ shorten-anonymize-url \"https://www.google.de/?gfe_rd=cr\u0026ei=WDE4We-3BcfPXr7dpdgH\u0026gws_rd=ssl\"\n\u003e\u003e http://bit.ly/2sglJKg\n```\n\n\n## \u003ca name=\"right-click_url_shortener_(macos)\"/\u003e\u003c/a\u003e Right-Click URL Shortener (macOS only)\n\n![screenshot-macos](./resources/screenshots/screenshot-macos-1.png)\n\n\nThe module includes a global [Service](https://www.macosxautomation.com/services/) for macOS [Automator](https://en.wikipedia.org/wiki/List_of_macOS_components#Automator), as well as an automated installation and uninstallation routine.\n\n### Features\n\nThe global shortener service does the following:\n\n 1. It takes any marked url within macOS,\n 1. shortens and anonymizes it,\n 1. copies the resulting shortened and anonymized URL to the macOS clipboard.\n\nThis enables global url shortening and anonymizing.\n\n### Compatibility\n\nThe global nature of macOS Services makes this module available to nearly all macOS apps, such as [Safari](https://www.apple.com/safari/), [Finder](https://en.wikipedia.org/wiki/Finder_(software)), [Google Chrome](https://www.google.de/chrome/browser/desktop/) or [Microsoft Office for Mac](https://products.office.com/en-us/mac/microsoft-office-for-mac).\n\n### Requirements for the macOS Service\n\nInstall [the commandline module](#commandline-use).\n\n### Install the macOS Service\n\nRun the commandline module with the **\u0010\u0010--service-install** argument:\n\n```bash\n$ shorten-anonymize-url --service-install\n```\n\n### Uninstall the macOS Service\n\nRun the commandline module with the **\u0010\u0010--service-uninstall** argument:\n\n```bash\n$ shorten-anonymize-url --service-uninstall\n```\n\n### Use the macOS Service\n\n1. Mark any URL (or any text),\n1. right-click,\n1. open the 'Services' menu,\n1. Click 'shorten-anonymize-url'\n\nThe clipboard now contains the shortened and anonymized URL.\n\n## \u003ca name=\"programmatic_usage\"/\u003e\u003c/a\u003e Programmatic Usage\n\n### Installation\n\n```bash\n$ npm install --save shorten-anonymize-url\n```\n\n### API\n\nThe module returns a `Function` which takes 3 arguments and returns a `Promise`:\n\n```js\nconst shortenAnonymizeUrl = require('shorten-anonymize-url')\nshortenAnonymizeUrl(url, bitlyKey, googlKey)\n.then((shorturl) =\u003e {\n    console.log(shorturl);\n})\n```\n\n - **url** *String* - Bundle identifier for the callback function\n - **bitlyKey** [optional] *String* - bit.ly API key\n - **googlKey** [optional] *String* - goo.gl API key\n\nThe `Promise` resolves with:\n\n - **shorturl** *String* - **Shortened anonymised bit.ly url**\n\n### Example\n\n```js\nconst shortenAnonymizeUrl = require('shorten-anonymize-url')\nshortenAnonymizeUrl('reddit.com')\n.then((url) =\u003e {\n    console.log(url);\n    // http://bit.ly/2qWTDzM\n})\n.catch((err) =\u003e {\n    console.error(err);\n})\n```\n\n\n## \u003ca name=\"platform_support\"/\u003e\u003c/a\u003e Platform Support\n\nTested on:\n\n- macOS Sierra\n- Windows 10 Anniversary\n- Ubuntu 17.10\n\nGlobal 'Right-Click' url shortening only supported on macOS for now.\n\n\n## \u003ca name=\"roadmap\"/\u003e\u003c/a\u003e Roadmap ![img](https://img.shields.io/badge/proposals-welcome-green.svg?style=flat)\n\n- [ ] Global Right-Click URL shortening for Windows + Linux\n- [ ] CI-based automated Testing\n\n\n## \u003ca name=\"contribute\"/\u003e\u003c/a\u003e Contribute ![Contribute](https://img.shields.io/badge/contributions-wanted-red.svg?style=flat-square)\n\nRead the [contribution documentation](https://github.com/sidneys/shorten-anonymize-url/blob/release/CONTRIBUTING.md) first.\n\n- [Dev Chat](http://gitter.im/sidneys/shorten-anonymize-url): Talk about features and suggestions.\n- [Issues](http;//github.com/sidneys/shorten-anonymize-url/issues) File bugs and document issues.\n\n\n## \u003ca name=\"author\"/\u003e\u003c/a\u003e Author\n\n[sidneys](http://sidneys.github.io) 2017\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidneys%2Fshorten-anonymize-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidneys%2Fshorten-anonymize-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidneys%2Fshorten-anonymize-url/lists"}