Compare commits
2 Commits
bf0cdee8ec
...
b73f8ae850
Author | SHA1 | Date |
---|---|---|
barnold | b73f8ae850 | |
barnold | d68a003228 |
88
index.html
88
index.html
|
@ -4,7 +4,84 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>~~~this is barnold's tilde.club page~~~~</h1>
|
||||
<style>
|
||||
pre {
|
||||
background: #556b2f;
|
||||
border: 1px solid #f0e68c;
|
||||
color: #ffffe0;
|
||||
padding: 4px 8px;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>~~~barnold's tilde.club page~~~</h1>
|
||||
|
||||
<h2>Best commit message of the year (so far)</h2>
|
||||
|
||||
2024-01-06
|
||||
|
||||
<p>I am proud to have inspired
|
||||
<a href="https://github.com/tildeclub/site/commit/3edcc92bd42699c1cae6ee25827727a8782555e3">this
|
||||
fine commit message</a>.
|
||||
|
||||
<h2>slrn post signature</h2>
|
||||
|
||||
2023-05-17
|
||||
|
||||
<p>My web searches showed me a way to generate a dynamic signature in
|
||||
my posts and followups. I put these in my ~/.slrnrc:
|
||||
|
||||
<pre>
|
||||
set signature ".slrn/signature.usenet"
|
||||
set post_editor_command "echo barnold > ~/.slrn/signature.usenet; \
|
||||
fortune -n 140 -s >> ~/.slrn/signature.usenet; emacsclient -t +9:0"
|
||||
</pre>
|
||||
(The second set was actually one line, I split it here for easier reading.)
|
||||
</p>
|
||||
<p>It didn't seem to work on the first attempt but then I did see
|
||||
<a href="https://linux.die.net/man/6/fortune">fortunes</a>
|
||||
in my signatures. However I noticed an odd thing: while editing a post,
|
||||
the fortune in my signature.usenet was different from the one in my post.
|
||||
The cause was obvious when I realised: slrn puts the signature into the draft post
|
||||
<em>before</em> calling the post_editor_command. It also explained
|
||||
why it didn't work the first time.
|
||||
</p>
|
||||
|
||||
<p>That doesn't matter for a fortune but won't work if you want
|
||||
something more current, say a weather report. The only way to do
|
||||
that seemed to be to disregard the signature file and edit the draft
|
||||
directly to add the "something". This works for me:
|
||||
<pre>
|
||||
set signature ""
|
||||
set post_editor_command "~/.slrn/post-edit-cmd.sh"
|
||||
</pre>
|
||||
</p>
|
||||
<p>
|
||||
And using a script provides a lot more breathing room than trying to squeeze
|
||||
everything into one line of configuration. This is my post-edit-cmd.sh:
|
||||
<pre>
|
||||
#!/bin/bash
|
||||
#
|
||||
# Generate a signature before invoking the editor.
|
||||
# slrn provides one argument, the name of the file to be edited.
|
||||
|
||||
# To avoid printf interpreting "--" as introducing an option,
|
||||
# we instead make it an 'argument' to printf's format string.
|
||||
#
|
||||
printf "\n%s \nbarnold\n" "--" >> "$@"
|
||||
|
||||
# Try to avoid fortunes that take up too many lines.
|
||||
fortune -n 140 -s >> "$@"
|
||||
|
||||
exec emacsclient -t +9:0 "$@"
|
||||
#
|
||||
# Should be unreachable.
|
||||
</pre>
|
||||
That's working nicely for me.
|
||||
</p>
|
||||
|
||||
<h2>Project Gutenberg</h2>
|
||||
|
||||
|
@ -41,15 +118,6 @@ ben and the tildeverse in general.</p>
|
|||
|
||||
2022-02-11
|
||||
|
||||
<style>
|
||||
pre {
|
||||
background: #556b2f;
|
||||
border: 1px solid #f0e68c;
|
||||
color: #ffffe0;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Here is a toy <a href="https://www.gnu.org/software/make/">Makefile</a>:</p>
|
||||
|
||||
<pre>
|
||||
|
|
Loading…
Reference in New Issue