# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 196279
# self = https://watcher.sour.is?offset=171025
# next = https://watcher.sour.is?offset=171125
# prev = https://watcher.sour.is?offset=170925

$ echo -n "https://twtxt.net/user/prologic/twtxt.txt\\n2020-07-18T12:39:52Z\\nHello World! ๐Ÿ˜Š" | sha256sum | base32 | tr -d '=' | tr 'A-Z' 'a-z' | tail -c 12
tdqmjaeawqu
@prologic yes, that would work, except there is no debug command on my local yarnc. Are you talking about a potential future implementation here?
@prologic yes, that would work, except there is no debug command on my local yarnc. Are you talking about a potential future implementation here?
@prologic text/plain without an explicit charset is still just US-ASCII:

> The default character set, which must be assumed in the absence of a charset parameter, is US-ASCII.

https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2
https://www.rfc-editor.org/rfc/rfc6657#section-4
@prologic text/plain without an explicit charset is still just US-ASCII:

> The default character set, which must be assumed in the absence of a charset parameter, is US-ASCII.

https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2
https://www.rfc-editor.org/rfc/rfc6657#section-4
@prologic text/plain without an explicit charset is still just US-ASCII:

> The default character set, which must be assumed in the absence of a charset parameter, is US-ASCII.

https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2
https://www.rfc-editor.org/rfc/rfc6657#section-4
@prologic text/plain without an explicit charset is still just US-ASCII:

> The default character set, which must be assumed in the absence of a charset parameter, is US-ASCII.

https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2
https://www.rfc-editor.org/rfc/rfc6657#section-4
Just experimenting...


$ echo -n "https://twtxt.net/user/prologic/twtxt.txt\n2020-07-18T12:39:52Z\nHello World! ๐Ÿ˜Š" | sha256sum | base64 | tr -d '=' | tail -c 12
NWY4MSAgLQo
Just experimenting...


$ echo -n "https://twtxt.net/user/prologic/twtxt.txt\\n2020-07-18T12:39:52Z\\nHello World! ๐Ÿ˜Š" | sha256sum | base64 | tr -d '=' | tail -c 12
NWY4MSAgLQo
Just experimenting...


$ echo -n "https://twtxt.net/user/prologic/twtxt.txt\n2020-07-18T12:39:52Z\nHello World! ๐Ÿ˜Š" | sha256sum | base64 | tr -d '=' | tail -c 12
NWY4MSAgLQo
It would appear that the blake2b 256bit digest algorithm is no longer supported by the openssl tool, however blake2s256 is; I'm not sure why ๐Ÿค”


$ echo -n "https://twtxt.net/user/prologic/twtxt.txt\n2020-07-18T12:39:52Z\nHello World! ๐Ÿ˜Š" | openssl dgst -blake2s256 -binary | base32 | tr -d '=' | tr 'A-Z' 'a-z' | tail -c 7
zq4fgq


Obviously produce the wrong hash, which should be o6dsrga as indicated by the yarnc hash utility:


$ yarnc hash -u https://twtxt.net/user/prologic/twtxt.txt -t 2020-07-18T12:39:52Z "Hello World! ๐Ÿ˜Š"
o6dsrga


But at least the shell pipeline is "correct".
It would appear that the blake2b 256bit digest algorithm is no longer supported by the openssl tool, however blake2s256 is; I'm not sure why ๐Ÿค”


$ echo -n "https://twtxt.net/user/prologic/twtxt.txt\\n2020-07-18T12:39:52Z\\nHello World! ๐Ÿ˜Š" | openssl dgst -blake2s256 -binary | base32 | tr -d '=' | tr 'A-Z' 'a-z' | tail -c 7
zq4fgq


Obviously produce the wrong hash, which should be o6dsrga as indicated by the yarnc hash utility:


$ yarnc hash -u https://twtxt.net/user/prologic/twtxt.txt -t 2020-07-18T12:39:52Z "Hello World! ๐Ÿ˜Š"
o6dsrga


But at least the shell pipeline is "correct".
It would appear that the blake2b 256bit digest algorithm is no longer supported by the openssl tool, however blake2s256 is; I'm not sure why ๐Ÿค”


$ echo -n "https://twtxt.net/user/prologic/twtxt.txt\n2020-07-18T12:39:52Z\nHello World! ๐Ÿ˜Š" | openssl dgst -blake2s256 -binary | base32 | tr -d '=' | tr 'A-Z' 'a-z' | tail -c 7
zq4fgq


Obviously produce the wrong hash, which should be o6dsrga as indicated by the yarnc hash utility:


$ yarnc hash -u https://twtxt.net/user/prologic/twtxt.txt -t 2020-07-18T12:39:52Z "Hello World! ๐Ÿ˜Š"
o6dsrga


But at least the shell pipeline is "correct".
FWIW the standard UNIX tools for Blake2b are openssl and b2sum -- Just trying to figure out how to make a shell pipeline again (_if you really want that_); as tools keep changing god damnit ๐Ÿคฃ
FWIW the standard UNIX tools for Blake2b are openssl and b2sum -- Just trying to figure out how to make a shell pipeline again (_if you really want that_); as tools keep changing god damnit ๐Ÿคฃ
@quark Do you mean something like this?


$ ./yarnc debug ~/Public/twtxt.txt | tail -n 1
kp4zitq 2024-09-08T02:08:45Z	(#wsdbfna) @<aelaraji https://aelaraji.com/twtxt.txt> My work has this thing called "compressed work", where you can **buy** extra time off (_as much as 4 additional weeks_) per year. It comes out of your pay though, so it's not exactly a 4-day work week but it could be useful, just haven't tired it yet as I'm not entirely sure how it'll affect my net pay
@quark Do you mean something like this?


$ ./yarnc debug ~/Public/twtxt.txt | tail -n 1
kp4zitq 2024-09-08T02:08:45Z\t(#wsdbfna) @<aelaraji https://aelaraji.com/twtxt.txt> My work has this thing called "compressed work", where you can **buy** extra time off (_as much as 4 additional weeks_) per year. It comes out of your pay though, so it's not exactly a 4-day work week but it could be useful, just haven't tired it yet as I'm not entirely sure how it'll affect my net pay
@quark Do you mean something like this?


$ ./yarnc debug ~/Public/twtxt.txt | tail -n 1
kp4zitq 2024-09-08T02:08:45Z	(#wsdbfna) @<aelaraji https://aelaraji.com/twtxt.txt> My work has this thing called "compressed work", where you can **buy** extra time off (_as much as 4 additional weeks_) per year. It comes out of your pay though, so it's not exactly a 4-day work week but it could be useful, just haven't tired it yet as I'm not entirely sure how it'll affect my net pay
@prologic I saw those, yes. I tried using yarnc, and it would work for a simple twtxt. Now, for a more convoluted one it truly becomes a nightmare using that tool for the job. I know there are talks about changing this hash, so this might be a moot point *right now*, but it would be nice to have a tool that:

1. Would calculate the hash of a twtxt in a file.
2. Would calculate all hashes on a twtxt.txt (local and remote).

Again, something lovely to have after any looming changes occur.
@prologic I saw those, yes. I tried using yarnc, and it would work for a simple twtxt. Now, for a more convoluted one it truly becomes a nightmare using that tool for the job. I know there are talks about changing this hash, so this might be a moot point *right now*, but it would be nice to have a tool that:

1. Would calculate the hash of a twtxt in a file.
2. Would calculate all hashes on a twtxt.txt (local and remote).

Again, something lovely to have after any looming changes occur.
@quark Watch TV at the moment so unsure about "out of the box tools" but there are 3 implementations on the spec page https://dev.twtxt.net/doc/twthashextension.html
@quark Watch TV at the moment so unsure about "out of the box tools" but there are 3 implementations on the spec page https://dev.twtxt.net/doc/twthashextension.html
@aelaraji Woah! Overkill, but nicely laid out. Hey, the ultimate goal is for it to work, so, mission accomplished! :-)
@aelaraji Woah! Overkill, but nicely laid out. Hey, the ultimate goal is for it to work, so, mission accomplished! :-)
Could someone knowledgable reply with the steps a grandpa will take to calculate the hash of a twtxt from the CLI, using out-of-the-box tools? I swear I read about it somewhere, but can't find it.
Could someone knowledgable reply with the steps a grandpa will take to calculate the hash of a twtxt from the CLI, using out-of-the-box tools? I swear I read about it somewhere, but can't find it.
[47ยฐ09โ€ฒ22โ€ณS, 126ยฐ43โ€ฒ23โ€ณW] Resetting transponder
[47ยฐ09โ€ฒ38โ€ณS, 126ยฐ43โ€ฒ34โ€ณW] --bad checksum--
@aelaraji Sometimes that's the most valuable though! Feedback!
@aelaraji Sometimes that's the most valuable though! Feedback!
@prologic I'm glad to! it just kinda feel a bit off when it's all I can do ๐Ÿ˜…
@prologic I'm glad to! it just kinda feel a bit off when it's all I can do ๐Ÿ˜…
@prologic I'm glad to! it just kinda feel a bit off when it's all I can do ๐Ÿ˜…
@quark Mine is a little overkill ๐Ÿ˜‚ but I need to do something for practice:

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
@quark Mine is a little overkill ๐Ÿ˜‚ but I need to do something for practice:

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
@quark Mine is a little overkill ๐Ÿ˜‚ but I need to do something for practice:

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
[47ยฐ09โ€ฒ10โ€ณS, 126ยฐ43โ€ฒ41โ€ณW] Reading: 1.51 Sv
I've been using Codeium too the last week or so ! It's pretty good and like @xuu said is a pretty desent Junior assistant, it helps me write good docs and the tab completion is amazing!

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've been using Codeium too the last week or so ! It's pretty good and like @xuu said is a pretty desent Junior assistant, it helps me write good docs and the tab completion is amazing!

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 ๐Ÿ‘Œ
@quark I admit I find the general "click here to share blah" generally wasteful, useless and unengaging really. Not just Wordle.

I admittedly however, I've been guilty of doing this sometimes myself. ๐Ÿคฆโ€โ™‚๏ธ sometimes though I think it's OK to show your achievements. ๐Ÿ‘Œ
@quark I admit I find the general "click here to share blah" generally wasteful, useless and unengaging really. Not just Wordle.

I admittedly however, I've been guilty of doing this sometimes myself. ๐Ÿคฆโ€โ™‚๏ธ sometimes though I think it's OK to show your achievements. ๐Ÿ‘Œ
This might be quite unpopular, but I truly dislike Wordle. The reason isnโ€™t rooted on any psychological issue, it is much, much more simple: people share their Wordle result(s)---I figure they feel good about themselves---and for me it is only uneven, unaligned, wasteful noise. I donโ€™t even want to show you an example, but I am sure you know what I am talking about.

Thank gods those posting their hideous squares have finally quieted down. LOL.
This might be quite unpopular, but I truly dislike Wordle. The reason isnโ€™t rooted on any psychological issue, it is much, much more simple: people share their Wordle result(s)---I figure they feel good about themselves---and for me it is only uneven, unaligned, wasteful noise. I donโ€™t even want to show you an example, but I am sure you know what I am talking about.

Thank gods those posting their hideous squares have finally quieted down. LOL.
๐Ÿงฎ USERS:1 FEEDS:2 TWTS:1096 ARCHIVED:78954 CACHE:2471 FOLLOWERS:17 FOLLOWING:14
Testing the new custom template option. Got to modify it more, but baby steps.
Testing the new custom template option. Got to modify it more, but baby steps.
@prologic woot! Fast! I think you need to change your nick to "fastlogic" instead. :-D
@prologic woot! Fast! I think you need to change your nick to "fastlogic" instead. :-D
@quark LOL ๐Ÿ˜‚ No worries! ๐Ÿ˜‰
@quark LOL ๐Ÿ˜‚ No worries! ๐Ÿ˜‰
@quark All fixed! ๐Ÿฅณ pleasure doing business with y'all. ๐Ÿคฃ
@quark All fixed! ๐Ÿฅณ pleasure doing business with y'all. ๐Ÿคฃ
Thank you for adding the feature so fast, @prologic! Look at how beautiful this one renders now. Oh my!
Thank you for adding the feature so fast, @prologic! Look at how beautiful this one renders now. Oh my!
@lyse Just as an aside, shouldn't you assume utf-8 anyway these days if not specified? ๐Ÿค” I mean basically everything almost always uses utf-8 encoding right? ๐Ÿ˜…
@lyse Just as an aside, shouldn't you assume utf-8 anyway these days if not specified? ๐Ÿค” I mean basically everything almost always uses utf-8 encoding right? ๐Ÿ˜…
@quark Okay fair ๐Ÿ‘Œ
@quark Okay fair ๐Ÿ‘Œ
@movq So basically on-call, but you don't get paid for it? ๐Ÿค”
@movq So basically on-call, but you don't get paid for it? ๐Ÿค”
@prologic sorry but nope. Neither 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).
@prologic sorry but nope. Neither 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).
@quark aye aye captain ๐Ÿคฃ
@quark aye aye captain ๐Ÿคฃ
@quark It's a good thin yarnd makes this user configurable via a preference ๐Ÿคฃ And displays both ๐Ÿ˜…
@quark It's a good thin yarnd makes this user configurable via a preference ๐Ÿคฃ And displays both ๐Ÿ˜…
@quark LOL ๐Ÿ˜‚ Thanks!
@quark LOL ๐Ÿ˜‚ Thanks!
@quark You are right, whilst it _technically_ works, its not well supported. Too much of the code would have to change to support that, and it's not worth the value.
@quark You are right, whilst it _technically_ works, its not well supported. Too much of the code would have to change to support that, and it's not worth the value.
Oh, and you can't imagine the level of control I am commandeering by restraining me from editing that previous "missing-one-backtick" twtxt. LOL!
Oh, and you can't imagine the level of control I am commandeering by restraining me from editing that previous "missing-one-backtick" twtxt. LOL!
So yeah no, whilst it _technically_ works, neither jenny nor yarnd support it very well. Only at a very basic level.
So yeah no, whilst it _technically_ works, neither jenny nor yarnd support it very well. Only at a very basic level.
It _actually_ has treated this as a thread, but it gets a bit weird, because we thread based on the content address of a root twt.
It _actually_ has treated this as a thread, but it gets a bit weird, because we thread based on the content address of a root twt.
@aelaraji this is the little script I am using on my 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. :-)
@aelaraji this is the little script I am using on my 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. :-)
@prologic based on @falsifian's findings, I don't believe this is quite accurate.

> "yarnd (_at least_) doesn't support creating such a custom TwtSubject, but it will reply and respect and thread one if one was constructed."
@prologic based on @falsifian's findings, I don't believe this is quite accurate.

> "yarnd (_at least_) doesn't support creating such a custom TwtSubject, but it will reply and respect and thread one if one was constructed."
@falsifian yes, that happened around 2 years ago, on commit 5923078ea5.
@falsifian yes, that happened around 2 years ago, on commit 5923078ea5.
Make that three issues. Mostly because the other two were feeling kind of lonely. So, yeah. Ha!
Make that three issues. Mostly because the other two were feeling kind of lonely. So, yeah. Ha!
@quark It looks like the part about traditional topics has been removed from that page. Here is an old version that mentions it: https://web.archive.org/web/20221211165458/https://dev.twtxt.net/doc/twtsubjectextension.html . Still, I don't see any description of what is actually allowed between the parentheses. May be worth noting that twtxt.net is displaying the twts with the subject stripped, so some piece of code is recognizing it as a subject (or, at least, something to be removed).
Opened a couple of issues on twtxt2html. Maybe @prologic will get to them after he has completed his luxurious recharging cycle. LOL.
Opened a couple of issues on twtxt2html. Maybe @prologic will get to them after he has completed his luxurious recharging cycle. LOL.
@lyse fully agree. I have never been a fan of relative times to begin with, so that one will go away, foh sho! :-D
@lyse fully agree. I have never been a fan of relative times to begin with, so that one will go away, foh sho! :-D
@falsifian based on Twt Subject Extension, your subject is invalid. You can have custom subjects, that is, not a valid hash, but you simply can't put anything, and expect it to be treated as a TwtSubject, me thinks.
@falsifian based on Twt Subject Extension, your subject is invalid. You can have custom subjects, that is, not a valid hash, but you simply can't put anything, and expect it to be treated as a TwtSubject, me thinks.
(replyto http://darch.dk/twtxt.txt 2024-09-15T12:50:17Z) Hmm, but yarnd also isn't showing these twts as being part of a thread. @prologic you said yarnd respects customs subjects. Shouldn't these twts count as having a custom subject, and get threaded together?
(replyto http://darch.dk/twtxt.txt 2024-09-15T12:50:17Z) yarnd just doesn't render the subject. Fair enough. It's (replyto http://darch.dk/twtxt.txt 2024-09-15T12:50:17Z), and if you don't want to go on a hunt, the twt hash is weadxga: https://twtxt.net/twt/weadxga
(replyto http://darch.dk/twtxt.txt 2024-09-15T12:50:17Z) @sorenpeter I like this idea. Just for fun, I'm using a variant in this twt. (Also because I'm curious how it non-hash subjects appear in jenny and yarn.)

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.
En su trono con su cetro
#catsoftwtxt
En su trono con su cetro
#catsoftwtxt
En su trono con su cetro
/https://duque-terron.cat/media/photos/IMG_2049.jpeg) #catsoftwtxt
@falsifian I can confirm, it's fixed. Thank you! Indeed, this is some wild quoting.

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.
@aelaraji yes, it is ignoring the template right now. I also test it. So, something's broken, @prologic.
[47ยฐ09โ€ฒ35โ€ณS, 126ยฐ43โ€ฒ55โ€ณW] Transfer aborted