update the readme so it's not lying

This commit is contained in:
sorrel 2023-12-13 22:14:10 -05:00
parent 1d300aa6bb
commit 773621f610
2 changed files with 48 additions and 58 deletions

97
README
View file

@ -1,6 +1,6 @@
-------------- --------------
| λ.sorrel.dev |\ | λ sorrel.dev |\
\--------------\ \ \--------------\ \
\______________\| \______________\|
@ -21,14 +21,18 @@ so
|----------------| |----------------|
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
it's a racket web server that uses xml library to generate some valid html. it's a racket web server that uses xml library to generate some valid html.
there's a dirty little dsl in there so that i can type some plain texty stuff and i write my little posts in xml-like s-expressions. (not for everyone! but i like the
have my plain texty stuff get turned into sexprs and then into xexprs and then written expressivity!) someday, i might turn it into a proper dsl with support for htmx's
as new-fangled html. typical lispy stuff. ~funky~ syntax and a little more distance from it's host language, but not this day.
```
(require web-server ; like so much of this module i make generous use of `racket/web-server` with a dispatcher for `hx/` prefixed content
xml) (snippets of html), and plain `/` (for rendering full pages.) handlers build the
``` content from the little sexpr .txt files (they're not valid racket on they're own,
that's all compiled and hosted in my friend maren's bedroom. it's all very cute. they get read and evaluated as data.) it's all real small and everything, but i figured
why not save the generated html in a `static/` directory so it doesn't need to be built
on each request? so that's what happens.
that's the server! it's compiled and hosted on bunk.computer. it's all very cute.
_________________ _________________
|-----------------| |-----------------|
@ -46,15 +50,16 @@ right now, the plan's for
~SETTLED THOUGHTS~ ~SETTLED THOUGHTS~
it's like a portfolio. links to stuff. deployed stuff. pictures of stuff. a it's like a portfolio. links to stuff. deployed stuff. pictures of stuff. a
home for everything that's done enough to need a home. home for everything that's done enough to need a home. or projects with
"minimally kickable tires"
~THOUGHTS ABOUT WHO EVEN AM I~ ~THOUGHTS ABOUT THOUGHTS?~
yr typical about page, y'know with some biographical information, some there's some "root" resources. yr typical about page, y'know with some
musings about life's meaning. some links to things i like or do as a biographical information, or whatever. "errata" like:
person with other people in the world. ~a page about the site itself.
~maybe a link page with some links to things i like or do as a person with other people
~some kinda tag system for things in the world
~some kinda apology for even serving you some javascript ~a tag index and indices for tags
the structure of things is such that: there's no templating per se. if the request the structure of things is such that: there's no templating per se. if the request
has the path prefix "/hx/" you just get little snippets of html. the htmx is there to has the path prefix "/hx/" you just get little snippets of html. the htmx is there to
@ -70,43 +75,35 @@ or footer or any of that fanciness.
| HOW TO POST | | HOW TO POST |
|-------------| |-------------|
¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯
remember up at the top of the README i said there was a DSL for this thing? i meant a let's talk about the posting. so you write up a little bit of s-expressified xml-like
domain specific language. the domain is hella specific. like just my particular web plain text works of astounding eloquence; how do you get the server to generate some
page specific. there's little grammars for each little part of it. i'll talk about stuff for you? i wrote a little utility for that. it's called "publish" and it uses a
those in a moment. #lang package a friend made for making cli tools called
[cli](https://docs.racket-lang.org/cli/index.html)
for right now i'm going to talk about the posting. so you write up a little bit of the tool is called "publish" and it needs some flags to build a thing right.
plain text according to the grammar for the type of post yr going to do. how do you get
the server to generate some stuff for you? that's where the second part of the process
comes in. there's a little racket utility for that. if it were an ~unsettled thought~
for example it might look something like:
``` ```
$ mkpost -s source/source-file.txt -t public_html/blog/target-file.html $ publish -i in-progress/ex.txt \ # -i is for the input (i keep em in in-progress/")
-r unsettled \ # -r is for the resource "type" (see "WHAT'S ON THERE?")
-t ecology,art,computer \ # -t is for comma separated tags
-l "An Example Text" \ # -l is for head_l_ine (it means title)
-d "a short description-like a sentence long ideally"
# there's also an "-x" flag to do a "test run" before publishing. it'll generate
# stuff in publish-test/ including a "staging database" (it's csv files)
``` ```
there's a couple things this'll do. the most obvious is that it takes yr plain text there's a couple things this'll do.
and it generates some html. you expected that. the other thing it does is it writes - first it'll take yr post and do some processing, add a footer with metadata and tags.
the name of that file to a little lookup table with all it's tags. [i haven't - it'll also update the "database" of csv files for the resource type and for all of
implemented this part yet] the associated tags.
- this generates new index files for the resource type, and the tags.
so that's simple enough. now for the - if the post introduces a new tag, a new tag index gets made.
- the atom feed gets updated with the uri and the relevant info about the post.
__________________________ (it's on the to-do list to embed the post in the feed, cause i like to read my rss
|--------------------------| in cli, but i'm also a hypocrite that wants people to visit my page!)
| DOMAIN SPECIFIC LANGUAGE | - finally it moves the input file to an archive folder.
|--------------------------| (in the future i'll make an update tool for posting updates to existing stuff!)
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
the main pages are just handwritten xexprs. not worth spending time on something you'll
only write once.
but for the posts:
post = post type, tags
post type = ( "blog" | "project" ) "\n" ;
tags = { tag identifier, white space } "\n" ;
tag identifier = "#", { alphabetic character}
so that's simple enough.

View file

@ -365,11 +365,4 @@
(displayln "publish was successful"))) (displayln "publish was successful")))
;;; (run publish) (run publish)
(run publish #("-i" "in-progress/beginning-latl.txt"
"-r" "unsettled"
"-t" "latl,conlang"
"-l" "Beginning LATL"
"-d" "beginning the process of thinking through an environment for conlanging and other language shenanigans"
"-x"))