* Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by jimlad68 » 25 Dec 2022 21:30

Plugin-Improve Website or CD DVD HTML

It is a while since I used this, probably FHv6, but when I did I am sure when data on the same line was separated by | (bar) , it created a "table" effect "aligned columns".

Perhaps a different method is required for FHv7 but I think I followed the help
Select a Tab separator from the dropdown list, and any text with that column separator will be converted into tidy aligned columns. {TAB} means the horizontal tab character, and the option {TAB}… means any number of consecutive tabs will be treated as one column separator.
temp mlf.png
temp mlf.png (26.7 KiB) Viewed 1545 times
I tried various options including "None" but noted that if I repeated the conversion with a different tab or "none", none of the output files had a date change and showed "0 converted lines ...."

There is no Rich Text involved.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
tatewise
Megastar
Posts: 27076
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by tatewise » 26 Dec 2022 12:33

Yes, sorry.
It looks like the plugin does not cope with rich text format that contains Bar | separated text, or any other kind of separator.
I guess I assumed that when converted to rich text that tables would be used.

I will investigate how the plugin needs changing to cope with rich text.
On first inspection, it looks like the FH V7 format even for plain text has changed so not detected by the plugin.

Have you considered using the AS Tools > Census Source Convert... feature?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by jimlad68 » 26 Dec 2022 13:12

tatewise wrote:
26 Dec 2022 12:33
It looks like the plugin does not cope with rich text format that contains Bar | separated text, or any other kind of separator.
Sorry Mike, I said there was NO Rich Text, just unformatted text carried over from FHv6. I did check to make sure no formatted text had been created "inadvertently".

In consequence the AS Tools > Census Source Convert is not relevant as at this stage I do not want to move to formatted text.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
tatewise
Megastar
Posts: 27076
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by tatewise » 26 Dec 2022 13:52

As I said, it seems that in FH V7 the web page format has changed even for plain text so the plugin does not find what it was expecting. My quick test suggests that the text font even for plain text is adjusted to Verdana. I don't know why.
So I have several issues to investigate.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by jimlad68 » 26 Dec 2022 15:04

Mike or anyone else interested, an observation: I am sure you understand this better than me and of no great import:

Just out of curiosity I was experimenting converting my | bar separated data. For me AS did not give a very good response so I thought I would try via MSWord.

- copy paste from a Source pop out ctrl+alt+doubleclick "Rich Text" box gives
Ellen Crook | Head | W | F | 59 | | Lancashire, Bolton
This identical to that "displayed" in the "text from Source" box

- copy paste from a Source "text from Source" box gives
Ellen Crook \| Head \| W \| F \| 59 \| \| Lancashire, Bolton
Adding backslash in front of the |. I suspect this is something to do with FHv7 using | in its Rich Text.

So in MSWord I just did some simple convert to tables of the lines with a | in.
Then ctrl+V paste back into FHv7 "text from Source" box
And it looked nice rich text table and appeared in a report OK.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
tatewise
Megastar
Posts: 27076
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by tatewise » 26 Dec 2022 16:00

There are some possible misunderstandings in your posting.

ctrl+alt+doubleclick does NOT open a "Rich Text" box.
That special shortcut opens a "Plain Text" editor box (equivalent to the FH V6 editor box).
However, if the text is formatted as Rich Text then the lower left Rich Text box is ticked and all the Rich Text control characters are shown, i.e. <b> for bold, and backslash \ escape before special characters like bar |.

A standard doubleclick opens the FH V7 "Rich Text" editor window with a 'word-processor' toolbar across the top.

So contrary to your earlier statement, it seems you are using Rich Text formatted text, otherwise the backslash \ escape characters would not exist.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by jimlad68 » 26 Dec 2022 17:02

Mike, apologies for my definitions, I was getting mixed up as the ctrl+alt+doubleclick gives the Rich Text Tick box!

However, I am pretty certain that it is unformatted text, the images below show the same data.

With these copy/paste to MSWord results (I've added FH V7 "Rich Text" editor)

- copy paste from a Source pop out ctrl+alt+doubleclick "Plain Text" editor box gives

Code: Select all

Ellen         Crook | Head | W | F | 59 |                    | Lancashire, Bolton
This identical to that "displayed" in the "text from Source" box

- copy paste from a Source "text from Source" box AND the doubleclick FH V7 "Rich Text" editor gives

Code: Select all

Ellen         Crook \| Head \| W \| F \| 59 \|                    \| Lancashire, Bolton
Adding backslash in front of the |.
.
pic1.jpg
pic1.jpg (44.64 KiB) Viewed 1434 times
pic2.jpg
pic2.jpg (27.63 KiB) Viewed 1434 times
Last edited by jimlad68 on 26 Dec 2022 17:12, edited 2 times in total.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
tatewise
Megastar
Posts: 27076
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by tatewise » 26 Dec 2022 17:10

Yes, I can confirm the same behaviour.
What is a little unexpected is that the Rich Text escape \ is included when copying from a plain text field.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by jimlad68 » 26 Dec 2022 17:21

tatewise wrote:
26 Dec 2022 17:10
What is a little unexpected is that the Rich Text escape \ is included when copying from a plain text field.
I was wondering if it is because FHv7 uses the | as part of its tables. I amended a | to a tab. It stayed as Unformatted text but copypaste to MSWord gave an underscore. So that might suggest there are various "paste alterations"

Code: Select all

Ellen         Crook \| Head \| W \| F \| 59 \|                    _ Lancashire, Bolton
Anyway, not a major problem, just another thing to be aware of.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
tatewise
Megastar
Posts: 27076
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by tatewise » 26 Dec 2022 17:31

Yes, I can understand that if it were a Rich Text field, but it is a plain text field which cannot have Rich Text tables or Rich Text anything else, so why the escape \ is needed is a mystery.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Mark1834
Megastar
Posts: 2146
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by Mark1834 » 26 Dec 2022 17:47

tatewise wrote:
26 Dec 2022 16:00
However, if the text is formatted as Rich Text then the lower left Rich Text box is ticked and all the Rich Text control characters are shown, i.e. <b> for bold, and backslash \ escape before special characters like bar |.
Are you sure that is always the case? The first screengrab is a tabulated Text from Source ex Find a Grave, and the second one is exactly the same field shown in the plain text editor. There are no escape slashes in front of the table uprights.
Rich.PNG
Rich.PNG (17.76 KiB) Viewed 1419 times
Plain.PNG
Plain.PNG (12.53 KiB) Viewed 1419 times
The definition of Rich Text in FH can be a little confusing. It's perfectly possible to create a table without using rich text if you use a monospaced font and the appropriate ASCII characters, exactly as those of us of a certain age ;) may remember doing in DOS a long time ago.
Also, whether a text field is "rich" or not does not depend solely on the content. "Hello World" must be rich text, as it contains bold and italic highlights, but "Hello World" could be either rich text or plain text.
There are two ways to be sure whether you have rich text or not. The Rich Text Tabulation plugin lists all rich text, not just fields containing rich characters. The second is to examine the project GEDCOM file in a text editor. If it contains _FMT tags, you have rich text, and if it doesn't you don't. Both tests should be definitive, and get around any misinterpretation arising just from inspecting what the text looks like.
Mark Draper

User avatar
tatewise
Megastar
Posts: 27076
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by tatewise » 26 Dec 2022 17:56

Mark1834 wrote:
26 Dec 2022 17:47
There are no escape slashes in front of the table uprights.
Well of course not. :roll: They are the special Rich Text magic table cell separator use of bar | characters.
The escape \ is only needed to force the plain text use of such characters as explained in the Rich Text Format specification to prevent them from being misinterpreted as table cell separators.
As an experiment try inserting a bar | or less than < or greater than > character into a table cell and see what happens.
It is much the same kind of escaping that is necessary for special HTML characters.

BTW: The Rich Text tick box in your screenshot also definitively indicates whether the text is rich or not.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Mark1834
Megastar
Posts: 2146
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by Mark1834 » 26 Dec 2022 18:05

OK, that makes sense. I was confused by your comment immediately prior to my post that appeared to suggest that plain text can’t contain tables. The tick-box, _FMT tag and plugin IsRich() function all seem to be linked to the same property. Tick box is great for single fields, but the other two allow checking the entire project in one step.
Last edited by Mark1834 on 26 Dec 2022 18:10, edited 1 time in total.
Mark Draper

User avatar
NickWalker
Megastar
Posts: 2401
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by NickWalker » 26 Dec 2022 18:08

jimlad68 wrote:
26 Dec 2022 15:04
Just out of curiosity I was experimenting converting my | bar separated data. For me AS did not give a very good response
I wonder what you mean by AS not giving a good response?
Nick Walker
Ancestral Sources Developer

https://fhug.org.uk/kb/kb-article/ancestral-sources/

User avatar
tatewise
Megastar
Posts: 27076
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by tatewise » 26 Dec 2022 18:09

I said "plain text cannot have Rich Text tables" which I stand by.
The plain text tables you mentioned are not Rich Text text tables.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Mark1834
Megastar
Posts: 2146
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by Mark1834 » 26 Dec 2022 18:15

No problem - we’ve all got examples of comments being taken to mean something different from what was intended... :)
Mark Draper

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by jimlad68 » 26 Dec 2022 18:20

NickWalker wrote:
26 Dec 2022 18:08
I wonder what you mean by AS not giving a good response?
Apologies bit rushed reply but as below. It might be that I have not studied the docs enough, this was my 2nd attempt. There are many added spaces which might upset things!
pic3.jpg
pic3.jpg (75.26 KiB) Viewed 1391 times
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by jimlad68 » 26 Dec 2022 21:57

NickWalker wrote:
26 Dec 2022 18:08
I wonder what you mean by AS not giving a good response?
OK, I removed all the "double spaces" leaving only "single spaces" and the result was perfect. So I don't know if you want to make your conversion cope with that kind of situation, not something I need for the present. (I changed the AS font to Consolas monospaced).
.
pic4.jpg
pic4.jpg (58.72 KiB) Viewed 1354 times
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
NickWalker
Megastar
Posts: 2401
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by NickWalker » 26 Dec 2022 22:53

The 'result' is in the rich-text tab. There is no need to make the font into a mono-space font - there are valid reasons to do that if using plain text, but not rich-text - monospace just makes the table take up more room. Also no point doing this at all for the AS interface - the font used in the rich-text box is defined differently.
Nick Walker
Ancestral Sources Developer

https://fhug.org.uk/kb/kb-article/ancestral-sources/

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by jimlad68 » 26 Dec 2022 23:25

NickWalker wrote:
26 Dec 2022 22:53
The 'result' is in the rich-text tab.
I have not set up for rich text, so I'm thinking that is why nothing showed in the rich-text tab for me.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
NickWalker
Megastar
Posts: 2401
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by NickWalker » 26 Dec 2022 23:36

That's correct.
Nick Walker
Ancestral Sources Developer

https://fhug.org.uk/kb/kb-article/ancestral-sources/

User avatar
tatewise
Megastar
Posts: 27076
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by tatewise » 29 Dec 2022 11:00

Jim, this is to let you know that I have been working on fixing the Improve Website or CD DVD HTML plugin for FH V7.
Although I had updated many things for FH V7 this feature had slipped through the net.
The way FH V7 formats Notes and Text From Source in HTML is radically different from FH V6 and is more challenging.
I think I've got a prototype working for FH V7 but still needs work to ensure it is backwards compatible with FH V6.
So if you are desperately in need of the | (bar) conversion working then I could attach the prototype, but it would be better if you could wait until the plugin is fully operational for both FH V6 and FH V7.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by jimlad68 » 29 Dec 2022 11:13

Mike, absolutely no urgency, I originally only noticed the feature by chance and thought that was very nice automatic "formatting", especially as "web type" pages seem to lose multiple "spaces". Should you need it testing on FHv7, just drop a copy on here as usual, although I no longer have FHv6 installed anywhere.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
tatewise
Megastar
Posts: 27076
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by tatewise » 13 Jan 2023 16:19

Sorry, for the delay. Christmas and then man-flu and then a faulty laptop battery got in the way!

Anyway, try the attached Improve Website or CD DVD HTML plugin Version 3.2.4 Date 30 Dec 2022 ZIP file.
It is a ZIP file because the raw Plugin is bigger than the Forum attachments limit.
So you must right-click the downloaded ZIP file and use Extract All...
Then double-click the extracted FH Plugin (Lua) Improve Website or CD DVD HTML.fh_lua file to auto-install it into FH.

This should handle the conversion of | Bar separated text into tabulated tables and should work in both FH V7 and FH V6.
Attachments
Improve Website or CD DVD HTML.zip
Version 3.2.4 Date 30 Dec 2022 ZIP file
(253.22 KiB) Downloaded 17 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Plugin-Improve Website or CD DVD HTML- | (bar) does not create aligned columns

Post by jimlad68 » 14 Jan 2023 13:17

Mike, these are my results. I cannot remember if it worked better before or was just the same.
- Wide screen is good, although by expanding to the full width, creates some big horizontal spaces, especially on smaller width records.
fhugwed-01.jpg
fhugwed-01.jpg (32.56 KiB) Viewed 957 times
- Medium width screen - no wasted space, but wrapped lines start under the column break| , making the column break not as easy to read. (n.b. I have a space after my |, so would not expect the next line to align exactly, although I do think it makes the columns clearer).
fhugwed-02.jpg
fhugwed-02.jpg (31.21 KiB) Viewed 957 times
- Narrow width screen - Some of the small width columns very disjointed.
fhugwed-03.jpg
fhugwed-03.jpg (26.2 KiB) Viewed 957 times
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

Post Reply