Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Real Programmers think better when playing Adventure or Rogue.


devel / comp.lang.tcl / Extending shtmlview with www URLs

SubjectAuthor
* Extending shtmlview with www URLsAlexandru
`* Extending shtmlview with www URLsD Groth
 `* Extending shtmlview with www URLsAlexandru
  `* Extending shtmlview with www URLspd
   `* Extending shtmlview with www URLsAlexandru
    `* Extending shtmlview with www URLspd
     +- Extending shtmlview with www URLsD Groth
     `* Extending shtmlview with www URLsD Groth
      `* Extending shtmlview with www URLsAlexandru
       `- Extending shtmlview with www URLsD Groth

1
Extending shtmlview with www URLs

<808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12631&group=comp.lang.tcl#12631

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:6214:2b8d:b0:66d:fd0:5d0a with SMTP id kr13-20020a0562142b8d00b0066d0fd05d0amr88055qvb.0.1697876292203;
Sat, 21 Oct 2023 01:18:12 -0700 (PDT)
X-Received: by 2002:a4a:391b:0:b0:581:d75c:13d0 with SMTP id
m27-20020a4a391b000000b00581d75c13d0mr1279517ooa.1.1697876292059; Sat, 21 Oct
2023 01:18:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sat, 21 Oct 2023 01:18:11 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=82.207.255.148; posting-account=glPZ8goAAADztwA3kVEZPMKXCGydx5DU
NNTP-Posting-Host: 82.207.255.148
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com>
Subject: Extending shtmlview with www URLs
From: alexandru.dadalau@meshparts.de (Alexandru)
Injection-Date: Sat, 21 Oct 2023 08:18:12 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1819
 by: Alexandru - Sat, 21 Oct 2023 08:18 UTC

I started to extend the code of shtmlview to support www URLS.
It works already when I do "browse https://something".
The content is displayed as expected with one exception:
When the content contains an achor tag to another www URL, the tag is ignored and the result is just text.
I tried to find out where in the code this happens, but no success until now.
Since the code relies (unfortuantelly) heavilly on the assumption, that all URL are local files, I guess somewhere in the code there is a validation if the URL is a local file and if not the URL is discarded. I true, this is bad method, since a not working URL should still be visible as an URL.
Maybe can someone help with this point since I'm pretty sucked with this.

Many thanks
Alexandru

Re: Extending shtmlview with www URLs

<10f4de9b-b69f-49a2-8edd-241d41e7caccn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12689&group=comp.lang.tcl#12689

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ac8:7317:0:b0:41c:bd1d:7df0 with SMTP id x23-20020ac87317000000b0041cbd1d7df0mr3504qto.0.1698341754378;
Thu, 26 Oct 2023 10:35:54 -0700 (PDT)
X-Received: by 2002:a05:6808:4191:b0:3ac:a02d:708f with SMTP id
dj17-20020a056808419100b003aca02d708fmr16828oib.1.1698341754029; Thu, 26 Oct
2023 10:35:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Thu, 26 Oct 2023 10:35:53 -0700 (PDT)
In-Reply-To: <808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:da:b700:34e5:fffe:afc6:ec56;
posting-account=l1SsogoAAADI9wGGep0j80-iEOPtae47
NNTP-Posting-Host: 2001:9e8:da:b700:34e5:fffe:afc6:ec56
References: <808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <10f4de9b-b69f-49a2-8edd-241d41e7caccn@googlegroups.com>
Subject: Re: Extending shtmlview with www URLs
From: tbgroth15@gmail.com (D Groth)
Injection-Date: Thu, 26 Oct 2023 17:35:54 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: D Groth - Thu, 26 Oct 2023 17:35 UTC

Alexandru schrieb am Samstag, 21. Oktober 2023 um 10:18:15 UTC+2:
> I started to extend the code of shtmlview to support www URLS.
> It works already when I do "browse https://something".
> The content is displayed as expected with one exception:
> When the content contains an achor tag to another www URL, the tag is ignored and the result is just text.
> I tried to find out where in the code this happens, but no success until now.
> Since the code relies (unfortuantelly) heavilly on the assumption, that all URL are local files, I guess somewhere in the code there is a validation if the URL is a local file and if not the URL is discarded. I true, this is bad method, since a not working URL should still be visible as an URL.
> Maybe can someone help with this point since I'm pretty sucked with this.
>
> Many thanks
> Alexandru

shtmlview is only thought to browse local files, for instance help pages for an Tk application.
There is no plan to support using shtmlview to browse the web.

If you really need this you might consider creating as well a vfs::https version of vfs::http

https://wiki.tcl-lang.org/page/vfs%3A%3Ahttp

Which allows you to browse the web as it the web is then taken as local files.

Not sure how difficult that could be.

Detlef

Re: Extending shtmlview with www URLs

<2ae7aded-4338-4b55-8c41-993322e22f9cn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12691&group=comp.lang.tcl#12691

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:a9b:b0:77a:29f:97e8 with SMTP id v27-20020a05620a0a9b00b0077a029f97e8mr1089qkg.5.1698343480988;
Thu, 26 Oct 2023 11:04:40 -0700 (PDT)
X-Received: by 2002:a05:620a:891:b0:778:9abd:da1a with SMTP id
b17-20020a05620a089100b007789abdda1amr1041qka.3.1698343480763; Thu, 26 Oct
2023 11:04:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Thu, 26 Oct 2023 11:04:40 -0700 (PDT)
In-Reply-To: <10f4de9b-b69f-49a2-8edd-241d41e7caccn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:893c:db00:509c:271a:5716:96eb;
posting-account=glPZ8goAAADztwA3kVEZPMKXCGydx5DU
NNTP-Posting-Host: 2001:9e8:893c:db00:509c:271a:5716:96eb
References: <808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com> <10f4de9b-b69f-49a2-8edd-241d41e7caccn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2ae7aded-4338-4b55-8c41-993322e22f9cn@googlegroups.com>
Subject: Re: Extending shtmlview with www URLs
From: alexandru.dadalau@meshparts.de (Alexandru)
Injection-Date: Thu, 26 Oct 2023 18:04:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3788
 by: Alexandru - Thu, 26 Oct 2023 18:04 UTC

D Groth schrieb am Donnerstag, 26. Oktober 2023 um 19:35:57 UTC+2:
> Alexandru schrieb am Samstag, 21. Oktober 2023 um 10:18:15 UTC+2:
> > I started to extend the code of shtmlview to support www URLS.
> > It works already when I do "browse https://something".
> > The content is displayed as expected with one exception:
> > When the content contains an achor tag to another www URL, the tag is ignored and the result is just text.
> > I tried to find out where in the code this happens, but no success until now.
> > Since the code relies (unfortuantelly) heavilly on the assumption, that all URL are local files, I guess somewhere in the code there is a validation if the URL is a local file and if not the URL is discarded. I true, this is bad method, since a not working URL should still be visible as an URL.
> > Maybe can someone help with this point since I'm pretty sucked with this.
> >
> > Many thanks
> > Alexandru
> shtmlview is only thought to browse local files, for instance help pages for an Tk application.
> There is no plan to support using shtmlview to browse the web.

Hi Detlef, glad that you answered, as the developer of shtmlview.

Question: Why not support also files from the web?

I'm planing to create an help system for my software.
The help files are online, so that the user does not need to download the whole bunch of html files to it's computer.
Besides, updates to the online files are easy done with imediate effect to all users.

The fact that I could already adapt your code in one hour or so and that it already works for online content shows that it can be done with little effort. And the changes done by me are only a few lines.

The function to dowload file content to a string, I had already. I don't think this function must be part of your package. I could be an external procedure that each user can configure in the package as an optional setting.

Would you take a look I my changes and give it a thought?

Many thanks
Alexandru

>
> If you really need this you might consider creating as well a vfs::https version of vfs::http
>
> https://wiki.tcl-lang.org/page/vfs%3A%3Ahttp
>
> Which allows you to browse the web as it the web is then taken as local files.
>
> Not sure how difficult that could be.
>
> Detlef

Re: Extending shtmlview with www URLs

<77e33702-09be-436c-b9f0-958aee927752n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12703&group=comp.lang.tcl#12703

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ac8:5653:0:b0:412:1a03:ba55 with SMTP id 19-20020ac85653000000b004121a03ba55mr92077qtt.9.1698493109648;
Sat, 28 Oct 2023 04:38:29 -0700 (PDT)
X-Received: by 2002:a05:6870:d61e:b0:1ef:b8a5:3d01 with SMTP id
a30-20020a056870d61e00b001efb8a53d01mr8316oaq.3.1698493109451; Sat, 28 Oct
2023 04:38:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sat, 28 Oct 2023 04:38:28 -0700 (PDT)
In-Reply-To: <2ae7aded-4338-4b55-8c41-993322e22f9cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=207.188.184.151; posting-account=fwjo5QoAAAAcS9TSqEAQL1VEl7b8nCOq
NNTP-Posting-Host: 207.188.184.151
References: <808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com>
<10f4de9b-b69f-49a2-8edd-241d41e7caccn@googlegroups.com> <2ae7aded-4338-4b55-8c41-993322e22f9cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <77e33702-09be-436c-b9f0-958aee927752n@googlegroups.com>
Subject: Re: Extending shtmlview with www URLs
From: eukelade@gmail.com (pd)
Injection-Date: Sat, 28 Oct 2023 11:38:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2003
 by: pd - Sat, 28 Oct 2023 11:38 UTC

El jueves, 26 de octubre de 2023 a las 20:04:44 UTC+2, Alexandru escribió:

> Question: Why not support also files from the web?
>
> I'm planing to create an help system for my software.
> The help files are online, so that the user does not need to download the whole bunch of html files to it's computer.
> Besides, updates to the online files are easy done with imediate effect to all users.

consider to include help files in the distribution package in order to consult them offline, there're pros and cons both for keeping help online or offline, but it may be quite annoying to have to look for something in help docs while not having internet access so you cannot do it.

Re: Extending shtmlview with www URLs

<7cf54501-8589-4f94-9183-e9a7d69916fdn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12704&group=comp.lang.tcl#12704

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ae9:e207:0:b0:777:f69:557 with SMTP id c7-20020ae9e207000000b007770f690557mr94933qkc.15.1698504249735;
Sat, 28 Oct 2023 07:44:09 -0700 (PDT)
X-Received: by 2002:a05:6870:35cd:b0:1e9:6d19:935b with SMTP id
c13-20020a05687035cd00b001e96d19935bmr2446887oak.5.1698504249540; Sat, 28 Oct
2023 07:44:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sat, 28 Oct 2023 07:44:08 -0700 (PDT)
In-Reply-To: <77e33702-09be-436c-b9f0-958aee927752n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:8915:db00:3de4:7cca:4fd:311b;
posting-account=glPZ8goAAADztwA3kVEZPMKXCGydx5DU
NNTP-Posting-Host: 2001:9e8:8915:db00:3de4:7cca:4fd:311b
References: <808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com>
<10f4de9b-b69f-49a2-8edd-241d41e7caccn@googlegroups.com> <2ae7aded-4338-4b55-8c41-993322e22f9cn@googlegroups.com>
<77e33702-09be-436c-b9f0-958aee927752n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7cf54501-8589-4f94-9183-e9a7d69916fdn@googlegroups.com>
Subject: Re: Extending shtmlview with www URLs
From: alexandru.dadalau@meshparts.de (Alexandru)
Injection-Date: Sat, 28 Oct 2023 14:44:09 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3300
 by: Alexandru - Sat, 28 Oct 2023 14:44 UTC

pd schrieb am Samstag, 28. Oktober 2023 um 13:38:32 UTC+2:
> El jueves, 26 de octubre de 2023 a las 20:04:44 UTC+2, Alexandru escribió:
>
> > Question: Why not support also files from the web?
> >
> > I'm planing to create an help system for my software.
> > The help files are online, so that the user does not need to download the whole bunch of html files to it's computer.
> > Besides, updates to the online files are easy done with imediate effect to all users.
> consider to include help files in the distribution package in order to consult them offline, there're pros and cons both for keeping help online or offline, but it may be quite annoying to have to look for something in help docs while not having internet access so you cannot do it.

Yes, I considered this option already an trust me, I would ask here my questions if offline help would be an option.

Besides: Our software manages licenses and users using our online database. And it also has acces to Gigabites of simulation models. So without internet, no software at all. It's that simple.

Secondly: The kind of help I'm planing is not the old school kind: It's kind of atomic help to single functions//buttons in the suftware. It's presented as small crumbs of text + images in a larger tooltip.

Thirdly: Having offline help files would logically mean that the local files will get outdated. Updating those local help files means online connection so here we are back to the point that an internet connection is needed.

Fourth: We are updating the software on a weekly basis. We do few improvements in short time distance. We don't do one large update once a year or so. So each week new small help files will be added to our server data base.

I know this has nothing to do with my original question but you started ;)

Cheers
Alex

Re: Extending shtmlview with www URLs

<1bb0a4fa-196a-49a6-ac8a-92821dadb63an@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12707&group=comp.lang.tcl#12707

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:622a:ecb:b0:410:9089:6b5f with SMTP id df11-20020a05622a0ecb00b0041090896b5fmr108129qtb.5.1698521889610;
Sat, 28 Oct 2023 12:38:09 -0700 (PDT)
X-Received: by 2002:a05:6870:e993:b0:1ea:2dd6:6a86 with SMTP id
r19-20020a056870e99300b001ea2dd66a86mr3093625oao.9.1698521889174; Sat, 28 Oct
2023 12:38:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sat, 28 Oct 2023 12:38:08 -0700 (PDT)
In-Reply-To: <7cf54501-8589-4f94-9183-e9a7d69916fdn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=207.188.184.151; posting-account=fwjo5QoAAAAcS9TSqEAQL1VEl7b8nCOq
NNTP-Posting-Host: 207.188.184.151
References: <808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com>
<10f4de9b-b69f-49a2-8edd-241d41e7caccn@googlegroups.com> <2ae7aded-4338-4b55-8c41-993322e22f9cn@googlegroups.com>
<77e33702-09be-436c-b9f0-958aee927752n@googlegroups.com> <7cf54501-8589-4f94-9183-e9a7d69916fdn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1bb0a4fa-196a-49a6-ac8a-92821dadb63an@googlegroups.com>
Subject: Re: Extending shtmlview with www URLs
From: eukelade@gmail.com (pd)
Injection-Date: Sat, 28 Oct 2023 19:38:09 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3220
 by: pd - Sat, 28 Oct 2023 19:38 UTC

I just don't want to feed a long off topic so just a comment to finish it up ;-)

El sábado, 28 de octubre de 2023 a las 16:44:12 UTC+2, Alexandru escribió:
> pd schrieb am Samstag, 28. Oktober 2023 um 13:38:32 UTC+2:

> > consider to include help files in the distribution package in order to consult them offline, there're pros and cons both for keeping help online or offline, but it may be quite annoying to have to look for something in help docs while not having internet access so you cannot do it.
> Yes, I considered this option already an trust me, I would ask here my questions if offline help would be an option.
> Thirdly: Having offline help files would logically mean that the local files will get outdated. Updating those local help files means online connection so here we are back to the point that an internet connection is needed.
> ...
> Thirdly: Having offline help files would logically mean that the local files will get outdated. Updating those local help files means online connection so here we are back to the point that an internet connection is needed.

The other points are good ones but this one seems contradictory to me, of course help files will get outdated as well as the software itself, saying it's not appropiate to have help offline because of you need to be online to update it is the same as saying it's not appropiate to distribute your software for offline use because of updates, it's better to use it online in a web app or cloud. Even having frequent updates you can consult the help offline it you have the files locally and that is an advantage.

But as I have said there's cons and pros for both strategies so it's a decision to make taking into account the environment and target.

Re: Extending shtmlview with www URLs

<786e3b7a-7934-4586-8c63-65ce57762fe6n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12709&group=comp.lang.tcl#12709

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:4686:b0:76d:ada1:d841 with SMTP id bq6-20020a05620a468600b0076dada1d841mr180672qkb.7.1698568930935;
Sun, 29 Oct 2023 01:42:10 -0700 (PDT)
X-Received: by 2002:a05:6870:35d3:b0:1e9:ba2a:1498 with SMTP id
c19-20020a05687035d300b001e9ba2a1498mr3374670oak.9.1698568930568; Sun, 29 Oct
2023 01:42:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!newsfeed.endofthelinebbs.com!weretis.net!feeder6.news.weretis.net!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sun, 29 Oct 2023 01:42:10 -0700 (PDT)
In-Reply-To: <1bb0a4fa-196a-49a6-ac8a-92821dadb63an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:f9:900:6516:cb80:69a7:16ef;
posting-account=l1SsogoAAADI9wGGep0j80-iEOPtae47
NNTP-Posting-Host: 2001:9e8:f9:900:6516:cb80:69a7:16ef
References: <808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com>
<10f4de9b-b69f-49a2-8edd-241d41e7caccn@googlegroups.com> <2ae7aded-4338-4b55-8c41-993322e22f9cn@googlegroups.com>
<77e33702-09be-436c-b9f0-958aee927752n@googlegroups.com> <7cf54501-8589-4f94-9183-e9a7d69916fdn@googlegroups.com>
<1bb0a4fa-196a-49a6-ac8a-92821dadb63an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <786e3b7a-7934-4586-8c63-65ce57762fe6n@googlegroups.com>
Subject: Re: Extending shtmlview with www URLs
From: tbgroth15@gmail.com (D Groth)
Injection-Date: Sun, 29 Oct 2023 08:42:10 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 31
 by: D Groth - Sun, 29 Oct 2023 08:42 UTC

pd schrieb am Samstag, 28. Oktober 2023 um 21:38:12 UTC+2:
> I just don't want to feed a long off topic so just a comment to finish it up ;-)
> El sábado, 28 de octubre de 2023 a las 16:44:12 UTC+2, Alexandru escribió:
> > pd schrieb am Samstag, 28. Oktober 2023 um 13:38:32 UTC+2:
>
> > > consider to include help files in the distribution package in order to consult them offline, there're pros and cons both for keeping help online or offline, but it may be quite annoying to have to look for something in help docs while not having internet access so you cannot do it.
> > Yes, I considered this option already an trust me, I would ask here my questions if offline help would be an option.
> > Thirdly: Having offline help files would logically mean that the local files will get outdated. Updating those local help files means online connection so here we are back to the point that an internet connection is needed.
> > ...
> > Thirdly: Having offline help files would logically mean that the local files will get outdated. Updating those local help files means online connection so here we are back to the point that an internet connection is needed.
> The other points are good ones but this one seems contradictory to me, of course help files will get outdated as well as the software itself, saying it's not appropiate to have help offline because of you need to be online to update it is the same as saying it's not appropiate to distribute your software for offline use because of updates, it's better to use it online in a web app or cloud. Even having frequent updates you can consult the help offline it you have the files locally and that is an advantage.
>
> But as I have said there's cons and pros for both strategies so it's a decision to make taking into account the environment and target.

Re: Extending shtmlview with www URLs

<f00d13de-88ea-4549-aba9-9782355aac81n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12710&group=comp.lang.tcl#12710

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ae9:ec05:0:b0:76f:cd2:5d10 with SMTP id h5-20020ae9ec05000000b0076f0cd25d10mr211588qkg.5.1698569401996;
Sun, 29 Oct 2023 01:50:01 -0700 (PDT)
X-Received: by 2002:a05:6870:6193:b0:1e9:7407:b4cd with SMTP id
a19-20020a056870619300b001e97407b4cdmr3354204oah.4.1698569401629; Sun, 29 Oct
2023 01:50:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.nntp4.net!paganini.bofh.team!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sun, 29 Oct 2023 01:50:01 -0700 (PDT)
In-Reply-To: <1bb0a4fa-196a-49a6-ac8a-92821dadb63an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:f9:900:6516:cb80:69a7:16ef;
posting-account=l1SsogoAAADI9wGGep0j80-iEOPtae47
NNTP-Posting-Host: 2001:9e8:f9:900:6516:cb80:69a7:16ef
References: <808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com>
<10f4de9b-b69f-49a2-8edd-241d41e7caccn@googlegroups.com> <2ae7aded-4338-4b55-8c41-993322e22f9cn@googlegroups.com>
<77e33702-09be-436c-b9f0-958aee927752n@googlegroups.com> <7cf54501-8589-4f94-9183-e9a7d69916fdn@googlegroups.com>
<1bb0a4fa-196a-49a6-ac8a-92821dadb63an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f00d13de-88ea-4549-aba9-9782355aac81n@googlegroups.com>
Subject: Re: Extending shtmlview with www URLs
From: tbgroth15@gmail.com (D Groth)
Injection-Date: Sun, 29 Oct 2023 08:50:01 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: D Groth - Sun, 29 Oct 2023 08:50 UTC

Dear Alex,

I suggest, that you do a fork of shtml to do so. I have no intension to add new features, just like to fix possible bugs.
My gut feeling tells me that it might be more appropiate for this topic to use one of many binary extensions which can be used to display web pages.
The most promising is the Tcl webview wrapper: https://www.androwish.org/home/dir?name=undroid/twv
Although the server seems currently down.

See as well here: https://wiki.tcl-lang.org/page/Taygete+Scrap+Book
Best,
Detlef

pd schrieb am Samstag, 28. Oktober 2023 um 21:38:12 UTC+2:
> I just don't want to feed a long off topic so just a comment to finish it up ;-)
> El sábado, 28 de octubre de 2023 a las 16:44:12 UTC+2, Alexandru escribió:
> > pd schrieb am Samstag, 28. Oktober 2023 um 13:38:32 UTC+2:
>
> > > consider to include help files in the distribution package in order to consult them offline, there're pros and cons both for keeping help online or offline, but it may be quite annoying to have to look for something in help docs while not having internet access so you cannot do it.
> > Yes, I considered this option already an trust me, I would ask here my questions if offline help would be an option.
> > Thirdly: Having offline help files would logically mean that the local files will get outdated. Updating those local help files means online connection so here we are back to the point that an internet connection is needed.
> > ...
> > Thirdly: Having offline help files would logically mean that the local files will get outdated. Updating those local help files means online connection so here we are back to the point that an internet connection is needed.
> The other points are good ones but this one seems contradictory to me, of course help files will get outdated as well as the software itself, saying it's not appropiate to have help offline because of you need to be online to update it is the same as saying it's not appropiate to distribute your software for offline use because of updates, it's better to use it online in a web app or cloud. Even having frequent updates you can consult the help offline it you have the files locally and that is an advantage.
>
> But as I have said there's cons and pros for both strategies so it's a decision to make taking into account the environment and target.

Re: Extending shtmlview with www URLs

<bb97dac4-c599-4313-9f03-3194564fc733n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12712&group=comp.lang.tcl#12712

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ad4:4505:0:b0:66d:291e:352b with SMTP id k5-20020ad44505000000b0066d291e352bmr207985qvu.1.1698570674610;
Sun, 29 Oct 2023 02:11:14 -0700 (PDT)
X-Received: by 2002:a05:6808:355:b0:3b2:e7a8:f7dd with SMTP id
j21-20020a056808035500b003b2e7a8f7ddmr2203204oie.11.1698570674175; Sun, 29
Oct 2023 02:11:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sun, 29 Oct 2023 02:11:13 -0700 (PDT)
In-Reply-To: <f00d13de-88ea-4549-aba9-9782355aac81n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:8927:6600:3047:67b8:c4d2:55a;
posting-account=glPZ8goAAADztwA3kVEZPMKXCGydx5DU
NNTP-Posting-Host: 2001:9e8:8927:6600:3047:67b8:c4d2:55a
References: <808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com>
<10f4de9b-b69f-49a2-8edd-241d41e7caccn@googlegroups.com> <2ae7aded-4338-4b55-8c41-993322e22f9cn@googlegroups.com>
<77e33702-09be-436c-b9f0-958aee927752n@googlegroups.com> <7cf54501-8589-4f94-9183-e9a7d69916fdn@googlegroups.com>
<1bb0a4fa-196a-49a6-ac8a-92821dadb63an@googlegroups.com> <f00d13de-88ea-4549-aba9-9782355aac81n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bb97dac4-c599-4313-9f03-3194564fc733n@googlegroups.com>
Subject: Re: Extending shtmlview with www URLs
From: alexandru.dadalau@meshparts.de (Alexandru)
Injection-Date: Sun, 29 Oct 2023 09:11:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4636
 by: Alexandru - Sun, 29 Oct 2023 09:11 UTC

D Groth schrieb am Sonntag, 29. Oktober 2023 um 09:50:04 UTC+1:
> Dear Alex,
>
> I suggest, that you do a fork of shtml to do so. I have no intension to add new features, just like to fix possible bugs.
> My gut feeling tells me that it might be more appropiate for this topic to use one of many binary extensions which can be used to display web pages.
> The most promising is the Tcl webview wrapper: https://www.androwish.org/home/dir?name=undroid/twv
> Although the server seems currently down.
>
> See as well here: https://wiki.tcl-lang.org/page/Taygete+Scrap+Book
> Best,
> Detlef
> pd schrieb am Samstag, 28. Oktober 2023 um 21:38:12 UTC+2:
> > I just don't want to feed a long off topic so just a comment to finish it up ;-)
> > El sábado, 28 de octubre de 2023 a las 16:44:12 UTC+2, Alexandru escribió:
> > > pd schrieb am Samstag, 28. Oktober 2023 um 13:38:32 UTC+2:
> >
> > > > consider to include help files in the distribution package in order to consult them offline, there're pros and cons both for keeping help online or offline, but it may be quite annoying to have to look for something in help docs while not having internet access so you cannot do it.
> > > Yes, I considered this option already an trust me, I would ask here my questions if offline help would be an option.
> > > Thirdly: Having offline help files would logically mean that the local files will get outdated. Updating those local help files means online connection so here we are back to the point that an internet connection is needed.
> > > ...
> > > Thirdly: Having offline help files would logically mean that the local files will get outdated. Updating those local help files means online connection so here we are back to the point that an internet connection is needed.
> > The other points are good ones but this one seems contradictory to me, of course help files will get outdated as well as the software itself, saying it's not appropiate to have help offline because of you need to be online to update it is the same as saying it's not appropiate to distribute your software for offline use because of updates, it's better to use it online in a web app or cloud. Even having frequent updates you can consult the help offline it you have the files locally and that is an advantage.
> >
> > But as I have said there's cons and pros for both strategies so it's a decision to make taking into account the environment and target.

Yes, I will make a fork of shtml.
But first I would like to have a working code.
Currently I'm stuck with finding out, where your code handles the anchors found in the HTML content.
Because the code expects a local file path in the href tag, it's not correctly interpreting my url path.
It should be easy to add an if/else there but I couldn't find out where in the code this happens.
Could you give me a hint for this?

Much appreciated.
Alexandru

Re: Extending shtmlview with www URLs

<3faffa8b-b06a-404e-8ad4-3665f5bf0421n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12727&group=comp.lang.tcl#12727

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:8e18:b0:777:7906:2500 with SMTP id re24-20020a05620a8e1800b0077779062500mr435841qkn.8.1699305515845;
Mon, 06 Nov 2023 13:18:35 -0800 (PST)
X-Received: by 2002:a05:6870:ac98:b0:1dc:7909:91fa with SMTP id
ns24-20020a056870ac9800b001dc790991famr298153oab.2.1699305515414; Mon, 06 Nov
2023 13:18:35 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 6 Nov 2023 13:18:34 -0800 (PST)
In-Reply-To: <bb97dac4-c599-4313-9f03-3194564fc733n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:ce:c700:3e87:f629:8e39:1a69;
posting-account=l1SsogoAAADI9wGGep0j80-iEOPtae47
NNTP-Posting-Host: 2001:9e8:ce:c700:3e87:f629:8e39:1a69
References: <808dfa48-ff48-493c-aa67-defae6ca68fdn@googlegroups.com>
<10f4de9b-b69f-49a2-8edd-241d41e7caccn@googlegroups.com> <2ae7aded-4338-4b55-8c41-993322e22f9cn@googlegroups.com>
<77e33702-09be-436c-b9f0-958aee927752n@googlegroups.com> <7cf54501-8589-4f94-9183-e9a7d69916fdn@googlegroups.com>
<1bb0a4fa-196a-49a6-ac8a-92821dadb63an@googlegroups.com> <f00d13de-88ea-4549-aba9-9782355aac81n@googlegroups.com>
<bb97dac4-c599-4313-9f03-3194564fc733n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3faffa8b-b06a-404e-8ad4-3665f5bf0421n@googlegroups.com>
Subject: Re: Extending shtmlview with www URLs
From: tbgroth15@gmail.com (D Groth)
Injection-Date: Mon, 06 Nov 2023 21:18:35 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: D Groth - Mon, 6 Nov 2023 21:18 UTC

Sorry, I am busy.
Check the "open" and tjhe "file exists" for instance commands. That would be the place to look.
For example in proc render:
set filename [shtmlview::TrimAnchor $url]
if [catch {open $filename r} infh] {
puts stderr "Cannot open $filename: $infh"
} else {
set html [read $infh]
close $infh
}
Here you would have to switch to check if it is http, https or local file url and then do the appropriate actions.

Still I think that using vfs::urltype would be much easier.
See here for an example. https://wiki.tcl-lang.org/page/One%2Dline+web+browser+in+Tcl

BTW: This is not my code, I just contributed .

Best,
Detlef

Best,
Detlef

Alexandru schrieb am Sonntag, 29. Oktober 2023 um 10:11:17 UTC+1:
> D Groth schrieb am Sonntag, 29. Oktober 2023 um 09:50:04 UTC+1:
> > Dear Alex,
> >
> > I suggest, that you do a fork of shtml to do so. I have no intension to add new features, just like to fix possible bugs.
> > My gut feeling tells me that it might be more appropiate for this topic to use one of many binary extensions which can be used to display web pages.
> > The most promising is the Tcl webview wrapper: https://www.androwish.org/home/dir?name=undroid/twv
> > Although the server seems currently down.
> >
> > See as well here: https://wiki.tcl-lang.org/page/Taygete+Scrap+Book
> > Best,
> > Detlef
> > pd schrieb am Samstag, 28. Oktober 2023 um 21:38:12 UTC+2:
> > > I just don't want to feed a long off topic so just a comment to finish it up ;-)
> > > El sábado, 28 de octubre de 2023 a las 16:44:12 UTC+2, Alexandru escribió:
> > > > pd schrieb am Samstag, 28. Oktober 2023 um 13:38:32 UTC+2:
> > >
> > > > > consider to include help files in the distribution package in order to consult them offline, there're pros and cons both for keeping help online or offline, but it may be quite annoying to have to look for something in help docs while not having internet access so you cannot do it.
> > > > Yes, I considered this option already an trust me, I would ask here my questions if offline help would be an option.
> > > > Thirdly: Having offline help files would logically mean that the local files will get outdated. Updating those local help files means online connection so here we are back to the point that an internet connection is needed.
> > > > ...
> > > > Thirdly: Having offline help files would logically mean that the local files will get outdated. Updating those local help files means online connection so here we are back to the point that an internet connection is needed.
> > > The other points are good ones but this one seems contradictory to me, of course help files will get outdated as well as the software itself, saying it's not appropiate to have help offline because of you need to be online to update it is the same as saying it's not appropiate to distribute your software for offline use because of updates, it's better to use it online in a web app or cloud. Even having frequent updates you can consult the help offline it you have the files locally and that is an advantage.
> > >
> > > But as I have said there's cons and pros for both strategies so it's a decision to make taking into account the environment and target.
> Yes, I will make a fork of shtml.
> But first I would like to have a working code.
> Currently I'm stuck with finding out, where your code handles the anchors found in the HTML content.
> Because the code expects a local file path in the href tag, it's not correctly interpreting my url path.
> It should be easy to add an if/else there but I couldn't find out where in the code this happens.
> Could you give me a hint for this?
>
> Much appreciated.
> Alexandru

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor