* 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
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 » 14 Jan 2023 15:44

If I get time I will try and have a further look at whether it is possible to improve the layout.
Some of the problems are similar to the Rich Text wide tables in Reports, etc.
Unfortunately, the way the table cells wrap is governed by the HTML browser features.
However, there appears to be a way to define a hanging indent for wrapped cell text that will indent the overflowing text, so will see if I can get that working.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

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 » 31 Jan 2023 12:32

I've had a chance to investigate the table cell wrapping layout and possibly found a working solution.
It works by giving the table cell separators (such as | bar) a very narrow column of their own (which never wraps).
Thus the actual column text wraps in its own separate column. It seems to work well in my tests.

Try the attached Improve Website or CD DVD HTML plugin Version 3.2.5 Date 31 Jan 2023 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.

It works with FH V7. I have not yet checked if it works with FH V6.
I've added a few more conditions to ensure it only converts genuine candidate tables in Note and Text From Source fields.
Coping with the table separator of Comma , poses a challenge because Note text can contain commas naturally, so this may need further investigation.
Attachments
Improve Website or CD DVD HTML.zip
Version 3.2.5 Date 31 Jan 2023 ZIP file
(253.66 KiB) Downloaded 27 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 » 01 Feb 2023 10:42

Mike, thanks, it might be a day or 2 before I get chance to test. My database is limited (simple?) with no formatted text, so if anyone else wants to test it as well, feel free.
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 » 01 Feb 2023 10:50

Jim, you had suitably 'formatted text' on Sat 14th Jan 2023 when you tested the plugin then. What has changed?

I am also considering a rather different approach by adding 'borders' to all the table cells.
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 » 01 Feb 2023 11:03

nothing, it was only formatted with | (bar) separated, not the new FHv7 Rich formatted, which from your earlier post I got the impression could be used within the new FHv7 tables etc, I have none of that.
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 » 01 Feb 2023 11:18

Jim, I think you are getting the options confused.

Nick Walker pointed out that the new AS and FH Rich Text formatting supports table structures (rather like MS Word).
They automatically become HTML tables in published website pages. My plugin is not applicable for Rich Text tables.

My plugin is for the old FH plain text | (bar) separated tables that do not become HTML tables in web pages.
On Sat 14th Jan you requested that the cell text wrapping produced by my plugin could be better.
This is my attempt to make it better.
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 » 01 Feb 2023 11:33

Mike, yes the old FH plain text | (bar) separated tables that I understand as "simulated" tables, and for me especially when used with a monospaced font. I have a lot of that!
Will report back on that soon. Off to the physio now.
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 » 01 Feb 2023 17:27

Try the attached Improve Website or CD DVD HTML plugin Version 3.2.7 Date 01 Feb 2023 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 is an alternative to V3.2.5 which hides the separator | bar character and spaces the cell text apart.
That allows any cell text that wraps to be more easily identified.
There is also a new tick option to draw grey borders around all the cells, which I think makes the tables much neater.

So when you have finished testing V3.2.5 give this version a try. You can revert back to V3.2.5 by opening its download.
Attachments
Improve Website or CD DVD HTML.zip
Version 3.2.7 Date 01 Feb 2023 ZIP file
(254.11 KiB) Downloaded 25 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 » 01 Feb 2023 17:34

Mike, just done a quick test, I don't know if I am having a senior moment, but it does not seem to do anything with the | (bar). I have tested with a freshly copied project, just 1 very basic individual with lots of census sources, and the only file that changed after the plugin run was _contact.html. The ind6058.html file date modified was not changed.

I reverted to none > 0 converted, tried again with | > 0 converted
Then tried with comma, and got 1 converted with the ind6058.html file date modified this time. And on viewing the file in a browser, the lines with commas was very nicely "table formatted" but the lines with | was not.
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 » 01 Feb 2023 17:36

Quick reply from my phone just seen your or last post which obviously crossed mine so will try again later cheers
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 » 01 Feb 2023 17:47

Please attach the Individual HTML file with | bar separators that did not convert so I can 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 » 01 Feb 2023 20:13

Mike these are before and after v3.2.5 plugin, by chance it also has some commas that it treats as columns.
So, it had been treated for both bar and comma.
I note that outside of the "data files" folder, the font and spacing changes, I suspect to Chrome default.

N.B. I had to zip in order to upload.

I will now have a go with 3.2.7
Attachments
325 before,after plugin.zip
(5.35 KiB) Downloaded 26 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 » 01 Feb 2023 20:55

OK test with 3.2.7

[1] for the commas it worked but not the best formatting, although this was not destined to be pseudo tables.
tempfhout.jpg
tempfhout.jpg (58.77 KiB) Viewed 1159 times
[2] I amended one of the sources to have commas (ensured there was same # of commas in each row) instead of bars, but it still did not work.

[3] I then changed all the census fact Places to have bars instead of commas, and that worked too, but still no comma or bar worked in the sources.
tempfhout2.jpg
tempfhout2.jpg (50.17 KiB) Viewed 1159 times

So, it looks like the bar and the comma both work for a list of facts (which just happen to have some separators in them), but it is not picking them up from the text in the Sources.
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 » 01 Feb 2023 23:16

Thank you. I see now that the FH V7 HTML page formats for each type of Report all need testing against the plugin as they all differ significantly and pose a challenge to detecting when | bar separated tables might legitimately appear.

I have been testing Family Group Sheets and Individual Summary Reports but you are using Descendant Outline reports.

Give me a day or so to test each type of Report format and update the plugin.
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 » 02 Feb 2023 13:08

tatewise wrote:
01 Feb 2023 23:16
but you are using Descendant Outline reports.
Mike, I am using Narrative Report > Descendants by Generation. My reason for this is so I can use the flexibility of narrative sentences to produce a "punchy" list of facts and can also make it easier to perform Word Macros.
tempfhrep1.jpg
tempfhrep1.jpg (107.48 KiB) Viewed 1085 times
tempfhrep2.jpg
tempfhrep2.jpg (107.31 KiB) Viewed 1085 times
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 » 02 Feb 2023 17:53

Thank you. I have revised and retested the plugin against Individual Summary Reports, Family Group Sheets, Narrative Reports and Outline Reports, plus your sample HTML page where I tried both | bar and , comma separators.

Try the attached Improve Website or CD DVD HTML plugin Version 3.2.8 Date 02 Feb 2023 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.
Attachments
Improve Website or CD DVD HTML.zip
Version 3.2.8 Date 02 Feb 2023 ZIP file
(254.16 KiB) Downloaded 28 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 » 03 Feb 2023 17:44

Mike, have tested on similar to my previous posting with 2 very big ancestors lots of descendants and pseudo tabled items.
- Looking excellent
- I like the table borders
- squashed the width, and in chrome word wraps very well, except when very narrow and even then gives a scroll bar so it is viewable OK for the narrowness.

The only issue I found was:
- As far as I can see, if a Fact has a source title with bars in it, it tries to convert that line. I suspect your plugin sees these in the source link. See attached. For me this is of no importance as I do not use bars in source names, but I suppose there is no reason for there not to be! I only chanced on this as I had the setup from previous testing. I must admit I went round in cicles a bit trying to work that out as I had forgotten that test data was there! The moral; always start with fresh data.
after-ind4565.jpg
after-ind4565.jpg (97.96 KiB) Viewed 996 times
I did a limited test with commas and this seemed to have the same problem but using commas in the source name as table separators, so it showed a lot more errors. But it worked well for an "expected" table. I am not sure how useful a comma is, as there are usually commas "all over the place", and within table data, does anyone use it as a separator except within the likes of a csv file and there it can be controlled by putting the data in quotes.
Attachments
before aft plugin328-.zip
(35.74 KiB) Downloaded 24 times
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 » 04 Feb 2023 11:33

Thank you again for the feedback.
The more I investigate both the FH V6 and FH V7 formats of the HTML files the greater becomes the challenge, especially for comma , separators that often occur in Place names and plain text Notes, etc.

For test purposes, I have added bar | and comma , separated tables to Note boxes on various Records, Facts, and Citations as well as Text From Source fields for Citations and Source records.
Some of those tables have plain text sentences both before and after which should not get tabulated.

That has revealed that the algorithm I used for FH V6 is far from satisfactory, so has always failed in some cases.
The FH V6 HTML formats in some cases are similar to the FH V7 HTML formats, which would have failed to tabulate.
The challenge is that very little HTML format is unique to bar | and comma , separated tables.
So the plugin must rely on detecting multiple bar | or comma , separators on at least two consecutive lines plus a few other rules to eliminate special cases.

I've decided to significantly revise the algorithm using the knowledge I have recently gained.
It is not a major rewrite of that section of the plugin but a reorganisation and refinement of the rules.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply