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
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.
[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
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.
[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)
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).
[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]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.
[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]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
[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]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
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 :(
[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
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
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.
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
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).
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?
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.
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
[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
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
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.
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)