Alfred workflow to shorten URLs by using YOURLS + some extras
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
icon.png
icons.php
info.plist
workflows.php
yourls_delete.php
yourls_shorten.php
yourls_shorten_input.php
yourls_stats.php

README.md

YOURLS

An Alfred 3 workflow to shorten URLs by using YOURLS + some extras

Requirements

YOURLS (Your Own URL Shortener) is a self hosted URL shortener and must be installed: http://yourls.org

Setup

  1. Use the keyword yourlsendpoint to set the API endpoint of your YOURLS server. E.g. http://yourserver.com/yourls-api.php

  2. Use the keyword yourlstoken to set your signature token. This token is used instead of your username and password. It can be found in the Tools section of your YOURLS admin website.

Shorten an URL

Use the keyword shorten and enter the URL to shorten. The shortened URL gets copied to the clipboard. You can also use a hotkey trigger (I've set it to ctl+option+cmd+y) which shortens the current text selection.

Shorten an URL and use a keyword

You can set a keyword by separating it with the * character from the URL.

Usage: <keyword>*<url>

Example: microsoft*http://www.microsoft.com will create a short URL like http://yourserver.com/microsoft

Statistics

The keyword yourlsstats displays the last 100 shortened URLs with their click counts.

There are some actions you can perform on the results:

  • return key: Copies the shortened URL to the clipboard
  • option/alt + return key: Opens the shortened URL in your default browser
  • cmd + return key: Deletes the shortened URL (see hint below)
  • space key + text: To filter the results. It searches in the shortened URL, original URL and the title for your entered text

Hint to get delete short URL working

The following API plugin must be installed on your YOURLS server: yourls-api-delete