@aelaraji@aelaraji.com i might give it a try soon!
@lyse@lyse.isobeef.org ahhh thank you so so much!!!! i’ve heard of shellcheck but haven’t checked it out properly - will try it for my scripts :D i really appreciate it
@movq@www.uninformativ.de Hmm yeah, you’re right. I should have checked for our location prior to getting too excited.
@aelaraji@aelaraji.com Yeah, a sore neck is always a win. :-P Here’s nothing really to see, all cloudy. And also a bit cold at -2°C. I don’t feel like standing still all that long outside at the moment. :-D
@lyse@lyse.isobeef.org /Me throws his keyboard off to the side, grabs his camera just in case and runs upstairs screaming “Yeah! Science B_ !”
Your code apparently works just fine. Until it @doesnm@doesnm.p.psf.lt’t. ;-) The shell languages are weird and having some strange properties that one is just not used to when coming from other languages.
@kat@yarn.girlonthemoon.xyz To improve you shell programming skills, I highly recommend to check out shellcheck
: https://github.com/koalaman/shellcheck It points out common errors and gives some suggestions on how to improve the code. Some details in shell scripting are very tricky to get right at first. Even after decades of shell programming, I run into “corner cases” every now and then.
E.g. in getlyr
’s line 7 it warns:
echo -e $(gum style --italic --foreground "#f4b8e4" "'$artist', '$song'")
^-- SC2046: Quote this to prevent word splitting.
For more information:
https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
Most likely not all that problematic in this application, but it’s good to know about this underlying concept. Word splitting is basically splitting tokens on whitespace, this can lead to interesting consequences as illustrated by this little code:
$ echo $(echo "Hello World")
Hello World
$ echo "$(echo "Hello World")"
Hello World
In the first case the shells sees two whitespace-separated tokens or arguments for the echo
command. This basically becomes echo Hello World
. So, echo
joins them by a single space. In the second one it sees one argument for the echo
command, so echo
simply echos this single argument that contains three spaces.
@prologic@twtxt.net Oh yeah, that’s terrible, yuck! Let’s not do it then. :-)
@prologic@twtxt.net As written in IRC, several things turned me off. I don’t have the energy at the moment to wrestle through. :-(
@kat@yarn.girlonthemoon.xyz That sounds interesting, good luck!
Need to summary all of these logic. So:\u2028 1. If file named twtxt.txt then grab parent directory name or hostname if file in root (and maybe delete ~?) \u2028 2. If file named nick.txt then grab filename
@kat@yarn.girlonthemoon.xyz definitely a fun way to get better at bash scripting by hand (AKA learn how it works besides the extreme basics i know) and use gum to make them cute too
@kat@yarn.girlonthemoon.xyz both scripts are here under the names ‘getlyr’ and ‘now playing’ if you wanna try them out yourself, just make sure you have gum installed (also curl and jq but most people have those i think) https://git.sr.ht/~chasinglightning/dotfiles/tree/main/item/home/.local/bin
@prologic@twtxt.net ah that’s good lol! i once pulled from main for a huge web app that i deployed and it haunts me because it will make upgrading so much harder lol
twtxt.txt
, following your recommendation, there could be many "twtxt" nicks. 😀
@doesnm@doesnm.p.psf.lt the logic that keeps on growing! :-D
@prologic@twtxt.net Where do I find those at? I have the 2024 year back but it may be nice for the others!
Ugh! Not @david@collantes.us, but this one. I am going nuts. Well, I am nuts!
@movq@www.uninformativ.de I think it was user error. Testing again.
@bender@twtxt.net (secret received!).
example.com/x/bananas/yo.txt
, and the feed has no nick. What is the nick?
I mean, since most feeds are named twtxt.txt
, following your recommendation, there could be many “twtxt” nicks. 😀
example.com/x/bananas/yo.txt
, and the feed has no nick. What is the nick?
nick is yo? Btw say me which method you choiced. I want to make mention fixer like @bender -> @bender@twtxt.net in my post-hook
@doesnm@doesnm.p.psf.lt I see problems with that, that do not exist on my approach. You could see, example.com/x/bananas/yo.txt
, and the feed has no nick. What is the nick?
@prologic@twtxt.net so i did a mistake that i’ve done before and i think i just pulled from the main branch which is STUPID i KNOW and i don’t LEARN but whatever. i was having trouble with my go version and the makefile so i think i literally just ran it as my user with go in the path and redirected the binaries to go to a temporary directory i made and then moved them to /usr/bin lol. i’m not sure what could’ve caused this! probably something in the pipeline of weirdness i just wrote out
@prologic@twtxt.net thank you so much!
@prologic@twtxt.net LMAO thats so funny i need to try jenny i was trying it but i couldn’t figure out my twtxt sync script for it
@prologic@twtxt.net wait thats so cute re: the yarn name! i had no idea! we’re all just keeping the yarn ball rolling…
@kingdomcome@yarn.girlonthemoon.xyz love this for you
@kingdomcome@yarn.girlonthemoon.xyz trueee! good point
Let’s return to previous conversation: what if detect nick from url: pubnix.com/~nick/twtxt.txt is nick, domain.com/anick.txt is anick and etc
@kat@yarn.girlonthemoon.xyz I mean, you could do the mjd approach & record your monitor while sitting a few feet away, with a Bluetooth mouse & keeb, watching your inputs from the view finder
Or using the same twt hash method, but only for the URL, to generate the nick, if it doesn’t exist, like so, @5vxo4ia@twtxt.net
@<url>
form of mentions. Strictly require that all mentions include a nickname/name; i.e: @<name url>
.
@lyse@lyse.isobeef.org Hmm you ate right 😆 Also did you volunteer to fix this 🤔🤣
@<url>
form of mentions. Strictly require that all mentions include a nickname/name; i.e: @<name url>
.
@prologic@twtxt.net If you’ve got the feed URL in yarnd’s cache, you can easily look up a missing nick. If you can’t find it, just show the URL (or maybe just the domain name to be halfway consistent with this @nick@domain
thing that yarnd invented) and be done. It’s really that simple.
When yarnds peer with each other, the odds of actually having come across that feed URL in the past are higher than with traditional clients that only have their local set of subscribed feeds. One additional improvment would be to also look at all the mentions and see if somebody used a nick for that URL and go with that.
Yeah, yarnd currently renders some really weird shit when the mention contains just a URL, but I’d call that a bug for sure.
Personally, I do not like the @nick@domain
syntax at all. It looks silly to my eyes. What might have also contributed is the fact of this mentions syntax gotten screwed up so many times by yarnd in the past. But that’s a totally different topic.
@kat@yarn.girlonthemoon.xyz @prologic@twtxt.net So, a burning roll of yarn…? :-D
@prologic@twtxt.net Since I live in Germany, I do believe the media here is generally reputable. It really depends where you live of course. Source I look at are Reuters, NPR, The Guardian, Die Zeit, NY Times, CNN, Tagesschau, Spiegel Online, RP Online (for local news), … I would never just trust what I see in my social media feeds.
Thanks, I’m trying my best. Also, nice to meet you (and welcome back?) @oevl@twtxt.net, never seen you around before. 🙌
@prologic@twtxt.net Don’t you dare fix it xD it’s not a bug, it’s a feature! xD
@kingdomcome@yarn.girlonthemoon.xyz I’m all in!
Hmm, I just noticed that the feed template seems to be broken on your yarnd instance, @kat@yarn.girlonthemoon.xyz. Looking at your raw feed file (and your mates as well), line 6 reads:
# This is hosted by a Yarn.social pod yarn running yarnd ERSION@OMMIT go1.23.4
^^^^^^^^^^^^
Looks like the first letters of the version and commit got somehow chopped off. I’ve no idea what happened here, maybe @prologic@twtxt.net knows something. :-? I’m not familiar with the templating, I just recall @xuu@txt.sour.is reporting in IRC the other day that he’s also having great fun with his custom preamble from time to time.
That “broken” comment doesn’t hurt anything, it’s still a proper comment and hence ignored by clients. It’s just odd, that’s all.
@movq@www.uninformativ.de Very cool!
@kat@yarn.girlonthemoon.xyz i don’t even have like time or space to stream unless it was no mic/video and just me doing stuff on my computer which can be boring without even mic input. plus no way to use camcorder that way. but. it’d be cool if i could so i dream
trying to set up @movq@www.uninformativ.de’s jenny client… currently trying to find where twtxt files are stored on the server so i can set up the scp script i have for this
@suitechic@yarn.girlonthemoon.xyz shes the best <3
@suitechic@yarn.girlonthemoon.xyz lol thats neat!
@prologic@twtxt.net i thought i was going insane when i saw blank posts on my TL i was like is noscript fucking with me again but no it’s you guys fucking around LOLLLL
@movq@www.uninformativ.de same here lol! my aunt actually got it for me so i’m super excited to tinker with it and i might record a vlog for it :D
@bender@twtxt.net Hahaha! :-D
@kat@yarn.girlonthemoon.xyz Thanks!
@<url>
form of mentions. Strictly require that all mentions include a nickname/name; i.e: @<name url>
.
@prologic@twtxt.net @movq@www.uninformativ.de Well, the original Twtxt Specification explicitly allows for the short form with just a URL and no nick: https://twtxt.readthedocs.io/en/latest/user/twtxtfile.html#format-specification
Mentions are embedded within the text in either
@<source.nick source.url>
or@<source.url>
format […]
I’d just continue supporting it, even though I don’t see it all that often in the wild. I guess more common is the case where just a nick is given, which is illegal. But yarnd users seem to produce it every now and then.
What’s the motivation for deprecation?
@movq@www.uninformativ.de An ähnliche Aktionen, von vor 20 Jahren, kann ich mich auch noch erinnern. Viel aktueller als damals™ waren unsere Spiele gestern auch nicht. BF1942, CoD, Flatout, CnC, AoE2, Unreal und Quake3, um nur einige zu nennen.