diff --git a/scripts/compare.py b/scripts/compare.py new file mode 100644 index 0000000..d92c099 --- /dev/null +++ b/scripts/compare.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python3 +"""Compare Astro preview site content against original scraped HTML.""" +import os, re, sys, urllib.request, html + +PREVIEW_BASE = "https://componentowl-preview.pages.dev" +ORIGINAL_DIR = "/tmp/cowl-site/www.componentowl.com" + +def strip_html(text): + text = re.sub(r'', '', text, flags=re.DOTALL) + text = re.sub(r'', '', text, flags=re.DOTALL) + text = re.sub(r'<[^>]+>', ' ', text) + text = html.unescape(text) + text = re.sub(r'\s+', ' ', text).strip() + return text + +def extract_links(text): + hrefs = set(re.findall(r'href="([^"]+)"', text)) + return hrefs + +def fetch_url(url): + try: + req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"}) + with urllib.request.urlopen(req, timeout=10) as r: + return r.read().decode('utf-8', errors='ignore') + except: + return None + +pages = [ + '', 'better-listview', 'better-thumbnail-browser', 'better-splitbutton', + 'better-listview-express', 'blog', 'articles', 'sitemap', + 'about-us', 'support', 'eula', 'privacy-policy', 'disclaimer', + 'pricing-licensing/better-listview', 'pricing-licensing/better-thumbnail-browser', + 'pricing-licensing/better-splitbutton', 'comics' +] + +print(f"{'Page':<45} | {'Orig':>6} | {'Preview':>7} | {'Diff':>6} | {'Links ±':>8}") +print("-" * 85) + +issues = [] +for page in pages: + orig_file = page if page else 'index' + orig_path = os.path.join(ORIGINAL_DIR, orig_file + '.html') + if not os.path.exists(orig_path): + orig_path = os.path.join(ORIGINAL_DIR, orig_file, 'index.html') + + if os.path.exists(orig_path): + orig_html = open(orig_path).read() + else: + print(f"{page or 'index':<45} | {'NORIG':>6} |") + continue + + preview_html = fetch_url(f"{PREVIEW_BASE}/{page}") or fetch_url(f"{PREVIEW_BASE}/{page}.html") + if not preview_html: + print(f"{page or 'index':<45} | {len(strip_html(orig_html)):>6} | {'MISS':>7} |") + issues.append(f"MISSING: {page or 'index'}") + continue + + ot = strip_html(orig_html) + pt = strip_html(preview_html) + ol, pl = len(ot), len(pt) + diff = ((pl - ol) / max(ol, 1)) * 100 + + oh = extract_links(orig_html) + ph = extract_links(preview_html) + ml = len(oh - ph) + + flag = "" + if diff < -20: + flag = " ⚠️" + issues.append(f"LOSS {diff:.0f}%: {page or 'index'}") + if ml > 5: + flag += " 🔗" + issues.append(f"LINKS -{ml}: {page or 'index'}") + + print(f"{page or 'index':<45} | {ol:>6} | {pl:>7} | {diff:>+5.0f}% | {-ml:>+7}{flag}") + +print() +if issues: + print(f"ISSUES ({len(issues)}):") + for i in issues: print(f" {i}") +else: + print("All pages look good!") diff --git a/src/pages/articles.astro b/src/pages/articles.astro index 17031bb..6a299d5 100644 --- a/src/pages/articles.astro +++ b/src/pages/articles.astro @@ -1,6 +1,6 @@ --- import Base from '../layouts/Base.astro'; -const title = "Better ListView .NET control: Improved List View control for C# and VB.NET (Windows Forms)"; +const title = "Articles for .NET developers - ComponentOwl"; const description = "Better ListView by Component Owl is a .NET WinForms control designed to replace the standard list view control included with C#/VB.net."; const keywords = "list view, listview, list view control, list view component, .net list view, list view replacement, list view alternative, improved list view, enhanced list view"; const rawContent = `
The information contained in this website is for general information purposes only. The information is provided by Jiri Novotny and +Dextronet.com and while we endeavor to keep the information up to date and correct, we make no representations or warranties of any kind, +express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, +products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore +strictly at your own risk. All content is provided "as is".
+ +In no event will we be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss +or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website.
+ +Through this website you are able to link to other websites which are not under our control. We have no control over the nature, content +and availability of those sites. The inclusion of any links does not necessarily imply a recommendation or endorse the views expressed +within them.
+ +Every effort is made to keep the website up and running smoothly. However, Jiri Novotny and Dextronet.com take no responsibility for, +and will not be liable for, the website or any related products or services being temporarily unavailable due to technical issues +beyond our control.
+ +All software offered by Jiri Novotny and Dextronet.com comes with End User License Agreement that you are bound to accept and agree +to in order to install and use the software.
+ +This website and its content is copyright of Jiri Novotny and Dextronet.com © Jiri Novotny and Dextronet.com 2005-2010. All rights reserved.
+ +The information contained in this website is for general information purposes only. The information is provided by ComponentOwl.com and while we endeavour to keep the information up to date and correct, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk.
- -In no event will we be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website.
- -Through this website you are able to link to other websites which are not under the control of ComponentOwl.com. We have no control over the nature, content and availability of those sites. The inclusion of any links does not necessarily imply a recommendation or endorse the views expressed within them.
- -Every effort is made to keep the website up and running smoothly. However, ComponentOwl.com takes no responsibility for, and will not be liable for, the website being temporarily unavailable due to technical issues beyond our control.
- -All content on this website, including but not limited to text, graphics, logos, images, and software, is the property of ComponentOwl.com or its content suppliers and is protected by international copyright laws.
- -
Better ListView has hundreds of extra features compared to the regular .NET ListView control. Some of the most notable include:
- -To put it simply, there is nothing like Better ListView out there. Nothing.
- -Better ListView has been designed as a component that can easily replace the original ListView control supplied with .NET. There is virtually no learning needed. It's just intuitive.
- -Better ListView looks native and always fully utilizes the current system theme (so there is no weird inconsistent look), and it also behaves exactly like it should. We've modeled it after the original list view component and the list view used in Windows Explorer — everyone already knows how to use it.
- -We put extreme attention to details. All the little quirks and nuances that drive us crazy when it comes to components of many smaller vendors are resolved in Better ListView. You will be amazed how flexible and customizable it is, and how great it feels to use it.
- -Most importantly, Better ListView is packed full of great features.
- -If you are wondering why we created Better ListView, you can read our story.
- -


Better ListView has hundreds of extra features, compared to the regular .NET ListView control. + Plus, it removes all its limitations and bugs. Some of the most notable extra features include:
+ +“Better List View is awesome.” – Daniel Nolan+
To put it simply, there is nothing like Better ListView out there. Nothing.
+ +Better ListView has been designed as a component that can easily replace the original + ListView control supplied with .NET.
+ +There is virtually no learning needed. It’s just intuitive.
+ +Better ListView looks native and always fully utilizes the current system theme (so there is + no weird inconsistent look), and it also behaves exactly like it should. We’ve modeled it after + the original list view component and the list view used in Windows Explorer – everyone already + knows how to use it. It fully leverages the previous user knowledge.
+ +We put extreme attention to details. All the little quirks and nuances that drive us crazy when + it comes to components of many smaller vendors are resolved in Better ListView. You will be + amazed how flexible and customizable it is, and how great it feels to use it. The users of your + application will feel right at home.
+ +Most importantly, Better ListView is packed full of great features.
+ +If you are wondering why we created Better ListView, you can read + our story.
+ +And by the way, Better ListView comes with awesome samples explorer. Download and install + the trial package right now and see for yourself what Better ListView can do.
+Better ListView really is better - it kills the standard .NET ListView in +both performance and flexibility. I’ll never use anything else.+ Mitchell Vincent, KSoftware +
“Wow! This is so easy to use. I’m not a very experienced VB.NET programmer, but I was up and running w/ Better List View in a matter of minutes. Great product! It’s just what I needed.” ++ Bret Reece, Five O’clock Software +
Overall what I really like about Better ListView is that you’ve gone for elegance, simplicity and consistency in the appearance and the behaviour of the control. ++ Daniel Nolan +
The control is very easy and intuitive to use and is well documented.+ DevProConnections.com Review +
Purchase the ideal replacement component for .NET ListView.
-Purchase the ideal replacement component for .NET ListView.
- -All licenses are:
+Subscription gets you:
+What license do I need?
+Better SplitButton is free for non-commercial use.
-Better SplitButton is free for non-commercial use.
- -Better SplitButton is completely free for non-commercial projects. No registration required.
+The commercial license includes full source code so you can customize the control to your needs.
+Both licenses include royalty-free distribution rights.
+What license do I need?
+Contact us if you have any questions about licensing.
+ +Purchase thumbnail image viewing and browsing component for .NET.
-Choose the license that best fits your needs.
- -All licenses are:
+Subscription gets you:
+What license do I need?
+If you have any questions, suggestions, bug reports, or need help with any of our products, please don't hesitate to contact us. We usually reply within 24 hours or sooner.
- -You can also email us directly at: support (at) componentowl (dot) com
- -You can contact us at support (at) componentowl (dot) com or use the form below.
+We will answer you as soon as possible, usually in 24 hours.
+ +Please note: We provide support for our products only. For general .NET programming questions, please use StackOverflow.
Please make sure that our reply will not be marked as spam by your filter (eg. add support (at) componentowl (dot) com to your white list) and that you typed your email address correctly, otherwise we will not be able to reply.
Better ListView on StackOverflow
+ +