Page 1 of 1
Convert tabbed text to table
Posted: 03 Jan 2022 17:56
by jelv
Having upgraded to v7 I'm going to use the rich text source transcriptions in Ancestral Sources from now on.
For consistency in the census sources I'd like to go back over all the existing sources and change the tabbed (with | delimiters) in to tables.
Has anyone come up with an easy way to do this?
Re: Convert tabbed text to table
Posted: 03 Jan 2022 18:08
by ColeValleyGirl
Re: Convert tabbed text to table
Posted: 03 Jan 2022 18:13
by jelv
Thanks.
I did several searches on FHUG thinking someone must have done something but never found the right search to find this plug in!
Re: Convert tabbed text to table
Posted: 03 Jan 2022 18:13
by Mark1834
Unfortunately, the plugin doesn’t work for lumped citations. They are trickier for plugins to manage. I have modified it to work with either (I tend to lump simple secondary sources such as FreeReg), but it’s a bit clunky for lumped citations so not really suitable for general use.
Re: Convert tabbed text to table
Posted: 03 Jan 2022 20:54
by jelv
I'm a splitter so it works perfectly for me - thanks Jane.
One minor niggle: the size of the dialog box where you select the text to be converted is always way too small and if you are working on a number of sources you have to stretch the box every time. I've managed to find where it is defined and changed it to HALFxTHIRD which works a lot better.
A technique I've used in the past in a vbasic program was that when the user resized or moved a dialog it remembered the size and position and the next time the program was run they was what it used instead of the default. Is that possible? A brief dip in to the iup reference suggests it might.
Re: Convert tabbed text to table
Posted: 04 Jan 2022 10:21
by tatewise
Yes, John, that is possible, and some plugins do so, especially the more complex ones that are likely to be run repeatedly.
Re: Convert tabbed text to table
Posted: 04 Jan 2022 10:33
by jelv
Could you point me to the code in one that does this and I'll see if I can lift it. It may be a bit of a jump in at the deep end, but it may be a way of starting to learn lua programming. I always find with any programming environment, having a clear goal is a great incentive to learning how.
Re: Convert tabbed text to table
Posted: 04 Jan 2022 10:47
by tatewise
See FHUG Knowledge Base > Snippets > Plugin-related / Lua / Programming >
Preserve User Settings.
Re: Convert tabbed text to table
Posted: 04 Jan 2022 11:11
by jelv
Thanks, I'll take a look.