This file contains hidden or 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
#!/usr/bin/perl | |
# Given an Apple News URL, prints the original URL for the story. | |
# | |
# Usage: | |
# % AppleNewsURLRedirect.pl 'https://apple.news/Ae78KIEmMOHCVXD4VA7ysKw' | |
# or | |
# % echo 'https://apple.news/Ae78KIEmMOHCVXD4VA7ysKw' | AppleNewsURLRedirect.pl | |
# | |
# Author: John Gruber <https://daringfireball.net/> |
This file contains hidden or 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
(* | |
Moves selected messages into an archive folder. I use FastScripts to bind this to Shift-Cmd-A. | |
For Gmail accounts, moves messages into "[Gmail]/All Mail"; for all other accounts, looks for a mailbox named "Archive". | |
Tested with Mail 4.5 (Mac OS X 10.6 Snow Leopard). | |
*) | |
tell application "Mail" | |
tell front message viewer |