-# Haskell:
out
-# Hakyll:
-_cache
-_site
-/*.pdf
--- /dev/null
+.PHONY: build clean
+
+HTML=$(patsubst html/%.esh,out/%,$(shell find html -name '*.esh'))
+DOCS=$(patsubst %,out/docs/%,$(shell recsel -P file docs/meta.rec))
+
+build: $(HTML) $(DOCS)
+clean:
+ rm -rf out
+
+out/docs/%: docs/%
+ mkdir -p "$(@D)"
+ cp "$<" "$@"
+out/docs/%.pdf: docs/%.ly
+ mkdir -p "$(@D)"
+ lilypond -o "$(@D)" "$<"
+
+out/%: html/%.esh
+ mkdir -p "$(@D)"
+ sh esh.sh < "$<" > "$@"
+
+++ /dev/null
-title: AmyMono Regular (Source FontForge)
-tags: police
-date: 2023-11-20
-description: La source (pour le logiciel fontforge) de la police de caractères monospace que j'ai faite.
+++ /dev/null
-title: AmyMono Regular (Fichier OTF)
-tags: police
-date: 2023-11-20
-description: La police de caractères monospace que j'ai faite.
+++ /dev/null
-title: Little Nightmares II - Étude For A Minor
-tags: musique, partition, Little Nightmares
-date: 2023-07-21
-description: Un arrangement pour piano de la musique "Étude For A Minor", de la bande originale de Little Nightmares II.
+++ /dev/null
-title: Ma'oz Tzur
-tags: musique, partition, Judaïsme
-date: 2024-06-16
-description: Une partition pour accordéon de mon arrangement de Ma'oz Tzur.
+++ /dev/null
-title: MoringMark - Triangle Glyph
-tags: storyboard, The Owl House
-date: 2022-01-10
-description: Un storyboard que j'ai fait pour mon adaptation en stop-motion d'un comic de MoringMark.
+++ /dev/null
-title: The Owl House - Outro Theme
-tags: musique, partition, The Owl House
-date: 2023-06-14
-description: Un arrangement pour piano de la musique de générique de fin d'épisode de The Owl House.
--- /dev/null
+%rec: Doc
+%mandatory: file title date
+
+file: AmyMono-Regular-FontForge.sfd
+title: AmyMono Regular (Source FontForge)
+date: 2023-11-20
+
+file: AmyMono-Regular.otf
+title: AmyMono Regular (Fichier OTF)
+date: 2023-11-20
+
+file: Little-Nightmares-II-Étude-For-A-Minor.pdf
+title: Little Nightmares II - Étude For A Minor
+date: 2023-07-21
+
+file: Ma-oz-Tzur.pdf
+title: Ma'oz Tzur
+date: 2024-06-16
+
+file: The-Owl-House-Outro-Theme.pdf
+title: The Owl House - Outro Theme
+date: 2023-06-14
--- /dev/null
+while read -r line; do
+ case "$line" in
+ "#"*) echo "$(echo "$line" | sed "s/#//")";;
+ *) echo "echo '$(echo "$line" | sed "s/'/''/g")'";;
+ esac
+done | sh
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <id>https://ameliathe1st.gay/</id>
- <title>AméliaThe1st</title>
- <link rel="self" href="https://ameliathe1st.gay/atom.xml"/>
- <updated>$datetime$</updated>
- <author>
- <name>Amélia Coutard</name>
- <email>contact@ameliathe1st.gay</email>
- <uri>https://ameliathe1st.gay</uri>
- </author>
-
- $for(docs)$
- <entry>
- <title>$title$</title>
- <link rel="alternate" href="https://ameliathe1st.gay$url$"/>
- <id>https://ameliathe1st.gay$url$</id>
- <updated>$datetime$</updated>
- <summary>$description$</summary>
- </entry>
- $endfor$
-
-</feed>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+
+ <id>https://ameliathe1st.gay/</id>
+ <title>AméliaThe1st</title>
+ <link rel="self" href="https://ameliathe1st.gay/atom.xml"/>
+ # echo "<updated>$(recsel -P date docs/meta.rec -S date | tail -n 1)T00:00:00Z</updated>"
+ <author>
+ <name>Amélia Coutard</name>
+ <email>contact@ameliathe1st.gay</email>
+ <uri>https://ameliathe1st.gay</uri>
+ </author>
+
+ # recsel -P file docs/meta.rec -C -S date | tail -n 10 | while read -r file; do
+ <entry>
+ # echo "<title>$(recsel -e "file = \"$file\"" -P title docs/meta.rec)</title>"
+ # echo "<link rel=\"alternate\" href=\"https://ameliathe1st.gay/docs/$(printf '%s' "$file" | jq -Rr @uri)\"/>"
+ # echo "<id>https://ameliathe1st.gay/docs/$(printf '%s' "$file" | jq -Rr @uri)</id>"
+ # echo "<updated>$(recsel -e "file = \"$file\"" -P date docs/meta.rec)T00:00:00Z</updated>"
+ </entry>
+ # done
+
+</feed>
<body>
<h3> Mes dernières publications: </h3>
<ul>
- $for(docs)$
- <li> <a href="$url$">$title$</a> ($tags$) </li>
- $endfor$
+ # recsel -P file docs/meta.rec -C | while read -r file; do
+ # echo "<li> <a href=\"/docs/$file\">$(recsel -e "file = \"$file\"" -P title docs/meta.rec)</a> </li>"
+ # done
</ul>
<h3> Des liens: </h3>
<ul>
+++ /dev/null
--- Copyright 2023 Amélia COUTARD.
---
--- This file from this website is free software: you can redistribute it
--- and/or modify it under the terms of the GNU Affero General Public License as published by the Free
--- Software Foundation, either version 3 of the License, or (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
--- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
--- Public License for more details.
---
--- You should have received a copy of the GNU Affero General Public License along with this program. If
--- not, see <https://www.gnu.org/licenses/>.
-
-{-# LANGUAGE OverloadedStrings #-}
-import Data.ByteString.Lazy.UTF8 (ByteString, fromString)
-import Data.Monoid ((<>))
-import Data.Time.Format (formatTime, defaultTimeLocale)
-import Hakyll
-import Hakyll.Process
-
-mapHead :: (a -> a) -> [a] -> [a]
-mapHead _ [] = []
-mapHead f (h:t) = f h:t
-
-split :: Eq a => a -> [a] -> [[a]]
-split _ [] = [[]]
-split v (h:t) | v == h = []:split v t
-split v (h:t) = mapHead (h:) (split v t)
-
-main :: IO ()
-main = hakyll $ do
- match "COPYING-*" $ do
- route idRoute
- compile copyFileCompiler
- match "html/style.css" $ do
- route $ gsubRoute "html/" (const "")
- compile copyFileCompiler
-
- match ( "docs/*.pdf" .||. "docs/*.sfd" .||. "docs/*.otf" ) $ do
- route idRoute
- compile getResourceLBS
-
- match "docs/*.ly" $ do
- route $ setExtension "pdf"
- compile $ execCompilerWith (execName "lilypond") [HakFilePath] (COutFile (RelativePath (newExtension "pdf" . last . split '/')))
-
- match "html/atom.xml" $ do
- route $ gsubRoute "html/" (const "")
- compile $ do
- docs <- fmap (take 10) . recentFirst =<< loadAll ("docs/*" .&&. complement "**.metadata")
- let docsContext = listField "docs" docContext (return docs)
- <> field "datetime" (const $ fmap (formatTime defaultTimeLocale "%FT%T%QZ") $ getItemUTC defaultTimeLocale $ itemIdentifier $ head docs)
- <> defaultContext
- getResourceBody
- >>= applyAsTemplate docsContext
-
- match "html/index.html" $ do
- route $ gsubRoute "html/" (const "")
- compile $ do
- docs <- recentFirst =<< loadAll ("docs/*" .&&. complement "**.metadata")
- let docsContext = listField "docs" docContext (return docs) <> defaultContext
- getResourceBody
- >>= applyAsTemplate docsContext
- >>= relativizeUrls
-
-docContext :: Context ByteString
-docContext = urlField "url" <> dateField "datetime" "%FT%TZ" <> metadataField