#dev 2019-09-29

2019-09-29 UTC
KartikPrabhu, NeroprojektDisco, vendan, jgmac1106 and dhanesh95 joined the channel
#
GWG
I just finished fixing UTC offsets in my location code, so I'm going to bed
#
GWG
That addresses that one attendee with a problem at IWC Austin 2017
[frank], [aaronpk] and [schmarty] joined the channel
#
Loqi
GWG has 27 karma in this channel over the last year (145 in all channels)
#
dansup
hecc timezones GWG++
#
Loqi
GWG has 28 karma in this channel over the last year (146 in all channels)
dhanesh95_, [Rose], [tonz], dhanesh95 and [tantek] joined the channel
#
[tantek]
aaronpk, some of these use-cases seem quite legit: https://w3ctag.github.io/capability-urls/
#
aaronpk
oh, one-time use tokens in URLs are a different story
#
aaronpk
the "password reset" case there
#
aaronpk
the "Risk of Exposure" section talks about it quite well
#
aaronpk
also lol "If you are considering using capability URLs, you should consider other options..."
#
aaronpk
they even say "Capability URLs should expire"
jgmac1106 and [jgmac1106] joined the channel
#
[schmarty]
haha wow
#
[schmarty]
was talking about this w/ tantek. i love this tool! it lets you muck w/ json data on the command line and in scripts https://stedolan.github.io/jq/
#
[schmarty]
aaronpk described it as "awk, but for json", which feels accurate if inscrutable 😄
[Rose], [jgmac1106]1 and [Lewis_Cowles] joined the channel
#
[Lewis_Cowles]
there is also yq for yaml if the need ever arises
#
[Lewis_Cowles]
beware json with comments, it's a thing I'm seeing more and more
AceFaceDiscord[m, mrcatmann, jgmac1106, [jgmac1106], [tantek], [frank], [grantcodes] and [schmarty] joined the channel
#
[schmarty]
Oooh yq is actually a thing I needed! I was converting yaml to JSON so I could use jq, then converting back! 😱
#
aaronpk
sebsel: quill supports visibility now!
jacki and [mapkyca] joined the channel
#
[frank]
[aaronpk] How do you redirect in Quill to the new published post? I can't find the permalink anywhere in the response from the micropub call.
#
sknebel
[frank]: Location: header
#
sknebel
of the micropub response
[aaronpk] joined the channel
#
@JamieTanna
We've had some issues with IndieAuth on a WordPress subdirectory, and sending Authorization headers to DreamHost but @david_bryant has still made some good progress at #IndieWebCamp Amsterdam!
(twitter.com/_/status/1178320286816636928)
#
@JamieTanna
As mentioned at #IndieWebCamp Amsterdam, I haven't quite yet got Meetup syndication from http://brid.gy - but hopefully I'll be able to show it off other the next couple of days!
(twitter.com/_/status/1178321399418642432)
jonny2 joined the channel
#
GWG
I see Quill supports visibility as a query.. will have to add it now
#
GWG
I should do some Quill PR stuff one of these days
#
Loqi
definitely
jgmac1106, [jgmac1106], jjuran, [Marten], [grantcodes] and [frank] joined the channel
#
[frank]
[Rose] a question on iOS Shortcuts. When I do a post to my blog (with micropub) I get a response from my WordPress site with the result and headers. How do I pick up this information in Shortcuts? Especially the header to get the Location which has the permalink to my new post.
[Rose] joined the channel
#
[Rose]
I presume it's returning JSON? JSON is a dictionary
#
[frank]
It's in the header, not the response itself. Which is JSON
#
[Rose]
I have a series of Shortcuts I've been modifying this summer, I should get around to posting them.
#
[Rose]
AFAIK you can't get the headers of the response. I'd be happy to be wrong about that though!
#
[frank]
Let me put my iPhone from Dutch to English to show the steps I have now. And the error message that goes along. BRB. I hope.
[tantek] joined the channel
#
[Rose]
Assuming iOS 13 you can also go to Settings > Shortcuts and enable untrusted Shortcuts and send me a link (making sure any keys are not present first though)
#
[frank]
It went pretty easy. Here's what I have now. After posting I want to get the headers of the URL. That's when I get an error.
#
[frank]
Here’s the error
#
[frank]
You can view it at https://www.icloud.com/shortcuts/1dc1eb7c4d8248f39639cdfaa010fa5f you need to put in a key and your own endpoint.
[aaronpk] and [schmarty] joined the channel
#
[Rose]
Getting the headers sends another request I beliece
#
[Rose]
At least, it used to
#
[Rose]
As you have to give it a URL, it can't read them from a query already executed
#
[Rose]
Yup, tapping the icon on Get Headers shows the following docs:
#
[Rose]
Retrieves the HTTP headers of the URL passed as input using a HEAD request.
#
[Rose]
Input
#
[Rose]
Result
#
[Rose]
Dictionaries
#
sknebel
for personal use, you could extend your micropub endpoint to return e.g. a json including the path as well. I think that's valid to do with 201/202 responses
#
Zegnat
Yeah, totally valid. I feel like some people had already started doing that?
#
[Rose]
Wordpress returns the url in the json
#
GWG
[Rose]: I couldn't even remember if I added that.
#
GWG
I am going to add the query Quill supports as of today in my next pass
#
[Rose]
I use it, so someone must have?
#
[grantcodes]
Yeah think I saw that in wp and added that to my endpoint too
#
GWG
[Rose]: Either me or snarfed
#
GWG
Who can remember
#
GWG
[Rose]: By the way, any asks for WordPress? I am starting a run of bugfixes and easy enhancements
#
[Rose]
Uhh, a custom theme? :P
#
[Rose]
Being serious, no I think I'm all good - thanks for asking!
#
[frank]
With my checks in Postman to do these micropub posts, the response doesn't give back the full permalink of the post.
#
[frank]
[sknebel] I have no idea how and where to extend an endpoint....
#
sknebel
since other say it should be there, micropub plugin up to date?
#
GWG
[frank]: Open an issue on the repo?
#
sknebel
[Rose]: you sure about the MP endpoint? or just the media endpoint?
#
sknebel
in the media endpoint I see code for it, in the micropub one it's not obvious
[tonz] joined the channel
#
[Rose]
Maybe I'm thinking of MediaPub?
#
GWG
It isn't returned
#
GWG
Only in the media endpoint
#
GWG
But if someone opens an issue, I will see about doing it
#
[Rose]
And I construct it for MicroPub somehow I thought, but I have a cold - my brain is 90% offline :P
#
Loqi
[RosemaryOrchard] #206 Return URL to post in JSON
#
[Rose]
Be careful what you wish for GWG :P
#
GWG
That's easy enough
#
[frank]
Thanks [Rose]
#
[frank]
Rosé++
#
[frank]
Hahaha. Dumb autocorrect.
#
[frank]
Rose++
#
Loqi
Rose has 14 karma in this channel over the last year (52 in all channels)
#
Loqi
[frank]: lol
jgmac1106, KartikPrabhu and [sebsel] joined the channel
#
[Rose]
!tell GWG: same as Media Endpoint? Sorry, I’m not logged into GitHub here.
#
Loqi
Ok, I'll tell them that when I see them next
Gr1mR33p joined the channel
#
Zegnat
Updated the GH issue ;)
[aaronpk] joined the channel
#
[aaronpk]
We should standardize the JSON response with the URL as a micropub extension
#
Loqi
definitely
#
Zegnat
Can I make the unpopular suggestion that, if that gets done, conneg is added so we can still give browsers a different response? 😇
#
KartikPrabhu
!karma conneg
#
Loqi
conneg has -2 karma in this channel over the last year (-3 in all channels)
#
[aaronpk]
Why do browsers need a different response? Won't they redirect when the Location header is returned?
krychu joined the channel
#
sknebel
not sure if they do that for 20x responses
#
Zegnat
I *think* they will
#
Zegnat
But I am not sure if that is actual HTTP standards behaviour or unspeced browser behaviour
#
Zegnat
Would need to double check
#
jgmac1106
jaimetanna I see it as if something deserves its own license then it probably should be it’s own h* level. A self contained piece of content that could or shouldn’t be moved around based on license.
#
sebsel
re the Micropub returning the URL: I have all my endpoints return a HTML link. Shortcuts can parse that too. But I guess JSON makes sense too here, but the redirect is designed to be user facing
#
sebsel
has to be an <a href> for Shortcuts to work though, iirc. Just putting plain text wont work
[jgmac1106] joined the channel
#
jgmac1106
I have used h-item for products on shopping pages, maybe that could work when you need a piece of content to have a different license??
#
Zegnat
https://tools.ietf.org/html/rfc7231#section-7.1.2 seems to suggest the location header is only informational for 201, so may not automatically redirect ?
#
sknebel
sebsel: how does shortcuts handle html?
#
sebsel
Shortcuts is a lot of magic
#
sebsel
https://seblog.nl/temp/media-endpoint/f01413-img_4167.png this is the (unfortunately Dutch) that was used to upload that image itself
#
sebsel
so it is ‘get contents of URL’ and then ‘get URLs’
#
sebsel
It just has URLs if you add html with a link
#
sebsel
But it can also parse JSON
#
sknebel
ah ok, extracting the links. neat!
jgmac1106 and KartikPrabhu joined the channel