Testing, testing,
h1. Add webmention client code to Junco h2. Dvlp to-dos (3oct2013) * if webmention posted manually with the form, then return to user as happens now by displaying the page of replies. * if webmention posted programmatically, then return status codes. * "If the WebMention request was successful, the server MUST reply with an HTTP 202 Accepted" - http://webmention.org ** return JSON responses: *** "result": "WebMention was successful" *** "error": "no_link_found", *** "error_description": "The source URI does not contain a link to the target URI" * "WebMention receivers SHOULD moderate WebMentions, and if a link is displayed back to the source, SHOULD link to source with *rel="nofollow"* to prevent spam." - http://webmention.org * investigate "indieweb comments":http://jothut.com/cgi-bin/junco.pl/blogpost/4135/Add-webmention-client-code-to-Junco#Reply-To---Comments ** why comments and webmentions? * [X] same source post URL can be posted only once to the target. * [X] create new get_blog_post subroutine check for target. * [X] webmentions can only be posted when the blog post contains the blog_username tag. * [X] add the webmention=no command to disable the option for a blog post. * [X] currently, webmentions will remain unavailable for microblog posts. * [X] look for the e-content microformat property on html5 section tag. h2. Microformats using: http://search.cpan.org/~gaas/HTML-Parser-3.71/lib/HTML/TokeParser.pm https://eschnou.com/entry/testing-indieweb-federation-with-waterpigscouk-aaronpareckicom-and--62-24908.html To get a webmention (source) reply post to appear at the target website, wrap the source post with an h-entry microformat code.
Published by W. Developer on
In which I extoll the virtues of using microformats.
Blah blah blah
Testing, testing,
class="u-in-reply-to"
on the target URL when it's included in my source (reply) post.
When a microblog (note) or blog post (article) is created in Junco, the app would search for class="u-in-reply-to"
within anchor tags, which would be targets. If found, then Junco would do a "get" on that target URL, read through the HTML, and search meta tag for a webmention URL program.
If the target has a webmention program, then Junco would send a POST request to that target's webmention program. The POST params would include URLs for target (the post that I'm replying to) and source (my reply post).
Once the POST request has been made, the target webmention app would return a status code, so that Junco can determine if success or failure or something else. Doesn't matter too much, since the source post still gets posted within the Junco app.
The target code would process the Junco post request, and add my source (reply) post to the thread or comment section of the target post. And if my source post contained h-entry and e-content info, then it's possible that some or all of my post would appear in the target's comment section.
A lot depends upon how the target app processes a webmention. Maybe after the Junco post request, and the target app has verified my source post, then my source post would go into a moderation queue and would not appear immediately in the comments section of the target page.
The target app may only display the source URL in the target's comment section and ignore the source's h-entry info.
The target may only display a snippet of the source's h-entry info, which is what I'm doing within the Junco app when the Junco app is receiving a webmention POST request (the Junco app is the target.)
If the target system does not supported automated webmentions (the target does not contain the webmentioni app in the meta tag), then maybe the target page contains the HTML form to allow a user to submit manually the source URL, which is what I'm doing now within Junco as of Oct 3, 2013.
Plus maybe the source software does not support auotmated webmentions. The source system may not scan its own source posts for links with the u-in-reply-to in order to send a POST request to the target. This is the current status for Junco as of Oct 3, 2013.
I'd like to automate Junco to send and receive webmention POST requests.
And I want to continue to supply the HTML form for manually submitting a webmention to a post within Junco.
If Junco was automated to make webmentions to the target, then the source post would include the target's URL, of course. For blog source posts, it would be easy to add the "in-reply-to" to the target's URL. For microblog source posts, I would need to add a new feature:
bq. in-reply-to:http://jothut.com/cgi-bin/d16augjunco.pl/blogpost/19
The Junco code would convert the URL to a link with the in-reply-to for the formatted markup. The link would be clickable when the displayed in Junco. And then Junco would automate the webmention POST to the target per above.
To keep it simple, I could also use the above proposed feature in blog posts too, but if I did not want to display the entire URL but only some link text, then the anchor tag or the Textile or Markdown anchor markup would contain the class="u-in-reply-to"
that I would add manually.
#junco - #juncotodo - #indieweb - #comments