#dev 2019-02-26

2019-02-26 UTC
[manton], singpolyma, [gRegorLove], snarfed, [cleverdevil], iasai, [aaronpk] and KartikPrabhu joined the channel
#
[gRegorLove]
@gwg if you document the indieauth profile stuff I'll try to add it to indiebookclub
#
GWG
Any suggestions about where?
#
[gRegorLove]
Brainstorming section on /Indieauth or maybe a post on your site
#
sknebel
GWG: in the issue you opened against the spec?
snarfed, [eddie] and [chrisaldrich] joined the channel
#
GWG
Gregorlove, added to issue
[jgmac1106], iasai, dougbeal|mb1 and gRegorLove joined the channel
#
gRegorLove
GWG: So does only your dev copy of the WP authorization endpoint return the profile jf2 currently?
#
gRegorLove
If so I'll probably wait until that's live. I'll follow that issue for any developments.
jjuran, iasai and KartikPrabhu joined the channel; KartikPrabhu left the channel
#
GWG
Gregorlove, nodded off, will push the live version shortly
iasai, [cleverdevil], [tantek], [eddie], cweiske, barpthewire, gRegorLove_, swentel, Guest25732, GWG_, wagle, stevestreza, [Rose], strugee, raucao, jeremych_ and swentie joined the channel
#
@srushe
↩️ I have a script that look for unsyndicated posts in the data I use to build my site, then use https://brid.gy/ to actually do the syndication, before saving the URL http://brid.gy sends back. http://brid.gy does most of the work… https://deeden.co.uk/replies/2019/02/26/105652
(twitter.com/_/status/1100349271491203072)
[grantcodes] joined the channel
#
[grantcodes]
!tell GWG let me know what issues you had with together or feel free to open issues on the GitHub repo
#
Loqi
Ok, I'll tell them that when I see them next
[kevinmarks], [jgmac1106], barpthewire1, j12t_, deathrow1|absnt, Zegnet, sknebel_, KartikPrabhu, tomasparks, cweiske, raucao, gRegorLove__, iasai and [Vincent] joined the channel
#
jeremycherfas
I know I saw people talking about converting [cleverdevil]'s Overcast python script to PHP; wondering whether anyone has actually started.
#
sknebel
wonders about crazy crosscompilation toolchains to avoid "let's rewrite X in $lang just so it's in $lang" :D
#
jeremycherfas
I believe it is better for me to use the python logic to learn more about PHP.
#
jeremycherfas
Is there even a translator?
#
jeremycherfas
Wouldn't it be cool if you could just paste code into translate.google.com
#
sknebel
heh, no, there isn't, at least not for that pairing
#
Loqi
[dan-da] py2php: py2php is a utility that will auto-translate python code into PHP code.
[kevinmarks] joined the channel
#
sknebel
I should maybe expand my statement with "that works reliably" :D
[schmarty] joined the channel
#
sknebel
python is a really annoying candidate for this, you'll probably end up with a good bit of a python interpreter in your converted program
#
jeremycherfas
OK, first silly question. Is there a way to check that I am logged in at a site, maybe by using curl? Or should I just log in anyway?
#
jeremycherfas
Will that even work if I am logged in already?
#
sknebel
what do you mean by "am logged in"? there's bunch of things that can mean
#
jeremycherfas
Let me try and figure this out for myself. I'll probably be back in half an hour.
#
jeremycherfas
Python has `if os.path.exists(conf.SESSION_PATH):` and if it does not exist, goes into Overcast to authenticate the user.
#
jeremycherfas
Trying to duplicate that in PHP
#
Zegnet
My expectation is that the script has stored some cookies at a location on your drive (conf.SESSION_PATH). It will either load those to keep you logged in on next poll, or request you to go and login so a session can be obtained
#
Zegnet
You can do a similar thing with curl (and thus also PHP’s curl methods) where you tell it what cookies to send along with a request.
#
Zegnet
As long as those cookies contain your session identifier, the Overcast server will assume it is talking to you.
#
sknebel
sounds right
#
Zegnet
(Haven’t looked at the Python script, but this is how it usually works.)
#
jeremycherfas
I see. Thanks. More complex than I thought, because I would need to find and store the cookie.
#
sknebel
jeremycherfas: what's the link to the python script?
iasai joined the channel
#
jeremycherfas
But this really is a useful exercise for me.
#
sknebel
ok, yes, the python script just dumps the entire session state, but cookies gonna be the key here
#
jeremycherfas
I'm going to start working without them. Assume I first authenticate, then retrieve the data.
#
Zegnet
Yeah, what this seems to do is post your email and password to the login page, and just store everything it gets back
#
Zegnet
Which would be cookies, as it is the only http-session-holding-data
#
Zegnet
For reference, in PHP you would define a COOKIEJAR for your curl calls: https://stackoverflow.com/a/38490660
#
Zegnet
That way consequent calls will use the same cookies (ie. session). And as long as you do not remove the file between runs it will just try again with the same cookies next time
snarfed, iasai and dougbeal|mb1 joined the channel
#
jeremycherfas
Is there a difference between COOKIEJAR and COOKIEFILE?
#
sknebel
I think you need to set both to the same file
#
sknebel
cookiejar is where cookies are stored, cookiefile is where they are loaded from
#
sknebel
if I remember right
#
jeremycherfas
Either way, I have gone as far as I can for one day. To Be Continued ...
[Rose], barpthewire, [grantcodes], [jgmac1106], [tantek] and snarfed joined the channel
#
aaronpk
wow I never really realized that openid connect and IndieAuth are about the same age https://nat.sakimura.org/2019/02/27/happy-5th-birthday-openid-connect/
snarfed, [kevinmarks] and jgmac1106 joined the channel
#
snarfed
lol ok [kevinmarks] wins the tantek QA-and-break-your-code award for the day for dt-published value "1998" on http://kevinmarks.com/
#
[kevinmarks]
I couldn't remember the exact date…
#
[kevinmarks]
Is that against 8601 rules?
#
snarfed
heh, got me
#
snarfed
my consuming code needs to not crash regardless
[tantek] joined the channel
#
snarfed
ok all, granary now has rss output (beta!), including podcast enclosures and itunes tags. feel free to try! https://granary.io/?input=html&output=rss#url-form
#
aaronpk
oo fancy
#
sknebel
"1998" is valid content for html <time> tags at least
swentel, [frank] and [jgmac1106] joined the channel
#
swentel
aaronpk, I think you'll have to change your checkin template a bit on your site. xray now puts the photo of the author of the checkin (emoji grilled bar) on /primary to the image of the first post :) (tiny detail of course)
#
swentel
s/puts/sets
#
swentel
(unless you already knew of course)
#
aaronpk
oh yes i just saw that
#
aaronpk
my checkins were the only post on my site that included my avatar before this change, and i apparently forgot to update that
#
swentel
it's still a cool feature, makes the page alive too
[manton], [cleverdevil], [eddie], snarfed, [jgmac1106]1 and [frank]1 joined the channel
#
[tantek]
That's the kind of stuff that kept me quite busy before we launched indieweb, and then overlapped a bit after
ichoquo0Aigh9ie, snarfed and [kevinmarks] joined the channel
#
[kevinmarks]
It is frustrating that most programming languages or libraries turn these kind of dates into exact date times with boundary dates/times.
[schmarty] joined the channel
#
sknebel
Yeah, expressing that in them is surprisingly tricky
ichoquo0Aigh9ie, [eddie], [jgmac1106], snarfed, jgmac1106, KartikPrabhu, [tantek] and [manton] joined the channel
#
[manton]
[aaronpk] I wrote a help page to try to guide developers in the right direction with using IndieAuth on Micro.blog. My thought is that this would be a good place to start when they want to build an app because it can use Micro.blog URLs for the examples. (And I want to encourage IndieAuth over the email sign-in, especially for web apps.) http://help.micro.blog/2019/api-indieauth/
#
[manton]
If you or anyone has feedback or concerns, lemme know.
#
aaronpk
Oh awesome
#
aaronpk
Looks great. Might want to add a sentence before "Finally" that mentions verifying the state parameter
#
[manton]
Does anyone really verify the state parameter?
#
[manton]
Just kidding! (I do.) I'll update it.
#
[eddie]
hahaha!
#
Loqi
rofl
#
aaronpk
I'm trying to think if they need to also verify the domain of the "me" URL returned too
iasai joined the channel
#
[manton]
Thanks. I think I verify "me" in Micro.blog, but I remember there was one place I was checking "me" that was kind of deprecated and not used by apps anymore... Forgetting the details now.
#
aaronpk
It used to come back in the redirect but it can't be trusted then so it's not used there anymore.
#
aaronpk
ok checked the spec again and now I remember
#
aaronpk
if an app is just getting an access token and using it to make api requests then your instructions are the complete set
#
aaronpk
If the app wants to know who signed in and looks at the "me" in the code exchange response, then it does need to check that the domain matches what was entered at first, otherwise someone can make a fake IndieAuth endpoint and sign in to apps as arbitrary users
#
aaronpk
(For example if the wiki didn't check that, people could sign in to the wiki as someone else)
#
aaronpk
Oh one more thing for the help page, the app should also discover the micropub endpoint to avoid hardcoding that to micro.blog
#
jacky
you still hacking on the indieauth.rocks thing aaronpk?
#
jacky
is eager to test
#
[manton]
[aaronpk] Ah, that makes sense about "me". Thanks! I'll add something to the Micropub page too for discovery.
snarfed and iasai joined the channel
#
KartikPrabhu
what is reader
#
Loqi
A reader (AKA indie reader or social reader) in the context of the indieweb is the portion/feature integrated into an indieweb site that provides a way to read content from other indieweb sites, possibly including posts from the current site, and respond (like, comment, repost, etc) inline in the reading UI itself https://indieweb.org/reader
#
aaronpk
jacky: i haven't made any progress on it in a while. I really need to tho
snarfed, [kevinmarks], [schmarty] and [tantek] joined the channel
#
KartikPrabhu
aaronpk: on https://aperture.p3k.io/ Sec. Technical Details first paragraph: should "Micropub app shows the posts" read "Microsub" instead?
#
aaronpk
wow yeah
#
aaronpk
thanks fixed
#
KartikPrabhu
:thumsup:
snarfed joined the channel