#grantcodesSpeaking of posting with micropub I just built an in app reply function into togther, that feels really good to write a reply directly in a reader
#aaronpkjf2 mostly, tho it's kind of on the bleeding edge rather than following it
#Loqiaaronpk: [eddie] left you a message 35 minutes ago: I’m working with xray on some parsing… is xray’s return data considered JSONified mf2? or jf2? or something else
#[eddie]Gotcha. I’m building some Swift classes into Indigenous to be able to interpret the data so I was trying to figure out what “library” to put it into. I’m trying to keep all my code in separate groups until I make some official libraries.
#[eddie]!tell schmarty While parsing https://martymcgui.re/2017/12/26/102358/ I realized that your dt-published date is ISO8601, but the dt-start is Jekyll’s offshoot date where you place the “T” with a space and add a space between the time and the timezone
#ZegnatOn the other hand, from a microformats parsers output, you have no idea which properties were dt- and which were not. `published` could have been `u-published` and actually contain a data:-uri.
#ZegnatSo what context are we talking about? Are you consuming mf2? Are you creating HTML? Is this about the Micropub client submitting dates?
#sknebelThe list of valid VCP patterns is also interesting, but afaik a subset of ISO 8601
snarfed joined the channel
#[eddie]ohhh interesting. So eventually I plan to build an mf2 parsing library in swift, but until then I have a private xray instance set up that Indigenous uses to parse pages. So I guess it would be a question of what xray does with the different potential values
#ZegnatFor now, the jf2 spec says ISO8601 for the published/updated, but that may change.
#ZegnatI know XRay is doing jf2-like stuff, so if aaronpk followed that it should be ISO8601
#aaronpkI always output dates like 2017-12-29T07:57:00-0800
#aaronpki'm not actually sure what XRay supports for consuming though, it might be flexible
#ZegnatOn cursory glance it looks like XRay just gives whatever value the mf2 parser gives. And IIRC, the PHP mf2 parser does not datetime normalisation.
#ZegnatSo on the consuming usecase, it is basically any string.
#aaronpkah interesting, I should probably add some normalization to XRay for the "published" property
#[eddie]Ahh gotcha. I take text strings (like 8601) and convert them into native Swift Date objects. Are there other popular datetime strings that I might need check for? I definitely think I’ll add support for the Jekyll date default (8601 but converting the T to a space and adding a space before the timezone)
#ZegnatI would like to get datetime normalisation as part of the mf2 spec, the problem is writing up the rules, haven’t had time just yet.
#Loqidatetime refers to an expression of the date (year, month, day), time (hours, minutes, optionally seconds), and optionally timezone https://indieweb.org/datetime
#Loqi[Daniel Goldsmith] Spent time this afternoon working on my nanopub script. I’ve started using composer for the first time. People far more skilled than I have created these packages, it seems churlish not to avail of them.
#Loqi[tantek] There is no "just a time" feature in mf2. dt-* properties are for datetimes (hence the "dt"). The TZ is optional however as there are use-cases of "floating" datetimes (local to whatever timezone).
#ZegnatThat to me suggested he meant datetime to always be a date and a time.
#[eddie]To me it reads that he’s not a fan of time only
#[eddie]I think date only is still potential based on that statement
#ZegnatMay very well be I am both misreading the statement and misremembering the context. It was something I just vaguely recalled just now.
#ZegnatI had to step away from the issue a bit to work on something actually practical instead.
#dgoldaaronpk: a*ha*, I think it's breaking (fvv breaking - the data is still returned) on a mailto: address in a h-card
#[eddie]aaronpk: yep 🙂 definitely long-term I’m looking forward to Swift mf2 parsing, but I figured that will take awhile, why hold back the app’s capabilities waiting for time to do that. Plus, I figure if you are on a website in your browser, you probably have an internet connection to use the indigenous copy of xray anyway
#[eddie]Also, Codable in Swift 4/iOS 11 was the BEST thing to ever come out of Swift. If I have a Struct or Class that have a protocol of Codable (which is pretty much all of my structs/classes related to micropub/mf2/jf2 stuff)
#[eddie]When you get a JSON response All it takes is JSONDecoder.decode(ClassName.self, from: returnedData) and you get a fully formed class or struct with all the correct URL/String/Date types, etc.
#[eddie]Completely changes the way you work with APIs in iOS
#ZegnatLooking at that listen option, [eddie], I really want to start doing “watch” posts.
snarfed, gRegorLove, Muchospanish and [eddie] joined the channel
#[eddie]Yeah? You're in luck. I have a micropub watch client in the plans. Right now I use an iOS app to track which shows I want to watch, and then I use a custom CLI script on my server to create my watch post files, however I am wanting to set up a web app that allows me to login, and do all of those functions including sending a micropub post to my site.
leg joined the channel
#ZegnatMore because I saw your code. And because my XRay instance parses YouTube links. It could easily enable watch posts from YouTube 😅
#ZegnatI am not yet sure how I would do TV watch posts
#[eddie]Right now that is super complicated for me when it comes to YouTube, that would be a nice feature
#[eddie]Instead of having listen hard-coded to my URL, I might add "listen, watch and read" post options and put them behind a "experimental micropub" settings flag
#[eddie]Then anyone that wanted to could activate that, which would add those options to h-entry URLs, which would then send a listen-of, watch-of or read-of with the URL that the user is on
#[eddie]That would enable you to be able to then use your xray to parse the watch-of property
#[eddie]On a side note as far as how to handle TV watch posts, The forthcoming TV micropub web app will send the TV/movie data as embedded JSON like OwnYourCheckin does (with an optional urlencoded summary property fallback) since there is no authoritative URLs for TV/movies
#Loqi[ltGuillaume] DroidShows: A Reboot of DroidSeries Offline TV Shows Tracker
#aaronpkThat sounds great ! I keep considering how/if to post my tv episode watches. I use Trakt.tv right now
#[eddie]Zegnat: That's great to have an exportable database.
#[eddie]aaronpk: I used Trakt.tv for a year or two before moving to my own tracking of it. I've manually imported about 6 months of my Trakt.tv data because it's not 100% authoritative so I have to determine which were real watches
#[eddie]I also find tv episode watches are a useful use of the visibility property. I don't post all my shows publically, certain ones are public others are private just based on personal preference
#[eddie]In fact, I plan to have my micropub app allow for default settings on a per show basis, that way when I first watch a show I can add the category, visibility and person tags and they will default when I watch it
#[eddie]Because what often happens is I watch certain shows with my wife (based on her interest) other shows on my own, etc.
#[eddie]Right now I have SSH clips in the Prompt app that pre-fills all those settings for the CLI to make my watch posts quick to make, but having all of that in a web app would be SO much more convenient
#aaronpkMy problem with Trakt.tv is it's still relatively manual so I often forget to tap "watched" until the next time I'm watching the show so my watch dates are definitely inaccurate
#[eddie]ahhh yeah, that's tricky. That happened when I did it through Trakt.tv, however since I've been doing it on my own site, it's given me enough purpose to do it every time
#[eddie]So the accuracy of my tracking since I've been doing it on my website instead of Trakt.tv (even still being manual) has greatly improved
#ZegnatThe one thing I dislike is that I am watching several shows where I missed episode 1. For all those shows it tells me my next episode to watch is episode 1 :(
#ZegnatMeans it is also bad at guessing what episode I want to mark as watched next, so it doesn’t auto show it.
#ZegnatFor shows I have seen all episodes from 1, it will instantly present me the next unwatched one and let me tap “watched”.
#[eddie]Ohhh yeah, there should be a "mark as next episode" button that doesn't track the episodes before it as "watched" but allows it to set what the next episode to watch is
#[eddie]I have that problem with my iOS app I use as well
#tantekhmm - if you "watched" shows/videos from inside your /reader that is already on your own site, then that same code could auto-post when you start/finish watching any particular video or show.
#tantekotherwise I think I'd want the video equivalent of Shazam, that could auto-recognize what show I was watching and fill in all the details for a post
#ZegnatI consume a lot of video content from YouTube and Twitch, when I have a good internet connection, so that would work for me. But I don’t think a lot of people will be getting TV shows in their readers any time soon.
#[eddie]Yeah, TV Shows are gonna be locked away for a long-time, which is unfortunate. I'd be happy if Apple allowed apps to integrate with the TV app (it tracks what you watch), so I'd be in heaven if I could have a micropub app that connected to the TV app's database and create posts
#[eddie]I wonder if there is a private API that I can access if I just manually install the app 🤔
#aaronpkAt least when I watch on Plex it auto scrobbles to Trakt
#ZegnatI tried setting up Plex on our NAS at home, but it never really worked well for me
#[eddie]All of my shows are locked in proprietary apps 😞
#tanteklast I checked iTunes had a AppleScript "API" that you could use to watch what it was doing (including watching videos)
leg joined the channel
#ZegnatI think most watch statistics are locked in, right? Does Spotify allow you to export the data? I think you are limited to scrobbling your listens live because no exports possible.
#ZegnatYouTube used to let you access what you had watched, but that was scrapped from the API as well :(
#aaronpkOh yeah I think there's also a trick where you can ask the Apple TV what it's playing regardless of what app it's coming from
#dgoldis using global variables in php a really really bad thing, or just an inelegant thing?
#ZegnatI don’t know why it would be any worse than in other programming languages. I am not a fan. For anonymous functions you can use `use` to pass along variables from the outer scope, if you need a variable to be mutated you can pass them by reference. Not sure I have had any use cases for global variables lately.
#aaronpkMostly inelegant, but bad if you're writing a module that will be used by other things. I think most of the dangerous parts of it have been removed from the language in 7
#aaronpkThings like query string paeans setting global variables, or parse_str setting global variables
#tantekdgold, depends if you're a beginner programmer (sure, why not?), intermediate programmer (never use globals anywhere for any reason!), or advanced programmer (avoid globals, but if using them results in simpler more maintainable code, go for it).
#dgoldhmmm; my particular use case is bringing in twitter-api-keys to a function
#dgoldthe keys are used elsewhere in the script for other tasks, but I also need them for a specific function
#tantekit really depends on how your code is structured. sometimes passing things around everywhere causes a lot more complexity than it is worth.
#aaronpkI usually make a static config class for stuff like that
#aaronpka little nicer than global vars but still easy to use
#ZegnatI am super stringent these days where, if a function requires some data it can’t go and fetch by itself, it should be passed in as a parameter.
#dgoldaaronpk: care to point a newbie at an explanation of a static config class?
#ZegnatAllows the code, anywhere, to just do Config::$base and get whatever was set as the base URL.
#ZegnatI am trying to learn more about dependency injection and container stuff for passing around configs and other objects. I feel like I haven’t really grasped that yet.
#[stephen634]Is there a script or framework I can set up as a simple authorization_endpoint/token_endpoint for local development of a micropub endpoint? Trying to figure out the best way to post from a local install of micropub.rocks or an app like micro.blog to my local dev site while I work on the endpoint plugin for my site
#[stephen634]For your token provider, how does the magic url work? Does it eliminate `<link rel=“authorization_endpoint” href=“”> ? Or do I use the url it creates for that?
#ZegnatThe magic URL is what you give to the Micropub client you are using as your login URL.
#ZegnatOn the page that results from the magic URL there is actually an authorization endpoint, token endpoint, and micropub endpoint, and it simulates an entire login flow.
#ZegnatSo the Micropub client will end up with the micropub endpoint URL and a token that you defined ;)
#ZegnatBut not all clients will appreciate the IndieAuth mangling I am doing there. Which is where the “mileage may vary” comes in.
#ZegnatIt should get Micropub clients posting to your endpoint though, so you can do testing on your endpoint.
#[stephen634]Thanks! That was exactly what I needed. Works w/ my local install of micropub.rocks
#LoqiXFN (XHTML Friends Network) is the network of visible links across blogs that claim various XFN relationships with/to each other https://indieweb.org/XFN
#Loqiok, I added "https://gmpg.org/xfn/11" to the "See Also" section of /XFN
#loqi.meedited /XFN (+26) "Zegnat added "https://gmpg.org/xfn/11" to "See Also"" (view diff)
[eddie] joined the channel
#[eddie]So I’m building a syndication site (that will host things posted by me and my wife). I would post something on my site, and then syndicate-to my secondary site. As far as authentication goes, should I just forward the bearer token to my syndication site and have that syndication site check for the token endpoint from eddiehinkle.com? Does that seem dangerous? both sites are https
j12t_ joined the channel
#ZegnatFeels a little weird to have the same token active on multiple endpoints. Though as you run both sites it might be less of an issue.
#ZegnatNormally you would want to keep those separate, as any client that now has a token for eddiehinkle.com suddenly also has the right to post to syndicationsite.example
#[eddie]The other option that came to mind would be a static server to server token (eddiehinkle.com to syndicationsite.example)
#[eddie]Although based on the library I’m using for micropub it wants a token endpoint to check
#ZegnatOn syndicationsite.example you would overwrite the token endpoint check to check internally, I would say.
#ZegnatThe interesting part, [eddie], is that eddiehinkle.com’s micropub endpoint could also be a micropub client. Then you can syndicate to *any* website that has a micropub endpoint.
#ZegnatSo if syndicationsite.example has a Micropub endpoint (and its own token endpoint), and you authenticate to it as eddiehinkle.com to get a token (much like how Sink works), you could have eddiehinkle.com post to it as if that was your Micropub client.
#[eddie]Yeah that’s interesting. Have a good night’s rest and it has definitely sent me down the path to thinking
#tantek.comedited /ACM_Hypertext_Conference (+561) "document a few other years to see if there is any pattern of what broke or not, maybe a paper on their own site reliability itself is worthy of a submission to this conference" (view diff)