From: ludo@gnu.org (Ludovic Courtès)
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: 28159@debbugs.gnu.org
Subject: bug#28159: Updater needs to support HTTP(S) servers
Date: Wed, 23 Aug 2017 23:30:35 +0200 [thread overview]
Message-ID: <87ziaqj7k4.fsf@gnu.org> (raw)
In-Reply-To: <570534f1-58d2-6db5-b5c2-b9e5276c5974@crazy-compilers.com> (Hartmut Goebel's message of "Wed, 23 Aug 2017 12:20:02 +0200")
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
> Am 22.08.2017 um 10:57 schrieb Ludovic Courtès:
>> So I would suggest picking one updater, say kde, and implementing it
>> using whatever metadata can be retrieved from kde.org.
>
> I'm not sure if I understood what you mean with "whatever metadata can
> be retrieved from kde.org".
I mean using package metadata provided by kde.org (maybe they have a
JSON representation of the package graph or something?), or the ‘ls-lR’
files at worst.
> By change, download.kde.org indeed provides a "ls-lR" and "ls-lR.bz"
> file at the top-level. I was not aware of this up to just now. Using
> this might be an option (It is lagging a bit, though I think this is
> acceptable. From what I've ssen I guess it is generated each hour if
> some file changed.)
Sounds good.
> So for kde we might find a simpler solution. But in the long-run IMHO we
> need a simple html parser.
In some cases yes, but maybe not in all cases. I also suspect that
something that attempts to extract the latest release number from a home
page may be brittle.
> I'm not skilled enough in scheme/guile to write such a parser, sorry.
This can be done along these lines:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use(sxml simple)
scheme@(guile-user)> ,use(web client)
scheme@(guile-user)> ,use(sxml match)
scheme@(guile-user)> (define page (xml->sxml (call-with-values
(lambda ()
(http-get "http://www.gnu.org/software/guix/guix.html" #:streaming? #t))
(lambda (response port)
port))))
--8<---------------cut here---------------end--------------->8---
… where ‘page’ is the SXML representation of the web page. The
difficulty is to browse this page (using ‘match’ or ‘sxml-match’.)
HTH,
Ludo’.
next prev parent reply other threads:[~2017-08-23 21:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <RT-Ticket-1238656@rt.gnu.org>
2017-08-20 12:06 ` bug#28159: Updater needs to support HTTP(S) servers Hartmut Goebel
2017-08-22 8:57 ` Ludovic Courtès
2017-08-23 10:20 ` Hartmut Goebel
2017-08-23 21:30 ` Ludovic Courtès [this message]
2017-08-26 9:54 ` Ludovic Courtès
2017-08-26 10:33 ` Hartmut Goebel
2017-09-03 21:40 ` Ludovic Courtès
2017-09-08 8:30 ` Ludovic Courtès
2017-09-14 16:50 ` bug#28159: [gnu.org #1238656] " =?UTF-8?B?UnViw6luIFJvZHLDrWd1ZXogUMOpcmV6?= via RT
2017-09-15 7:50 ` Ludovic Courtès
2017-09-14 16:50 ` Rubén Rodríguez Pérez via RT
2017-09-25 22:39 ` Ludovic Courtès
2018-11-10 22:38 ` Ludovic Courtès
2019-09-10 17:25 ` Hartmut Goebel
2020-04-29 8:21 ` bug#28159: Closing bug #28159? " Brice Waegeneire
2020-04-30 21:14 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ziaqj7k4.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=28159@debbugs.gnu.org \
--cc=h.goebel@crazy-compilers.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.