#dev 2025-08-08

2025-08-08 UTC
grufwub, gRegor and duanin2 joined the channel
#
[tantek]
[KevinMarks] maybe -> #indieweb-random for AWS humor/rant unless it was related to something indieweb specific?
doesnm joined the channel
#
glitzeor4444
aaronpk: Ooh smart, then you can link friends to the heading, and it'll take them straight there without needing to have a million pages
webdev007 and sivoais joined the channel
#
mathium05
WebRTC is a huge pain
#
[mattl]
Updated https://mattl.github.io/simple-html-file-generator/ — now the default page it makes has a bit more content and a photo of a cat (essential)
#
[mattl]
Okay, and now it validates. Please check it out when you get a sec and send me any feedback 🙂
#
mathium05
A few suggestions, nothing wrong with it
#
mathium05
object strings
#
mathium05
They allow you to do multiple lines instead of having to use \n
#
mathium05
And you can also simplify the defualting logic
#
mathium05
document.getElementById('title').value || "My fantastic website"
#
mathium05
|| picks the first truthy value
#
mathium05
also let vs var, var isn't really used anymore, *but* depending on your goals you may not have a choice, as old browsers (pre-2016) don't have support for let but it's only after 2015 they have var
#
mathium05
Here, it doesn't matter as the scoping for var and let would be the same, but it's something to keep in mind
#
mathium05
let is block scoped while var is function scoped
#
mathium05
Or var could be global scoped or function scoped depending where you've placed it
#
mathium05
Though in this case if you simplified the logic for the defaults you could also use const
#
mathium05
also if you want to do carriage returns, you'll need to do a find and replace on user submitted strings
#
mathium05
for downloading, that's how you should do it really
#
mathium05
I know there's a better way now, but it's too new to rely on it
webdev007, sarna and barnaby joined the channel
#
rubenwardy
there's no need to support browsers that old, those browsers won't be secure so should not even be supported
#
rubenwardy
unless maybe your device is airgapped and has some retro usecase
ttybitnik joined the channel
#
[mattl]
Can’t use const as the variables change.
#
[mattl]
rubenwardy: I don’t think 2016 is an old browser. People may very well still use browsers that old. I may even use browsers that old.
#
rubenwardy
That's how you get malware
#
rubenwardy
You should not be using software that old connected to the internet
#
rubenwardy
It's fine if you airgap or only view local atuff
#
Loqi
it is probable
#
[mattl]
I’m certain people are already using older software than that to access http://Libre.fm every day, so I’m really not worried about this.
#
rubenwardy
My point is that there's no need to support software that old as it is a security risk for the user anyway, and 99.9% are on much newer software
#
[mattl]
People are using it, so I support it.
#
[mattl]
And this is a page which generates a static HTML file, nothing to do with http://Libre.fm
#
mathium05
No, there are old browsers that are still supported like LTS firefox
Xander joined the channel
#
[mattl]
There are lots of weird and wonderful browsers outside of the main 3 desktop browsers too.
#
mathium05
There's like two others that're trying and neither are ready
#
mathium05
though firefox LTS is not an uncommon base for third party browsers
#
[mattl]
Last time I had logs on for debugging (a few months ago) I was surprised by the number of different user agents hitting http://Libre.fm in rapid succession
jak2k joined the channel
#
[mattl]
Haven’t seen anything under the Boost license for years. Wow.
lanodan, jak2k, webdev007, gRegor, ttybitnik, doesnm and btrem joined the channel
#
btrem
Are there any gotchas with `curl -u`? I assume I enter my password in plain text, yes? When I inspect the headers, all seems well. But I'm really struggling to debug my VCALENDAR. :(
#
btrem
Ugh. Too many moving parts. I swore I was going to give up on Drupal/ical feed. Why did I go back to it? My head hurts. I really need to stop banging it against the wall. ;-)
#
[tantek]
you are in the right channel to be among friends for that 🙂
#
jak2k
> Are there any gotchas with `curl -u`? I assume I enter my password in plain text, yes? When I inspect the headers, all seems well. But I'm really struggling to debug my VCALENDAR. :(
#
jak2k
It should also be possible to use https://user:pass@host.tld/path
#
btrem
[tantek]: How so? Do you have any aspirin? :-D
#
btrem
jak2k: and again, I'd be entering the `pass` in plain text, right?
#
gRegor
yes, plaintext
#
[mattl]
if you do `curl -u btrem` it should prompt you for a password, but you can also do `curl -u btrem:hunter2` but that will add your password to your terminal history.
#
btrem
[mattl]: the prompt works. Everything works, except my VCALENDAR. :/
#
btrem
I don't know if (a) the Drupal ical module is broken; (b) it's working, but my output is not sufficient to produce usable VEVENTs; or (c) my calendar apps are not working correctly.
#
[mattl]
have you tried uploading the output to something like https://icalendar.org/validator.html ?
#
gRegor
Did you get authn set up in front of the ics? I thought last time we discussed, the Drupal authentication system was in front of ics, not Basic authentication
#
gRegor
If I'm understanding correctly, you're saying you're just not getting the ICS file at all, right? or it's partial/invalid?
#
btrem
[mattl]: I did. It validates. But I imagine one could have a technically valid ical feed whose events are missing data that calendar apps require.
#
btrem
Sort of like how in the day of HTML <=4 a document could validate but still be full of errors.
#
gRegor
Eh, it shouldn't. I run a pretty minimal generated ICS file into gCal without problems (no authn juggling though)
#
gRegor
But just to be clear, is the issue that curl command doesn't get you the ICS file? are you getting some other HTTP response code/body?
#
btrem
gRegor: I have a local ddev version of the drupal site on my desktop, where I made the feed public.
#
btrem
I am getting VCALENDAR output. But visually parsing it is a bit dodgy. Plus, I don't know what my calendar apps require.
#
gRegor
So what part isn't working?
#
btrem
There's no events in my calendar apps!
#
[mattl]
Can you make an event in your calendar app and export it and compare the two?
#
btrem
So, just that minor wrinkle. :-D
#
btrem
[mattl]++ Hmm. I don't know, but that's a good idea.
#
Loqi
[mattl] has 40 karma in this channel over the last year (98 in all channels)
#
gRegor
So you're plugging an `https://user:pass@example.com...` type URL into the calendar? I wonder if they're dropping the auth part
#
[mattl]
(Don’t tell anyone but that’s how I do a lot of things.. export it and then write some code to generate the same output)
#
btrem
[mattl]: it'll be our secret.
#
btrem
gRegor: sorry for the confusion. I'm trying to fix two things at once. How to get HTTP basic auth working, and how to get the calendar feed working. For the moment, the feed is public. So the calendar can subscribe the feed. (If I make it private, it's doesn't "see" the feed.)
#
gRegor
Gotcha
#
btrem
It would be nice to nail down at least some part of this, so that I can focus on the other.
#
gRegor
So you're using a desktop calendar like Outlook, trying to subscribe to the "public" url on localhots?
#
gRegor
*localhost, even
#
btrem
The docs for the Drupal module appear to be out of date. Which makes me wonder if the module is actually working.
#
gRegor
(very different sites XD)
#
[mattl]
I just made a brand new calendar in Apple Calendar and added a single event… https://gist.github.com/mattl/fbe7c5a054ae395f040efb7f67801299
#
btrem
gRegor: excactly. Not outlook, but Thunderbird cal and Ubuntu cal.
#
[mattl]
Ubuntu cal is Evolution?
#
btrem
Not AFAICT.
#
btrem
It simply says "calendar".
#
[mattl]
oh, probably GNOME Calendar then
#
gRegor
If you need another test case, `webcal://gregorlove.com/calendar/calendar.ics`
#
btrem
[mattl]: Yes, I think so.
#
btrem
gRegor: That one works.
#
[mattl]
I can dig out my Linux laptop and install that too if that’ll help with anything. I can also boot the same machine into Windows 11 but I have no idea what I’m really doing there.
#
gRegor
Can you save mine locally and subscribe via localhost URL? I'm wondering if the calendar app doesn't like localhost for some reason
#
gRegor
Heh. I'm also on Windows, but I use gCal web, so not much help in that regard
#
btrem
Thanks. I'll keep that in mind. But that would require me making a public ical feed on production. It I have to do that, I certainly will. But I'd prefer not to if I can avoid that.
#
[mattl]
gRegor: Is there a Windows desktop calendar? I have no idea… Outlook has one but I don’t even think Outlook is a desktop app anymore, just a shell around a website.
#
btrem
gRegor: I don't think so. If I save the file, it is by definition not a feed. As for localhost, I dunno, but the address is actually om.ddev.site. Something particular to ddev containers.
#
gRegor
Windows has some Outlook "lite" default app in Windows 10, though I've not used it
#
gRegor
You can serve my calendar.ics file from localhost. It's a feed.
#
btrem
Ah, yeah, I suppose I could.
#
gRegor
it's a VCALENDAR with multiple VEVENTS
#
btrem
Sorry, I misunderstood you.
#
btrem
That will take some wrangling to get Drupal to send just your calendar.ics as an HTTP response. But worth trying.
#
btrem
Because then I'll have narrowed down my problem to /my/ feed. Right.
#
[mattl]
Stick it in a folder and if you have php running locally you can type `php -S 127.0.0.1:3000` in that folder and you’ll get an instant local web server
#
btrem
[mattl]: neat!
#
[mattl]
Yeah, I use that all the time when I’m trying to debug stuff.
#
gRegor
Yeah, matt's is more what I was suggesting, just to make sure the localhost URL is pulling in correctly. Fewer layers than Drupal in front of it
barnaby, cotsuka, [Ana_R] and jjuran joined the channel