summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Webster <hwebs@hwebs.info>2026-07-20 11:34:47 -0500
committerHenry Webster <hwebs@hwebs.info>2026-07-20 11:34:47 -0500
commitd3ad45eed60a90b6ba828f500c314c60591f9151 (patch)
tree4539eaa58ea2eaaf7377e5ec4215d0f75654f299
parent4dac3c3f686760f8a84f4870f877ef4c42b34d00 (diff)
start migrating blog posts
-rw-r--r--haunt.scm14
-rw-r--r--images/data-entry.webpbin0 -> 27138 bytes
-rw-r--r--posts/data-entry.md47
-rw-r--r--style.css32
-rw-r--r--theme.scm33
5 files changed, 121 insertions, 5 deletions
diff --git a/haunt.scm b/haunt.scm
index 4364b4d..56d89af 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -1,19 +1,31 @@
(use-modules
+ (haunt builder assets)
(haunt builder flat-pages)
(haunt builder blog)
(haunt artifact)
(haunt reader)
(haunt reader commonmark)
(haunt site)
+ (haunt post)
(theme))
+(define post-prefix "post")
+
+(define collections
+ `(("Blog" "blog/index.html" ,posts/reverse-chronological)))
+
(site #:title "hwebs"
#:domain "hwebs.info"
#:default-metadata
'((author . "Henry J. Webster")
(email . "hwebs@hwebs.info"))
#:readers (list commonmark-reader)
- #:builders (list (flat-pages #:template flat-page-template)
+ #:builders (list (blog #:theme hwebs-theme
+ #:collections collections
+ #:prefix "blog"
+ #:post-prefix post-prefix)
+ (flat-pages #:template flat-page-template)
+ (static-directory "images")
(lambda (site posts)
(list (verbatim-artifact "style.css" "style.css")))))
diff --git a/images/data-entry.webp b/images/data-entry.webp
new file mode 100644
index 0000000..d537172
--- /dev/null
+++ b/images/data-entry.webp
Binary files differ
diff --git a/posts/data-entry.md b/posts/data-entry.md
new file mode 100644
index 0000000..0a0ed66
--- /dev/null
+++ b/posts/data-entry.md
@@ -0,0 +1,47 @@
+title: The Joy of Data Entry
+date: 2026-02-21 12:13
+---
+<figure>
+ <img src="/images/data-entry.webp" alt="The setup"/>
+ <figcaption>The setup</figcaption>
+</figure>
+
+I often feel like all crowd-sourced information is already on the internet.
+Sure, there are people who edit Wikipedia furiously.
+But that's not me.
+At least, I _thought_ I would never have anything to offer.
+
+At the beginning of this cozy winter, I took on the task of ripping my household's CDs.
+I'd wake up, put the next letter of an alphabetical stack on my desk, and methodically get to work.
+My [ripper](https://github.com/poddmo/abcde) levereges the [MusicBrainz](https://musicbrainz.org/) database to look up CD information.
+CDs don't have any metadata on the disk, so wonderful projects like MusicBrainz map raw discs with the artist, album name, track titles, and other metadata.
+
+Out of 257 albums, only eight where not on MusicBrainz!
+To not break my flow, I set these in another pile as they came up to worry about later.
+My initial idea was to enter in the information locally.
+When I finished the rest of the albums though, I let these linger on the desk.
+
+It took me about a week of gazing at this pile's beady eyes before I relented.
+I started poking around MusicBrainz for the first time to try to understand why it couldn't find my discs.
+That's when I found out maybe everything _isn't_ on the internet.
+
+Most were missing disc IDs.
+Easy fix.
+Look up the release and submit the new ID from the disc.
+
+But how is Q-Tip not on here?
+Turns out it's the [Korean version](https://musicbrainz.org/release/a90f31db-605f-4238-8585-ca57938bbdb4): scan the packaging, make a new release, done.
+
+[Etta James four disc set](https://musicbrainz.org/release/3d32ef0e-0353-4b96-a612-bea655664ac9): budget Euro label, copy over existing song info, verify with packaging, done.
+
+[Operatic two disc set](https://musicbrainz.org/release/e13ac9ab-5a91-4965-bb6b-e552581f300f): every accent and umlaut must be accounted for! Why is the name on the spine different than the name on the cover?
+
+[Stigma](https://musicbrainz.org/release/49aff8a8-9932-400a-a832-a86f8dea7d29): one of these [thrity Stigmas](https://musicbrainz.org/search?query=stigma&type=artist&limit=50&method=indexed) must be them. (They were not, I had to add [another one](https://musicbrainz.org/artist/638dd7c9-cfdd-42bb-9b90-4a4856bfa290).)
+
+It wasn't the most compelling way to spend my time off, but it was rewarding.
+Beyond being able to correctly label my CDs, I had a blast building the collective conscience.
+The physicality of finishing an album and taking another off the stack gave me fuel to continue.
+Digging through booklets and entering in forms brought a sense of peace to me.
+
+My apprecition goes out to all the people who contribute to MusicBrainz and make my life easier.
+Now I just have to get a scanner so I can upload these ablum covers...
diff --git a/style.css b/style.css
index 4ad622a..5c8b415 100644
--- a/style.css
+++ b/style.css
@@ -14,3 +14,35 @@ main {
header {
padding: 0.5rem 1rem;
}
+header nav {
+ display: inline-block;
+}
+header span {
+ margin-right: 10px;
+}
+nav ul {
+ list-style-type: none;
+ border-left: 1px solid;
+ margin: 0;
+ padding: 0;
+}
+nav ul li {
+ display: inline-block;
+ border-right: 1px solid;
+ padding: 2px 10px;
+ margin: 0;
+}
+li {
+ margin-left: 1rem;
+}
+p {
+ margin: 1rem 0;
+ line-height: 1.5rem;
+}
+img {
+ width: 100%;
+ height: auto;
+}
+figure {
+ margin: 1rem 4rem;
+}
diff --git a/theme.scm b/theme.scm
index 85d48a6..4843ed6 100644
--- a/theme.scm
+++ b/theme.scm
@@ -1,10 +1,12 @@
(define-module (theme)
#:use-module (haunt html)
#:use-module (haunt site)
+ #:use-module (haunt post)
#:use-module (haunt builder blog)
#:export (hwebs-theme
flat-page-template))
+
(define hwebs-theme
(theme #:name "hwebs"
#:layout
@@ -12,17 +14,40 @@
`((doctype "html")
(html
(head
- (meta (@ (charset "utf-8")))
+ (meta (@ (http-equiv "Content-Type")
+ (content "text/html")
+ (charset "utf-8")))
(meta (@ (name "viewport")
(content "width=device-width, initial-scale=1.0")))
(link (@ (rel "stylesheet")
- (href "style.css")))
+ (type "text/css")
+ (href "/style.css")))
(title ,(string-append title " — " (site-title site))))
(body
- (header (span ,(assq-ref (site-default-metadata site) 'author)))
+ (header (span ,(assq-ref (site-default-metadata site) 'author))
+ (nav (ul (li (a (@ (href "/")) "Home"))
+ (li (a (@ (href "/blog")) "Blog")))))
(main
(article (h1 ,title)
- ,body))))))))
+ ,body))))))
+ #:post-template
+ (lambda (post)
+ ;; TODO fill in datetime correctly
+ ;; TODO add <author>? (as hidden?)
+ `((time ,(date->string*(post-date post)))
+ ,(post-sxml post)))
+ #:collection-template
+ (lambda (site title posts prefix)
+ (define (post-uri post)
+ (string-append "/" (or prefix "") "/"
+ (site-post-slug site post) ".html"))
+ `((ul
+ ,@(map (lambda (post)
+ `(li (a (@ (href ,(post-uri post)))
+ ,(post-ref post 'title)
+ " — "
+ ,(date->string* (post-date post)))))
+ posts))))))
(define (flat-page-template site metadata body)
((theme-layout hwebs-theme) site (assq-ref metadata 'title) body))