From 57ff09d2eefefa2462a2af0175e3e8164c7bc828 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Mon, 5 Jan 2026 21:10:33 +0800 Subject: Sharpen Bumblebee post. --- _site/feed.xml | 2 +- _site/index.html | 2 +- _site/log/bumblebee/index.html | 50 ++++++++++++++++++++---------------------- _site/posts.xml | 2 +- _site/projects/index.html | 4 ++-- _site/robots.txt | 2 +- _site/sitemap.xml | 28 +++++++++++------------ 7 files changed, 44 insertions(+), 46 deletions(-) (limited to '_site') diff --git a/_site/feed.xml b/_site/feed.xml index 5d9d93f..4c3b746 100644 --- a/_site/feed.xml +++ b/_site/feed.xml @@ -1 +1 @@ -Jekyll2026-01-05T18:48:39+08:00http://localhost:4000/feed.xmlASCIIMX | LogW. D. Sadeep MadurangeSearch engine (Perl + FastCGI + SA)2026-01-03T00:00:00+08:002026-01-03T00:00:00+08:00http://localhost:4000/log/site-searchW. D. Sadeep MadurangeMatrix Rain: 2025 refactor2025-12-21T00:00:00+08:002025-12-21T00:00:00+08:00http://localhost:4000/log/matrix-digital-rainW. D. Sadeep MadurangeFingerprint door lock (LP)2025-08-18T00:00:00+08:002025-08-18T00:00:00+08:00http://localhost:4000/log/fpm-door-lock-lpW. D. Sadeep MadurangeHigh-side MOSFET switching2025-06-22T00:00:00+08:002025-06-22T00:00:00+08:00http://localhost:4000/log/mosfet-switchesW. D. Sadeep MadurangeATmega328P at 3.3V and 5V2025-06-10T00:00:00+08:002025-06-10T00:00:00+08:00http://localhost:4000/log/arduino-unoW. D. Sadeep MadurangeFingerprint door lock (RF)2025-06-05T00:00:00+08:002025-06-05T00:00:00+08:00http://localhost:4000/log/fpm-door-lock-rfW. D. Sadeep MadurangeBumblebee: browser automation2025-04-02T00:00:00+08:002025-04-02T00:00:00+08:00http://localhost:4000/log/bumblebeeW. D. Sadeep MadurangeATSAM3X8E bare-metal notes2024-09-16T00:00:00+08:002024-09-16T00:00:00+08:00http://localhost:4000/log/arduino-dueW. D. Sadeep MadurangeEtlas: e-paper dashboard2024-09-05T00:00:00+08:002024-09-05T00:00:00+08:00http://localhost:4000/log/etlasW. D. Sadeep Madurange512 KB e-reader2023-10-24T00:00:00+08:002023-10-24T00:00:00+08:00http://localhost:4000/log/e-readerW. D. Sadeep Madurange \ No newline at end of file +Jekyll2026-01-05T22:16:02+08:00/feed.xmlASCIIMX | LogW. D. Sadeep MadurangeSearch engine (Perl + FastCGI + SA)2026-01-03T00:00:00+08:002026-01-03T00:00:00+08:00/log/site-searchW. D. Sadeep MadurangeMatrix Rain: 2025 refactor2025-12-21T00:00:00+08:002025-12-21T00:00:00+08:00/log/matrix-digital-rainW. D. Sadeep MadurangeFingerprint door lock (LP)2025-08-18T00:00:00+08:002025-08-18T00:00:00+08:00/log/fpm-door-lock-lpW. D. Sadeep MadurangeHigh-side MOSFET switching2025-06-22T00:00:00+08:002025-06-22T00:00:00+08:00/log/mosfet-switchesW. D. Sadeep MadurangeATmega328P at 3.3V and 5V2025-06-10T00:00:00+08:002025-06-10T00:00:00+08:00/log/arduino-unoW. D. Sadeep MadurangeFingerprint door lock (RF)2025-06-05T00:00:00+08:002025-06-05T00:00:00+08:00/log/fpm-door-lock-rfW. D. Sadeep MadurangeBumblebee: web script synthesizer2025-04-02T00:00:00+08:002025-04-02T00:00:00+08:00/log/bumblebeeW. D. Sadeep MadurangeATSAM3X8E bare-metal notes2024-09-16T00:00:00+08:002024-09-16T00:00:00+08:00/log/arduino-dueW. D. Sadeep MadurangeEtlas: e-paper dashboard2024-09-05T00:00:00+08:002024-09-05T00:00:00+08:00/log/etlasW. D. Sadeep Madurange512 KB e-reader2023-10-24T00:00:00+08:002023-10-24T00:00:00+08:00/log/e-readerW. D. Sadeep Madurange \ No newline at end of file diff --git a/_site/index.html b/_site/index.html index 5b62029..62cc0dd 100644 --- a/_site/index.html +++ b/_site/index.html @@ -136,7 +136,7 @@ - Bumblebee: browser automation + Bumblebee: web script synthesizer diff --git a/_site/log/bumblebee/index.html b/_site/log/bumblebee/index.html index f1881aa..5f5c3b0 100644 --- a/_site/log/bumblebee/index.html +++ b/_site/log/bumblebee/index.html @@ -3,7 +3,7 @@ - Bumblebee: browser automation + Bumblebee: web script synthesizer @@ -37,44 +37,42 @@
-

BUMBLEBEE: BROWSER AUTOMATION

+

BUMBLEBEE: WEB SCRIPT SYNTHESIZER

02 APRIL 2025

-

Built with Andy Zhang for an employer. Tool to automate web scraping script -generation.

+

Work project. Browser session-to-code conversion.

-

Manual script authoring took hours. Scripts poorly optimized, CPUs maxed -constantly, cloud costs excessive.

+

Architecture: C# WinForms host, embedded browser, code editor. Browser +extension rejected due to security policy and shallow event control.

-

Initially considered browser extension. Desktop app won—extensions don’t give -deep event control. Company policy blocked extensions anyway.

+

Tool evaluation:

-

First prototype: C# Win Forms + CefSharp.

+
    +
  • CefSharp: Discarded. API lacked elegance.
  • +
  • WebView2: Selected. Better WinForms integration. Hard dependency on +Microsoft Edge–acceptable for corporate Windows environments.
  • +
-

Second prototype: C# Win Forms + WebView2. Packaging and distribution more -complex, but the API is well-designed; integrates well with Win Forms.

+

Implementation:

-

Microsoft Edge required. Portability not a concern, only need to target -controlled Windows environments. Choosing WebView2 over CefSharp.

+
    +
  1. Interception: Injected JS hooks; internal browser event monitoring +(pop-ups/downloads).
  2. +
  3. Transformation: Event → Token → Instruction Table → String.
  4. +
  5. Optimization: Parallel event/text lists processing; rendered +in Scintilla.NET
  6. +
-

Embed Scintilla.NET editor for -overriding generated script.

+

Bug: Manual mid-session overrides desync code/event lists, bypassing optimizer. +Linear lists inadequate for state synchronization. Need to rethink data +structures; look to compiler Abstract Syntax Trees (AST) for intermediate +representation.

-

Code generation sequence: Inject JavaScript to intercept client-side events. -Capture internal browser events (pop-ups, file downloads). Event -raised → parsed into a token → insert to list → interpret event → look up -instruction from a table → form instruction with event args → insert text to a -parallel list → run both lists through optimizer → update Scintilla editor.

- -

Limitation: manual overriding via Scintilla editor mid-session causes the code -list to go out of sync with the event list. Optimizer can’t handle this yet.

- -

Note to self: need to rethink the event/text list data structures in the -context of the optimizer–look to compilers for inspiration maybe?

+

Verdict: Serves its purpose.

diff --git a/_site/posts.xml b/_site/posts.xml index 2b2377d..d381285 100644 --- a/_site/posts.xml +++ b/_site/posts.xml @@ -1 +1 @@ -Jekyll2026-01-05T18:48:39+08:00http://localhost:4000/posts.xmlASCIIMXW. D. Sadeep Madurange \ No newline at end of file +Jekyll2026-01-05T22:16:02+08:00/posts.xmlASCIIMXW. D. Sadeep Madurange \ No newline at end of file diff --git a/_site/projects/index.html b/_site/projects/index.html index c87b2d7..90732a1 100644 --- a/_site/projects/index.html +++ b/_site/projects/index.html @@ -82,8 +82,8 @@ - Bumblebee: browser automation -
Bumblebee: browser automation
+ Bumblebee: web script synthesizer +
Bumblebee: web script synthesizer
diff --git a/_site/robots.txt b/_site/robots.txt index d297064..e087884 100644 --- a/_site/robots.txt +++ b/_site/robots.txt @@ -1 +1 @@ -Sitemap: http://localhost:4000/sitemap.xml +Sitemap: /sitemap.xml diff --git a/_site/sitemap.xml b/_site/sitemap.xml index a722c6a..ad3bdcd 100644 --- a/_site/sitemap.xml +++ b/_site/sitemap.xml @@ -1,56 +1,56 @@ -http://localhost:4000/log/neo4j-a-star-search/ +/log/neo4j-a-star-search/ 2018-03-06T00:00:00+08:00 -http://localhost:4000/log/e-reader/ +/log/e-reader/ 2023-10-24T00:00:00+08:00 -http://localhost:4000/log/etlas/ +/log/etlas/ 2024-09-05T00:00:00+08:00 -http://localhost:4000/log/arduino-due/ +/log/arduino-due/ 2024-09-16T00:00:00+08:00 -http://localhost:4000/log/bumblebee/ +/log/bumblebee/ 2025-04-02T00:00:00+08:00 -http://localhost:4000/log/fpm-door-lock-rf/ +/log/fpm-door-lock-rf/ 2025-06-05T00:00:00+08:00 -http://localhost:4000/log/arduino-uno/ +/log/arduino-uno/ 2025-06-10T00:00:00+08:00 -http://localhost:4000/log/mosfet-switches/ +/log/mosfet-switches/ 2025-06-22T00:00:00+08:00 -http://localhost:4000/log/fpm-door-lock-lp/ +/log/fpm-door-lock-lp/ 2025-08-18T00:00:00+08:00 -http://localhost:4000/log/matrix-digital-rain/ +/log/matrix-digital-rain/ 2025-12-21T00:00:00+08:00 -http://localhost:4000/log/site-search/ +/log/site-search/ 2026-01-03T00:00:00+08:00 -http://localhost:4000/about/ +/about/ -http://localhost:4000/ +/ -http://localhost:4000/projects/ +/projects/ -- cgit v1.2.3