From 87afacd48d93f6d6f1a06f0d3f27e1bff6ac1730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Dvo=C5=99=C3=A1k?= <150935816+Dvorinka@users.noreply.github.com> Date: Thu, 22 May 2025 09:32:58 +0200 Subject: [PATCH] Add files via upload --- contact-scrape-test/contact-scrape.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/contact-scrape-test/contact-scrape.go b/contact-scrape-test/contact-scrape.go index 6f96978..6f803e9 100644 --- a/contact-scrape-test/contact-scrape.go +++ b/contact-scrape-test/contact-scrape.go @@ -217,9 +217,13 @@ func parseTable(f *excelize.File, sheetName, startCol, endCol string, tableNum i continue } - // Check for "Aktualizace" - end of data - if len(row) > nameCol && strings.Contains(strings.ToLower(row[nameCol]), "aktualizace") { - break + // Skip general contacts and update date line + if strings.Contains(row[nameCol], "převzetí hovoru") || + strings.Contains(row[nameCol], "hlavní vchod") || + strings.Contains(row[nameCol], "brána") || + strings.HasPrefix(row[nameCol], "Aktualizace dne") || + strings.HasPrefix(row[nameCol], "Poslední aktualizace") { + continue } // Check for special formatting rows (like "*02(xx)") @@ -246,11 +250,6 @@ func parseTable(f *excelize.File, sheetName, startCol, endCol string, tableNum i phone = cleanPhoneNumber(phone) servicePhone = cleanPhoneNumber(servicePhone) - // Skip general contacts that don't have names - if strings.Contains(name, "převzetí hovoru") || strings.Contains(name, "hlavní vchod") || strings.Contains(name, "brána") { - continue - } - // If we have a name, start a new contact if name != "" && !strings.Contains(name, "(") { currentContact = &Contact{