Thursday, February 13, 2014

GEDCOM Plugin for Notepad++: Now with Automatic Install

Earlier this week, the GEDCOM plugin made it to the official list of Notepad++ plugins. Registering a plugin and getting it accepted is fairly easy. But there is a big benefit to the user: your desired plugin is just a click away. No more downloads, unpacking zips, and copying files to multiple directory locations.

You can thank the Plugin Manager (also a plugin!) developed by Dave Brotherstone for this effective system of plugin management. When you register a plugin, you supply the information the Plugin Manager needs to find your zip (a download URL), identify its version, and tell it what needs to be extracted and where it should go. With just that information the Plugin Manager can perform installs and updates of registered plugins. It does this magic and also stops and restarts Notepad++ to make the changes take effect. And if the plugin doesn't do what you want, it's just as easy to remove it.

Plugin Manager also updates its list of available plugins from the plugin registry. There are actually two lists, a list of registered but not yet vetted new or updated plugins, and then the current official list which is downloaded by Plugin Manager. When you issue the command Plugins->Plugin Manager->"Show Plugin Manager", it displays the current official plugin list. Here is a screenshot of that from version 6.5.2 of Notepad++ taken today (13 Feb 2014):

You will notice that GEDCOM Lexer is still at version 0.1. Generally, Plugin Manager will lag behind the latest and greatest, for that you may still need to do a manual update.

Wednesday, February 12, 2014

New in GEDCOM Plugin v0.2: Navigating by NAMEs

GEDCOM Plugin v0.2 can now use the Function List to navigate to individual names. This allows you to double-click a name in a list to go directly to that INDI record in the GEDCOM file.

Notepad++ has a Function List plugin that comes already installed (more...). At one time this was an independent plugin developed by Jens Lorenz, but has been integrated into the main program since version 6.4.

The Function List panel (shown above) can be displayed by clicking the "Function List" command under View on the main menu. Any file type can define a rule for filling the Function List panel. Each node in the list serves as a hyperlink to a location in the file. Double-clicking on a node will take you straight to that file location. The larger image below better illustrates the relation between a viewed file and the Function List panel.

Setting up the Function List for the GEDCOM file type requires adding two entries to Notepad++'s functionList.xml configuration file. This file is user specific, so it is located in the directory: %APPDATA%\Notepad++.

The first entry associates the function list rule with a particular language and this takes the form of an <association> element under the <associationMap> section. For GEDCOM add this element line:
<association langID="XX" id="gedcom_name"/>
The "XX" following langID is a placeholder for whatever language ID number has been assigned to GEDCOM for your installation of the plugin. For Notepad++'s internal languages, there are fixed numbers assigned to each language (file type). But for external languages, this number can vary depending on what version of Notepad++ you are using and whether you have other external languages installed. Starting with v0.2 of the plugin, this langID is determined for you and displayed in the About dialog ("57" in this example):
The second entry defines the function list rule as a pair of regular expressions and takes the form of a <parser> element under the <parsers> section. To populate the Function List with NAMEs from GEDCOM INDI records, add this block:

<parser id="gedcom_name" displayName="GEDCOM Names">
    <nameExpr expr="(?&lt;=([\d][\x20]NAME[\x20])).*?([\r]|[\n]|[\r][\n])"/>

Note that if an INDI record contains more than one PERSONAL_NAME_STRUCTURE, only the first one encountered will be displayed. To learn more about the Function List see the Notepad++ Function List page. To download this example functionList.xml file, grab it from the SampleFiles area on SourceForge.

Popular Posts


Total Pageviews

Follow by Email