💾 Archived View for gemini.circumlunar.space › users › acdw › work-notes captured on 2021-12-17 at 13:26:06. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-09-24)
-=-=-=-=-=-=-
I take a lot of notes at work and email them to myself and then like ... don't read them or do anything with them. They usually just sit in my 'Work notes' folder in my email. But now...
You can see them too!!!!
At some point I might even automate this, but for now I'm doing it manually. Enjoy!
https://github.com/mrzool/bash-sensible
https://github.com/sindresorhus/awesome-scifi
or like, this one (latin modern mono)
crux -- at least look at these
(M-x package-install RET try RET first!!)
STUNNEL - to TLSify an awk server
dynamic range compression w/ffmpeg
from kumquat on #meta @ tilde.chat
1. remove the skins from the chickpeas
2. use white vinegar and not lemon juice
3. use the aquafaba to thin out the hummus, rather than water
a lot of times I don't want to drop $$ on marcona almonds, so I use just sliced almonds or another nut I have hanging out in the freezer. I've even used hazelnut meal when I didn't seem to have enough almonds ~~ kumquat
Still mostly emacs ...
But other stuff too ...
how to stop procrastinatin (still need to read)
And old computer searching ...
cool guy with cool emacs config
mac-centric config of emacs (based on rakhim's)
librefox, not-a-fork of firefox with better defaults
better than make? allegedly...
possibly far too incisive, really. kind of stings a bit.
"I for one welcome our Robot overlords"
-- email kensanata re: toki.transjovian.org
lasers & feelings -- also, curiously enough, from kensanata
https://github.com/amno1/dotfiles/blob/master/.emacs.d/lisp/init.org
https://www.emacswiki.org/emacs/ElDoc
https://github.com/debanjum/company-ledger
https://github.com/bbatsov/crux
literate configs
https://www.wisdomandwonder.com/wp-content/uploads/2014/03/C3F.html
https://pages.sachachua.com/.emacs.d/Sacha.html
They're full of beans
~ crossword clue and hilarious phrase
https://so.nwalsh.com/2020/02/29/dot-emacs
esp. look at appearance and custom file
some performance advantages of lexical scope
Bicycles and UNIX are the two best inventions I've interacted with. Well, they and Emacs.
Great example of the Web Gone Too Far:
electrek's best sub-1200 bikes
okay foreal tho: read this to get kNOWLEDGE
Configuring Emacs from scratch - use-package
EVIL
https://github.com/emacs-evil/evil-collection
https://github.com/emacs-evil/evil
Apropos of nothing, my Enter key on this keyboard is sticky... (as in it stays down, not that it's covered in anything)
more emacsy goodness from Alex Schroeder
this looks promising to check out
Database set for Practical SQL
-- the book is available from the library:
looks like a good computer recycler
read this - might be *too real*
looks like a good computer recycler
Let's try using Links, how bad could it be??
oblique strategies as an app // gp
seinen or josei - anime targeted toward an older (and hopefully less horny) audience
On Basilisk Station - David Weber
Chomsky PDF: "Strategies of Manipulation"
pizza recipe, found by easter egg in a personal website
(well, watch actually, whatever)
"Getting my tabs under control" - Solderpunk
~spring on republic.circumlunar.space
---
I need to look more at using vimwiki, seriously
and more, of course, courtesy of ~epoch
-> write up a spec proposal for :^) the sarcasm line in text/gemini
The decommoditization of protocols
refer for other business people
madi swan (heard on klsu, apparently local)
grab colors off this (red, yellow, green, blue, gray, bg, fg, cyan [window borders], )
openssl s_client -showcerts -servername your.host.com -connect host:port | openssl x509 –noout
openssl req -new -subj "/C=CA/CN=*.makeworld.gq" -addext "subjectAltName = DNS:makeworld.gq, DNS:*.makeworld.gq" -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -days 1825 -nodes -out cert.pem -keyout key.pem
https://michaelheap.com/self-signed-ssl-client-certificates/
https://portal.mozz.us/gemini/tilde.black/users/fox/journal/20200706-gemini-on-tor.gmi
https://community.torproject.org/onion-services/overview/
gopher://gopher.black/1/phlog/20180427-gopher-black-on-tor-part-1
gopher://gopher.black/1/phlog/20180428-gopher-black-on-tor-part-2
https://alexschroeder.ch/wiki/2020-07-02_An_overview_over_my_Gemini_projects
JOBS
https://scribe.breezy.hr/p/740a946753cf-scribe-ghostwriter
---
https://alexschroeder.ch/wiki/2020-06-04_Gemini_Upload
https://alexschroeder.ch/wiki/Baschdels_spin_on_Gemini_uploading
https://alexschroeder.ch/wiki/2020-06-04_Gemini_Upload
WFH
https://intern.textbroker.com/us/author-signup.php
https://www.oatmealstudios.com/html/pages/write-guide.php
https://ttec.taleo.net/careersection/10020/jobdetail.ftl?job=02OJ5&lang=en
https://www.scribendi.com/jobs.en.html#freelance
https://www.sps.com/greeting-card-guidelines-submissions
https://www.gramlee.com/jobs.html
https://www.kirkusreviews.com/about/careers/
https://boards.greenhouse.io/bevy/jobs/4755656002
OTHER
https://www.vanityfair.com/hollywood/2020/06/ziwe-fumudoh-baited-interview-alison-roman
https://en.wikipedia.org/wiki/Joan_Stark
---
that's so southern, louisiana pronunciation
---
https://blog.ebrpl.com/?s=business
- make list of already-posted-about businesses
- think of more emails to send
- bbb of baton rouge?
- john smith?
- Kelly?
- why not big names, like Caine's, etc?
- bicycle shops
- facebook post ?
- polish up question list
mmmm depends. one's i've played: Dark & Shattered Lands, Forgotten Kingdoms, Shadowgate, Genesis, BatMUD, Lost Souls, Discworld MUD
out of those, Forgotten Kingdoms is the most well-made, but also probably the least-populated
Discworld is fun, Genesis has a fantastic newbie area, DSL and Shadowgate have a lot of people but tend to be hack-and-slash MUDs
BatMUD has a *ton* of people but is very hack-and-slash
https://news.ycombinator.com/item?id=17787816
http://rickcarlino.com/2018/07/11/fabulous-text-only-websites-2018-edition-html.html
https://news.ycombinator.com/item?id=13337948
https://idle.nprescott.com/2020/why-bother-with-markdown.html
ALSO: WRITE A GETTING STARTED ON GEMINI GUIDE
---
SSS N: [redacted]
attached: the beginnings of a pager in bash (no scroll up??)
cf.
https://github.com/dylanaraps/fff/blob/master/fff
https://github.com/dylanaraps/pure-bash-bible
https://github.com/dylanaraps/writing-a-tui-in-bash#line-wrapping
[2020-06-23T21:59:21.348Z] <makeworld> Also make sure you're hashing SubjectPublicKeyInfo and not the whole cert if possible
[2020-06-23T21:59:26.722Z] <makeworld> Yeah in the TOFU threead
[2020-06-23T21:59:35.419Z] <acdw> oh good point -- I'll have to re read that thread
[2020-06-23T21:59:40.637Z] <acdw> okay I gotta go get on the desk
[2020-06-23T21:59:41.483Z] <acdw> o/
Public Key Pinning For TLS Using a Trust on First Use Model
gopher://zaibatsu.circumlunar.space/~solderpunk/phlog/why-gopher-needs-crypto.txt
attached: art thing and another art thing
attached: bollux with cert validation (no TOFU, no config)
attached: gmi/txt art (with png sources)
attached: gemlog post
CONTENT CREATOR -- ???
FREELANCE RESUME WRITER
GEMINI TEST CASES
- gempaper.strangled.net has a v1 cert, needs v3 (?)
file server for gemini BASIC AS HELL
CSS FOR .GALLERY - ACDW.NET
.gallery { display: grid; grid-template-columns: 1fr 1fr 1fr; } .gallery > figure { border: 1px dotted; /* or whatever */ margin: 0; padding: 1ch; text-align: center; }
https://letsencrypt.org/docs/a-warm-welcome-to-asn1-and-der/
use to put bollux source on gemini
https://portal.mozz.us/gemini/gemini.circumlunar.space/users/christina/
--- GEMINI INTERESTING THINGS ---
makeworld: saves hash of raw cert and expiry date for TOFU
xq: store pubkey?
--> PUBKEY // PRIVKEY
-> CERT == EXPIRATION DATE SIGNED WITH PUBKEY
it's like "i'm guaranteeing you for 3 months that i am in control of this server"
openssl x509 -pubkey -dates -wahtver
17:33 <makeworld> xq: Why store the fingerprint along with the pubkey, like why does it matter if the cert is refreshed or not, as long as the pubkey matches?
17:33 <xq> nah, doesn#t really matter
17:33 <xq> i would just announce to the user that something has changed in a non-intrusive way
https://tildegit.org/sloum/bombadillo/issues/173
17:37 <makeworld> My unreleased browser caches any text/gemini or text/plain pages, storing the rendered page, url and the link. The max number of pages and/or the max cache size in bytes is configurable
17:38 <makeworld> The cache is just in-memory, so it starts whenever the browser is opened
17:38 <acdw> oh cool -- yes I was thinking about an in-memory cache so like, backs and forwards wouldn't do a round-trip with the server
17:38 <makeworld> The cache is organized by URLs, and I also normalize the URLs so that if it has :1965 or no port it doesn't create a double entry
17:38 <makeworld> Yeah exactly
bollux: - => blastoff "${BOLLUX_URL%/*}"
USE URL-2.SH OMG
url.sh - split and join url. using 'eval'. is it secure? I'm not sure. it's attached.
another thing is attached too -- but whatever. why am I doing this again????
What I NEED to do is just parse the URL every time into a new array. I can't really pass arrays around in bash - it's not going to be super efficient but if I cared about that I wouldn't be programming it in BASH.
DECLARE -N OMG OMG OMG (bash 4.3)[[[[[[[[[[[[[[[[[[ URL-2.SH ]]]]]]]]]]]]]]]]]]]]
A variable can be assigned the nameref attribute using the -n option to the declare or local builtin commands (see Bash Builtins) to create a nameref, or a reference to another variable. This allows variables to be manipulated indirectly. Whenever the nameref variable is referenced, assigned to, unset, or has its attributes modified (other than using or changing the nameref attribute itself), the operation is actually performed on the variable specified by the nameref variable's value. A nameref is commonly used within shell functions to refer to a variable whose name is passed as an argument to the function. For instance, if a variable name is passed to a shell function as its first argument, running
declare -n ref=$1
inside the function creates a nameref variable ref whose value is the variable name passed as the first argument. References and assignments to ref, and changes to its attributes, are treated as references, assignments, and attribute modifications to the variable whose name was passed as $1.
If the control variable in a for loop has the nameref attribute, the list of words can be a list of shell variables, and a name reference will be established for each word in the list, in turn, when the loop is executed. Array variables cannot be given the nameref attribute. However, nameref variables can reference array variables and subscripted array variables. Namerefs can be unset using the -n option to the unset builtin (see Bourne Shell Builtins). Otherwise, if unset is executed with the name of a nameref variable as an argument, the variable referenced by the nameref variable will be unset.
something like this
openssl s_client ... | openssl x509 -noout -SHA256 -subject -dates -fingerprint | while IFS='=' read var val; do printf "%s='%s'\n" "$var" "$val" done
-- but what to do with the output? Save the whole thing, then...what? Source it? Hm....
---
icon adapted from
https://commons.wikimedia.org/wiki/File:H%C3%A9raldique_meuble_Cygne_passant.svg
install icon into $(PREFIX)/share/icons/hicolor/scalable/apps/
-- possibly convert to 48x48 png to $(PREFIX)/share/icons/hicolor/48x48/apps/
BOLLUX.DESKTOP -- install to $(PREFIX)/share/applications/
[Desktop Entry] Name=bollux GenericName=bollux Comment=Terminal gemini client Categories=Network; Icon=bollux Exec=bollux %u Terminal=true Type=Application MimeType=x-scheme-handler/gemini;x-scheme-handler/gopher;
after installed: -- update-desktop-database $(PREFIX)/share/applications
TOFU -- SET UMASK TO 077 -- LOOK AT
https://tildegit.org/solderpunk/AV-98/src/branch/master/av98.py#L290
see earlier email for actual code. this is going to be process
1. get domain's SSL fingerprint
2. do we already have the domain's fingerprint? -->
- text files in $XDG_DATA_HOME/bollux/certs/<domain.name>.fprint (?)
3. if it exists: is it the same?
- yes: OKAY GREAT
- no: OH NOES TELL THE USER - WHAT DO?
4. if it doesn't:
- OKAY FINE WE'LL JUST SAVE IT -- possibly notifying the user.
KEYBINDS
'-' run blastoff "${BOLLUX_URL%%/*}" # error handling - if path is '/' do nothing
OTHER NOTES STUFF
- to read header: `read -n 1027` (only read code + ' ' + 1024 bytes)
- how to see if header is too long???
- redirects: keep previous in an array and don't keep redirecting if we've been there before
- ask before cross-domain or cross-protocol redirect
- REALLY SHOULD JUST PASS AROUND URL AS ARRAY
---
GEMINI
======
COPROC
------
#!/usr/bin/env bash url="$1" serv="${url#*//}" serv="${serv%%/*}" echo "URL='$url' SERV='$serv'" coproc openssl s_client -servername "$serv" -connect "$serv:1965" -ign_eof -crlf openssl x509 -fingerprint -noout <&"${COPROC[0]}" >fingerprint printf "FINGERPRINT: %s\n" "$(cut -d'=' -f2 <fingerprint)" printf "SENDING REQUEST: $url\n" echo "$url" >&"${COPROC[1]}" printf "RESPONSE: \n" document=false while read -r; do hre='^[1-6][0-9] .+ if [[ "$REPLY" =~ $hre ]]; then document=true fi ! $document && continue printf '%s\n' "$REPLY" done <&"${COPROC[0]}"
-----------------------------------------------
Attaching other options
improvements to bollux : ATTACHED. DROP THIS INTO THE REPO !!!!
--
should probably redo download()
--
handle about://history, about://bookmarks
-- ^^
in parse_url:
- because if items are changed, `name[url]` won't be.
--
--
in parse_url:
arr="$1" printf -v "$arr[scheme]" "$scheme" # apparently works
--
isdefined() => isset / setq
isempty() => isnull / nullq / nulq?
--
--
TOFU
<makeworld> It's basically what Bombadillo does. I store the hash of the raw cert, as well as its expiry date. Then for every request, I pass the cert to a function that tries to load the TOFU entry from storage. If it doesn't exist, then the current cert is saved. If the fingerprints match, everything's good. If they don't match, but the expiry date has passed, then the new cert is saved over top of the old one. Otherwise, something malicious has happened
<makeworld> https://pastebin.com/xMsdE5D0
<makeworld> acdw: That's the overview, and the text of my high level function that handles it
<makeworld> It really wasn't that bad to do
--
LUTE
https://veterummusica.bandcamp.com/album/elizabeths-lutes
--
GEMINI
https://github.com/MasterQ32/kristall
--
https://github.com/taviso/ctypes.sh
--
TEXT FOLDING
------------
https://github.com/dylanaraps/pure-bash-bible
https://gist.github.com/venator85/d8552019a20aa947f59fabc735093a91
---
attached: stylus styles, deploy.sh for circumlunar, transform_url.sh and normalize_url.sh, Phase 1 PDF (mangled filename)
where have all the gophers gone
EMAIL: ckaiser@floodgap.com re forking OverbiteWX for geminispace
gopher://gopher.somnolescent.net
BOLLUX
------
SEE TRANSFORM_URI.SH MUFUCKA
BOLLUX
------
fix the thing and then post about it on
change install to 0755, not 0775
VENV ALIASES
------------ from hackernews
I do something similar, although I use venv to create a new virtual environment and update pip and setuptools:
alias venv='python3 -m venv venv && source venv/bin/activate && pip install --upgrade pip setuptools -q'
And then ae and de to activate/deactivate a venv:
alias ae='source venv/bin/activate' alias de='deactivate'
JOBs
----
- actually pays slightly less than current job, at least at the low end -- growth?
also check (attached) bollux.
EL
--
attache's
GEMINI
------
GAWK
----
https://news.ycombinator.com/item?id=23240800
https://www.gnu.org/software/gawk/manual/gawkinet/
EPIGRAPH LINK:
https://www.nytimes.com/interactive/2020/05/19/magazine/covid-quarantine-recovery.html
BECAUSE WE ARE ALSO EATING BROWNIES
attache'd (also ttrss opml)
ALSO: attached notes on hell
https://jobs.lever.co/italic/63166118-9213-41df-a12b-cc27f144bbd2
---
https://jobs.lever.co/italic/63166118-9213-41df-a12b-cc27f144bbd2
Attached: expati, a function to parse @( || ) strings inline.
Syntax will look like this:
Here is a line that has a @(strong||strong) thing. Here is one with a @(reference|ref) to something else.
Note the difference: '||' is expanded to '| el' (actually with quotes), and '|' is not -- because usually you don't want to add 'el' to the beginning of the command.
Another thought: change the '@@<name>:' rule to include '@@<name>::' -> <name>(){ el <bind> "$@"; }
@@ref: el a href=example.com
---
https://www.manmadediy.com/4223-15-essential-bike-tools-every-cyclist-should-own
http://www.davesbicyclerepair.com/
https://bicyclingbr.blogspot.com/
function mkcd() { mkdir -p -- "$1" && cd -P -- "$1" }
==========================================
expat.
- default tags: (in /^#/{})
lvl = RLENGTH - 1 -sub(/^#+/, "<<" end (lvl?lvl:"") " el ") +sub(/^#+/, "") +if (!match($0, /^[[:alnum:]]+/)) + $0 = default_tag $0 +$0 = "<<" end (lvl?lvl:"") " el " $0
- how to define default tag?
@#p - only to next blank
@@#p - until next default is defined
/^@/ { if (!match($0, /[[:blank:]]*[:=#][[:blank:]]*/)) { echo(); # TODO: write begin() function (and end()) next; } name = .. tokn = .. bind = .. if (!name) { if (tokn ~ /#/) { default_block = bind if (ats==2) keep_default = 1 } }
el() { e="$1"; shift; case "$e" in *.) e="${e%.}"; while read -r line; do text "$line"; done ;; *) : ;; esac for word; do case "$word" in *.) word="${word%.}"; while read -r line; do text "$line"; done ;; ...... }
this allows for, e.g., # OR NOT WHY WOULD I CARE ABOUT THAT
el h1 Text that will be a header << END el p - This text will go til the end which is marked by END: END << END el p - I can also do $(el a href="example.com" a link) like this. Or I can even do it $(text a link|el a href="example.com" -) like this. END << END el p - The biggest things I want to do is make it easy to write this format. Because this is $(el em pretty) verbose. It's not as verbose as it $(strong $(el em could)) be, but it still is pretty verbose. Note: you could write the above as $(el em could | el strong -), too. END <<. el p - You could also just have the end marker be a period. I'm also thinking I should change "el" to grab stdin, if there's no text. Unless it's maybe one of the empty tags. . <<. el ul - $(el li Here is an example of a list.) $(el li I haven't done one of these yet.) $(el li You can have short list items that just take up a line.) $(<<.1 el li - Or you can have items that will take up multiple lines. This might get a little tricky to implement, maybe? .1 ) $(el li Either way, it should be fine, I think.) . <<. el p - Of course, something I have yet to talk about is how much power this will take to render anything. As you can see, a list, especially a nested list, takes up a lot of shells. I'm not sure that's going to be very ... efficient. . <<. el p - Whatever. I'll do this anyway. I just need to figure out $(<<.1 el ol - $(el li Something to convert to '<<[end] el ') $(el li A way to convert the first blank line to '[end]') $(el li Something to convert to '$(<<[end-nest] el ') $(el li A way to figure out when the block will end, and end it with '$([end-nest]\n)') $(el li An easy way to nest elements) $(el li Something to convert to '$(el ' ) $(el li Something to convert to '$(text ') $(el li Something to convert to '|el ' ) .1 ) .
attached
@-tached
@-@chd
@_@
Case Duckworth
Library Technician II
Career Center / Reference
East Baton Rouge Parish Library
---
also: a function to do inline @() (I hope)
# emulate a do-while loop in sh while body DONE condition do true; done # OR while true; do body [[ condition ]] || break done
- different stacks, possibly MADE, NOT IMPLEMENTED
- blocks contain inlines -- if a block ends, all its inlines should end as well.
- pop() and push() should be more general, then -- and take a filename as $1.
IMPLEMENTED -- you can only push and pop one at a time though (better)
- inlines should be able to be piped to - so I can write, e.g.,
%(here is link text| a href=example.com%)
which will expand to
$(echo "here is link text" | inline a href=example.com)
- of course, the line delimiters are up for grabs.
- could just be '$(' '$)', since that's basically sh-style.
- not sure if I want it to be *too* similar, since it's not actually
going to expand straight to shell syntax -- there's going to be some
"magic" (i.e., auto echo and quoting).
SYNTAX OF SOURCE FILES
I like kind of a heredoc-style interpolation, or like pp(1):
Here is regular text. #h1 a directive here. this is a h1. Now more regular text.
There's some things to think on:
- sometimes I'll want a tag 'line-wise', i.e., to end at a newline.
- sometimes I'll want it to work 'block-wise', i.e., apply to the entire block.
- additionally, sometimes I'll want tags to end at the next tag,
and sometimes to enclose the rest of the tags to the end of the par.
- sometimes I'll want 'inline' tags, as well.
- These can actually solved with current logic:
- I have `block <tag>` -> block-wise
-> These will only enclose everything to the next blank line
-> how to close? --> macros of some kind?
-> is that actually something I want?
-> another option: have 'default block',
and I can change the default block
- so that a blank line just closes to the default block
and I can do paragraphs inside lists, or whatever.
- I have `block <tag>/` -> line-wise (I think?)
- I have `inline` (or will)
TO FIND OUT
- in a here-doc: if I set a variable in a $() block, will it stay set in subsequent blocks? or are they like, subshells or whatever?
- is a here-doc really the best way to insert text? or should I just have incremental 'printf' statements? and a prefixed line would just do the command or whatever? --- I'M THINKING THIS MIGHT BE THE BEST IDEA THE MORE I THINK OF IT
xorg/ .Xresources .xprofile .xinitrc .fehbg nvim/ .config/nvim/* nvimpager/ .config/nvimpager/* git/ .config/git/* neomutt/ .config/neomutt/* khal/ .config/khal/* khard/ .config/khard/* vdirsyncer/ isync/ msmtp/ netrc/
check out some stuff like
https://github.com/Aloxaf/fzf-tab
to redo `fmenu` -- it'd be better to just have one program, right?
slash:
https://github.com/sgtpep/pmenu
problem with fzf: no mouse
but is that really an issue? I think it might be better to have a mouse-menu program (with limited number of options) and text-menu program (that enables filtering/etc).
--bottom, --vertfull, --horzfull, --center*, --lines, --font, --*fg, --*bg, --width, --height, -x, -y:
handled by st options
--opacity*,--dim*, --linehight, :
stupid/unneeded
etc: all fzf I think. SO LET'S DO IT
also,
bitmap fonts (I think I need to make my own italic tamzen-ish)
https://github.com/kreativekorp/bitsnpicas
https://github.com/tajmone/pixel-art-supplies
https://github.com/robhagemans/monobit
<-- HAS ITALICS -- based on uw. If I want UW in TTF I might have to build using the tools here.
https://github.com/nereusx/xsg-fonts
https://github.com/robhagemans/hoard-of-bitfonts
(https://github.com/bbidulock/adwm)
^ -- fork of echinus <- dwm. see arch forums for screenshots?
<- wrote mcwm, other cool projects too
https://github.com/sunaku/vim-highlightedyank
sanic
--- title: "Lucky charms" subtitle: "(373)" series: moon photos tags: cereal, house, window --- | I never liked them, if I'm being honest. | The marshmallows are too sweet | And the cereal wooden. I couldn't eat | Them quickly enough to make it through a bowl. | I remember my aunt's house overlooking | The lake. I ate them in the kitchen. The light | Broke through the window like a thief. | I dropped the bowl. It shattered. Not so lucky | Anymore, she said. The open window gaped.
---
also see the attached html & css. for a look
---
AND AND
---
&
https://undeadly.org/cgi?action=article;sid=20080607131856
---
&&&
https://www.daveeddy.com/2019/02/11/kvm-virtualization-with-virtmanager-on-void-linux/
?title=Hoff, an experiment in web authoring ?author=Case Duckworth ?date () date +%F ;h1:class=title: Hoff ;p:class=subtitle: an experiment in web authoring I've been thinking about a few things lately: ;ul::li : Markdown, specifically how complicated it can be, : Literate programming, : Using AWK, Make, and sh in programming, and : What I've discovered is basically Groff: macro-style text setting. To that end, I want to try a new thing, which I'm calling [[Hoff::strong]], which stands for HTML groff, and makes me think of this guy: ;img :src=https://i0.wp.com/metalinjection.net/wp-content/uploads/2019/04/davidhasselhoff.jpg :alt=David Hasselhoff, of course So, [[Don't hassle the hoff!::em]] ;h2 Basics There are some properties of Hoff that should be immediately apparent: ;ul::li : HTML tags at the beginning of a line are prefixed with a semicolon and are separated from their content by a space : Optional attributes to tags are preceded and followed by colons : Inline tags are set off with double-semicolons, with the content coming first, followed by two colons, followed by the tag's name and attributes, in the above format : For some reason the metadata at the top of the file is preceded by question marks : And lists are also marked strangely
notes:
;<tag>:<attrs>: <text>
<tag> default is p
<attrs> default is ""
ends on blank line
;;<tag>
sets new default <tag> (blank lines now make a new one)
::<???>
sets new
---
!title= Toward a new markdown !author = Case Duckworth !date $ date +%F Here are some notes for a language I want to make that's almost, but not entirely, unlike markdown. I've used *sirius* as a name in the past, and I'd like to keep it that way. So let's call this: !h1 Sirius! Notice the first difference: instead of using `#` to delineate headers, I'm using `!h1`. The easiest way to mark different HTML elements is by starting a line with `!` followed by the name of the element, followed by a space and the content for that element. For example, !em this will be emphasized !strong and this will be strong text. Some tags, of course, need more than just their name. !!a href=example.com!! If a line starts with two exclamation points, the `!!`s on either side will be converted, simply, to `<` and `>`, making the tag complete. Note, however: the tag's text still only goes to the end of the line. Sometimes you want more than that. !!!p id=three-exc For a lot of content, you'll want to use three exclamation points on a line with the tag name by itself. The tag will continue until there's another three bangs. !!! Hm... I still think there's work to be done. For example, inline tags should be easier, possibly expanded with, I don't know, macros?, and there should be a way to nest block elements that works better than using a lot of `!!!`s all over the damn place.
---
read an article in AEON, his website is cool
BASIC.KAK , a basic colorscheme
# code face value rgb:000000,default face type rgb:212121,default face identifier rgb:212121,default face string rgb:000080,default+N face error default,rgb:000000 face keyword rgb:212121,default+b face operator rgb:212121,default face attribute rgb:000000,default face comment rgb:808080,default+i face meta rgb:787878,default # text face title rgb:000000,default+b face header rgb:000000,default face bold rgb:000000,default+b face italic rgb:121212,default+i face mono rgb:333333,rgb:dedede face block rgb:333333,rgb:dedede face link rgb:000000,default face bullet rgb:000000,default face list rgb:212121,default # kakoune UI face Default rgb:333333,rgb:ffffff face PrimarySelection rgb:ffffff,rgb:333333 face SecondarySelection rgb:ededed,rgb:545454 face PrimaryCursor rgb:ffffff,rgb:000000+b face SecondaryCursor rgb:ededed,rgb:212121+b face MatchingChar default,rgb:cccccc face Search default,rgb:cccccc face Whitespace default,rgb:cccccc face BufferPadding rgb:cccccc,default face LineNumbers rgb:cccccc,default face LineNumberCursor rgb:999999,default face MenuForeground rgb:ededed,rgb:212121 face MenuBackground default,rgb:dedede face MenuInfo default,rgb:ababab face Information default,rgb:bababa face Error rgb:ededed,rgb:212121 face StatusLine rgb:333333,rgb:dedede face StatusLineMode rgb:ededed,rgb:212121 face StatusLineInfo rgb:000000,rgb:cccccc face StatusLineValue rgb:000000,rgb:bababa face StatusCursor default,rgb:878787 face Prompt rgb:ededed,rgb:212121
https://thewirecutter.com/reviews/best-bike-rack-basket-panniers/
https://thewirecutter.com/reviews/best-rear-bike-rack/
---
from yesterday. also this for inlines:
https://bitbucket.org/yiyus/md2html.awk/raw/fa51423d52928d8eaac248cb6a2ea78afd99324e/md2html.awk
---
oh and (commented)
function eschtml(t) { gsub("&", "\\&", t); gsub("<", "\\<", t); return t; } function process_inlines(t) { ilcode = 0; # inline code? ilcode2 = 0; # ?? ns = 0; # ?? return nextil(t); # next inline } function nextil(t) { # look for ` (code), < (autolinks), & (?), [ (link), # * (em/strong/list?), _ (em/strong), \ (escape), - (list?), # ![ (image) if (!match(t, /[`<&\[*_\\-]|(\!\[)/)) # return if not found return t; # in the example `here is **strong emphasis**!`: # t1 = `here is ` BEGINNING OF STRING t1 = substr(t, 1, RSTART - 1); # tag = `*` UNDER INVESTIGATION tag = substr(t, RSTART, RLENGTH); # t2 = `*strong emphasis**!` REST OF STRING t2 = substr(t, RSTART + RLENGTH); # if ilcode is nonzero and the tag isn't ` # (I'm assuming that means we're IN the code tag!) # just escape the html and process the next bit of string if (ilcode && tag != "`") return eschtml(t1 tag) nextil(t2); # Backslash escaping if (tag == "\\") { # if t2 begins with one of these: # \ ` * _ { } [ ] ( ) # + - . ! # move to the next character and continue if (match(t2, /^[\\`*_{}\[\]()#+\-\.!]/)) { tag = substr(t2, 1, 1); t2 = substr(t2, 2); } return t1 tag nextil(t2); } # Dashes if (tag == "-") { # if there are two dashes in a row, # replace with em-dash if (sub(/^-/, "", t2)) tag = "—" return t1 tag nextil(t2); } # Inline code if (tag == "`") { # if the rest of the string begins with `, consume it, then if (sub/^`/, "", t2)) { # look for another ``. If it's not found: if (!match(t2, /``/)) # it's a LaTeX-style right double quote return t1 "”" nextil(t2); # otherwise, we're looking at a double `` code block ilcode2 = !ilcode2; } else if (ilcode2) return t1 tag nextil(t2); tag = "<code>"; if (ilcode) { t1 = eschtml(t1); tag = "</code>"; } ilcode = !ilcode; return t1 tag nextil(t2); } }
- post.md ------ !title: Title A post. ---------------- => mawkdown => wrapper ---------------- ---------------- <p>A post.</p> title="Title" ---------------- content(){ ./mawkdown "$filename";} # or something CAT_TAIL="$RANDOM" | cat << $CAT_TAIL | <!DOCTYPE html> | | <html><head> | | $title |<- template | </head><body> | `---------->$(content) | </body></html> | $CAT_TAIL ---------------- pipeline: mawkdown "$post" | ??? | sh figure out: - how to combine HTML (content) and template (headers)? - when to wrap it all? ---> render templates into memory FIRST. Or use tempfiles. ---> THEN go through posts. ---> DEFINITELY USE https://github.com/zimbatm/shab or thing. notes on template: - options on variable interpolation: - just use sh-style ("$var") variables - do some interpolation with "{{", "}}", etc. - see previous notes email
---
# blog software (ubs? untitled blog software?) !!title=What are you thinking !! date = $(date +%F) content... title="What are you thinking" date="$(date +%F)" ID=$RANDOM cat << $ID content... $ID === variables: {{ name }} => "${name}" --> NEED AUTO-ESCAPE OF `gemini - kennedy.gemi.dev macros: !{{ if [ $x -lt 3 ]; then echo lt; else echo gt; fi }} => "$(if [ $x -lt 3 ]; then echo lt; else echo gt; fi)" invocation: ./mawkdown {body}lt; | sh > $@ or: "$(./mawkdown {body}lt;)" > $@ ----------------------------- OR --------------------------------------------- !!title = Whatever => title(){ echo "Whatever"; } !!isodate = $(date -d "$1" +%F) => date(){ echo "$(date -d "$1" +%F)";} -- TODO: ^^^ make this more compact? !? {{ title }} => "$(title)" {{ date +%F }} => "$(date +%F)" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!title = whatever it is !!isodate $= date -d "$1" +%F => title="whatever it is" ### TODO --> quote quotes meta["title"] = "whatever it is" isodate(){ date -d "$1" +%F;} {{ title }} => if ("title" in meta) text = text "${title}" else text = text "$(title)" {{ isodate today }} => placeholder = YOU KNOW WHAT THIS IS ALL INFORMATION THAT THE TEMPLATE WILL USE IT'S USELESS TO DO IT IN JUST THE MARKDOWN-LIKE THING #DUH
https://en.wikipedia.org/wiki/Murray_Enkin
- try emailing his biographers about the Old Farts Forum
(cf.
)
- ask Adam about linking to his wiki
https://tildegit.org/tildeverse/zine
- what to submit?
- make a cosmic.voyage account?
https://labs.tomasino.org/gnu-recutils/
- this I like. It's a plaintext database thing.
https://github.com/tildetown/zine
- why not?
-> for a new acdw.net:
UNK:
Poem/
...
For category in */; do Cd $category tm_$category *.md done
or something
that could be cool
what to do
==========
1. make output directory
2. copy static files
3. load templates
4. render posts with templates
5. render pages with templates -> really pages are subtype of
posts with some special formatting/considerations
6. render tags/categories/lists with templates -- LIST PAGES
...
- read these and look into transcribing audio in free time for extra $$
- REAL poem a day, from Richard Gabriel
https://www.poetryfoundation.org/poetrymagazine/poems/91697/from-whereas
https://github.com/npgm/libdrawxcb
https://github.com/laserswald/backflip
---
https://wiki.archlinux.org/index.php/Default_applications
---
https://github.com/hckiang/slopen
https://github.com/hckiang/slopen/blob/master/slopen
both use rc files, of different format