Titler Service

Turn urls into titled links

This is a System Service called Titler that complements the Markdown Service Tools. It does what it says on the label: finds URLs in selected text and adds titles to them based on the page title. It also adds Amazon and iTunes affiliate tokens, cleans out referrer junk, and has the ability to neatly truncate titles at word breaks and with proper closing punctuation based on a maximum length setting.

Download below, unzip, and double click the included Services (.workflow extension) to install.

The first time it runs, it will create a .titler file in your home directory. Edit this file to change the default behavior. Its format is identical to SearchLink, so if you use SearchLink, you can just copy the iTunes and Amazon settings over. If you don’t want affiliate links, just delete the contents of the keys for them. The settings are all documented in the config file.

Now just select text and containing some “naked” urls. Right click, choose a Titler service from the menu, and titles will be added in inline Markdown format.

Flavors

The regular Titler service. It finds all urls in the text. If they’re already inline Markdown links, it will replace the text in square brackets with the title, and the url in parenthesis with the cleaned up, affiliated url. If the link is part of a reference link, it leaves the id in square brackets alone, updates the URL, and appends the title to the end in quotes.

Extract Links will gather all the URLS in your selection and output them as a bulleted list with titles in inline Markdown format. URLs are affiliatized as needed and tracking junk is removed. Your selection is left alone and the results are put on your clipboard. It will notify you (on 10.9+) when it’s finished.

Affiliatize will skip finding titles and just replace any iTunes or Amazon links it finds with versions containing your affiliate tokens. All of the “affiliatization” removes existing affiliate tokens (yours or other’s) as part of the process, unless you have no affiliate tokens configured, in which case it will skip the process entirely.