#indiewebcamp 2014-08-09

2014-08-09 UTC
#
aaronpk
so this is actually a great example of the first problem we'll encounter
#
tantek
what is this?
#
aaronpk
when editing a mediawiki, you don't submit HTML, you submit mediawiki syntax
#
aaronpk
which means the thing you're reading is not the same as the format you have to submit edits in
#
tantek
that's right, you have to publish e-content of the raw syntax of the thing you're editing.
#
aaronpk
which also means you need a way to retrieve the raw syntax
#
tantek
aaronpk - those aformentioned edit buttons on wikipedia :)
#
tantek
simple HTTP GET
#
aaronpk
yep, and now this is starting to sound a lot more like micropub :)
#
tantek
except there's no auth
#
tantek
*how* you get that raw mediawiki syntax into your publishing system is orthogonal
#
aaronpk
so I think the same mechanism could work for both
#
aaronpk
for micropub edits we'll also need a way to retrieve the raw post content
#
tantek
I can click the "edit" link on indiewebcamp, or even "view source" to get a textarea with the source
#
aaronpk
isn't there already a rel=edit link on all the MW pages?
#
tantek
then I can select all
#
tantek
go to my own flat storage text file
#
tantek
paste
#
tantek
and wrap it in an e-content
#
tantek
and edit it as I would have edited the textarea on wikipedia
#
tantek
except this time when I save to my server it publishes an *edit* post on *my* site
#
tantek
then I send the webmention
#
aaronpk
makes sense
#
aaronpk
shouldn't you also publish the date of the thing you're editing? so that someone looking at your post has a way to know what changes you're making?
#
aaronpk
since you're not publishing a diff, you're publishing the full new version
#
tantek
the "the date of the thing you're editing" is part of the permalink on wikipedia to a version
#
tantek
so you have to do a u-edit-of *of* *that* permalink
#
aaronpk
hm so your "u-edit-of" would be a version permalink?
#
tantek
it must be
#
aaronpk
that would handle it
#
tantek
because you don't care abou the date of the thing you're editing, you care about the *version* of the thing
#
KevinMarks_
so you're relying on the source to decide what chunk you edit in
#
KevinMarks_
and it is effectively a PUT?
#
aaronpk
that means if I wanted to support edits of my posts, I would need to create version permalinks for my own posts
#
tantek
KevinMarks: the source already depends on that - see above, Wikipedia form UI submits the entire page/section
#
KevinMarks_
or it's a POST and the server has to handle contention?
#
tantek
aaronpk - yes - it turns every post into a /wiki-page
#
tantek
KevinMarks: no - don't get confused with the native HTTP verbs
#
tantek
this is built on webmention
#
tantek
the only thing submitted over HTTP is the webmention POST to endpoint and two URLs (source, target)
#
aaronpk
we don't need different HTTP verbs for it since mediawiki already does it with GET/POST via HTML
manny__ joined the channel
#
KevinMarks_
does webmention normally send text in POST?
#
tantek
aaronpk - and before wikipedia supports receiving webmentions, we could add support to Bridgy Publish to accept the webmention of an edit, and then perform a form submission to Wikipedia on behalf of us
#
tantek
KevinMarks: nothing is being sent in text
#
tantek
it's all in the e-content of the actual HTML post permalink
#
aaronpk
KevinMarks_: webmention doesn't ever include any content, just URLs
#
KevinMarks_
right, thats why I was confused. The source is the replacement content?
#
tantek
so we could a) get this to work on indiewebcamp mediawiki, and then b) build a webmention->mediawiki proxy
#
tantek
KevinMarks: no the source is a URL to an edit post
#
tantek
that /edit post has an e-content which has the new raw syntax replacement
#
KevinMarks_
right, that's what I meant. Got it now
#
tantek
aaronpk - this is why I want to try this with the mediawiki use-case first before trying to make it happen for editing our own posts
#
tantek
mediawiki has versions for pages already
#
tantek
our posts don't
#
tantek
(have versions)
#
tantek
(that I know of anyway)
#
KevinMarks_
mine do in git
#
tantek
interesting
#
KevinMarks_
though not revealed on the site
#
tantek
KevinMarks: example of a post permalink on your site with versions?
#
KevinMarks_
the versionsa are invisible on the HTML, which is a problem
#
tantek
what's an example post on your site like that?
#
tantek
any of them?
#
tantek
that looks like an edit post
#
tantek
I mean whats the actual post URL on kevinmarks.com
paulcp joined the channel
#
tantek
KevinMarks: then that page should have a hyperlink in the footer like:
#
tantek
<a href="https://github.com/kevinmarks/kevin-marks.com/commits/dfd796bb0ccefbe02ec7cafcc670a9edb108ffec/web/fragmentions.html">History</a>
#
KevinMarks_
that makes sense
#
tantek
and here you go for even more fun, put a link like this next to that one:
#
KevinMarks_
needs to build a template thing
#
tantek
<a href="https://github.com/kevinmarks/kevin-marks.com/blob/db004403ae6fcb9dfdb1b6cc316fae98422bb35b/web/fragmentions.html">Edit</a>
#
tantek
then all your blog posts will have transparent history, and the ability for anyone to go from reading your blog post, to making and suggesting an edit all through the web UI!
#
tantek
(no need for git command line nonsense)
#
KevinMarks_
though the edits they see will be me adding these links...
#
tantek
you've already done the hard part of setting up git as your backend
#
tantek
might as well put the little bit of UI of a "History" and an "Edit" link on there
#
tantek
to make it supercool :)
#
KevinMarks_
I was thinking about moving off git, but this is a reason to stay
KevinMarks2 joined the channel
#
KevinMarks_
heading out for lunch (!)
#
kylewm
very late lunch or KevinMarks_ is in Hawaii
#
tantek
aaronpk - this edit "protocol" is only "simple" because MediaWiki already has a notion of versions of pages with their own permalinks built in
#
tantek
while that may also be a good approach for any random post on any indieweb site - I'm not sure of tying a general edit protocol to requiring permalinks of versions - though maybe that's the easiest path?
#
tantek
enjoy lunch KevinMarks! Looking forward to seeing you implement the "Read Fork Write Merge Web" on your own site ;)
tilgovi joined the channel
#
aaronpk
oh right... my site is backed by git as well, so I inherently have versioned posts if I expose a way to retrieve them by git hashes
#
tantek
your flat file storage is backed by git?!?
#
tantek.com
edited /edit (+1182) "/* Why */ Federated IndieWebCamp Edits"
(view diff)
#
tantek
aaronpk - here you have it - perhaps the fastest/simplest demonstration of peer-to-peer useful edit post publishing we could do: http://indiewebcamp.com/edit#Federated_IndieWebCamp_Edits
#
tantek
(might have to use p-content with any markup escaped instead of e-content so the edit post doesn't look weird on your own site)
#
tantek.com
edited /edit (+255) "/* Federated IndieWebCamp Edits */ might have to use p-content"
(view diff)
#
kylewm
tantek: how about including both the diff and the full, edited version? suspect diffs would be more useful for the implementation/plumbing
#
tantek
kylewm: by virtue of the fact that the *working* MediaWiki form submission edit "protocol" sends the full version, I say no, the full version is what is useful for implementation, as that's what's currently implemented! (and not the diff)
#
tantek
so the minimum viable edit post is *just* the full edited version
#
tantek.com
edited /edit (+108) "/* Federated IndieWebCamp Edits */ permalink must include specific version (and section if any)"
(view diff)
paulcp joined the channel
#
kylewm
hmm, ok. if you are including the u-edit-of the specific version of the page (as it says in your spec), then i guess the diff is redundant anyway
#
tantek
well, they're hypothetically isomorphic (diff vs. full), however I'm preferring the quickest path to implementation, following what's already been implemented (editing / accepting full versions)
#
tantek
I'm assuming it's straightforward to code the transform of parsing an h-entry with p-content of the full version into the same result as a receiving and handling a form submission with the full version
#
tantek
so I could post one of these edits as a "note" reply to a version of a page on indiewebcamp like *now*, and send a webmention, except it wouldn't do anything
#
tantek
I wonder if that would be useful as a test case?
#
tantek
I suppose it would depend on level of interest in anyone here adding the code to IndieWebCamp.com's webmention handler to process a mention from an edit post
#
tantek
aaronpk - how interested in this would you be?
#
kylewm
so my utf woes appear to be the same as KartikPrabhu fixed with this https://github.com/kartikprabhu/mf2py/blob/master/mf2py/parser.py#L62
#
kylewm
getting a header with Content-Type: "text/html" and a <meta charset="utf-8"> in the actual contents
#
KartikPrabhu
kylewm: that little piece of code has turned out to be quite useful! I put it in ronkyuu as well :) maybe it should be its own thing
#
tantek
which site is this header vs. meta happening?
#
kylewm
yours!
#
tantek
I was afraid of that
#
KartikPrabhu
badoomm tssh
chrissaad joined the channel
#
KartikPrabhu
tantek: it seems to be a thing that the python requests library gets messes up on
#
kylewm
but curl and the browser both seem to be able to figure it out
chrissaad joined the channel
#
tantek
so my server got sloppier likely when they switched it over
#
tantek
very odd
#
kylewm
so seems like a functional deficiency of python
#
tantek
same time I had those other PHP problems
#
KartikPrabhu
kylewm: requests is more likely the offender
#
tantek
hmm - just verified that my home page returns Content-Type: text/html
#
tantek
charset=UTF-8
#
tantek
oh snap but a permalink only returns text/html. oops.
#
kylewm
oh phew :)
#
kylewm
thought i was craaazy
#
KartikPrabhu
tantek: yes iirc I had toruble with your post permalinks too
#
tantek
sooo - should I fix this now? or leave it as a test case for you to fix your code on yourside too?
#
KartikPrabhu
tantek: upto you. that shimmy I wrote works even if you fix it :)
#
tantek
(it is part of the HTML5 spec - that is, what I'm doing is ok)
#
tantek
(though I'd rather serve it consistently header vs. meta)
#
KartikPrabhu
it seems requests does not read the meta tag... and so default guess is ISO...., if header has no charset. But then BS4 reads the meta tag anyway ;)
#
kylewm
feel free to fix it
#
kylewm
i can still fake this behavior for a test case
#
kylewm
tantek: but nice of you to offer :)
#
KartikPrabhu
wow that is 4 months old already
KevinMarks2 joined the channel
#
kylewm
oh wow, yeah this doc (linked by the HTML5 spec) addresses exactly this issue http://tools.ietf.org/html/draft-ietf-websec-mime-sniff-03
#
kylewm
"Many web servers supply incorrect Content-Type header fields with their HTTP responses. ... must consider the content of HTTP responses as well ..."
#
kylewm
wondering if we should file an issue on python-requests
#
KartikPrabhu
kylewm: I think requests does its best without sniffing the content... which they give ample warning about on their "quickstart" page
#
KartikPrabhu
so I feel it is upto the users of requests to get it right
chrissaad joined the channel
#
KartikPrabhu
kylewm: there seems to be an open issue for this here: https://github.com/kennethreitz/requests/issues/2086
#
@kyle_wm
RT @t: The Read Write Web is no longer sufficient. I want the Read Fork Write Merge Web. #osb11 lunch table. #diso #indieweb (ttk.me/t4CU1)
(twitter.com/_/status/497920789018984448)
#
kylewm
KartikPrabhu++ agree with your analysis, and thank you for pointing me to this issue...
#
Loqi
KartikPrabhu has 54 karma
#
kylewm
also showing off my new cedille https://kylewm.com/share/2014/08/09/1
snarfed joined the channel
#
tantek
nicely done kylewm! also - I noticed your <action> tags on your webaction links! Add yourself: http://indiewebcamp.com/webactions#IndieWeb_Examples
#
tantek
(how long have you had those?)
#
kylewm
looks like since May 15, though i lost them for a while when i changed styles
#
tantek.com
edited /repost (+174) "/* Kyle Mahan */ note repost of an indieweb post as well as POSSE native retweet of the respective POSSE tweet"
(view diff)
#
tantek
nicely done with your (presumably automatic) POSSE native retweet of a POSSE tewet!
#
kylewm.com
edited /webactions (+309) "/* IndieWeb Examples */ added me"
(view diff)
#
kylewm
tantek: thanks!! that is one of my favorite things, feels like magic. we just added a similar feature to bridgy
#
tantek
yeah! whenever any of this stuff just "clicks" with existing systems it definitely feels like magic
#
tantek
hence if/when we get federated editing of MediaWiki working, that's going to look surreal to folks
#
tantek
nevermind if we actually get Wikipedia to accept federated edits!
scor, krendil, Acidnerd, brianloveswords, mdik, snarfed, paulcp, jacus and tantek joined the channel
#
tantek
!tell kylewm,KartikPrabhu fixed tantek.com post permalinks to return Content-Type: text/html
#
tantek
charset=UTF-8
#
Loqi
Ok, I'll tell them that when I see them next
bret joined the channel
#
Loqi
KartikPrabhu: tantek left you a message 9 minutes ago: fixed tantek.com post permalinks to return Content-Type: text/html
KevinMarks2, alanpearce, alanpear_ and wolftune joined the channel
#
@kyle_wm
forget the Read Write Web, I want the Read Write Read Write Up Up Down Down B A Start Web #indieweb
(twitter.com/_/status/497996692931620865)
squeakytoy, petermolnar and eschnou joined the channel
#
@jkphl
Very much looking forward to my extended #Brighton stay in Sept. — @reasonsto, @dconstruct & my 1st #IndieWebCamp! Who else will be there?
(twitter.com/_/status/498022364408721408)
#
@reasonsto
RT @jkphl: Very much looking forward to my extended #Brighton stay in Sept. — @reasonsto, @dconstruct & my 1st #IndieWebCamp! Who else will…
(twitter.com/_/status/498025905466671106)
Pierre-O, scor, eschnou, Acidnerd and ShaneHudson joined the channel
#
@webrocker
@pixelbande @andreasisaak > die dikussionseinbindung per externen service wie discuss ist halt auch son bissi gegen das ownyourdata ding…
(twitter.com/_/status/498085146801995776)
jschweinsberg joined the channel
#
@pixelbande
@bastianallgeier haste dir schonmal @nemex_io angesehen? macht echt Spaß damit rumzuspielen, ist ein bisschen “kirby light” ;) #ownyourdata
(twitter.com/_/status/498095144089174017)
Pierre-O, eschnou, chrissaad, ShaneHudson, wolftune, brianloveswords, alanpearce, irdan, pauloppenheim1, paulcp, scor and indie-visitor joined the channel
#
Loqi
Welcome, indie-visitor! Set your nickname by typing /nick yourname
bnvk and eschnou joined the channel
#
bret.io
edited /videos_about_the_indieweb (+156) "/* 2014 */ Added Jeremy Keith's video at ITS"
(view diff)
#
bret
good video btw!
#
bnvk
link?
#
bret
also in that wiki edit
#
bnvk
oh yah
#
bnvk
was a cool talk in person
#
bret
bnvk did you talk?
#
bret
:( no video yet
#
bnvk
mine should be up at some point- I was later in the day and he seems to be posting linearly
#
bnvk
can't tell if amazing or gonna flop http://emoj.li/
#
bnvk
I have no idea what sort of "emoji only" username to pick
#
bret
your emoji name must tell a story
#
bnvk
true
#
bnvk
oh being trolled by non dogfooding dencetralization fascists… the joys
alanpearce, wolftune and squeakytoy joined the channel
#
bret
bnvk ?
snarfed, alanpearce and Kopfstein joined the channel
KevinMarks2, snarfed, grantmacken and scor joined the channel
#
Loqi
kylewm: tantek left you a message on 8/8 at 10:06pm: fixed tantek.com post permalinks to return Content-Type: text/html
#
kylewm
nice!
alanpearce, techlifeweb, paulcp, brianloveswords, snarfed, alanpear_ and scor joined the channel
#
snarfed
bnvk: re the trolling, were they on their own domain? or a tumblr.com subdomain?
#
snarfed
may regret asking
Acidnerd, fourtonfish, paulcp and techlifeweb joined the channel
#
techlifeweb
snarfed: dose bridgy pick up if my tweet containging a link is retweeted? Original tweet was posted by jetpack Publish.
wolftune and paulcp joined the channel
#
snarfed
techlifewebAway: yup, it should
#
snarfed
techlifeweb: do you see it on https://www.brid.gy/twitter/techlifeweb ?
#
techlifeweb
ah ha! sorry, figured it out. The one is didn''t see looks like it was reposted by a private account.
#
techlifeweb
I didn't realize he had his tweets hidden.
#
techlifeweb
snarfed: tried favoriting, retweeting and replying via a different accout and it's all good.