[bug #67488] Consider saving the URL that was fetched

Eo Koochu <[email protected]> Tue, 9 Sep 2025 11:33:41 -0400 (EDT)
Newsgroups gmane.comp.web.wget.general
Message-ID <[email protected]>
--8323329-1635102232-1757432021=:1301555
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

URL:=0A  <https://savannah.gnu.org/bugs/?67488>=0A=0A                 Summa=
ry: Consider saving the URL that was fetched=0A                   Group: GN=
U Wget=0A               Submitter: eokoochu=0A               Submitted: Tue=
 09 Sep 2025 03:33:36 PM GMT=0A                Category: Feature Request=0A=
                Severity: 3 - Normal=0A                Priority: 5 - Normal=
=0A                  Status: None=0A                 Privacy: Public=0A    =
         Assigned to: None=0A         Originator Name:=0A        Originator=
 Email:=0A             Open/Closed: Open=0A         Discussion Lock: Any=0A=
                 Release: None=0A        Operating System: GNU/Linux=0A    =
     Reproducibility: None=0A           Fixed Release: None=0A         Plan=
ned Release: None=0A              Regression: None=0A           Work Requir=
ed: None=0A          Patch Included: None=0A=0A=0A    _____________________=
__________________________________=0A=0AFollow-up Comments:=0A=0A=0A-------=
------------------------------------------------=0ADate: Tue 09 Sep 2025 03=
:33:36 PM GMT By: Eo Koochu <eokoochu>=0AWhen archiving a webpage, this com=
mand is quite useful:=0A=0A$ wget -P "$dir" -E -H -k -K -p "$url"=0A=0AThe =
annoying thing is that it leaves no record of what URL was fetched. Not=0Ao=
nly would it be useful to store that information, but it=E2=80=99s somewhat=
=0Aimportant to remedy another problem: all the content is scattered into a=
 tree=0Aof files. Which file do we need to tell the browser to open later?=
=0A=0AI have written a wrapper script for wget that writes a file =E2=80=9C=
url.txt=E2=80=9D=0Awhich then contains the URL that was fetched. It=E2=80=
=99s very useful for later=0Aworking out which file in the tree the browser=
 needs to open. It=E2=80=99s a hack=0Athough. Ideally wget should store the=
 URL in a way that solves both problems,=0Aso we have metadata of what was =
fetched and therefore what to open with a=0Abrowser. And since webpages oft=
en change, it might be useful to record the=0Adate of the snapshot somewher=
e too.=0A=0AFor reference, there is a Firefox plugin called SingleFile that=
 saves a=0Awebpage and all objects to render it in a single file. When it d=
oes that, it=0Aadds a comment to the top of the HTML file that contains the=
 URL. E.g.:=0A=0A<!DOCTYPE html> <html lang=3Den data-color-mode=3Dauto dat=
a-light-theme=3Dlight=0Adata-dark-theme=3Ddark data-a11y-animated-images=3D=
system=0Adata-a11y-link-underlines=3Dtrue class=3Djs-focus-visible data-js-=
focus-visible=0Adata-turbo-loaded style><!--=0A Page saved with SingleFile =
=0A url:  https://savannah.gnu.org/bugs/?group=3Dwget=0A saved date: Tue Se=
p 09 2025 17:21:47 GMT+0200 (Central European Summer Time)=0A--><meta chars=
et=3Dutf-8>=0A=0A=0A=0A=0A=0A=0A=0A=0A    _________________________________=
______________________=0A=0AReply to this item at:=0A=0A  <https://savannah=
.gnu.org/bugs/?67488>=0A=0A_______________________________________________=
=0AMessage sent via Savannah=0Ahttps://savannah.gnu.org/=0A
--8323329-1635102232-1757432021=:1301555
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaMBI1QAKCRCqLAuaBUf3
Tkt7AP45O3iB2ss6jk/n8wyGH/O8xk8y7s0TSiH3BRk0Af96AgEA6V9gQLgPw3ay
Mo5HKQVmcoVXV1bdELiQ0McOqwfJCAI=
=wg80
-----END PGP SIGNATURE-----

--8323329-1635102232-1757432021=:1301555--