Skip to content

Instantly share code, notes, and snippets.

@donpdonp
Last active June 28, 2018 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donpdonp/e0b9e36b811f95c6607008dde9d00caa to your computer and use it in GitHub Desktop.
Save donpdonp/e0b9e36b811f95c6607008dde9d00caa to your computer and use it in GitHub Desktop.
#!/usr/bin/env php
<?php
include('vendor/autoload.php');
$xray = new p3k\XRay();
$parsed = $xray->parse($argv[1]);
print(json_encode($parsed, JSON_PRETTY_PRINT))
?>
$ ./xray https://donp.org/blog/2018/06/25/indiewebcamp-2018
{
"data": {
"type": "entry",
"published": "2018-06-25 09:57:06 -0700",
"rsvp": "yes",
"in-reply-to": [
"https:\/\/2018.indieweb.org\/"
],
"name": "IndieWebCamp 2018",
"content": {
"text": "Yes, I will be attending IndieWebCamp 2018\n\nHere's how to do an RSVP in HTML.\n\n\n\n<span class=\"p-rsvp\">Yes<\/span>, I will be attending <a href=\"https:\/\/2018.indieweb.org\/\" class=\"u-in-reply-to\">IndieWebCamp 2018<\/a>\n\n\n\nimpressions:\n\nh-entry needs a p-author inside and not in context of the website?\nno docs: only p-author reference according to google is the h-event page\nwhy h-things p-things and u-things?",
"html": "<p>Yes, I will be attending <a href=\"https:\/\/2018.indieweb.org\/\" class=\"u-in-reply-to\">IndieWebCamp 2018<\/a><\/p>\n\n<p>Here's how to do an RSVP in HTML.<\/p>\n\n<pre>\n<code>\n&lt;span class=\"p-rsvp\"&gt;Yes&lt;\/span&gt;, I will be attending &lt;a href=\"https:\/\/2018.indieweb.org\/\" class=\"u-in-reply-to\"&gt;IndieWebCamp 2018&lt;\/a&gt;\n<\/code>\n<\/pre>\n\n<p>impressions:<\/p>\n\n<ul><li>h-entry needs a p-author inside and not in context of the website?<\/li>\n<li>no docs: only p-author reference according to google is the h-event page<\/li>\n<li>why h-things p-things and u-things?<\/li>\n<\/ul>"
},
"author": {
"type": "card",
"name": "Don Park",
"url": "https:\/\/donp.org",
"photo": "https:\/\/en.gravatar.com\/userimage\/3240117\/2383955e328bce58cf2f8c5f40c10ecc.jpg?size=50"
}
},
"url": "https:\/\/donp.org\/blog\/2018\/06\/25\/indiewebcamp-2018",
"code": 200
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment