Last active
November 15, 2022 01:32
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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