git.fiddlerwoaroof.com
Browse code

modified: README.md modified: TodayScripts.h modified: TodayScripts.m

SamRothCA authored on 29/10/2014 05:26:18
Showing 3 changed files
... ...
@@ -0,0 +1,27 @@
1
+#Today Scripts
2
+
3
+A widget for running scripts in the Today View in OS X Yosemite's Notification Center.
4
+
5
+##Features
6
+
7
+* [Colorized Output](http://i.imgur.com/Yvj2ePG.png). Today Scripts supports colorized terminal output from your scripts, as well as bold and underline.
8
+* [Custom Labels](http://i.imgur.com/WJPWQN7.png). Today Scripts has a form for setting up scripts, which gives you the option of picking a label to display instead of the script itself.
9
+* Custom Interpreters: When setting up a script, you may specify any program to run in place of your shell. This means you can directly run scripts in Python, Perl, AppleScript, etcetera, simply by specifying their associated interpreter.
10
+* Manually Run Scripts: Scripts may be run on command by clicking on their label. You may also specify that scripts not be run automatically when Notification Center is opened.
11
+* Output text selection: You may highlight the output of your scripts, allowing you to copy it to the clipboard or drag it where you please.
12
+
13
+##Usage
14
+
15
+After building, simply copy "Today Scripts.app" wherever you'd like to store it, then open it. In Notification Center, you will see "1 New" appear on the edit button, and you may use that to add Today Scripts to your Tdoay View in order to begin using it.
16
+
17
+To begin editing your list of scripts, click the "Info" symbol in the title of the widget.
18
+
19
+To run a script on command, click its label in your list.
20
+
21
+To edit an existing script, click the "action" button to the right of its label.
22
+
23
+##Technical Details
24
+
25
+* An interpreter can be speficied using a path to any valid executable (it need not be an "interpreter" at all). The provided script is piped to the interpreter via its standard input.
26
+* Today Scripts emulates a 40-column terminal. When running a script, a pseudo-TTY is opened for it, and the standard output and standard error of it is set to that. The `COLUMNS` environment variable for scripts is set to `40`, and `PAGER` is set to `/bin/cat`.
27
+* Today Scripts supports all ANSI color sequences; both standard and bright, as well as both foreground and background. The `TERM` environment variable for scripts is set to `ansi`.
... ...
@@ -1,6 +1,6 @@
1 1
 //
2
-//  XPCHelper.h
3
-//  xpc
2
+//  TodayScripts.m
3
+//  Today Scripts
4 4
 //
5 5
 //  Created by Sam Rothenberg on 8/10/14.
6 6
 //  Copyright (c) 2014 Sam Rothenberg. All rights reserved.
... ...
@@ -1,5 +1,5 @@
1 1
 //
2
-//  ScriptsArray.m
2
+//  TodayScripts.m
3 3
 //  Today Scripts
4 4
 //
5 5
 //  Created by Sam Rothenberg on 8/14/14.