Dear Guixers, The hpcguix-web package interface (https://hpc.guix.info/browse) supports package search, unlike the current one at https://guix.gnu.org/en/packages/. Plus imo hpcguix-web looks nicer. It would be a great UI/UX improvement if the current search was replaced with hpcguix-web. Has this been considered before? Thanks, kiasoc5
[-- Attachment #1.1: Type: text/plain, Size: 930 bytes --] On Wednesday, January 5th, 2022 at 11:52 PM, kiasoc5--- via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org> wrote: > Dear Guixers, > > The hpcguix-web package interface (https://hpc.guix.info/browse) supports package search, unlike the current one at https://guix.gnu.org/en/packages/. Plus imo hpcguix-web looks nicer. > > It would be a great UI/UX improvement if the current search was replaced with hpcguix-web. Has this been considered before? Yes. It just needs to be done :) One thing that would have to be addressed, though, is that the package list view of hpcguix-web seems to work only for JavaScript-enabled browsers. So if you are browsing with, say, Lynx, you don't have a way to discover packages. But I wonder if it is possible now to make the packages part use any of the Postgres databases that already exist and allow traditional search without JavaScript... [-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --] [-- Type: application/pgp-keys, Size: 1815 bytes --] [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 509 bytes --]
Hi, Luis Felipe <luis.felipe.la@protonmail.com> skribis: > But I wonder if it is possible now to make the packages part use any of the Postgres databases that already exist and allow traditional search without JavaScript... Former Outreachy intern Danjela Lura, together with Chris Baines, had started developing a JS-free package browsing interface: https://lists.gnu.org/archive/html/guix-devel/2020-07/msg00050.html Chris, could you tell us what the status is and what’s missing before we can use it on the web site? Thanks, Ludo’.
[-- Attachment #1.1: Type: text/plain, Size: 1152 bytes --] Ludovic Courtès <ludo@gnu.org> writes: > Luis Felipe <luis.felipe.la@protonmail.com> skribis: > >> But I wonder if it is possible now to make the packages part use any of the Postgres databases that already exist and allow traditional search without JavaScript... > > Former Outreachy intern Danjela Lura, together with Chris Baines, had > started developing a JS-free package browsing interface: > > https://lists.gnu.org/archive/html/guix-devel/2020-07/msg00050.html > > Chris, could you tell us what the status is and what’s missing before we > can use it on the web site? I think it's unchanged for a while now, I've attached what's probably the latest source code (there's not much to it). I think the remaining work is to settle on a direction in terms of the design and how to integrate it in to the website, and then deploy something for real. Personally, I'm in favour of a packages.guix.gnu.org domain which hosts the search page plus the package pages, and stopping generating package pages with haunt. I don't really have the time to try and move this forward myself, but I can try and support others. [-- Attachment #1.2: search.scm --] [-- Type: text/plain, Size: 6305 bytes --] #!/usr/local/bin/guile -s !# (use-modules (web server) (web request) (web response) (web uri) (sxml simple) (web client) (rnrs bytevectors) (srfi srfi-11) (srfi srfi-1) (ice-9 match) (json) (texinfo) (texinfo plain-text) (apps aux strings) (apps base templates theme) (apps base utils) (apps base types) (apps base templates components)) (define (templatize title body) `(html (head (title ,title)) (body ,@body))) (define* (respond #:optional body #:key (status 200) (title "Packages") (doctype "<!DOCTYPE html>\n") (content-type-params '((charset . "utf-8"))) (content-type 'text/html) (extra-headers '()) (sxml (and body (templatize title body)))) (values (build-response #:code status #:headers `((content-type . (,content-type ,@content-type-params)) ,@extra-headers)) (lambda (port) (if sxml (begin (if doctype (display doctype port)) (sxml->xml sxml port)))))) (define (search-packages-page request body) (define uri-value (let ((uri (request-uri request))) (if (eqv? #f (uri-query uri)) "" (second (string-split (uri-query uri) #\=))))) (define response (let-values (((response-object body) (http-request (string-append "http://data.guix.gnu.org/repository/1/branch/master/latest-processed-revision/packages.json?locale=en_US.utf8&search_query=" uri-value "&field=version&field=synopsis&field=description&after_name=&limit_results=30") #:method 'GET))) (json-string->scm (utf8->string body)))) (respond `((link (@ (rel "stylesheet") (href "http://guix-website-test.cbaines.net/static/base/css/package.css"))) (link (@ (rel "stylesheet") (href "http://guix-website-test.cbaines.net/static/base/css/item-preview.css"))) (link (@ (rel "stylesheet") (href "http://guix-website-test.cbaines.net/static/base/css/page.css"))) (link (@ (rel "stylesheet") (href "http://guix-website-test.cbaines.net/static/base/css/elements.css"))) (link (@ (rel "stylesheet") (href "http://guix-website-test.cbaines.net/static/base/css/common.css"))) (link (@ (rel "stylesheet") (href "http://guix-website-test.cbaines.net/static/base/css/messages.css"))) (link (@ (rel "stylesheet") (href "http://guix-website-test.cbaines.net/static/base/css/navbar.css"))) (link (@ (rel "stylesheet") (href "http://guix-website-test.cbaines.net/static/base/css/breadcrumbs.css"))) (link (@ (rel "stylesheet") (href "http://guix-website-test.cbaines.net/static/base/css/buttons.css"))) (link (@ (rel "stylesheet") (href "http://guix-website-test.cbaines.net/static/base/css/footer.css"))) (link (@ (rel "stylesheet") (href "https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css") (integrity "sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu") (crossorigin "anonymous"))) ,(navbar #:active-item "packages/search") (div (@ (class "package-info")) (div (@ (class "search-container") (style "display: block; text-align: center;")) (h1 "Packages") (form (@ (style "display: inline-block; margin-right auto; text-align: left")) (input (@ (type "text") (placeholder "Search packages") (name "search"))) (button (@ (class "btn btn-primary pull-right") (type "submit")) '((span (@ (class "glyphicon glyphicon-search") (aria-hidden "true"))))))) ,@(match response ((packages _) (map (match-lambda ((description synopsis version name) (let ((package-name (cdr name)) (package-version (cdr version)) (package-synopsis (match synopsis ((synopsis locale plain html source) (cdr source)))) (package-description (match description ((description locale plain html source) (cdr source))))) `(a (@ (class "item-preview") (href ,(string-append "http://guix-website-test.cbaines.net/packages/" (string-append package-name "-" package-version)))) (h3 ,package-name " " ,package-version) (p (@ (class "item-summary")) ,(string-summarize (stexi->plain-text (texi-fragment->stexi package-description)) 30) "…"))))) (vector->list (cdr packages)))))) (footer "Made with " (span (@ (class "metta")) "♥") " by humans and powered by " (a (@ (class "link-yellow") (href ,(gnu-url "software/guile/"))) "GNU Guile") ". " (a (@ (class "link-yellow") (href "//git.savannah.gnu.org/cgit/guix/guix-artwork.git/tree/website")) "Source code") " under the " (a (@ (class "link-yellow") (href ,(gnu-url "licenses/agpl-3.0.html"))) "GNU AGPL") ".")))) (run-server search-packages-page 'http '(#:port 8765)) [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 987 bytes --]
[-- Attachment #1.1: Type: text/plain, Size: 1480 bytes --] On Sunday, January 9th, 2022 at 7:53 PM, Christopher Baines <mail@cbaines.net> wrote: > Ludovic Courtès ludo@gnu.org writes: > > > Luis Felipe luis.felipe.la@protonmail.com skribis: > > > > > But I wonder if it is possible now to make the packages part use any of the Postgres databases that already exist and allow traditional search without JavaScript... > > > > Former Outreachy intern Danjela Lura, together with Chris Baines, had > > > > started developing a JS-free package browsing interface: > > > > https://lists.gnu.org/archive/html/guix-devel/2020-07/msg00050.html I completely forgot about this :( Thanks for the link. > > Chris, could you tell us what the status is and what’s missing before we > > > > can use it on the web site? > > I think it's unchanged for a while now, I've attached what's probably > > the latest source code (there's not much to it). > > I think the remaining work is to settle on a direction in terms of the > > design and how to integrate it in to the website, and then deploy > > something for real. Personally, I'm in favour of a packages.guix.gnu.org > > domain which hosts the search page plus the package pages, and stopping > > generating package pages with haunt. +1 > I don't really have the time to try and move this forward myself, but I > > can try and support others. I want to help. I'll check the source and start asking questions. [-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --] [-- Type: application/pgp-keys, Size: 1815 bytes --] [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 509 bytes --]
Hi, Christopher Baines <mail@cbaines.net> skribis: > Ludovic Courtès <ludo@gnu.org> writes: [...] >> Former Outreachy intern Danjela Lura, together with Chris Baines, had >> started developing a JS-free package browsing interface: >> >> https://lists.gnu.org/archive/html/guix-devel/2020-07/msg00050.html >> >> Chris, could you tell us what the status is and what’s missing before we >> can use it on the web site? > > I think it's unchanged for a while now, I've attached what's probably > the latest source code (there's not much to it). Nice. That’s only the search page though, and not individual package pages, right? > I think the remaining work is to settle on a direction in terms of the > design and how to integrate it in to the website, and then deploy > something for real. Personally, I'm in favour of a packages.guix.gnu.org > domain which hosts the search page plus the package pages, and stopping > generating package pages with haunt. Sounds like a plan! > I don't really have the time to try and move this forward myself, but I > can try and support others. Yes, that would be nice. It now takes Haunt ages to generate all these pages, we have to do something about it. :-) So, if anyone feels like picking it up but needs guidance, let us know! Thanks, Ludo’.
Luis Felipe <luis.felipe.la@protonmail.com> skribis:
> I want to help. I'll check the source and start asking questions.
Yay!
Ludo'.
[-- Attachment #1.1: Type: text/plain, Size: 401 bytes --] On Tuesday, January 18th, 2022 at 2:05 PM, Ludovic Courtès <ludo@gnu.org> wrote: > Luis Felipe luis.felipe.la@protonmail.com skribis: > > > I want to help. I'll check the source and start asking questions. > > Yay! Unfortunately, I need to focus on something else right now, so I think I can't work on this project anytime soon :( If anyone else can take it, that would be great... [-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --] [-- Type: application/pgp-keys, Size: 1815 bytes --] [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 509 bytes --]