From ef4e97ec9a49e65d70c9ba8d4c1926b2eeec2cba Mon Sep 17 00:00:00 2001 From: Luis Felipe Date: Wed, 2 Jun 2021 14:17:03 -0500 Subject: [PATCH] website: publications: Add publication type. * website/apps/media/types.scm (): Add "type" field. * website/apps/media/data.scm (publications): Specify publication types. * website/apps/media/templates/components.scm (publication->shtml): Show publication type. --- website/apps/media/data.scm | 21 ++++++++++++++------- website/apps/media/templates/components.scm | 8 +++++--- website/apps/media/types.scm | 15 +++++++++++---- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/website/apps/media/data.scm b/website/apps/media/data.scm index fc7854e..812f9e3 100644 --- a/website/apps/media/data.scm +++ b/website/apps/media/data.scm @@ -105,40 +105,47 @@ distribution.")) #:title "Functional Package Management with Guix" #:url "https://arxiv.org/abs/1305.4584" #:authors "Ludovic Courtès" - #:date (string->date "2013-05-20" "~Y-~m-~d")) + #:date (string->date "2013-05-20" "~Y-~m-~d") + #:type (C_ "publication type" "Conference paper")) (publication #:title "Reproducible and User-Controlled Software Environments in HPC with Guix" #:url "https://hal.inria.fr/hal-01161771/en" #:authors (G_ "Ludovic Courtès, Ricardo Wurmus") - #:date (string->date "2015-07-25" "~Y-~m-~d")) + #:date (string->date "2015-07-25" "~Y-~m-~d") + #:type (C_ "publication type" "Conference paper")) (publication #:title "Code Staging in GNU Guix" #:url "https://arxiv.org/abs/1709.00833" #:authors "Ludovic Courtès" - #:date (string->date "2017-09-04" "~Y-~m-~d")) + #:date (string->date "2017-09-04" "~Y-~m-~d") + #:type (C_ "publication type" "Conference paper")) (publication #:title "Scientific Data Analysis Pipelines and Reproducibility" #:authors "Altuna Akalin" #:url "https://towardsdatascience.com/scientific-data-analysis-pipelines-and-reproducibility-75ff9df5b4c5" - #:date (string->date "2018-10-01" "~Y-~m-~d")) + #:date (string->date "2018-10-01" "~Y-~m-~d") + #:type (C_ "publication type" "Article")) (publication #:title "Reproducible Genomics Analysis Pipelines with GNU Guix" #:url "http://dx.doi.org/10.1093/gigascience/giy123" #:authors "Ricardo Wurmus, Bora Uyar, Brendan Osberg, Vedran Franke, \ Alexander Gosdschan, Katarzyna Wreczycka, Jonathan Ronen, Altuna Akalin" - #:date (string->date "2018-10-02" "~Y-~m-~d")) + #:date (string->date "2018-10-02" "~Y-~m-~d") + #:type (C_ "publication type" "Journal article")) (publication #:title "Guix: A most advanced operating system" #:url "https://ambrevar.xyz/guix-advance/index.html" #:authors "Pierre Neidhardt" - #:date (string->date "2019-01-14" "~Y-~m-~d")) + #:date (string->date "2019-01-14" "~Y-~m-~d") + #:type (C_ "publication type" "Article")) (publication #:title "Scalable Workflows and Reproducible Data Analysis for Genomics" #:url "https://link.springer.com/protocol/10.1007%2F978-1-4939-9074-0_24" #:authors "Francesco Strozzi, Roel Janssen, Ricardo Wurmus, \ Michael R. Crusoe, George Githinji, Paolo Di Tommaso, Dominique Belhachemi, \ Steffen Möller, Geert Smant, Joep de Ligt, Pjotr Prins" - #:date (string->date "2019-07-06" "~Y-~m-~d")))) + #:date (string->date "2019-07-06" "~Y-~m-~d") + #:type (C_ "publication type" "Book chapter")))) (define screenshots diff --git a/website/apps/media/templates/components.scm b/website/apps/media/templates/components.scm index ce9d944..20fa3a9 100644 --- a/website/apps/media/templates/components.scm +++ b/website/apps/media/templates/components.scm @@ -46,9 +46,11 @@ (p (@ (class "publication-info")) - ;; TRANSLATORS: <1/> is a date, and <2/> a list of authors. - ,(G_ `("Published " ,date " by " - ,(publication-authors publication) "")))))) + ;; TRANSLATORS: <1/> is a publication type, <2/> is a date, and + ;; <3/> is a list of authors. + ,(G_ + `("" ,(publication-type publication) ". Published " ,date + " by " ,(publication-authors publication) ". ")))))) (define (screenshot->shtml shot) diff --git a/website/apps/media/types.scm b/website/apps/media/types.scm index 579e642..2c219e5 100644 --- a/website/apps/media/types.scm +++ b/website/apps/media/types.scm @@ -11,6 +11,7 @@ publication-date publication-language publication-title + publication-type publication-url screenshot screenshot? @@ -66,20 +67,26 @@ ;;; IETF language tag corresponding to the language in which the ;;; publication is written. ;;; +;;; type (string) +;;; The kind of publication. See the list of publications in the +;;; (apps media data) module for examples. +;;; +;;; (define-record-type - (make-publication title url authors date language) + (make-publication title url authors date language type) publication? (title publication-title) (url publication-url) (authors publication-authors) (date publication-date) - (language publication-language)) + (language publication-language) + (type publication-type)) ;;; Helper procedures. -(define* (publication #:key title url authors date (language "en")) +(define* (publication #:key title url authors date (language "en") type) "Return a object with the given attributes." - (make-publication title url authors date language)) + (make-publication title url authors date language type)) ;;; Screenshot (record type) base-commit: aa3ec5059f92ac5a0a47367cb886c87bb26d44fa -- 2.31.1