Browse Source

rename to X-Ray

pull/39/head
Aaron Parecki 8 years ago
parent
commit
e9bc4bf450
6 changed files with 47 additions and 17 deletions
  1. +7
    -7
      README.md
  2. +1
    -1
      controllers/Main.php
  3. +1
    -1
      controllers/Parse.php
  4. +2
    -2
      lib/Formats/Mf2.php
  5. +31
    -2
      views/index.php
  6. +5
    -4
      views/layout.php

+ 7
- 7
README.md View File

@ -1,15 +1,15 @@
Percolator
==========
XRay
====
## Discovering Content ## Discovering Content
The contents of the URL is checked in the following order: The contents of the URL is checked in the following order:
* A supported silo URL
* A supported silo URL (coming soon)
* h-entry, h-event, h-card * h-entry, h-event, h-card
* OEmbed
* OGP
* OEmbed (coming soon)
* OGP (coming soon)
## API ## API
@ -20,7 +20,7 @@ To parse a page and return structured data for the contents of the page, simply
GET /parse?url=https://aaronparecki.com/2016/01/16/11/ GET /parse?url=https://aaronparecki.com/2016/01/16/11/
``` ```
To conditionally parse the page after first checking if it contains a link to a target URL, also include the target URL as a parameter. This is useful if using Percolator to verify an incoming webmention.
To conditionally parse the page after first checking if it contains a link to a target URL, also include the target URL as a parameter. This is useful if using XRay to verify an incoming webmention.
``` ```
GET /parse?url=https://aaronparecki.com/2016/01/16/11/&target=http://poetica.com GET /parse?url=https://aaronparecki.com/2016/01/16/11/&target=http://poetica.com
@ -88,7 +88,7 @@ The author will always be set in the entry if available. The service follows the
All URLs provided in the output are absolute URLs. If the source document contains a relative URL, it will be resolved first. All URLs provided in the output are absolute URLs. If the source document contains a relative URL, it will be resolved first.
Replies, likes, reposts, etc. of this post will be included if they are listed on the page.
In a future version, replies, likes, reposts, etc. of this post will be included if they are listed on the page.
```json ```json
{ {

+ 1
- 1
controllers/Main.php View File

@ -6,7 +6,7 @@ class Main {
public function index(Request $request, Response $response) { public function index(Request $request, Response $response) {
$response->setContent(view('index', [ $response->setContent(view('index', [
'title' => 'Percolator'
'title' => 'X-Ray'
])); ]));
return $response; return $response;
} }

+ 1
- 1
controllers/Parse.php View File

@ -2,7 +2,7 @@
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Percolator\Formats;
use XRay\Formats;
class Parse { class Parse {

+ 2
- 2
lib/Formats/Mf2.php View File

@ -1,5 +1,5 @@
<?php <?php
namespace Percolator\Formats;
namespace XRay\Formats;
class Mf2 { class Mf2 {
@ -225,7 +225,7 @@ class Mf2 {
} }
} }
return $author; return $author;
} }

+ 31
- 2
views/index.php View File

@ -1,5 +1,34 @@
<?php $this->layout('layout', ['title' => $title]); ?> <?php $this->layout('layout', ['title' => $title]); ?>
<div id="header">
<h1>Percolator</h1>
<div class="ui middle aligned center aligned grid">
<div class="column">
<form class="ui large form">
<div class="ui stacked segment">
<div class="field">
<div class="ui left icon input">
<i class="linkify icon"></i>
<input type="text" name="url" placeholder="http://example.com">
</div>
</div>
<div class="ui fluid large teal submit button">Go</div>
</div>
</form>
</div>
</div> </div>
<style type="text/css">
body {
background-color: #e9e9e9;
}
body > .grid {
height: 100%;
}
.image {
margin-top: -100px;
}
.column {
max-width: 450px;
}
</style>

+ 5
- 4
views/layout.php View File

@ -1,6 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8">
<title><?= $this->e($title) ?></title> <title><?= $this->e($title) ?></title>
<link href="/assets/style.css" rel="stylesheet"> <link href="/assets/style.css" rel="stylesheet">
<link href="/semantic-ui/semantic.min.css" rel="stylesheet"> <link href="/semantic-ui/semantic.min.css" rel="stylesheet">
@ -11,13 +12,13 @@
</head> </head>
<body> <body>
<div id="page-content">
<?= $this->section('content') ?>
</div>
<?= $this->section('content') ?>
<!--
<footer> <footer>
<a href="https://indiewebcamp.com/Percolator">What is Percolator?</a>
<a href="https://indiewebcamp.com/X-Ray">What is X-Ray?</a>
</footer> </footer>
-->
</body> </body>
</html> </html>

Loading…
Cancel
Save