Readme file for ZopeEditManager 0.9.2
ZopeEditManager
ZopeEditManager is a wrapper application for Casey Duncan's excellent External Editor for Mac OS X, allowing Mac users the same level of flexibility in editors and number of concurrent edits.
The Problem
Using the current Mac OS X Solution <http://zope.org/Members/Feneric/ExtEditMacOSX> will only get you part of the way to <textarea> freedom. Specifically, it only allows for applications that have either a CLI component, like BBEdit, or that are bundle applications with an easily attainable executable file, mostly limited to Cocoa applications.
In addition, because of the way Mac OS X approaches applications, you can only have one External Editor process going at a time. Unlike Windows and UNIX/X11 applications, Mac OS X native applications have one runtime instance.
The Solution
Taking Casey's work to the next level for Mac OS X users, I replicated his work using the PyObjC bridge, creating a native, Mac OS X application to act as manager for all External Editor processes. This means that you can specify any Mac OS X application (Carbon or Cocoa) to act as the editor for a MIME type, type group, or Zope meta_type. And you can have as many concurrent edits as you like, since all edits are proxied through a single application.
Installing It
Drag the ZopeEditManger application to the Applications folder in your hard drive or home directory. You can use the built-in preferences, one of the supplied preference files, or edit your own.
Alternately, you can build ZopeEditManager from sources. In order to build it, you will need the Developer Tools provided by Apple, and the PyObjC distribution.
Jaguar users should download the PyObjC 1.0 installer <http://prdownloads.sourceforge.net/pyobjc/pyobjc-1.0.dmg?download>.
Panther users should consider using Jack Jansen's Python Additions for Panther <http://ftp.cwi.nl/jack/python/mac/MacPython-Panther-2.3-1.dmg>, which includes a Package Manager program, and installing the PyObjC tools that way.
With the PyObjC bridge now installed, you can download the ZopeEditManager sources <http://zope.org/Members/urbanape/ZopeEditManager/ZopeEditManager%200.9.2/ZopeEditManager-0.9.2-src.tar.gz>, unpacking them, and issuing the following commands:
$ tar xfz ZopeEditManager-0.9.2.tar.gz $ cd ZopeEditManager-0.9.2 $ python buildapp.py --standalone --strip --builddir=/Applications build
You'll now have an application bundle in your /Applications directory that you can register with Mozilla.
Using It
As you download links from the Zope Management Interface (ZMI) or the Content Management Framework (CMF) or Plone, new documents will accumulate in the main table.
As saves are made in the editor, ZopeEditManager will synch those changes back to the server, and display the time of the last synch. To remove a document from ZopeEditManager, simply select it from the table, and press the '-' button, or press the 'delete' key.
Configuring your Browser
Currently, the only browser fully set to work with ZopeEditManager is Mozilla. Internet Explorer supports the configuration of File Helpers, but I've been unable to get it working quite right. In any case, other browsers will download a particular file. That file can be dragged onto the ZopeEditManager icon and it will work fine. To enable ZopeEditManager in Mozilla, select the Helper Applications pane from the Navigator group, and create a New Type called 'application/x-zope-edit', and choose ZopeEditManager with the Application picker.
Configuration
The configuration file has changed since version 0.7. ZopeEditManager now provides a means to automatically upgrade your preference file, if you've modified it past the defaults.
ZopeEditManager also now sports a GUI Preferences panel. Just choose "Preferences..." from the ZopeEditManager menu, or press Command-, to open the window.
Options
The available options for ZopeEditManager are (names in parentheses are the corresponding key names in the Preferences plist):
Files Prefs
- Cleanup Files (
cleanup_files
) - Whether to delete the temp files created.
WARNING the temp file coming from the browser contains authentication information and therefore setting this to <false/> is a security risk, especially on shared machines. If set to <true/>, that file is deleted at the earliest opportunity, before the editor is even spawned. Set to <false/> for debugging only. - Confirm on Finish (
confirm_on_finish
) - When you are finished locally editing a file, ZopeEditManager will ask you to confirm this. You can disable this behavior by unchecking this button.
- Save Interval (
save_interval
) - The interval in seconds that the helper application checks the edited file for changes.
WebDAV Prefs
- Use WebDAV Locks (
use_locks
) - Whether to use WebDAV locking. The user editing must have the proper WebDAV related permissions for this to work.
- Always borrow WebDAV Locks (
always_borrow_locks
) - When use_locks is enabled this features suppresses warnings when trying to edit an object you have already locked. When enabled, external editor will always "borrow" the existing lock token instead of doing the locking itself. This is useful when using CMFStaging for instance. If omitted, this option defaults to <false/>.
- (
temp_dir
) - Path to store local copies of object data being edited. Defaults to operating system temp directory. (This preference is currently unsupported in the Preference Panel; however, it can be set by manually editing the .plist file)
Helper Apps Prefs
To edit an entry, simply double click on the cell, and edit. To add a new Helper App, click the '+' button. To remove an entry, select a row, and click '-'. On Panther, you can sort the table by any of the columns, ascending or descending.
- Type
- Either the meta_type of the Zope object, or the MIME type of the file it would represent.
- Extension (
extension
) - The file extension to add to the content file. Allows better handling of images and can improve syntax highlighting.
- Editor (
editor
) - Application name used to invoke the editor application.
Credits
I would like to thank the following people for their help in this endeavor:
- Casey Duncan, for the excellent ExternalEditor product, and the initial zopeedit.py
- Bill Bumgarner and Bob Ippolito, for their hard work on PyObjC
- Jesús Díaz Blanco, for his help refining the UI
- Sascha Gresk, Eric W. Brown, Brian Morton, Jeff Putsch, Aurelius Prochazka, Jürgen Valldorf, Michael Bond, Sébastien Verbois, Jonah Crawford, Jean-Philippe Rey, and Jim Allman for using it and supplying valuable feedback
Conclusion
I hope you enjoy using this software. If you have any comments, suggestions or would like to report a bug, send an email with 'ZopeEditManager' in the Subject line to the author:
Zachery Bir <[email protected]>
© 2003, Zachery Bir and Zope Corporation. All rights reserved.