add ability to parse atom.txt with bound values

This commit is contained in:
Sorrel 2023-11-01 18:32:17 -04:00
parent 92f20f47a0
commit d02be1f2a4
4 changed files with 53 additions and 51 deletions

View file

@ -13,6 +13,9 @@
web-server/dispatchers/filesystem-map
web-server/http)
(define-namespace-anchor anc)
(define ns (namespace-anchor->namespace anc))
(define (html-response content)
(response/full
@ -116,15 +119,8 @@
[homepage "https://sorrel.dev"])
;; hard coding for now because reader can't be escaped
(define content
`(feed
((xmlns "http://www.w3.org/2005/Atom"))
(title "λ.sorrel.dev")
(link ((rel "self")
(href ,feed-ref)))
(updated ,update-time)
(author
(name "sorrel"))
(id ,homepage)))
((eval (read (open-input-file "source/atom.txt")) ns)
feed-ref update-time homepage))
(xml-response
(string->bytes/utf-8 (string-append "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
(xexpr->string content))))))

View file

@ -1,26 +1,11 @@
(main
(p "what do you want to know?")
(section
(h1 "about sorrel")
(p "i'm a gay lil nerd who's learning everyday about community, and ecology,
and computer; and trying hard to be good for the world with my gay lil
friends.")
(section
(h2 "contact")
(p "- e - m- "
(span " a - i ")
(span " -l [ at ")
(span "] s - o- ")
(span "r - r- e - l [ d o")
(span "t ] d -e")
(span "-v is a good place to do the email"))
(p
"i have avoided 'online' for a long time, but i'm getting hip to it. i'll
add some more socials here for to socially network in the future,
promise."))
(section
(h2 "a bio or smth")
(p
"i am a little bug that was named after "
(p "i was named after "
(a ((href "https://plants.usda.gov/home/plantProfile?symbol=OXOR"))
"a plant called sorrel")
" and i live in the mountains of southern appalachia on "
@ -60,6 +45,7 @@
;; mmt bullet
(li (p "mmt, but make it anarchist "
(small "and get rid of all that \"sovereignty\" stuff, ew")))
;; nd bullet
(li (p "the autistic-contiguous position: object-relations theory or gay
sex act? "
(span
@ -70,20 +56,41 @@
(hx-target "closest span.hx-target")
(hx-swap "innerHTML"))
"a ~type~ of experience")))))
(li (p "being trans and gay"))
(li (p "א ⃝"))))
;; queer bullet
(li (p "she's a gay trans lady, harold"))
;; art bullet
(li (p "i used to make a lot more visual art than i do these days. some
sort of smth'll wind up here at some point."))))
;; contact section
(section
(h2 "contact")
(p "- e - m- "
(span " a - i ")
(span " -l [ at ")
(span "] s - o- ")
(span "r - r- e - l [ d o")
(span "t ] d -e")
(span "-v is a good place to do the email"))
(p
"i have avoided 'online' for a long time, but i'm getting hip to it. i'll
add some more socials here for to socially network in the future,
promise."))
;; getting earnest section
(section
(h2 "a very earnest disclaimer")
(p
"i like to talk about computation with ppl! but it is important for me that
you know: i am new to all this! i did not think software was ^for me^ and
then i learned some webdev and now i am down the rabbit hole.")
you know: i am new to all this! i did not think computers or software were
^for me^ and then i had to get good at spreadsheets at my first email-factory
job and then i got curious about webdev and now i have reached terminal
velocity down a very λ.particular.rabbit[hole]")
(p
"i'm not very good at many things. i don't even have a math education or.
have you ever met someone who *is* good at all this stuff?")
"i'm not very good at many things. i don't even have a math education or a
degree in anything. have you ever met someone who *is* good at _all_ ^this^
~stuff~ ???")
(p
"please be patient! with me and with everyone else you talk about things
you care about with.")
"i like thinking in public, but please be patient! with me and with
everyone else you talk about things you care about with.")
(p "let's hold our strong opinions loosely!")
(p "and first assume good faith from each other!")
(br)

View file

@ -1,8 +1,5 @@
;; required on update
;; -- (let (feed-ref "https://URI/atom")
;; (update-time
(feed
(lambda (feed-ref update-time homepage)
`(feed
((xmlns "http://www.w3.org/2005/Atom"))
(title "λ.sorrel.dev")
(link ((rel "self")
@ -25,4 +22,4 @@
; (categories item))
; (updated ,(updated item)))
; items))
)
))

View file

@ -64,4 +64,6 @@
(hx-get "/hx/settleds")
(hx-target "main")
(hx-swap "innerHTML"))
"\"settled\" thoughts (projects built/in progress)")))
"\"settled\" thoughts (projects built/in progress)")
(a ((href "/feed.atom"))
"þͤ olde rss")))