From 2080cf54332f4a728e3e233d4b2221b6eb1a6e29 Mon Sep 17 00:00:00 2001 From: aristote Date: Tue, 12 Aug 2025 15:56:21 +0200 Subject: flake.lock: Update (data update) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'data': 'github:qaristote/info/9749429636e7e5e2515f1c75d228d5321907fba4' (2025-07-27) → 'github:qaristote/info/e22c29e4d972e07fc64fd867aa6ccbd293373a33' (2025-08-12) • Updated input 'flake-parts': 'github:hercules-ci/flake-parts/644e0fc48951a860279da645ba77fe4a6e814c5e' (2025-07-21) → 'github:hercules-ci/flake-parts/af66ad14b28a127c5c0f3bbb298218fc63528a18' (2025-08-06) • Updated input 'flake-parts/nixpkgs-lib': 'github:nix-community/nixpkgs.lib/14a40a1d7fb9afa4739275ac642ed7301a9ba1ab' (2025-06-29) → 'github:nix-community/nixpkgs.lib/0f36c44e01a6129be94e3ade315a5883f0228a6e' (2025-07-27) • Updated input 'my-nixpkgs': 'github:qaristote/my-nixpkgs/2a8763191aed7bc2db4fc478804d80420c542b3b' (2025-07-22) → 'github:qaristote/my-nixpkgs/a8023c066698c2b4b2f8a57425fac196ee021d57' (2025-08-12) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/6027c30c8e9810896b92429f0092f624f7b1aace' (2025-07-25) → 'github:NixOS/nixpkgs/372d9eeeafa5b15913201e2b92e8e539ac7c64d1' (2025-08-12) --- html/research/writings.nix | 161 ++++++++++++++++++++++++--------------------- 1 file changed, 87 insertions(+), 74 deletions(-) (limited to 'html/research/writings.nix') diff --git a/html/research/writings.nix b/html/research/writings.nix index 4ba4ec6..205bcf6 100644 --- a/html/research/writings.nix +++ b/html/research/writings.nix @@ -3,86 +3,99 @@ data, lib, ... -}: let - attrValsOpt = attrs: attrSet: - lib.attrVals (builtins.filter (attr: lib.hasAttr attr attrSet) attrs) - attrSet; - concatStringsPrefix = prefix: strings: - lib.concatStrings (builtins.map (string: prefix + string) strings); - concatStringsSuffix = suffix: strings: - lib.concatStrings (builtins.map (string: string + suffix) strings); - format = publication: +}: +let + attrValsOpt = + attrs: attrSet: lib.attrVals (builtins.filter (attr: lib.hasAttr attr attrSet) attrs) attrSet; + concatStringsPrefix = + prefix: strings: lib.concatStrings (builtins.map (string: prefix + string) strings); + concatStringsSuffix = + suffix: strings: lib.concatStrings (builtins.map (string: string + suffix) strings); + format = + publication: with html; with publication; - { - inherit id title url year abstract cite; - } - // (let - authorsOther = - lib.remove "${data.basics.name.first} ${data.basics.name.last}" - (builtins.map (author: "${author.given} ${author.family}") author); + { + inherit + id + title + url + year + abstract + cite + ; + } + // ( + let + authorsOther = lib.remove "${data.basics.name.first} ${data.basics.name.last}" ( + builtins.map (author: "${author.given} ${author.family}") author + ); in - lib.optionalAttrs (authorsOther != []) { - authors = "With ${lib.concatStringsSep ", " authorsOther}"; - }) - // lib.optionalAttrs (publication ? note) { - note = publication.note; - } - // lib.optionalAttrs (publication ? container-title) { - published = - "In ${em container-title}" - + concatStringsPrefix ", " - (attrValsOpt ["volume" "issue" "publisher"] publication); + lib.optionalAttrs (authorsOther != [ ]) { + authors = "With ${lib.concatStringsSep ", " authorsOther}"; } - // lib.optionalAttrs (publication ? event-title) { - published = "At ${em event-title}"; - } - // lib.optionalAttrs (publication ? DOI) { - doi = "${small "DOI"}: ${href "https://doi.org/${DOI}" (code DOI)}"; - }; - listPublications = collection: + ) + // lib.optionalAttrs (publication ? note) { + note = publication.note; + } + // lib.optionalAttrs (publication ? container-title) { + published = + "In ${em container-title}" + + concatStringsPrefix ", " (attrValsOpt [ "volume" "issue" "publisher" ] publication); + } + // lib.optionalAttrs (publication ? event-title) { + published = "At ${em event-title}"; + } + // lib.optionalAttrs (publication ? DOI) { + doi = "${small "DOI"}: ${href "https://doi.org/${DOI}" (code DOI)}"; + }; + listResearch = + collection: with html; - section [ - (dl (for (sort.reverse.byPath ["issued" "date-parts"] collection) - (publication: let + section [ + (dl ( + for (sort.reverse.byPath [ "issued" "date-parts" ] collection) ( + publication: + let formatted = format publication; in - with formatted; - lines [ - (dt {id = "Writings#${id}";} - "${href {target = "_blank";} url (em title)} (${year})") - (dd [ - (concatStringsSuffix ". " - (attrValsOpt ["authors" "note" "published" "doi"] - formatted)) - (details [ - (summary "More") - (dl [ - (dt "Abstract.") - (dd (blockquote abstract)) - (dt "Cite.") - (let - citeWith = title: type: - details [ - (summary title) - (pre (code ( - lib.readFile "${data.publications.files}/${type}/${id}" - ))) - ]; - in - dd [ - (citeWith "BibLaTeX" "biblatex") - (citeWith "BibTeX" "bibtex") - (citeWith "CSL JSON" "csljson") - ]) - ]) - ]) + with formatted; + lines [ + (dt { id = "Writings#${id}"; } "${href { target = "_blank"; } url (em title)} (${year})") + (dd [ + (concatStringsSuffix ". " (attrValsOpt [ "authors" "note" "published" "doi" ] formatted)) + (details [ + (summary "More") + (dl [ + (dt "Abstract.") + (dd (blockquote abstract)) + (dt "Cite.") + ( + let + citeWith = + title: type: + details [ + (summary title) + (pre (code (lib.readFile "${data.research.files}/${type}/${id}"))) + ]; + in + dd [ + (citeWith "BibLaTeX" "biblatex") + (citeWith "BibTeX" "bibtex") + (citeWith "CSL JSON" "csljson") + ] + ) ]) - ]))) - ]; -in { - conferences = listPublications data.publications.conferences; - journals = listPublications data.publications.journals; - misc = listPublications data.publications.misc; - reports = listPublications data.publications.reports; + ]) + ]) + ] + ) + )) + ]; +in +{ + conferences = listResearch data.research.conferences; + journals = listResearch data.research.journals; + misc = listResearch data.research.misc; + reports = listResearch data.research.reports; } -- cgit v1.2.3