Novo branch de fluxo git do URL da placa Trello

Eu gosto de nomear meus branches de recursos do git-flow após a placa Trello associada. Quando eu copio um URL do trello para a área de transferência (por exemplo, https://trello.com/c/AbcDEfG/name-of-card) e digito gffsno prompt, o TextExpander substitui o texto por:

$ git flow feature start AbcDEfG/name-of-card

Para fazer isso, defino um snippet TextExpander que contém o seguinte script:

#!/usr/bin/env python

import richxerox
import re
import subprocess
import sys

url
= richxerox.paste()
x
= re.match('https://trello.com/c/(.*)', url)
if x is not None:
sys
.stdout.write("git flow feature start {}".format(x.group(1)))
else:
subprocess
.call(["/usr/bin/say", "Clipboard does not contain a Trello card url"])
#%-