Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work towards warc2zim reading #1173

Merged
merged 80 commits into from
Dec 2, 2023
Merged

Work towards warc2zim reading #1173

merged 80 commits into from
Dec 2, 2023

Conversation

Jaifroid
Copy link
Member

This is more on track than previous attempts, though not working yet.

It achieves the following:

  • Loads the replay_iframe inside our iframe, with the src set to the requested document with a rewritten URL like http://localhost:8080/kiwix-js/zim_name.zim/C/A/mp_/https://example.com/requested_document/ (all done from within the replayWorker);
  • The reuquest for above URL is caught by our service worker and passed back to the replayWorker;
  • ReplayWorker parses that URL and reads the header from our backend;
  • A response is returned to the Service Worker. Our Service Worker returns the response, at which point we get an abrupt "not found" in console.log.

So, it's progress (painstaking), but missing something vital.

@Jaifroid Jaifroid added do-not-merge Sample code dependencies Pull requests that update a dependency file backend zimit Code relating to the support of Zimit-style archives labels Nov 24, 2023
@Jaifroid Jaifroid added this to the v4.0 milestone Nov 24, 2023
@Jaifroid Jaifroid self-assigned this Nov 24, 2023
load.js Fixed Show resolved Hide resolved
service-worker.js Fixed Show fixed Hide fixed
service-worker.js Fixed Show fixed Hide fixed
service-worker.js Fixed Show fixed Hide fixed
@Jaifroid
Copy link
Member Author

Now loading HTML and correctly parsing CSS and most images except those that are dynamically constructed or called by JS / lazy loading.

The issue appears to be that wombat.js has not been added as pre-processor. But this is much better than anything I've tried before.

image

service-worker.js Fixed Show fixed Hide fixed
service-worker.js Fixed Show fixed Hide fixed
service-worker.js Fixed Show fixed Hide fixed
service-worker.js Fixed Show resolved Hide resolved
service-worker.js Fixed Show fixed Hide fixed
service-worker.js Fixed Show fixed Hide fixed
www/js/app.js Dismissed Show dismissed Hide dismissed
www/js/app.js Fixed Show fixed Hide fixed
@Jaifroid
Copy link
Member Author

Jaifroid commented Dec 2, 2023

All issues now fixed in both modes.

@Jaifroid Jaifroid merged commit 74a2b54 into main Dec 2, 2023
9 checks passed
@Jaifroid Jaifroid deleted the Work-towards-warc2zim-reading branch December 2, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend dependencies Pull requests that update a dependency file zimit Code relating to the support of Zimit-style archives
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide support for reading warc2zim / Zimit archives
1 participant