Yes, I meant MB.  Thanks.

There are other issues with viewing local documentation files in a
browser.  On Ubuntu, Chrome and Firefox are packaged as snaps.  A snap is
not allowed to read a file:// url which is not in the user's home
directory.  As long as sage is installed in the user's home directory this
is not an issue.  But if the documentation is elsewhere then Firefox and
Chrome will refuse to show it.  Using the cocoserver works around this
because it is allowed to use a url with the loopback interface as the host
address.  (I think it is safer to use 127.0.0.1 instead of localhost
because, in principle, a rogue DNS server would be able to provide any IP
address as an A record for localhost).  I don't know if there is a jupyter
extension that provides access to local files on the loopback interface.

- Marc

On Fri, Apr 26, 2024 at 2:12 PM Nils Bruin <nbr...@sfu.ca> wrote:

> On Friday 26 April 2024 at 06:53:28 UTC-7 marc....@gmail.com wrote:
>
> I have a suggestion to improve the situation, which is to do what the
> Sage_macOS app does.
>
> The app provides access to a local copy of the documentation stored inside
> the application bundle.  The files are reorganized slightly to remove
> duplication and then compressed with gzip.  The app views the files using
> cocoserver <https://pypi.org/project/cocoserver/>, which provides a
> slightly modfiied subclass of Python's ThreadingHTTPServer.  The behavior
> of that server is modified so that it adds a gzip header to any file named
> *.gz.  The browser automatically decompresses gzipped files served with
> such a header.  ("Coco" stands for "compressed content".)
>
>
> Yes, I was thinking in that direction too. Is there perhaps already a
> jupyter server extension that can serve files in a local directory? I bet
> we can instruct jupyterlab to point at a "localhost" url rather than at "
> doc.sagemath.org"
>
>
> Compressing the documentation reduces the size (of the English
> documentation) from about 600 GB to about 100 GB.
>
>
> You meant MB probably?
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-devel" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sage-devel/kzSWB8ps7VA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/4e33bc5d-ba8e-419d-92a3-87977765ad86n%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-devel/4e33bc5d-ba8e-419d-92a3-87977765ad86n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CALcZXRGFwTqZWkf%3DDkp6se_Gqo2z-BfwEK_eXiF0_kB1qDM%2BcQ%40mail.gmail.com.

Reply via email to