This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
OmniGraffle Export tool
=======================

A command line tool that allows to export one or more canvases from [OmniGraffle](http://www.omnigroup.com/products/omnigraffle/) into various formats using [OmniGraffle AppleScript interface](http://www.omnigroup.com/mailman/archive/omnigraffle-users/2008/004785.html)

Installation
------------

In order to have it successfully installed and working, following is required:

- [OmniGraffle](http://www.omnigroup.com/mailman/archive/omnigraffle-users/2008/004785.html) 5 or 6
- python \>= 2.7
- [appscript](http://appscript.sourceforge.net/py-appscript/index.html) \>= 0.22

You can either clone the repository and use the setup tool:

setup.py install

Or using the PIP:

pip install omnigraffle_export

Usage
-----

Usage: omnigraffle-export [options] <source> <target>

Options:
-h, --help show this help message and exit
-c NAME canvas name. If not given it will be guessed from the target
filename unless it is a directory.
-f FMT format (one of: pdf, png, svg, eps). Guessed from the target
filename suffix unless it is a directory. Defaults to pdf
--force force the export
--debug print out debug messages

If the target file exists it tries to determine whether the canvas has been changed. It does that by comparing the checkums. Since the PDF export always results into a different file, it uses the PDF subject attribute to store there a checksum that will be generated by exporting to a PNG format.

Examples
--------

- Export *all* canvases into directory *figures* using EPS

```sh
$ omnigraffle-export -f eps schemas.graffle figures
```

- Export canvas named *FullModel* into a *FullModel.svg* SVG file:

```
$ omnigraffle-export schemas.graffle FullModel.svg
```

- Export canvas name *FullModel* into a *my\_new\_model.pdf* PDF file:

```sh
$ omnigraffle-export -c FullModel -f pdf schemas.graffle my_new_model
```

or

```sh
$ omnigraffle-export -c FullModel schemas.graffle my_new_model.pdf
```

*Note: that the ’.pdf’ suffix will be automatically added in the first case.*

- Export *all* canvases into directory *figures* using EPS

```
$ omnigraffle-export -f eps schemas.graffle figures
```

LaTeX Support Example
---------------------

One of the main motivation for this package was to be able to quickly export OmniGraffle canvases and use them in LaTeX. One of the possible setup is following: every time a figure is included add some instruction so it can be later exported from OmniGraffle file. For example using a comment like:

```
% omnigraffle sources/schemas.graffle figures/CondorKernel.pdf
```

to export a canvas `CondorKernel` from `sources/schemas.graffle` into `figures/CondorKernel.pdf` as `PDF`.

```latex
\begin{figure}
\center
% omnigraflle: sources/schemas.graffle figures/CondorKernel.pdf
\includegraphics[scale=.5]{images/CondorKernel}
\end{figure}
```

An example preprocesor in Python using [frabric](http://docs.fabfile.org/en/1)

```python
from fabric.api import *
import re

# latex files to process
fnames = ['UCGridRLDecisionModel.tex']
omnigraffle_re = re.compile(r'%\s*omnigraflle:\s*([^ ]+)\s+([^ ]+)')

def _convert(source, target):
local('omnigraffle-export %s %s' % (source, target))

@task
def schemas():
'''
Generate all schemas
'''

for fname in fnames:
with open(fname) as f:
for l in f:
m = omnigraffle_re.match(l.strip())
if m:
_convert(*m.groups())
```

Export on Demand
----------------

The `omnigraffle-export` can be used either in a batch mode or in a more interactive way. For example it can be used to export the currently selected canvas into a file.

Following is an example Python script that will export currently active canvas into a PDF file that has the same name as the canvas and is placed in the same directory as the OmniGraffle document:

```python
#!/usr/bin/env python

import os
import sys
import omnigraffle

og = omnigraffle.OmniGraffle()
schema = og.active_document()

schema_path = schema.path
schema_fname = os.path.basename(schema_path)
schema_dir = os.path.dirname(schema_path)
export_info_fname = os.path.join(schema_dir, '.' + schema_fname[0:schema_fname.rindex('.')] + '.omnigraffle_export')

canvas_name = schema.active_canvas_name()

format = 'pdf'
target_path = os.path.join(schema_dir, canavs_name + '.' + format)

schema.export(canvas_name, target_path, format=format)
```

Fancier version can be download [here](https://gist.github.com/4195669)

Making a release
----------------

- update the version number in `setup.py`
- rerun tests `$ python setup.py test`
- commit
- push
- register release `$ python setup.py register`
- upload release `$ python setup.py bdist upload`

Developing omnigraffle-export
-----------------------------

- clone
- stage `$ python setup.py develop`
- make a new feature branch
- code
- do release
- unstage `$python setup.py develop --uninstall`
Release History

Release History

1.7.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.5.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.4.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.4.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.4.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
omnigraffle-export-1.7.1.macosx-10.10-x86_64.tar.gz (13.1 kB) Copy SHA256 Checksum SHA256 any Dumb Binary Mar 16, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting