Announcement: Tkme snippets

Date: Wed, 06 Sep 2000 16:30:28 -0400
Subject: mp-users: Tkme snippets

mp-users,

With much wrestling of code, I've implemented a new feature in Tkme.
The new feature, for lack of a better name, is "snippets".
A snippet is a bit of metadata cut from an existing record that you
might want to use again in another record.  For example, I expect
that people will want to have a snippet containing their own
contact information, for use in Metadata_Contact.  Other snippets
that might be useful would include Distributor, Distribution_Liability,
and Map_Projection sections.  Previously, in order to use existing
metadata information in Tkme, you had to open another copy of
Tkme containing the metadata record with the information you
wanted to paste, then you had to copy the info and paste it
into the current metadata record using Tkme.  Snippets simplifies
this process by keeping bits of metadata in a standard location,
where they can be pasted as needed into your metadata.

How to create a snippet

Highlight an element that heads a section you want to save as a
snippet.  Select "Save as snippet" from the Snippets menu.  In
the save-file dialog that opens up, you can create directories if
you wish, but you need to enter a file name for the snippet.  You
don't need to give it an extension.  Click Save, and the snippet
will appear in the Snippets menu.

How to place a snippet

Highlight an element that could be the parent of your snippet.
For example, if you have a snippet that is Contact_Information,
you can highlight Metadata_Contact, Distributor, Point_of_Contact,
or Process_Contact.  Then simply choose the snippet you want from
the Snippets menu, and the snippet will be pasted into the metadata.

Snippet management

Snippets are just text in files stored in a special "snippets"
subdirectory of \USGS.  To get rid of a snippet, simply delete
the file from the operating system.  When you run Tkme, it looks
in that directory for any snippets you have saved, and creates
menu items for them.

Your snippets directory can contain subdirectories; these will
appear as menu-cascades from the Snippets menu.  So for example,
you can put all of the snippets containing Contact_Information
in a subdirectory called "contacts", and all of the projection
information in one called "projections".  You don't have to do
this, of course, it's just one way to organize your snippets.

Thanks to Hugh Phillips and A.J. Wortley for helping me think
this idea through.

Please let me know if this is helpful, and especially do let me
know if anything ... uh ... *unexpected* occurs.