<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Amiel,<br>
I'll have to figure out how to upload it to Textmate then. I've
never done it before.<br>
<br>
Meantime, you could use the bundle editor and paste in what I did.<br>
<br>
Under the Bundles menu, select "Show Bundle Editor", which gives
you the bundle editor window.<br>
Click on + (bottom left) and select "New Bundle" and name it Ged<br>
<br>
With Ged selected, click on + again and select "New Language" and
name it Ged. You will get a default script in the edit part of the
window.<br>
Select all that script text and delete it. <br>
Then paste in the script below. When you click back on the main
Ged entry, it should start working.<br>
<br>
{ scopeName = 'source.ged';<br>
firstLineMatch = '0 HEAD';<br>
fileTypes = ( 'ged' );<br>
patterns = (<br>
{ name = 'keyword.control.ruby';<br>
comment = "everything being a reserved word, not a
value and needing a 'end' is a..";<br>
match =
'\b(INDI|FAM|SOUR|NOTE|REPO|HEAD|TRLR|OBJE)\b$';<br>
},<br>
{ name = 'keyword.block.ruby';<br>
comment = "everything being a reserved word, not a
value and needing a 'end' is a..";<br>
match = '^0';<br>
},<br>
{ name = 'comment.xref.ged';<br>
comment = "everything being a reserved word, not a
value and needing a 'end' is a..";<br>
match = '^1 \b(FAMC|FAMS)\b';<br>
},<br>
{ name = 'entity.control.ged';<br>
comment = "everything being a reserved word, not a
value and needing a 'end' is a..";<br>
match = '^1 [A-Z]+(?![?!])';<br>
},<br>
{ name = 'string.control.ged';<br>
comment = "everything being a reserved word, not a
value and needing a 'end' is a..";<br>
match = '^2 [A-Z]+(?![?!])';<br>
},<br>
{ name = 'constant.control.ged';<br>
comment = "everything being a reserved word, not a
value and needing a 'end' is a..";<br>
match = '^3 [A-Z]+(?![?!])';<br>
},<br>
{ name = 'support.control.ged';<br>
comment = "everything being a reserved word, not a
value and needing a 'end' is a..";<br>
match = '^4 [A-Z]+(?![?!])';<br>
},<br>
{ name = 'storage.control.ged';<br>
comment = "everything being a reserved word, not a
value and needing a 'end' is a..";<br>
match = '^[5-9] [A-Z]+(?![?!])';<br>
},<br>
{ name = 'variable.xref.ged';<br>
comment = "everything being a reserved word, not a
value and needing a 'end' is a..";<br>
match = '@.*@';<br>
},<br>
);<br>
}<br>
<br>
Click on + again, and select "New Command" and name it validate. <br>
In the "Activation" "Key Equivalent" text box (bottom right hand
side) add control shift V (standard for validation).<br>
Select all the text in the Script Editor, and delete it, then
paste in the script below.<br>
You will need to do an "sudo gem install gedcom" and "sudo gem
install VersionCheck" in a terminal window.<br>
<br>
With a GEDCOM file open, you can type control shift V, and you
should get a new text window with the results of the GEDCOM
parsers test of the GEDCOM file.<br>
<br>
#!/usr/bin/env ruby<br>
# just to remind you of some useful environment variables<br>
# see Help / Environment Variables for the full list<br>
#echo File: "$TM_FILEPATH"<br>
#echo Word: "$TM_CURRENT_WORD"<br>
#echo Selection: "$TM_SELECTED_TEXT"<br>
#<br>
#sudo gem install VersionCheck<br>
#sudo gem install gedcom<br>
#<br>
require 'rubygems'<br>
require 'gedcom'<br>
require 'versioncheck'<br>
file = ENV["TM_FILEPATH"]<br>
puts "###########################################"<br>
puts "Gedcom opening #{file}"<br>
puts "###########################################"<br>
if VersionCheck.rubyversion.have_at_least_version?(1,9)<br>
g = Gedcom.file("#{file}", "r:ASCII-8BIT") #OK with LF line
endings.<br>
else<br>
g = Gedcom.file("#{file}", "r") #OK with LF line endings.<br>
end<br>
puts<br>
puts "###########################################"<br>
puts "Gedcom Consistency test"<br>
puts "###########################################"<br>
g.transmissions[0].self_check<br>
puts<br>
puts "###########################################"<br>
puts "Gedcom Summary"<br>
puts "###########################################"<br>
g.transmissions[0].summary<br>
<br>
<br>
On 15/01/13 10:01 AM, Amiel Martin wrote:<br>
</div>
<blockquote
cite="mid:CACQg5EbNek4zuXR5FyTrda_kApbUKHD2BX3=sd4bZ3DPmzc_6A@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">Hi Rob,
<div><br>
</div>
<div style="">I'd be interested in your GEDCOM bundle and gem...</div>
<div style=""><br>
</div>
<div style="">-Amiel</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>-Amiel
<div><a moz-do-not-send="true" href="http://carnesmedia.com"
target="_blank">http://carnesmedia.com</a></div>
</div>
<br>
<br>
<div class="gmail_quote">On Sat, Jan 5, 2013 at 3:38 PM, Rob
Burrowes <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:r.burrowes@auckland.ac.nz" target="_blank">r.burrowes@auckland.ac.nz</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
I have been working with a lot of GEDCOM files lately, so
yesterday i created a simple bundle to color the keywords
(GEDCOM is a text database format for genealogy data). If
anyone is interested, I can make it available to others.<br>
<br>
I had previously written a GEDCOM parser in ruby, and this
is available as a Ruby Gem. The validation script requires
the gem to be installed.<br>
<br>
-- <br>
Rob Burrowes Ph: <a
moz-do-not-send="true" href="tel:%2B64%209%20923%202308"
value="+6499232308" target="_blank">+64 9 923 2308</a>
(Internal 82308)<br>
Research Data Services Cell: <a
moz-do-not-send="true" href="tel:%2B64%2027%204731856"
value="+64274731856" target="_blank">+64 27 4731856</a>
(internal 64209)<br>
Technical Lead<br>
Centre for eResearch<br>
The University of Auckland<br>
Private Bag 92019 <a moz-do-not-send="true"
href="http://www.sit.auckland.ac.nz/%7Erob"
target="_blank">http://www.sit.auckland.ac.nz/~rob</a><br>
Auckland Mail Centre <a moz-do-not-send="true"
href="http://www.burrowes.org/" target="_blank">http://www.burrowes.org/</a><br>
Auckland 1142 <a moz-do-not-send="true"
href="http://www.wikarekare.org/" target="_blank">http://www.wikarekare.org/</a><br>
NEW ZEALAND<br>
<br>
_______________________________________________<br>
textmate-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:textmate-dev@lists.macromates.com"
target="_blank">textmate-dev@lists.macromates.com</a><br>
<a moz-do-not-send="true"
href="http://lists.macromates.com/listinfo/textmate-dev"
target="_blank">http://lists.macromates.com/listinfo/textmate-dev</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
textmate-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:textmate-dev@lists.macromates.com">textmate-dev@lists.macromates.com</a>
<a class="moz-txt-link-freetext" href="http://lists.macromates.com/listinfo/textmate-dev">http://lists.macromates.com/listinfo/textmate-dev</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Rob Burrowes Ph: +64 9 923 2308 (Internal 82308)
Research Data Services Cell: +64 27 4731856 (internal 64209)
Technical Lead
Centre for eResearch
The University of Auckland
Private Bag 92019 <a class="moz-txt-link-freetext" href="http://www.sit.auckland.ac.nz/~rob">http://www.sit.auckland.ac.nz/~rob</a>
Auckland Mail Centre <a class="moz-txt-link-freetext" href="http://www.burrowes.org/">http://www.burrowes.org/</a>
Auckland 1142 <a class="moz-txt-link-freetext" href="http://www.wikarekare.org/">http://www.wikarekare.org/</a>
NEW ZEALAND
</pre>
</body>
</html>