The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniGraffle > OmniGraffle General
FAQ Members List Calendar Today's Posts

 
Exporting omnigraffle canvases to PDF,SVG,PNG,EPS from command line Thread Tools Search this Thread Display Modes
Hi Kent,

Glad you find it useful. Please feel free to clone it on github and add these functionalities.

The --resolution will be very simple to add:

From the ASDictionary for OmniGraffle suites:
  • resolution short_float -- The number of pixels per point in the resulting exported image (1.0 for 72 DPI)
so in the export method you add new parameter and use it like:

Code:
self.og.current_export_settings.resolution.set(resolution)
The --suffix will be probably even easier as you could reuse the namemap argument for the export all. It is a lambda function (like a block in objc) and so you call it:

Code:
schema.export_all(target, fmt=format, force=options.force, namemap=lambda c, f: "%s%s.%s" % (c, suffix, f)))
The c is the canvas name and f is the target format and the suffix is your suffixed obtained from the options.suffix. You need to add both options to the option parser: parser.add_option.

Hope it help,

/cheers
Filip
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Line Build Fails For OmniFileStore at OFSDocumentStore.m davidbitton Omni Frameworks 3 2012-06-12 11:03 PM
Selecting 003 rows with 'command-line' queries RobTrew OmniOutliner 3 for Mac 1 2010-07-08 01:46 AM
Redirecting command line output into OO ptorngaard OmniOutliner 3 for Mac 3 2009-04-05 11:29 PM
OmniGraffle Frustrations - Master Canvases ggaudrea OmniGraffle General 3 2008-05-01 04:02 PM
Create new search through command line m-rick OmniWeb General 1 2007-03-19 03:27 PM


All times are GMT -8. The time now is 04:45 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.