unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: Luis Felipe <luis.felipe.la@protonmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [Guix Website] A Search Page for Packages
Date: Sun, 13 Nov 2022 08:46:42 +0000	[thread overview]
Message-ID: <87fsentep5.fsf@cbaines.net> (raw)
In-Reply-To: <YunTuBngnDlF2GuYKBWnmo1DqVMSF3pV80qU-FrGwK9n_3eSYOq1b7xaItHfkGtKG3f3gc75Ohjclvst6-af9CWprI5n_S_cjHng490gYaQ=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 2021 bytes --]


Luis Felipe <luis.felipe.la@protonmail.com> writes:

>> > What Danjela produced in terms of the search is probably fine as
>> > something to go with, maybe the additional thing that needs writing is
>> > pages for the individual packages that the search can link to (they can
>> > just be very simple initially).
>>
>> > But yeah, are you (or anyone else who's reading) up for hacking on this?
>>
>> Yeah, I'm willing to work on that. I'll start by adding support for handling requests for package detail pages.
>
> I have a working package browser now and will be styling it next. I'll link to a public repository later.
>
> However, I have some questions about the Data Service:

Hey! Sorry for the slow reply.

> 1. Is there any way to page through the data
> (e.g. https://dev.socrata.com/docs/paging.html#2.1)?

For most bits of data, yes. Although I haven't used limit/offset style
pagination as that doesn't perform particularly well.

The Guix Data Service web pages should help with how to use the API, so
you can look at how the packages page handles pagination for example:

  https://data.guix.gnu.org/revision/c4025af8c11c3e9ea0c2747b6c475c916fb61d80/packages

> 2. What would be an efficient way to get the total count of packages?
> (to be used as in https://guix.gnu.org/en/packages/)

You can get a count here for example [1], that also works with the
latest-processed-revision URL [2]. I think the counting methadolody is a
bit different to what's currently used though.

1: https://data.guix.gnu.org/revision/c4025af8c11c3e9ea0c2747b6c475c916fb61d80.json
2: https://data.guix.gnu.org/repository/1/branch/master/latest-processed-revision.json

> 3. Is there any way to get the "supported-systems" info of a package?

The value of that specific field isn't recorded, but you could look at
the derivations of the package, then just find the systems, that should
be pretty close:

  https://data.guix.gnu.org/revision/c4025af8c11c3e9ea0c2747b6c475c916fb61d80/package/0ad/0.0.26-alpha.json

Thanks,

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

  reply	other threads:[~2022-11-13  8:57 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-05 16:53 [Guix Website] A Search Page for Packages Luis Felipe
2022-11-05 18:53 ` Christopher Baines
2022-11-05 19:59   ` Luis Felipe
2022-11-09 16:43     ` Luis Felipe
2022-11-13  8:46       ` Christopher Baines [this message]
2022-11-15 13:30         ` Luis Felipe
2022-11-16 16:25           ` Christopher Baines
2022-11-16 18:46             ` Luis Felipe
2022-11-16 14:55       ` Luis Felipe
2022-11-16 16:32         ` Christopher Baines
2022-11-16 18:50           ` Luis Felipe
2022-11-18 19:03           ` Luis Felipe
2022-11-19 10:51             ` Christopher Baines
2022-11-19 12:03               ` Luis Felipe
2022-11-19 13:53                 ` Luis Felipe
2022-11-21 11:06                   ` Ludovic Courtès
2022-11-19 16:07               ` John Kehayias
2022-11-19 16:13                 ` Christopher Baines
2022-11-21 20:30                   ` John Kehayias
2022-11-20 22:33               ` zimoun
2022-11-21  8:57                 ` Christopher Baines
2022-11-21 17:03                   ` zimoun
2022-11-22  8:23                     ` Christopher Baines
2022-11-21 12:57             ` Ludovic Courtès
2022-11-21 13:21               ` Christopher Baines
2022-11-21 19:11                 ` Luis Felipe
2022-11-21 19:00               ` Luis Felipe
2022-11-21 20:42                 ` Julien Lepiller
2022-11-07  9:18   ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2020-07-08 18:49 Daniela Lura
2020-07-08 20:31 ` Cook, Malcolm
2020-07-08 21:00   ` pelzflorian (Florian Pelz)
2020-07-10 10:15   ` Daniela Lura
2020-07-09  0:53 ` Bengt Richter
2020-07-09  6:17 ` Pierre Neidhardt
2020-07-10 10:26   ` Daniela Lura
2020-07-09  7:47 ` Hartmut Goebel
2020-07-09  8:50 ` zimoun
2020-07-09  9:32 ` YP
2020-07-13 13:56   ` Ludovic Courtès
2020-07-13 14:00 ` Ludovic Courtès
2020-07-13 20:10   ` Christopher Baines
2020-07-13 22:04     ` Marius Bakke
2020-07-14 13:24     ` Ludovic Courtès
2020-07-14 19:47       ` Marius Bakke
2020-09-06 14:19         ` Daniela Lura
2020-09-07 10:20           ` Ludovic Courtès
2020-09-08 16:50             ` Daniela Lura
2020-09-08 16:38           ` Hartmut Goebel
2020-07-14  9:19   ` Daniela Lura
2020-07-14 13:23     ` 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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fsentep5.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=guix-devel@gnu.org \
    --cc=luis.felipe.la@protonmail.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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).