Skip to content

Instantly share code, notes, and snippets.

@jhamrick
Created April 15, 2013 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhamrick/5392294 to your computer and use it in GitHub Desktop.
Save jhamrick/5392294 to your computer and use it in GitHub Desktop.
omnigraffle-export: look for OmniGraffle Professional 5 if OmniGraffle 5 does not exist
From 1ebff43a47eea78643a903d85b13c91eb94d1e76 Mon Sep 17 00:00:00 2001
From: "Jessica B. Hamrick" <jhamrick@berkeley.edu>
Date: Mon, 15 Apr 2013 16:51:38 -0700
Subject: [PATCH] Look for OmniGraffle Professional 5 if OmniGraffle 5 does not
exist
---
omnigraffle_export/omnigraffle.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/omnigraffle_export/omnigraffle.py b/omnigraffle_export/omnigraffle.py
index ed5cc5e..8f1749d 100644
--- a/omnigraffle_export/omnigraffle.py
+++ b/omnigraffle_export/omnigraffle.py
@@ -85,7 +85,10 @@ class OmniGraffleSchema(object):
class OmniGraffle(object):
def __init__(self):
- self.og = app('OmniGraffle 5.app')
+ try:
+ self.og = app('OmniGraffle 5.app')
+ except:
+ self.og = app('OmniGraffle Professional 5.app')
def active_document(self):
self.og.activate()
--
1.8.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment