remove all references to 'sorrel.dev'
Some checks failed
ci/woodpecker/push/build-and-deploy Pipeline failed

This commit is contained in:
sorrel 2024-01-14 21:06:09 -05:00
parent 44e621a9d0
commit 9981bc889e
12 changed files with 43 additions and 112 deletions

View file

@ -1,5 +1,6 @@
2024/01/14
- fix stylesheets
-
2024/01/13
- update atom-table-writing

View file

@ -10,8 +10,8 @@ steps:
- apt update
- apt -yq install racket ca-certificates
- yes Y | raco pkg install --no-docs csv-reading
- raco exe sorrel.dev.rkt
- raco distribute dist sorrel.dev
- raco exe oxaliq.net.rkt
- raco distribute dist oxaliq.net
deploy:
image: alpine:latest

View file

@ -1,9 +0,0 @@
FROM debian:bookworm-slim
COPY . .
RUN rm -rf data/
RUN rm -rf in-progress
RUN apt update
RUN apt -yq install racket ca-certificates
RUN yes Y | raco pkg install --no-docs csv-reading
RUN raco exe sorrel.dev.rkt
RUN raco distribute dist sorrel.dev

22
README
View file

@ -1,6 +1,6 @@
--------------
| λ sorrel.dev |\
| λ oxaliq.net |\
\--------------\ \
\______________\|
@ -105,5 +105,25 @@ there's a couple things this'll do.
so that's simple enough.
______________________
|----------------------|
| HOW TO MODIFY A POST |
|----------------------|
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
so, some things aren't done til yr dead. some of those things might be posts. `publish`
is always going to move yr text into archive/ and you'll be able to move that file back
to in-progress/ when yr ready to start working on it again.
then you can use the "modify" tool. here's how it works
```
$ modify -i in-progress/ex.txt \ # -i is for the input
-r unsettled \ # -r is for the resource type
-l "An Example Text" \ # -l is for the head_l_ine (title)
```
you can't currently change the description or the tags on existing posts.
what this does:
- update the csv files for the resource type
- rebuilds the source with footer and metadata and tags
- update the atom feed, but this time with a "updated" tag in the entry
if at any point the script encounters a problem, any changes will be rolled back

View file

@ -1,13 +0,0 @@
#!/bin/sh -e
# clean up old build
rm -rf sorrel || true
# compile binary
raco cross --target x86_64-linux exe sorrel.dev.rkt
# distribute
raco cross --target x86_64-linux dist sorrel sorrel.dev
# remove duplicated binary
rm sorrel.dev

View file

@ -1,2 +1 @@
title,link,summary,published,updated
Beginning LATL,https://sorrel.dev/unsettled/1,beginning the process of thinking through an environment for conlanging and other language shenanigans,2023-12-04T15:20:53
1 title,link,summary,published,updated title link summary published updated
Beginning LATL,https://sorrel.dev/unsettled/1,beginning the process of thinking through an environment for conlanging and other language shenanigans,2023-12-04T15:20:53

View file

@ -2,7 +2,7 @@
(let ([feed
`(feed
((xmlns "http://www.w3.org/2005/Atom"))
(title "λ.sorrel.dev")
(title "λ.oxaliq.net")
(link ((rel "self")
(href ,feed-ref)))
(updated ,update-time)

View file

@ -1,17 +0,0 @@
#!/bin/sh -e
# make a clean slate locally
rm -rf ./deploy-dir || true
mkdir ./deploy-dir
# copy all the files into a deploy local directory
cp -a ./sorrel/. ./deploy-dir/.
cp -a ./static ./deploy-dir/.
cp -a ./source ./deploy-dir/.
cp -a ./data ./deploy-dir/.
# make a clean slate remotely
ssh deploy@turtle.hup.is 'rm -rf ./sorrel.dev'
# copy all the files onto remote
rsync -avz ./deploy-dir/. deploy@turtle.hup.is:~/sorrel.dev

View file

@ -4,7 +4,7 @@
(p "some kind of colophon"))
(p
"all of the code for the website is hosted and deployed from tree, "
(a ((href "https://git.bunk.computer/oxaliq/sorrel.dev"))
(a ((href "https://git.bunk.computer/oxaliq/oxaliq.net"))
"bunk computer club's git forge")
"i do almost everything in the main branch, cause it's just me and that way
i can add links below to the in-progress stuff real easy")
@ -28,9 +28,9 @@
"there's some racket scripts i use for tooling that were made with "
(a ((href "https://docs.racket-lang.org/cli/"))
"#lang cli"))
(p (a ((href "https://git.bunk.computer/oxaliq/sorrel.dev/src/branch/main/.dev-log"))
(p (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/.dev-log"))
"you can read about development here"))
(p (a ((href "https://git.bunk.computer/oxaliq/sorrel.dev/src/branch/main/.idea-log"))
(p (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/.idea-log"))
"you can read about my vague plans here"))
(p (a ((href "https://git.bunk.computer/oxaliq/sorrel.dev/src/branch/main/in-progress"))
(p (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/in-progress"))
"or read works in progress here")))

View file

@ -8,13 +8,12 @@
(only-in racket/function thunk identity)
(only-in csv-reading csv->list)
(only-in xml read-xml)
(only-in "./tool/utils.rkt" list->csv resource-link atom-table-entry add-atom-entry make-feed))
(only-in "./tool/utils.rkt" list->csv resource-link atom-table-entry add-atom-entry
make-feed archive-file))
(define-namespace-anchor anc)
(define ns (namespace-anchor->namespace anc))
(define homepage "https://sorrel.dev")
;; modify needs to
@ -346,7 +345,7 @@
(let* ([old-feed (read-xml af-input-port)])
(lambda (accumulator)
(let* ([atom-table (hash-ref accumulator 'atom-table)]
[new-feed (make-feed ns make-af-input-port atom-table update-time #:homepage homepage)])
[new-feed (make-feed ns make-af-input-port atom-table update-time)])
(write-to-file af-output-port new-feed old-feed accumulator)))))
;; ----------------
@ -375,7 +374,7 @@
[(atom-feed-input-port atom-feed-output-port) (get-atom-feed-ports)]
[(make-atom-input-port) (get-make-atom-input-port)]
[(old-res-table id) (get-res-table-and-id res-table-input-port)]
[(res-link) (resource-link r-type id #:homepage homepage)]
[(res-link) (resource-link r-type id)]
[(tags) (get-tags r-type id)]
[(new-content) (get-new-content source-input-port tags id)])
@ -388,10 +387,12 @@
;; see above
(replace-resource source-input-port source-output-port new-content id)
(update-res-table old-res-table res-table-output-port id))
(compose-accumulator rollback-thunks))))
(compose-accumulator rollback-thunks))
;;
))
;; only archive after everything else is done
(archive-file n-in x-test)
(displayln "modify was successful")))))
;(run modify)

View file

@ -5,13 +5,12 @@
(only-in racket/format ~a)
(only-in racket/list append* first second third fourth fifth rest flatten add-between take)
(only-in xml xexpr->string)
(only-in "./tool/utils.rkt" homepage list->csv add-atom-entry archive-file)
csv-reading)
(define-namespace-anchor anc)
(define ns (namespace-anchor->namespace anc))
(define homepage "https://sorrel.dev")
;; publish needs to:
@ -97,11 +96,6 @@
(make-root-file-handle x-test l-headline)
(make-res-file-handle x-test r-type r-id)))
(define (archive-file i x)
(if x
(copy-file i (string-replace i "in-progress" "publish-test/archive") #t)
(rename-file-or-directory i (string-replace i "in-progress" "archive"))))
(define (write-new-tagged/index tag-table #:test [x #f])
(displayln "write-new-tagged/index")
(let* ([tags (rest (map (lambda (row) (first row))
@ -184,17 +178,6 @@
(close-output-port file))
(error "couldn't obtain file lock on ~a" file))))
;; takes a parsed table as a list of lists and formats for writing as a .csv file
(define (list->csv l)
(foldl (lambda (i res)
(string-append res i))
""
(flatten
(add-between (map (lambda (row)
(add-between row ","))
l)
"\n"))))
(define (write-csv-to-file data handle)
(let ([file (open-output-file handle #:exists 'replace)])
@ -222,15 +205,6 @@
tag-list)
new-tt))))
(define (add-atom-entry atom-table new-row)
;; take only first 21 rows (or all rows)
;; insert new-row after header
(let ([out-length (min (+ 1 (length atom-table)) 21)]
[header (first atom-table)]
[old-content (rest atom-table)])
(take (append (list header new-row) old-content)
out-length)))
(program
(publish)
@ -340,7 +314,7 @@
(define feed ((eval (read (open-input-file (if x
"publish-test/data/make-atom.txt"
"data/make-atom.txt"))) ns)
"https://sorrel.dev/feed.atom"
"https://oxaliq.net/feed.atom"
publish-time
homepage
(rest new-atom-table)))

View file

@ -1,25 +0,0 @@
(lambda (feed-ref update-time homepage)
`(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)
; ,(map
; (lambda (item)
; `(entry
; (title ,(title item))
; (link ((href ,(href item))))
; (id ,(href item))
; (type ,(type item)) ; usually html
; ,(map (lambda (category)
; `(category ((term ,(term category))
; (scheme ,(scheme category)))))
; (categories item))
; (updated ,(updated item)))
; items))
))