Compare commits

..

14 commits

Author SHA1 Message Date
Fabien Freling 45ce87e6b1 update article main page generator 2024-11-28 09:47:19 +01:00
Fabien Freling 70005c9228 update mastodon link 2024-11-28 09:46:59 +01:00
Fabien Freling 5066f456f1 add nushell 2024-11-27 15:24:32 +01:00
Fabien Freling ca36f290b4 fix variant path for footer generated file 2024-11-27 10:09:08 +01:00
Fabien Freling 8a84b11503 remove ubuntu setup 2024-11-19 17:44:01 +01:00
Fabien Freling f0af5efd81 add jujutsu 2024-11-19 17:42:21 +01:00
Fabien Freling 6a3440dd1a switch to flake 2024-11-19 15:13:02 +01:00
Fabien Freling c28b99933e update "about" page 2022-07-10 23:45:04 +02:00
Fabien Freling be3345736b add AVIF support 2022-01-13 14:41:39 +01:00
Fabien Freling fa15d60ae1 add nix shell 2022-01-12 16:36:11 +01:00
Fabien Freling eacb2c685b update deploy location 2021-12-29 17:51:19 +01:00
Fabien Freling 6911b53616 add git large files article 2021-12-29 16:02:26 +01:00
Fabien Freling b73a81a129 add horizontal rule 2021-08-31 13:59:09 +02:00
Fabien Freling c6543c3669 update build scripts 2021-08-31 13:58:44 +02:00
9 changed files with 17 additions and 104 deletions

View file

@ -24,11 +24,3 @@ HTML_TEMPLATE = main.html
JPG_OPT = -quality 80 -strip -interlace Plane
!blur_mini = |> ^ %f -> blur mini^ convert %f -resize 400x400 -blur 0x8 $(JPG_OPT) %o |> blur_mini.jpg
!thumbnail = |> ^ %f -> thumbnail^ convert %f -resize 200x200 $(JPG_OPT) %o |>
#
# Slides
#
MARP = npx @marp-team/marp-cli@latest
MARP_OPTS = --allow-local-files --bespoke.progress
!marp_pdf = |> $(MARP) $(MARP_OPTS) %f --pdf --output %o |> %B.pdf
!marp_html = |> $(MARP) $(MARP_OPTS) %f --html --output %o |> %B.html

View file

@ -66,7 +66,7 @@ work on smart homes. I work in the Vision team, making home cameras smarter. I
am thrilled to work on computer vision again.
<div style="text-align:center; padding-top:2em;">
<a href="https://octodon.social/@ffreling">
<a href="https://mas.to/@ffreling">
<img src="images/mastodon.svg" alt="Mastodon" style="height:40px; padding-inline:5px">
</a>
<a href="http://code.ffreling.com">

View file

@ -1,39 +1,31 @@
#!/usr/bin/env nu
#
def title [path: string] -> string {
open $path | lines | filter {|l| (str starts-with "title:")} | first | split row --regex 'title\s*:\s*' | get 1 | str trim --char "\""
}
def creation_date [path: string] -> string {
open $path | lines | filter {|l| (str starts-with "date:")} | first | split row --regex '\s*:\s*' | get 1
def get_metadata [path: string] {
let lines = open $path | lines
let anchors = $lines | enumerate | filter {|l| ($l.item | str starts-with "---")} | take 2
let header = $lines
| range (($anchors | first | get 'index') + 1)..(($anchors | last | get 'index') - 1)
let metadata = $header | split column -n 2 --regex '\s*:\s*' | rename key value
let record = $metadata | reduce -f {} {|it, acc| $acc | upsert $it.key ($it.value | str trim --char '"') }
$record |
}
def update_date [path: string] -> string? {
let updates = open $path | lines | filter {|l| (str starts-with "update:")}
if ($updates | length) > 0 {
return ($updates | first | split row --regex '\s*:\s*' | get 1)
} else {
return null
}
}
let pages = (glob *.md) ++ (glob **/index.md)
let sorted_pages = $pages | wrap 'path'
| upsert title {|row| (title $row.path)}
| upsert creation {|row| (creation_date $row.path)}
| upsert update {|row| (update_date $row.path)}
| sort-by --reverse creation
| upsert metadata {|row| (get_metadata $row.path)}
| sort-by --reverse metadata.date
print "---
title: Articles
---
"
$sorted_pages | each {|p|
let _ = $sorted_pages | each {|p|
let rel_path = $p.path | path relative-to (pwd)
print --no-newline $"- ($p.creation): [($p.title)]\(($rel_path)\)"
if $p.update? != null {
print $" \(Updated: ($p.update)\)"
let html_path = $rel_path | path parse --extension md | upsert extension { 'html' } | path join
print --no-newline $"- ($p.metadata.date): [($p.metadata.title)]\(($html_path)\)"
if $p.metadata.update? != null {
print $" \(Updated: ($p.metadata.update)\)"
} else {
print ""
}

View file

@ -1,23 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
cat << EOF
---
title: Articles
---
EOF
listing=""
for file in *.md; do
if [ $file = "index.md" ]; then
continue
fi
link=$(basename $file .md).html
date=$(sed -n 's/date: \(.*\)/\1/p' $file)
title=$(sed -n 's/title: \(.*\)/\1/p' $file)
listing="$listing- $date: [$title]($link)\n"
done
echo -e $listing | sort --reverse

View file

@ -1,6 +0,0 @@
include_rules
HTML_TEMPLATE = article.html
: slides.md |> !marp_pdf |> jujutsu_slides.pdf ./<deps>
: index.md | ./<deps> |> !html |>

View file

@ -1,16 +0,0 @@
---
title: "Lightning talk: Jujutsu"
date: 2024-11-26
---
_This article is also available as a lightning talk: [pdf](./jujutsu_slides.pdf)_
## What is it?
## How does it compare?
## VCS landscape
> I was part of the team at Meta that built Sapling for many years. Im no
> longer at Meta and I use jj full time.
>
> _[Discussion on Lobste.rs](https://lobste.rs/s/rojoz1/jujutsu_jj_git_compatible_vcs#c_foqya4)_

View file

@ -1,23 +0,0 @@
---
marp: true
theme: gaia
footer: '**Fabien Freling** - 2024-11-26'
paginate: true
---
<style>
section::after {
content: attr(data-marpit-pagination) '/' attr(data-marpit-pagination-total);
}
</style>
<!--
_class: lead
-->
# Jujutsu
Life after Git
---

View file

@ -1,7 +1,6 @@
---
title: Web stack
date: 2019-06-26
update: 2024-11-26
---
Previous stacks

View file

@ -7,12 +7,10 @@
devShell.x86_64-linux = with pkgs;
mkShell {
nativeBuildInputs = [
graphviz-nox
imagemagick
just
libavif
libjxl
nodejs
nushell
pandoc
tup