Skip to content

Instantly share code, notes, and snippets.

View bachya's full-sized avatar

Aaron Bach bachya

View GitHub Profile
@bachya
bachya / Add File to Evernote.scpt
Created September 5, 2014 05:28
Simple Applescript to add a file to Evernote
tell application "Evernote"
activate
create note from file theFile notebook {"Personal Archive"} tags {"receipt/statement"}
end tell
(*
### SCRIPT NAME
Send nvALT Checkboxes to Omnifocus
### DESCRIPTION
Automatically scans nvALT files (via Hazel) and, upon finding "checkboxes,"
sends them to OmniFocus as tasks.
(*
### SCRIPT NAME
Add Emails to OmniFocus
### DESCRIPTION
A simple script aimed at working with "todo" emails. The script
accomplishes two things:
(*
### SCRIPT NAME
OmniFocus+
### DESCRIPTION
Allows for smarter task entry on OS X: if OmniFocus is running, use
Applescript to add the task; otherwise, use the user's Mail Drop
email address.
@bachya
bachya / Smart OmniFocus Entry.scpt
Created September 5, 2014 05:23
Smart Applescript that allows tasks to be entered into OmniFocus, even if it's not open
-- Determine whether OmniFocus is running.
tell application "System Events"
set omnifocusActive to count (every process whose name is "OmniFocus")
end tell
if omnifocusActive > 0 then
-- OmniFocus is running, so insert a task into it directly.
tell application "OmniFocus" to tell document 1
make new inbox task with properties {name:"TASK TITLE"}
end tell
@bachya
bachya / Save Files to Evernote.scpt
Created September 5, 2014 05:20
Smarter saving of files to Evernote (regardless of whether Evernote is open)
(*
### SCRIPT NAME
Save Files to Evernote (via Hazel)
### DESCRIPTION
Allows for smarter document creation on OS X: if Evernote is running, use
Applescript to add the document; otherwise, use the user's Evernote
email address.
@bachya
bachya / Dynamic Markdown Links from Chrome.scpt
Last active August 29, 2015 14:06
For use in TextExpander or aText. Grabs the current tab in Chrome and returns a Markdown link with the current title and URL.
@bachya
bachya / LCP Action Router.py
Last active August 29, 2015 14:06
Pythonista script to trigger different Launch Center Pro actions based on internet availability
# Pythonista script to trigger different Launch Center Pro
# actions based on internet availability
# Author: Aaron Bach
# www: http://www.bachyaproductions.com/
import json
import re
import socket
import sys
import urllib
@bachya
bachya / Update Grocery Stores.py
Last active October 28, 2016 18:24
Pythonista script to create a Launch Center Pro action related to Trello lists
# Pythonista script to create a Launch Center Pro action with all my
# updated grocery lists.
# Author: Aaron Bach
# www: http://www.bachyaproductions.com/
import json
import os
import sys
import urllib
import urllib2
@bachya
bachya / Email to OmniFocus (Drafts)
Created August 24, 2014 20:15
A Drafts email action to send a draft to OmniFocus via Mail Drop
drafts://x-callback-url/import_action?type=email&name=Email to OmniFocus&to=xxxxx.xxxxx@sync.omnigroup.com&cc=&bcc=&subjecttype=1&subject=&markdown=1&background=1&fromprefix=&template=[[body]]