With some effort (the clipboard handling is a pig) I have managed to produce a version of the Markdown snippet written in Swift. Why? Because I can. :-)

#!/usr/bin/env swift
import AppKit

let thePasteboard = NSPasteboard.generalPasteboard()
let stringClass = NSClassFromString("NSString")
let pasteboardContents = thePasteboard.readObjectsForClasses([stringClass!], options: [:])

if let theContent = pasteboardContents {
let theText = theContent[0] as! String
if let theURL = NSURL(string: theText) {
print("[\(theURL.host!)/...](\(theURL.standardizedURL!))", terminator: "")
}
}