DeepBlueCLtd / LegacyMan

Legacy content for Field Service Manual
https://deepbluecltd.github.io/LegacyMan/index.html
Apache License 2.0
2 stars 0 forks source link

A23 - New style of non-standard category #475

Closed IanMayo closed 12 months ago

IanMayo commented 1 year ago

The category page for one country has a unique layout (A23).

It lists all of the installations by name, but doesn't include the normal summary information.

This page fails the TD colspan:7 test in parser.py at around line 332. Where we encounter this failing file pattern we should write a line to the console reminding us that this non-standard file (give name) has not been parsed.

Once I've created a mock version of the file we can process it.

Issue appears to be because this trailing layer in Wales_Composite.html is being processed instead of BottomLayer/PageLayer: https://github.com/DeepBlueCLtd/LegacyMan/pull/493/commits/0177ffec2c71e1846c3f1eb2c09b8b04b852204f#diff-62d7a66c9ac29965990cfdd82f883b16dbb10d8629297430d00192dc4d609bb2R139

robintw commented 1 year ago

The problem with this is that we use the existence (or not) of a colspan:7 to decide whether to process the country as a NS country or a standard country - in the call to does_image_links_table_exist at line 165.

Is there another way we can easily identify this weird country?

IanMayo commented 1 year ago

Aah. this is at the category table level, not the country level.

The country has an ImageLinksTable. As we navigate those links, each normally links to a Category Table, except for this special case.

How about I introduce a non-visible Div, with an id handle_as_generic? When we encounter that, it just gets processed as a generic file. The non-visible div won't get pulled through to DITA.

robintw commented 1 year ago

Sounds good. Once you replicate in mock data, I'll add that in.

IanMayo commented 1 year ago

The target file does not have a colspan:7 in the page. But, import currently fails when parser.py encounters such a file. So, we're currently just reporting the issue, rather than crashing. Code change here: https://github.com/DeepBlueCLtd/LegacyMan/pull/483/commits/7af2934708d1a2bd15df4ae5b69930c54b68efc4

robintw commented 1 year ago

Fixed in #489

IanMayo commented 1 year ago

Re-open, the page is empty. Update the mock data to more accurately reflect the pattern in use,

robintw commented 1 year ago

This might also be fixed by the fix for #494. Can you check once you've merged the latest PR and then update with further info/more mock data if it's still broken?

IanMayo commented 12 months ago

Yes this file (wales_composite) is being correctly parsed.