Skip to content

Instantly share code, notes, and snippets.

@SKaplanOfficial
Last active November 15, 2022 01:32
Show Gist options
  • Save SKaplanOfficial/dbe7d57eb6fe1a40e4c4f047d1b1b253 to your computer and use it in GitHub Desktop.
Save SKaplanOfficial/dbe7d57eb6fe1a40e4c4f047d1b1b253 to your computer and use it in GitHub Desktop.
Using PyXA to prepend a date at the beginning of every currently open TextEdit document
# Tested with PyXA 0.1.0
import PyXA
app = PyXA.Application("TextEdit")
documents = app.documents()
date = datetime.now()
documents.prepend(str(date) + "\n\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment