h
#!/bin/bash
set -e
trap 'echo "!! Something went wrong...!!"' ERR
#============= Variables ==========#
# Source files
LOCAL_DIR=$HOME/twtxt
TWTXT=$LOCAL_DIR/twtxt.txt
HTML=$LOCAL_DIR/log.html
TEMPLATE=$LOCAL_DIR/template.tmpl
# Destination
REMOTE_HOST=remotHostName # Host already setup in ~/.ssh/config
WEB_DIR="path/to/html/content"
GOPHER_DIR="path/to/phlog/content"
GEMINI_DIR="path/to/gemini-capsule/content"
DIST_DIRS=("$WEB_DIR" "$GOPHER_DIR" "$GEMINI_DIR")
#============ Functions ===========#
# Building log.html:
build_page() {
twtxt2html -T $TEMPLATE $TWTXT > $HTML
}
# Bulk Copy files to their destinations:
copy_files() {
for DIR in "${DIST_DIRS[@]}"; do
# Copy both `txt` and `html` files to the Web server and only `txt`
# to gemini and gopher server content folders
if [ "$DIR" == "$WEB_DIR" ]; then
scp -C "$TWTXT" "$HTML" "$REMOTE_HOST:$DIR/"
else
scp -C "$TWTXT" "$REMOTE_HOST:$DIR/"
fi
done
}
#========== Call to functions ===========$
build_page && copy_files
h
#!/bin/bash
set -e
trap 'echo "!! Something went wrong...!!"' ERR
#============= Variables ==========#
# Source files
LOCAL_DIR=$HOME/twtxt
TWTXT=$LOCAL_DIR/twtxt.txt
HTML=$LOCAL_DIR/log.html
TEMPLATE=$LOCAL_DIR/template.tmpl
# Destination
REMOTE_HOST=remotHostName # Host already setup in ~/.ssh/config
WEB_DIR="path/to/html/content"
GOPHER_DIR="path/to/phlog/content"
GEMINI_DIR="path/to/gemini-capsule/content"
DIST_DIRS=("$WEB_DIR" "$GOPHER_DIR" "$GEMINI_DIR")
#============ Functions ===========#
# Building log.html:
build_page() {
twtxt2html -T $TEMPLATE $TWTXT > $HTML
}
# Bulk Copy files to their destinations:
copy_files() {
for DIR in "${DIST_DIRS[@]}"; do
# Copy both `txt` and `html` files to the Web server and only `txt`
# to gemini and gopher server content folders
if [ "$DIR" == "$WEB_DIR" ]; then
scp -C "$TWTXT" "$HTML" "$REMOTE_HOST:$DIR/"
else
scp -C "$TWTXT" "$REMOTE_HOST:$DIR/"
fi
done
}
#========== Call to functions ===========$
build_page && copy_files
h
#!/bin/bash
set -e
trap 'echo "!! Something went wrong...!!"' ERR
#============= Variables ==========#
# Source files
LOCAL_DIR=$HOME/twtxt
TWTXT=$LOCAL_DIR/twtxt.txt
HTML=$LOCAL_DIR/log.html
TEMPLATE=$LOCAL_DIR/template.tmpl
# Destination
REMOTE_HOST=remotHostName # Host already setup in ~/.ssh/config
WEB_DIR="path/to/html/content"
GOPHER_DIR="path/to/phlog/content"
GEMINI_DIR="path/to/gemini-capsule/content"
DIST_DIRS=("$WEB_DIR" "$GOPHER_DIR" "$GEMINI_DIR")
#============ Functions ===========#
# Building log.html:
build_page() {
\ttwtxt2html -T $TEMPLATE $TWTXT > $HTML
}
# Bulk Copy files to their destinations:
copy_files() {
\tfor DIR in "${DIST_DIRS[@]}"; do
# Copy both `txt` and `html` files to the Web server and only `txt`
# to gemini and gopher server content folders
\t\tif [ "$DIR" == "$WEB_DIR" ]; then
\t\t\tscp -C "$TWTXT" "$HTML" "$REMOTE_HOST:$DIR/"
\t\telse
\t\t\tscp -C "$TWTXT" "$REMOTE_HOST:$DIR/"
\t\tfi
\tdone
}
#========== Call to functions ===========$
build_page && copy_files
It of course completely sucks at doing anything "intelligent" or complex, but if you just use it as a fancier auto complete it's actually half way decent 👌
It of course completely sucks at doing anything "intelligent" or complex, but if you just use it as a fancier auto complete it's actually half way decent 👌
I admittedly however, I've been guilty of doing this sometimes myself. 🤦♂️ sometimes though I think it's OK to show your achievements. 👌
I admittedly however, I've been guilty of doing this sometimes myself. 🤦♂️ sometimes though I think it's OK to show your achievements. 👌
Thank gods those posting their hideous squares have finally quieted down. LOL.
Thank gods those posting their hideous squares have finally quieted down. LOL.
utf-8 anyway these days if not specified? 🤔 I mean basically everything almost always uses utf-8 encoding right? 😅
utf-8 anyway these days if not specified? 🤔 I mean basically everything almost always uses utf-8 encoding right? 😅
jenny, nor yarnd supports it at all. This was treated as a thread because I picked one of @falsifian's twtxts (with the "old subject"), and replied to it (hence starting the thread).
jenny, nor yarnd supports it at all. This was treated as a thread because I picked one of @falsifian's twtxts (with the "old subject"), and replied to it (hence starting the thread).
yarnd makes this user configurable via a preference 🤣 And displays both 😅
yarnd makes this user configurable via a preference 🤣 And displays both 😅
jenny nor yarnd support it very well. Only at a very basic level.
jenny nor yarnd support it very well. Only at a very basic level.
publish_command:
#!/usr/bin/env bash
twtxt2html -t "Quark's twtxt feed" /var/www/sites/ferengi.one/twtxt.txt > /var/www/sites/ferengi.one/index.html
I named it
twtxtit. :-)
publish_command:
#!/usr/bin/env bash
twtxt2html -t "Quark's twtxt feed" /var/www/sites/ferengi.one/twtxt.txt > /var/www/sites/ferengi.one/index.html
I named it
twtxtit. :-)
> "yarnd
(_at least_) doesn't support creating such a custom TwtSubject, but it will reply and respect and thread one if one was constructed."
> "yarnd
(_at least_) doesn't support creating such a custom TwtSubject, but it will reply and respect and thread one if one was constructed."
TwtSubject, me thinks.
TwtSubject, me thinks.
URLs can contain commas so I suggest a different character to separate the url from the date. Is this twt I've used space (also after "replyto", for symmetry).
I think this solves:
- Changing feed identities: although @mckinley points out URLs can change, I think this syntax should be okay as long as the feed at that URL can be fetched, and as long as the current canonical URL for the feed lists this one as an alternate.
- editing, if you don't care about message integrity
- finding the root of a thread, if you're not following the author
An optional hash could be added if message integrity is desired. (E.g. if you don't trust the feed author not to make a misleading edit.) Other recent suggestions about how to deal with edits and hashes might be applicable then.
People publishing multiple twts per second should include sub-second precision in their timestamps. As you suggested, the timestamp could just be copied verbatim.
I still do not understand why the encoding suddenly broke, though. :-? Anyway. I concentrate on my rewrite and do things the right™ way. ;-) Still long ways to go.
* Add smartypants rendering, just like Yarn has.
* Add the ability to create individual twtxts, each named after their hash.
* Fix the formatting of the help. :-P*
* Add smartypants rendering, just like Yarn has.
* Add the ability to create individual twtxts, each named after their hash.
* Fix the formatting of the help. :-P*
publish_command to vomit the HTML into a file, using twtxt2html.
publish_command to vomit the HTML into a file, using twtxt2html.
main.go (but it can be done on a template now, so no reason to touch the code):
<time class="dt-published" datetime="{{ $twt.Created | date "2006-01-02T15:04:05Z07:00" }}">
{{ $twt.Created | date "2006-01-02 15:04:05 MST" }}
</time>
See https://ferengi.one. I am going to further customise things, but that's a start.
<time class="dt-published" datetime="2024-09-17T15:05:19+01:00"> 2024-09-17 14:05:19 +0000 UTC+0000 </time> the datetime=... atribute is in my local time UTC+1 then the text within the tag is in UTC+0 The thing is, I've been poking at the template as well, but nothing changes. I literally whole portionsm added in lorem text just to see if it would do anything, then
twtxt2html -T ./layout.html <link to twtxt file> | less shows same thing as before! nothing changes. LOL I'm not sure I'm going at it the right way.
<time class="dt-published" datetime="2024-09-17T15:05:19+01:00"> 2024-09-17 14:05:19 +0000 UTC+0000 </time> the datetime=... atribute is in my local time UTC+1 then the text within the tag is in UTC+0 The thing is, I've been poking at the template as well, but nothing changes. I literally whole portionsm added in lorem text just to see if it would do anything, then
twtxt2html -T ./layout.html <link to twtxt file> | less shows same thing as before! nothing changes. LOL I'm not sure I'm going at it the right way.
<time class="dt-published" datetime="2024-09-17T15:05:19+01:00"> 2024-09-17 14:05:19 +0000 UTC+0000 </time> the datetime=... atribute is in my local time UTC+1 then the text within the tag is in UTC+0 The thing is, I've been poking at the template as well, but nothing changes. I literally whole portionsm added in lorem text just to see if it would do anything, then
twtxt2html -T ./layout.html <link to twtxt file> | less shows same thing as before! nothing changes. LOL I'm not sure I'm going at it the right way.
+0000 UTC+0000. Same on a local test I am running.I tried changing
{{ $twt.Created | date "2006-01-02T15:04:05Z07:00" }} to {{ $twt.Created | date "2006-01-02T15:04:05" }}, but no dice. I don't really care about the timezone. LOL.