Skip to content

Instantly share code, notes, and snippets.

@givens
Last active December 10, 2015 02:29
Show Gist options
  • Save givens/4367596 to your computer and use it in GitHub Desktop.
Save givens/4367596 to your computer and use it in GitHub Desktop.
The Python list, L, contains references to Text Expander snippets. These snippets are "tag lines" for my email. Using Text Expander, I reference the snippet with a few short keystrokes. When the code executes in Text Expander 4.0.3, it randomly selects one of the snippets. It pulls a random tag line into my email. In the future, I'd like to upda…
#!/usr/bin/env python
from __future__ import print_function
import random, sys
L = [",,spe", ",,ipe", ",,adp", ",,phd", ",,gg"]
l = "%snippet:"+random.choice(L)+"%"
print(l,end="",file=sys.stdout)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment