Michel KIRSCH Posted January 12, 2021 Report Share Posted January 12, 2021 2 hours ago, Appelmus said: with more than 7000 entries My little Mod will "automatize" the copy/paste action and allow to edit the note... Better than nothing... The fact is that TNG, for the Custom Events only, do the job, because notes are well displayed instead the reference. But the edition of such a note is not possible... Now well... Michel Quote Link to comment Share on other sites More sharing options...
Appelmus Posted January 13, 2021 Report Share Posted January 13, 2021 Hello Michel, I will try the mod on a test page! Thanks for your work! Quote Link to comment Share on other sites More sharing options...
klooster Posted January 14, 2021 Author Report Share Posted January 14, 2021 This Darrin's answer: ---------------------- The problem is that TNG doesn't recognize this notation: 1 MIL @N22@ Instead it's looking for this: 1 MIL 2 NOTE @N22@ Anything that's on the same line as the tag goes into the "fact" or "detail" area. For example: 1 OCCU Fireman That's why your @N22@ ended up where it did. I'll make a note to try and address this at some point in the future. Darrin Quote Link to comment Share on other sites More sharing options...
Michel KIRSCH Posted January 22, 2021 Report Share Posted January 22, 2021 On 1/14/2021 at 7:02 AM, klooster said: 1 MIL @N22@ Instead it's looking for this: 1 MIL 2 NOTE @N22@ It is easy to write a script that modify your gedcom before import... Michel Quote Link to comment Share on other sites More sharing options...
klooster Posted January 23, 2021 Author Report Share Posted January 23, 2021 Thanks for the reply Michel, but I do not have the knowledge to write such a script. Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted January 23, 2021 Report Share Posted January 23, 2021 *deleted* Update: Sorry, my example won't work because I naively thought '22' was a constant, which, as Roger points out below, it would not be. Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 23, 2021 Report Share Posted January 23, 2021 1 hour ago, tngrlkrz said: If you are familiar with Notepad++, you could do it without a script or macro. In the gedcom, with Find/Replace, with boxes ticked Extended (\n, \r...) , Match case: There should be no space between 'MIL' and '\n'. Do a test with a copy, and 'Ctl Z' will always 'undo' any changes. For this to work though with minimal effort, it needs wildcard searches for both the MIL part and the Nxx part since these two parts will be different in different parts of the file. I see that dialog does allow for regular expression searches - does it also allow for regular express results replacement? This setup works in BBEdit on my Mac Pro to change the lines as needed. It grabs the string after the 1 (so OBT or MIL or _MIL for example) and the digits of the note's number (the digits in @Nxx@ and replaces them into the desired format - eg 1 MIL @N22@) becomes 1 MIL 2 NOTE @N22@ Roger Roger Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted January 23, 2021 Report Share Posted January 23, 2021 Yea, Roger, I over simplified, forgetting that the @Nnn@ could vary the value of 'nn'. Yes, Notepad++ does permit regular expression replacement as well, as you can see by the tick box, though I have not had need to use it much, so haven't checked that option. Q. why does your expression look for variations and not only look for 'MIL'? I thought that was a constant. Or is it because any record with the trailing 'N' enclosed by '@'s would be found regardless of the first string? Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 23, 2021 Report Share Posted January 23, 2021 19 minutes ago, tngrlkrz said: Q. why does your expression look for variations and not only look for 'MIL'? I thought that was a constant. Or is it because any record with the trailing 'N' enclosed by '@'s would be found regardless of the first string? Because at least in Reunion, you can have up to 100 different notes fields, each with its own GEDCOM tag, so I have about 15 different ones in my family file. So looking for any string after the 1, before the @Nxx, captures whatever is the GEDCOM tag used for a note. It captures that in variable 1. It captures the xx from @Nxx@ in variable 2. Then writes them out in the new format of 1 Variable1 2 NOTE @Nvariable2@ Roger Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted January 23, 2021 Report Share Posted January 23, 2021 OK....thanks for the explanation. Makes sense now. Quote Link to comment Share on other sites More sharing options...
klooster Posted January 24, 2021 Author Report Share Posted January 24, 2021 Hi Kiwi, Thanks for you explanation, but how do you accomplish in the Reunion GedCom export file the change into: 1 Variable12 NOTE @Nvariable2@ Do you have a script to change all the @Nxx@ variables in the Reunion GedCom export ?? PS: I use Visual Code Studio as my editor for all my PHP, GedCom, ect files. Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted January 24, 2021 Report Share Posted January 24, 2021 Cees, I note from your website that you are a Mac user and recommend BBedit. why can't you use Kiwi's dialogue to alter gedcoms? Or is it you wish an automatic script/macro approach? I can't help, since I am Windows user of Notepad++ and it's macros not available on Mac. Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 24, 2021 Report Share Posted January 24, 2021 5 hours ago, klooster said: 1 Variable12 NOTE @Nvariable2@ Do you have a script to change all the @Nxx@ variables in the Reunion GedCom export ?? If you don't already have it, download BBEdit - it has a free version that will do what you need. Open your GEDCOM file using BBEdit, and then press Command F to invoke the Find/Find & Replace dialogue box Here's the Find string to copy and paste 1 ([_A-Za-z]+) @N([0-9]+)@ Here's the Replace string to copy and paste 1 \1\r2 NOTE @N\2@ Make the entries as shown in each box, and make sure to check the Grep box Press Find - it will find the first occurrence that matches that Find string. Click Replace and watch it change 1 line into 2 lines. Do that a few times to convince yourself it knows what it's doing, and then click the Replace All button. In the blink of an eye the entire file will be changed. Roger Quote Link to comment Share on other sites More sharing options...
klooster Posted January 25, 2021 Author Report Share Posted January 25, 2021 Thanks Roger, yes I have BbEdit / Mac Your Find and replace works like a charm !! BUT when I import the edited BbEdit file into TNG all the notes are not imported, see print screen, so its even worse then before Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 25, 2021 Report Share Posted January 25, 2021 If you click the 3rd icon over with the green dot on it, the notes are in there. Roger Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 25, 2021 Report Share Posted January 25, 2021 7 hours ago, klooster said: Your Find and replace works like a charm !! Cees - you might need one more "run" after this has done - I've just now noticed it turns 1 NOTE @N2165@ into 1 NOTE 2 NOTE @N2165@ which causes the appearance of a blank note in TNG when imported. So after running the first Find and Replace, you'll need to do this one to turn the "true" NOTE lines back to 1 NOTE @N2165@ Roger Quote Link to comment Share on other sites More sharing options...
klooster Posted January 25, 2021 Author Report Share Posted January 25, 2021 Hi Roger, thanks for you suggestion, but I know that i have to click the 3rd icon with the green dot on it to see the notes.. But it is empty! No single note is imported I did the second run as you suggested, no succes. Notes are with a green dot, but when you click, empty, see printscreen. I also attach the Gedcom Test file after the two suggested runs. And the original Reunion export GedCom file before the two bbEdit runs TEST2-bbedit-2-run.ged Reunion-Kloosterman-NO-BbEdit runs.ged Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 25, 2021 Report Share Posted January 25, 2021 (edited) I have performed the changes on the Reunion GEDCOM file, and imported it into my test site. There are 2,133 Notes show up when I go to TNG Admin ------> Notes. When I find the same Adriaan Kloosterman as you show above, I see this - the overlay is what I got when I clicked on the grey icon with the green dot for Residence. I'm assuming that some events (eg Research) didn't import because they weren't set up in my Custom Events. But those that did import and have the green dot on the icon have notes showing when I click that icon. All 5 icons that have the green dot (there are 3 you see, and 2 more above for Birth and Death) have similar to what I show above - a note showing up in the overlay screen when clicked. Here he is on my testing site [Website Example URL Removed as Website is Defunct] Roger Edited December 30, 2023 by theKiwi [Website Example URL Removed as Website is Defunct] Quote Link to comment Share on other sites More sharing options...
klooster Posted January 26, 2021 Author Report Share Posted January 26, 2021 Hi Roger, Thank you for trying it out. Yes I see that the notes are importing. So I did the two runs again, see attached gedcom file, Reunion-Kloosterman-N2x-BbEdit runs Imported all current data into TNG, NO NOTES, see 3 attached print screens. So what is going wrong ????????????? PS: emptied the cache Reinstalled all the important TNg gedcom import php 13.02 files again. Then I imported the Reunion-Kloosterman-NO-BbEdit runs again. Now the notes are imported and visible on my local host test site, but wit the original problem where this help question originally started. In admin person only the @Nxx@ and no text visble see last printscreen. Reunion-Kloosterman-N2x-BbEdit runs.ged Reunion-Kloosterman-NO-BbEdit runs.ged Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 26, 2021 Report Share Posted January 26, 2021 Well basically I'm stumped. But a couple of things: Why is TNG showing you the grey icon with a green dot if that note is empty? If there is no note it should show just the grey icon. I notice that all the empty events are listed at the end of the page. In TNG Admin ------> Setup ------> General Settings ------> Miscellaneous, what do you have chosen for "Show Notes"? Probably "In Notes section"? Change that to "Underneath events, except general notes" and see if that makes any difference. If you're doing all this on your localhost, then try going to TNG Admin ------> Setup ------> General Settings ------> Table Creation tab, and click the button to Create the Tables. This will wipe out everything (including your User setup).** Now import the GEDCOM file again - is it any different - particularly the issue of the green dot showing when the note is in fact empty? **If you go to TNG Admin ------> Utilities and backup all the tables first, you can restore the Users table after you've done the Create Tables. Roger Quote Link to comment Share on other sites More sharing options...
klooster Posted January 26, 2021 Author Report Share Posted January 26, 2021 Hi Roger, did as you suggested: 1.] In TNG Admin ------> Setup ------> General Settings ------> Miscellaneous, UNDERNEATH EVENTS, EXCEPT GENERAL NOTES Imported the 2 x BbEdit Gedcom run, no notes. 2.] New tables, Imported the Imported the 2 x BbEdit Gedcom run, no notes. See printscreens. There is aGreen Dot, but the note is empty ????? I SURRENDER, Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 26, 2021 Report Share Posted January 26, 2021 Here's an oddity... versus See the difference in number of notes? Are all the Custom Events set to Accept after you cleared the tables and started over? What's odd is that the small empty circle indicates TNG thinks there's a Note, but there's nothing in it - I guess that lines up with the green dot showing, but there's no note. I suggest you write to Darrin again, and reference this thread and see if he has any thoughts on this. Roger Quote Link to comment Share on other sites More sharing options...
klooster Posted January 26, 2021 Author Report Share Posted January 26, 2021 Thanks for all the time and effort Roger!! Yes I did restore the Custom Events. I'll contact Darrin again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.