MarcEdit 6.1 Update

 MarcEdit  Comments Off on MarcEdit 6.1 Update
Jul 202015

This update will have four significant changes to three specific algorithms that are high use — so I wanted to give folks a heads up.

1) Merge Records — I’ve updated the process in two ways.  

   a) Users can now change the data in the dropdown box to a user-defined field/subfield combination.  At present, you have defined options: 001, 020, 022, 035, marc21.  You will now be able to specify another field/subfield combination (must be the combination) for matching.  So say you exported your data from your ILS, and your bibliographic number is in a 907$b — you could change the textbox from 001 to 907$b and the tool will now utilize that data, in a control number context — to facilitate matching.  

   b) This meant making a secondary change.  When I shifted to using the MARC21 method, I removed the ability for the algorithm to collapse multiple records of the same type with the merge file into the source.  For example, after the change to the marc21 algorithm, in the following scenario, the following would be true:

 source 1 — record 1
merge 1 — matches record 1
merge 2 — matches record 2
merge 3 — matches record 3


The data moved into source 1 would be the data from merge1 — merge 3 wouldn’t be seen.  In the previous version prior to utilizing just the Marc21 option, users could collapse records when using the control number index match.  I’ve updated the merge algorithm, so that default is now to assume that all source data could have multiple merge matches.  This has the practical option of essentially allowing users to take a merge file with multiple duplicates, and merge all data into a single corresponding source file.  But this does represent a significant behavior change — so users need to be aware.


2) RDA Helper — 

   a) I’ve updated the error processing to ensure that the tool can fail a bit more gracefully

   b) Updating the abbreviation expansion because the expression I was using could miss values on occasion.  This will catch more content — it should also be a bit faster.


3) Linked Data tools — I included the ability to link to OCLC works ids — there were problems when the json outputted was too nested.  This has been corrected.


4) Bibframe tool — I’ve updated the mapping used to the current LC flavor.


Updates can be found on the downloads page (Windows/Linux) or via the automated update tool.

Direct Links:


 Posted by at 11:51 pm

MarcEdit 6.1 Update

 Uncategorized  Comments Off on MarcEdit 6.1 Update
Jul 102015

A new MarcEdit 6.1 build is available.  This build closes one bug related to the Select Individual Records for Edit function in the MarcEdit, and adds four new enhancements.  You can get the update through the automated download process within MarcEdit or from the downloads page.

Download URL:
32-bit URL:
64-bit URL:


** Change Log

* 6.1.25
** Bug Fix: Selected Records for Edit within the MarcEditor
** Enhancement: New button added to the join window to allow you to jump directly to the MarcEditor and work with the newly joined file.
** RDA Helper enhancement: I'm doing some additional refinements around the 380 and when bibliography is provided (since it's still probably too often to be useful)
** RDA Helper enhancement: Option to parse the 502 so that it becomes delimited.
** Enhancement Linked Data tool -- New option to add a link to OCLC's work entities.  Data is represented as a 787$n$o.  This could change...this is an experimental mapping. 


 Posted by at 12:49 am

MarcEdit OSX Preview Build Update

 Uncategorized  Comments Off on MarcEdit OSX Preview Build Update
Jul 082015

This build is a continued refinement of the preview build.  It really doesn’t include anything that is significantly new, but addresses a couple of early gaps folks had noticed while working with the tool.  Change log is below.

Download URL:
Direct URL:


** 1.0.8 ChangeLog
* Bug Fix: Field Count -- When clicking on a field to retrieve information about specific indicator/subfield
usage, an error would be thrown.  This has been corrected.
* Enhancement: Main Menu -- Added a Windows menu to the MarcEdit OSX main window to make it easier to 
get back to windows that might have been hidden.
* Enhancement: Main Menu/Help/Help -- Linked to the Online Help
* Enhancement: Main Menu/Help/Report Bug/Suggestion -- Linked to the MarcEdit online reporting tool.
* Enhancement: Main Menu/Help/About Author -- Linked to online contact information.
* Enhancement: Join MARC Records -- Added an Edit File button so that users can move directly 
from Joining files together to editing the data in the MarcEditor.
* Enhancement: MarcEditor -- Exposed the mrc extension so that users can now open mrc files 
directly into the MarcEditor.  This isn't quite as smooth as the Windows version yet, but
its getting there.
* Enhancement: MarcEditor/Reports/Validate ISSNs -- Exposed the Validate ISSNs function.
 Posted by at 8:58 pm

MarcEdit OSX Public Build #2

 Uncategorized  Comments Off on MarcEdit OSX Public Build #2
Jul 062015

Interesting thing about software development — everything can work so great within your own environments, but then be so uneven once they move outside of them.  The variable that changed — real data…and that’s why you make things available for folks to play with.

First, thanks to those that downloaded the preview and gave it a whirl.  I got responses that ranged from — looks great, when will [my favorite missing function] be ported to, I tried click on this button and things crashed.  The crashing was something I didn’t expect — but it was a good lesson in making sure that all user data is validated.  I took for granted that all data passed between the API components would be OK — and it wasn’t, and when it wasn’t, problems ensued, which could not be fixed without resetting the config settings manually (which made me realize I need to ensure this can be done automatically like in the Windows/Linux version).

So, I had a late night ahead of me for some unrelated reasons, and I took a crack and hardening the validation and making the portions of the program that accept user data more fault tolerant.  And, I’m back to the point where I can’t break it…so, I’ll let you all take another crack at it.

If you downloaded the preview yesterday — the first time you open the program, you’ll be notified that a new version is available.  You can click on the download button and follow the link.  Otherwise, you can download the program from the downloads page.

Download Page URL:
Direct Link:

Change log is below


1.0.7 ChangeLog
* Bug Fix: Open/Save Dialog Validation — These functions were not validating user data and this was causing problems. These functions now validate data, and if they cannot recover from an error, will simply return a blank value.
* Bug Fix: Run Tasks — Some of the task elements were not running. This has been corrected.
* Bug Fix: Window flashing when running tasks — this still exists a little bit (small flicker), but prior, windows were opening and staying open on each task element.
* Bug Fix: Change File prompt not being run on close – this occurred when an update was made that returned zero results. The value that managed data changes was cleared, and the window was allowed to close without prompt. This has been corrected.
* Bug Fix: The about page wasn’t listing the names that supported this development. This was a regression due to some changes made to how this particular UI component renders. This has been corrected.
* Enhancement: MARC Tools — when select a file to process, the program autofills the save file with the appropriate extension.
* Enhancement: MARC Tools — the Edit File button is now enabled after breaking
* Enhancement: Document Types — I’ve enabled document type support within the program. The application does not yet self register file extensions to the application, but if you associate the .mrc or .mrk files with the application, it will now handle opening these files correctly.

 Posted by at 9:53 pm

MarcEdit OSX Public Preview 1

 MarcEdit, Uncategorized  Comments Off on MarcEdit OSX Public Preview 1
Jul 052015

It’s with a little trepidation that I’m formally making the first Public Preview of the MarcEdit OSX version available for download and use.  In fact, as of today, this version is now *the* OSX download available on the downloads page.  I will no longer be building the old code-base for use on OSX.

When I first started this project around Mid-April, I began knowing that this process would take some time.  I’ve been working on MarcEdit continuously for a little over 16 years.  It’s gone through one significant rewrite (when the program moved from Assembly to C#) and has had way too many revisions to count.  In agreeing to take on the porting work — I’d hoped that I could port a significant portion of the program over the course of about 8 months and that by the end of August, I could produce a version of MarcEdit that would cover the 80% or so of the commonly used application toolset.  To do this, it meant porting the MARC Tools portion of the application and the MarcEditor.

Well, I’m ahead of schedule.  Since about 2014, I’ve been reworking a good deal of the application to support a smoother porting process sometime in the future — though, honestly, I wasn’t sure that I’d ever actual do the porting work.  Pleasantly, this early work has made a good deal of the porting work easier allowing me to move faster than I’d anticipated.  As of this posting, a significant portion of that 80% has been converted, and I think that for many people — most of what they probably use daily — has been implemented.  And while I’m ahead of schedule and have been happy with how the porting process has gone, make no mistake — it’s been a lot of work, and a lot of code.  Even though this work has primarily been centered around rewriting just the UI portions of MarcEdit, you are still talking, as of today, close to 200,000 lines of code.  This doesn’t include the significant amount of work I’ve done around the general assemblies that have provided improvements to all MarcEdit users.  Because of that — I need to start getting feedback from users.  While the general assemblies go through an automated testing process — I haven’t, as of yet, come up with an automated testing process for the OSX build.  This means that I’m testing things manually, and simply cannot go through the same leveling of testing that I do each time I build the Windows version.  Most folks may not realize it, but it takes about a day to build the Windows version — as the program goes through various unit tests processing close to 25 million records.  I simply don’t have an equivalent of that process yet, so I’m hoping that everyone interested in this work will give it a spin, use it for real work, and let me know if/when things fall down.

In creating the Preview, I’ve tried to make the process for users as easy as possible.  Users interested in running the program simply need to be running at least OSX 10.8 and download the dmg found here:  Once downloaded, run the dmg an a new disk will mount called MarcEdit OSX.  Run this file, and you’ll see the following installer:

MarcEdit OSX installer

MarcEdit OSX installer

Drag the MarcEdit icon into the Applications folder and the application will either install, or overwrite an existing version.  That’s it.  No other downloads are necessary.  On first run, the program will generate a marcedit folder under /users/[yourid]/marcedit.  I realize that this isn’t completely normal — but I need the data accessible outside of the normal app sandbox to easily support updates.  I’d also considered the User Documents folder, but the configuration data probably shouldn’t live there either.  So, this is where I ended up putting it.

So what’s been completed — Essentially, all the MARC Tools functions and a significant amount of the MarcEditor has been completed.  There are some conspicuous functions that are absent at this point though.  The Call Number and Fast Heading generation, the Delimited Text Translator and Exporter, the Select and Delete Selected Records, everything Z39.50 related, as well as the Linked Data tools and the Integration work with OCLC and Koha.  All these are not currently available — but will be worked on.  At this point, what users can do is start letting me know what absent components are impacting you the most, and I’ll see how they fit into the current development roadmap.

Anyway — that’s it.  I’m excited to let you all give this a try, and a little nervous as well.  This has been a significant undertaking which has definitely pushed me a bit, requiring me to learn Object-C in a short period of time, as well as quickly assimilate a significant portion of Apples SDK documents relating to UI design.  I’m sure I’ve missed things, but it’s time to let other folks start working with it.

If you have been interested in this work — download the installer, kick the tires, and give feedback.  Just remember to be gentle.  :)


Download URL:


 Posted by at 8:40 pm

MarcEdit 6.1 Update

 MarcEdit  Comments Off on MarcEdit 6.1 Update
Jul 052015

This was something I’d hoped to get into the last update, but didn’t get the time to test it; so I got it done now.  While at the first MarcEdit User Group meeting at ALA, there was a question about supporting 880 fields when exporting data via tab delimited format.  When you use the tool right now, the program will export all the 880 fields, not a specific 880 field.  This update changes that.  After the update, when you select the 880 field in the Export tab delimited tool, the program will ask you for the linking field.  In this case, the program will then match the 880$6[linkingfield], and pull the selected subfield.  I’m not sure how often this comes up — but it certainly made a lot of sense when the problem was described to me.

You can pick up the download at:


 Posted by at 8:33 pm
Jun 302015

Changes in this update:

* 6.1.21
** Bug Fix: Conditional Delete - When selecting regular expressions -- there were times when the process wasn't being recognized.
** Enhancement: Conditional Delete - This function use to only work when using the Regular Expression option.  This now works for all options.
** Bug Fix: ValidateISBNs - Process would only process the first subfield.  If the subfield to be processed wasn't the first one, it wouldn't be validated.
** Enhancement: ValidateISSN: Uses mathematical formula to validate ISSNs.
** Bug Fix: Generate Fast Headings (Stand alone tool) -- LDR fields could be deleted.  
** Enhancement: Working to make the global edit functions a little more fault tolerant around record formatting.
** Enhancement: Generate MARC record from URL -- program generates MARC records from Webpages.  If you pass it an LC URL, it will generate data from the MARCXML.

At this point, only the Windows and Linux downloads were updated.  I'll be replacing the Mac download with the first version of the native OSX build the July 4th weekend.  You can get the updates either via the Automated updated tool or from the website at:

 Posted by at 8:45 pm
Jun 192015


Time: 6:00 – 7:30 pm, Friday, June 26, 2015
Place: Marriott Marquis (map)
Room: Pacific H, capacity: 30


The MarcEdit user community is large and diverse and honestly, I get to meet far too few community members.  This meeting has been put together to give members of the community a chance to come together and talk about the development road map, hear about the work to port MarcEdit to the Mac, and give me an opportunity to hear from the community.  I’ll talk about future work, areas of potential partnership, as well as hearing from you what you’d like to see in the program to make your metadata live’s a little easier.  If this sounds interesting to you — I really hope to see you there.


A *big* thank you to John Chapman and OCLC for allowing this to happen.  As folks might guess, finding space at ALA can be a challenging and expensive endeavor so when I originally broached the idea with OCLC, I had pretty low expectations.  But they truly went above and beyond any reasonable expectation, working with the hotel and ALA so this meeting could take place.  And why they didn’t ask for it — they have my personal thanks and gratitude.  If you can attend the event, or heck, wish you could have but your schedule made it impossible — make sure you let OCLC know that this was appreciated.

 Posted by at 1:24 pm

Working with the Clipboard on OSX

 C#, code, Programming  Comments Off on Working with the Clipboard on OSX
Jun 172015

Coming from the Windows and Linux world — the object where data is copy and pasted from is called the Clipboard.  Not so in OSX.  In OSX, this is referred to as the NSPasteBoard.  Should you need to get string data on and off of it – use the following:


private static string[] pboardTypes = new string[] { "NSStringPboardType" };
public void SetClipboardText(string text)
	NSPasteboard.GeneralPasteboard.DeclareTypes(pboardTypes, null);
	NSPasteboard.GeneralPasteboard.SetStringForType(text, pboardTypes[0]);

public string GetClipboardText()
	return NSPasteboard.GeneralPasteboard.GetStringForType(pboardTypes[0]);


 Posted by at 3:23 pm

Updating resources on the main UI thread: OSX & C#

 Uncategorized  Comments Off on Updating resources on the main UI thread: OSX & C#
Jun 062015

One of the things that has been a learning experience for me has been understanding how OSX handles threading, understanding what objects are thread-safe, and how to capture user feedback from within an thread running outside of the main UI thread.

Conceptually, Windows, OSX, Linux — UIs tend to be run through a single, primary thread.  This is why long-running processes can lock a window from updating.  In Windows, this can be overcome by creating background threads.  While these threads should not interact with the main UI objects — you do have the ability to spawn a new UI thread that can be used to capture interaction from users.  You just need to be careful to ensure that objects stay compartmentalized since these objects are not explicitly thread-safe.

Within the OSX environment, the UI components cannot be run from outside of the main thread.  This means that if you have a background threading process, you cannot interact with the user because all UI objects are marked as not safe for threading.  Not very practical since there are times when user interaction is definitely necessary.  For example, within MarcEdit’s Mac port — I need to be able to tell users when the program has updated — and I’d like this process to occur outside the primary UI thread so not to slow down application startup or user interactions.  To do this, you need to find a way to thread switch — so that you can encapsulate the code that will interact with the UI around the necessary code to switch execution back to the main UI thread.  In C# and on Windows, you can take non-thread-safe components and using a delegate and Invoke, thread switch within your application.  OSX has something similar, but after hours of looking, I wanted to make sure I document how it works here, so I won’t have to look this up again.  The two functions are: InvokeOnMainThread and BeginInvokeOnMainThread.  These two functions have some limitations — they can only be run within the context of a UI thread (so a window controller because you need access to the NSWindow handle) — but from within this block, you have the ability to generate an NSAlert class (though tricky) as well as generate new NSWindow objects to capture user input.

Here’s an example of how this would work below.  This is the code used for MarcEdit’s Mac notification service.  The program starts a thread when the application loads the main window for the first time — that thread initiates a System.Net.HttpWebRequest object to retrieve information about the current MarcEdit Mac Build.  The program then parses the version information, compares it to the local version and build number — and if the remote build number is newer — generates a UI element that tells the user what has changed, and provides buttons to download the new application.  This code lives in a couple of different classes, but these are the relevant parts.


public override void AwakeFromNib ()
	this.Window.BackgroundColor = NSColor.White;
	base.AwakeFromNib ();
	System.Threading.Thread objT = new System.Threading.Thread((System.Threading.ThreadStart)delegate { CheckUpdate();});
	objT.Start ();


void CheckUpdate ()
	helpers objH = new helpers ();
	string data = objH.GetWebContent(clsGlobal.MacNotificationURI);
	string sversion = data.Split (System.Environment.NewLine.ToCharArray ()) [0].Trim();

	if (!string.IsNullOrEmpty (data)) {
		NSObject ver = NSBundle.MainBundle.InfoDictionary ["CFBundleVersion"];
		NSObject ver2 = NSBundle.MainBundle.InfoDictionary ["CFBundleShortVersionString"];

		Version vweb = new Version (sversion);
		Version vlocal = new Version (ver2.ToString() + "." + ver.ToString ());

		if (vweb > vlocal) {
			//To generate a UI element from outside the main UI thread, 
			//use InvokeOnMainThread and create a delegate function block
			InvokeOnMainThread (() => {
				frmUpdateNotificationController objU = new frmUpdateNotificationController();
				objU.LoadMessage("Build #" + sversion + System.Environment.NewLine + System.Environment.NewLine + 

//helpers class

public string GetWebContent(string uri) {

	System.Net.HttpWebRequest myReq =
				(System.Net.HttpWebRequest)System.Net.WebRequest.Create (new Uri (uri));
	System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)myReq.GetResponse ();
	System.IO.Stream responseStream = response.GetResponseStream ();
	System.IO.StreamReader reader = new System.IO.StreamReader (responseStream, System.Text.Encoding.UTF8);
	string val = reader.ReadToEnd ();
	reader.Close ();
	response.Close ();
	return val;

 Posted by at 9:28 am