Coder Social home page Coder Social logo

Comments (3)

dibstern avatar dibstern commented on July 19, 2024 9

+1, this is what would make this the tool that I need

from monolith.

Alch-Emi avatar Alch-Emi commented on July 19, 2024

How would this work with pages that are linked to multiple times? Would only one link work, or would the page and every resource it links to be duplicated?

from monolith.

snshn avatar snshn commented on July 19, 2024

If JS was something we could always rely on, then we'd be able to have just one dataURL link to some sub-page, with other links having something like a href="javascript:<click the first link to this resource on the page>". But we can't imply JS is always on, not to mention one of the features of monolith is to strip document off JS (mostly for security and privacy reasons). Hence the only way to do it is likely to cache nested dataURLs but still include them in the final output. Limiting depth and having code to avoid infinite loops would be the key here, but it's hard to predict what may go wrong, it's a very big and complex feature.
Since the main goal of the program is to save the resource as one file, the output should be one file even in case when sub-pages within the same domain are being embedded as dataURLs -- that undoubtedly will result in the file being very large in size and hard to edit due to a hrefs' dataURLs containing whole pages along with their assets; but I'm sure people who will archive web resources that way understand this, and mostly will use this feature for convenience of having one file on their filesystem representing that resource, even if it's very big and ugly. So we can't really save one resource as a separate file here and then just link to it from everywhere, unless we implement two modes of this feature: one where it's one file, and the other where it saves monolithic files next to one another. We'll need to implement an -o flag to let that happen, since the usual stdout way can't really tell where the monolithic HTML file's going to be saved.

from monolith.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.