Giter Site home page Giter Site logo

Comments (18)

baloe avatar baloe commented on May 12, 2024 4

So, the convenient workaround is:

  • execute this command from within the directory holding the html file of interest:

    python -m SimpleHTTPServer 8000
    
  • Open your web browser and go to http://localhost:8000/ + name of your html file

  • Use SingleFile

from singlefile.

amirrh6 avatar amirrh6 commented on May 12, 2024 4

#7 (comment)

So, the convenient workaround is:

* execute this command from within the directory holding the html file of interest:
  ```
  python -m SimpleHTTPServer 8000
  ```

* Open your web browser and go to `http://localhost:8000/` + name of your html file

* Use SingleFile

The suggested workaround is considerably useful.
SimpleHTTPServer has been deprecated since Python 3. Consider using this command instead:

python3 -m http.server 8000

from singlefile.

marsupilam1 avatar marsupilam1 commented on May 12, 2024 2

Single File will save a http://localhost url, so if you set up IIS (http://www.howtogeek.com/112455/how-to-install-iis-8-on-windows-8/) and put your html page + folder in C:\inetpub\wwwroot, you can save the webpage with Single File (enter http://localhost/your-html-file.html in Chrome)

from singlefile.

baloe avatar baloe commented on May 12, 2024 2

Yes. After devouring all memory and half of swap space and hanging the system for 15 minutes it finally outputs something similar to the source with some assets lost and bigger in size than the source by a third.
Works like a charm? Works like shit, I would say.

Come on, if you really want help be constructive and actually provide information. Just being rude won't solve your issue.

from singlefile.

UltraMagnus0 avatar UltraMagnus0 commented on May 12, 2024

I would find this useful also, I have a bunch of pages I saved in the conventional way, some of which are no longer available, and want to use this extension to archive them in a neater fashion.

from singlefile.

Kirrrr avatar Kirrrr commented on May 12, 2024

Thumbs up for this feature request!
I have plenty of old saved pages in MHT or HTML+Folder form and it will very nice to convert it into all-in-one HTML files.

from singlefile.

gildas-lormeau avatar gildas-lormeau commented on May 12, 2024

Actually it's not a security reason. It's because SingleFile relies on XMLHttpRequest API to get embedded external resources (stylesheets, images...) data. There is an issue with this API on Chrome: it does not work on file:// URLs so SingleFile cannot process the page.

from singlefile.

Kirrrr avatar Kirrrr commented on May 12, 2024

It's clear.
Thanks for fast reply!

from singlefile.

danielb2 avatar danielb2 commented on May 12, 2024

So it cannot, and will not be done? Or will it work when the Chrome API works?

from singlefile.

gildas-lormeau avatar gildas-lormeau commented on May 12, 2024

It will work when the Chrome API will work but I'm not sure this Chrome bug will be fixed soon (the bug was opened 2 years ago)... SingleFile will also need a new permission for file:// URL access which will have to be approved by Google.

from singlefile.

kenahoo avatar kenahoo commented on May 12, 2024

Thanks @marsupilam1, that's the exact workaround I have now. It's a pain to get (and keep) IIS working though. I've been tempted to install Apache instead.

from singlefile.

gildas-lormeau avatar gildas-lormeau commented on May 12, 2024

@marsupilam1 @kenahoo You're right, that's the only workaround I know to solve this issue. I should have documented it somewhere...

from singlefile.

marsupilam1 avatar marsupilam1 commented on May 12, 2024

@kenahoo I have not had any problems with keeping IIS working, but I found that in some programs - like evernote - I could not save to wwwroot because of lack of administrative rights. A solution to this problem can be found here: http://www.alltechtalk.net/forum/thread-bypass-windows-8-uac-while-keeping-metro . Finally I can clip with Evernote, export compilations of snippets to wwwroot, and save it as a single html file with Chrome :)

from singlefile.

KrasnayaPloshchad avatar KrasnayaPloshchad commented on May 12, 2024

@kenahoo So what happened if you set allowing to access file directory at chrome://extensions page?

from singlefile.

gildas-lormeau avatar gildas-lormeau commented on May 12, 2024

@Antiwhore You need to rewrite absolute URLs found in the page into relative URLs.

from singlefile.

baloe avatar baloe commented on May 12, 2024

I just tried it out. Worked like a charm.

Steps:

  1. Website foo.html with images and all relevant files in a folder /tmp/test (e.g. this page after Ctrl+S)
  2.  cd /tmp/test
     python3 -m http.server 8000
    
  3. In Firefox browse http://localhost:8000/foo.html and save page with SingleFile

Firefox version 109.0.1
SingleFile version 1.21.39

from singlefile.

gildas-lormeau avatar gildas-lormeau commented on May 12, 2024

@Antiwhore I apologize for trying to help you and for providing you with a tool that does not suit you.

from singlefile.

melyux avatar melyux commented on May 12, 2024

I don't think you can host WebArchive files on Mac with the HTTP server (they just download). What I've done is use https://github.com/gonejack/webarchive-to-html to convert them to HTML, then locally host the HTML using http-server, and then use SingleFile to download that. This works.

from singlefile.

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.