Date: Sat, 1 Sep 2018 18:43:35 +0100
Subject: [PATCH 19/92] Update logic when accessing next element
---
src/Nodes/NodeUtility.php | 4 ++--
src/Readability.php | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Nodes/NodeUtility.php b/src/Nodes/NodeUtility.php
index bb638287..b5f66ba0 100644
--- a/src/Nodes/NodeUtility.php
+++ b/src/Nodes/NodeUtility.php
@@ -45,8 +45,8 @@ public static function nextElement($node)
{
$next = $node;
while ($next
- && $next->nodeName !== '#text'
- && trim($next->textContent)) {
+ && $next->nodeType !== XML_ELEMENT_NODE
+ && preg_match(NodeUtility::$regexps['whitespace'], $next->textContent)) {
$next = $next->nextSibling;
}
diff --git a/src/Readability.php b/src/Readability.php
index c7c3d503..3f4d8073 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -447,7 +447,7 @@ private function getArticleTitle()
return null;
}
- $curTitle = $originalTitle;
+ $curTitle = trim($originalTitle);
$titleHadHierarchicalSeparators = false;
/*
@@ -825,7 +825,7 @@ private function prepDocument(DOMDocument $dom)
while ($next) {
// If we've hit another , we're done adding children to this .
if ($next->nodeName === 'br') {
- $nextElem = NodeUtility::nextElement($next);
+ $nextElem = NodeUtility::nextElement($next->nextSibling);
if ($nextElem && $nextElem->nodeName === 'br') {
break;
}
From d8471fc68e363ac884591cf9ab9e334773f97cae Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sat, 1 Sep 2018 20:50:25 +0100
Subject: [PATCH 20/92] Import the isPhrasingContent function. Might want to
check the recursive loop there if it's actually doing what it should and if
there's a better way to optimize it
---
src/Nodes/NodeTrait.php | 32 ++++++++++++++++++++++++++++++++
src/Readability.php | 4 ++++
2 files changed, 36 insertions(+)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index 13611c9e..9f24abc0 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -50,6 +50,21 @@ trait NodeTrait
'select',
];
+ /**
+ * The commented out elements qualify as phrasing content but tend to be
+ * removed by readability when put into paragraphs, so we ignore them here.
+ *
+ * @var array
+ */
+ private $phrasing_elems = [
+ // 'CANVAS', 'IFRAME', 'SVG', 'VIDEO',
+ 'abbr', 'audio', 'b', 'bdo', 'br', 'button', 'cite', 'code', 'data',
+ 'datalist', 'dfn', 'em', 'embed', 'i', 'img', 'input', 'kbd', 'label',
+ 'mark', 'math', 'meter', 'noscript', 'object', 'output', 'progress', 'q',
+ 'ruby', 'samp', 'script', 'select', 'small', 'span', 'strong', 'sub',
+ 'sup', 'textarea', 'time', 'var', 'wbr'
+ ];
+
/**
* initialized getter.
*
@@ -431,4 +446,21 @@ public function isElementWithoutContent()
);
}
+
+ /**
+ * Determine if a node qualifies as phrasing content.
+ * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content
+ *
+ * @return bool
+ */
+ public function isPhrasingContent()
+ {
+ return $this->nodeType === XML_TEXT_NODE || !in_array($this->tagName, $this->phrasing_elems) ||
+ (!is_null($this->childNodes) &&
+ ($this->tagName === 'a' || $this->tagName === 'del' || $this->tagName === 'ins') &&
+ array_reduce(iterator_to_array($this->childNodes), function ($carry, $node) {
+ return $carry || $node->isPhrasingContent();
+ })
+ );
+ }
}
diff --git a/src/Readability.php b/src/Readability.php
index 3f4d8073..e0c9abf0 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -831,6 +831,10 @@ private function prepDocument(DOMDocument $dom)
}
}
+ if ($next->isPhrasingContent()) {
+ break;
+ }
+
$this->logger->debug('[PrepDocument] Replacing BR with a P node...');
// Otherwise, make this node a child of the new .
From ef57e870f9cfd1bec25028abd2c1e9dcb6a99126 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sat, 1 Sep 2018 23:56:09 +0100
Subject: [PATCH 21/92] Avoid nesting paragraphs
---
src/Readability.php | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/Readability.php b/src/Readability.php
index e0c9abf0..323cdc24 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -842,6 +842,14 @@ private function prepDocument(DOMDocument $dom)
$p->appendChild($next);
$next = $sibling;
}
+
+ while ($p->lastChild && preg_match(NodeUtility::$regexps['whitespace'], $p->lastChild->textContent)) {
+ $p->parentNode->removeChild($p->lastChild);
+ }
+
+ if ($p->parentNode->tagName === "p") {
+ NodeUtility::setNodeTag($p->parentNode, 'div');
+ }
}
}
From 473a5b2fb98b962428bc5a892784e214e62b69cd Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 2 Sep 2018 10:15:34 +0100
Subject: [PATCH 22/92] Rename hasSinglePNode to hasSingleTagInsideElement and
accept tag as parameter
---
src/Nodes/NodeTrait.php | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index 9f24abc0..4e545665 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -375,26 +375,26 @@ public function hasAncestorTag($node, $tagName, $maxDepth = 3)
* Useful to convert nodes to a single
node and avoid confusing the scoring system since div with p
* tags are, in practice, paragraphs.
*
- * @param DOMNode $node
+ * @param $tag string Name of tag
*
* @return bool
*/
- public function hasSinglePNode()
+ public function hasSingleTagInsideElement($tag)
{
- // There should be exactly 1 element child which is a P:
- if (count($children = $this->getChildren(true)) !== 1 || $children[0]->nodeName !== 'p') {
+ // There should be exactly 1 element child with given tag
+ if (count($children = $this->getChildren(true)) !== 1 || $children[0]->nodeName !== $tag) {
return false;
}
- // And there should be no text nodes with real content (param true on ->getChildren)
- foreach ($children as $child) {
- /** @var $child DOMNode */
- if ($child->nodeType === XML_TEXT_NODE && !preg_match('/\S$/', $child->getTextContent())) {
+ // And there should be no text nodes with real content
+ return array_reduce($children, function ($carry, $child) {
+ if (!$carry === false) {
return false;
}
- }
- return true;
+ /** @var $child DOMNode */
+ return !($child->nodeType === XML_TEXT_NODE && !preg_match('/\S$/', $child->getTextContent()));
+ });
}
/**
From 7a3993d6e5aa41467bd9b09e4dff3966f3e673b7 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 2 Sep 2018 20:34:31 +0100
Subject: [PATCH 23/92] Remove single cell tables
---
src/Readability.php | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/Readability.php b/src/Readability.php
index 323cdc24..aadd6310 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -671,7 +671,7 @@ private function getNodes($node)
* safely converted into plain P elements to avoid confusing the scoring
* algorithm with DIVs with are, in practice, paragraphs.
*/
- if ($node->hasSinglePNode()) {
+ if ($node->hasSingleTagInsideElement('p')) {
$this->logger->debug(sprintf('[Get Nodes] Found DIV with a single P node, removing DIV. Node content is: \'%s\'', substr($node->nodeValue, 0, 128)));
$pNode = $node->getChildren(true)[0];
$node->parentNode->replaceChild($pNode, $node);
@@ -1237,6 +1237,23 @@ public function prepArticle(DOMDocument $article)
}
}
+ // Remove single-cell tables
+ foreach (iterator_to_array($article->getElementsByTagName('table')) as $table) {
+ /** @var DOMNode $table */
+ $tbody = $table->hasSingleTagInsideElement('tbody') ? $table->childNodes[0] : $table;
+ if ($tbody->hasSingleTagInsideElement('tr')) {
+ $row = $tbody->childNodes[0];
+ if ($row->hasSingleTagInsideElement('td')) {
+ $cell = $row->childNodes[0];
+ $cell = NodeUtility::setNodeTag($cell, (array_reduce(iterator_to_array($this->childNodes), function ($carry, $node) {
+ return $carry || $node->isPhrasingContent();
+ })) ? 'p' : 'div');
+ $table->parentNode->replaceChild($cell, $table);
+ }
+ }
+
+ }
+
return $article;
}
From 41c0328fd6253e57f0e4cd1607e8c489826fe6a4 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 2 Sep 2018 20:34:54 +0100
Subject: [PATCH 24/92] Remove DOMComments before anything else
---
src/Readability.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Readability.php b/src/Readability.php
index aadd6310..2cad398a 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -617,8 +617,6 @@ private function getNodes($node)
*/
while ($node) {
- $matchString = $node->getAttribute('class') . ' ' . $node->getAttribute('id');
-
// Remove DOMComments nodes as we don't need them and mess up children counting
if ($node->nodeType === XML_COMMENT_NODE) {
$this->logger->debug(sprintf('[Get Nodes] Found comment node, removing... Node content was: \'%s\'', substr($node->nodeValue, 0, 128)));
@@ -626,6 +624,8 @@ private function getNodes($node)
continue;
}
+ $matchString = $node->getAttribute('class') . ' ' . $node->getAttribute('id');
+
// Check to see if this node is a byline, and remove it if it is.
if ($this->checkByline($node, $matchString)) {
$this->logger->debug(sprintf('[Get Nodes] Found byline, removing... Node content was: \'%s\'', substr($node->nodeValue, 0, 128)));
From 84dcd2b1c8907e2e102ad05f8142e3d3b1ab3ede Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 2 Sep 2018 20:39:52 +0100
Subject: [PATCH 25/92] Add isProbablyVisible function
---
src/Nodes/NodeTrait.php | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index 4e545665..9f878ce6 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -463,4 +463,16 @@ public function isPhrasingContent()
})
);
}
+
+ public function isProbablyVisible()
+ {
+ /*
+ * In the original JS project they check if the node has the style display=none, which unfortunately
+ * in our case we have no way of knowing that. So we just check for the attribute hidden.
+ *
+ * Might be a good idea to check for classes or other attributes like 'aria-hidden'
+ */
+
+ return !$this->hasAttribute('hidden');
+ }
}
From 18b61354ce2d0c2133b82b54254a9239ec5a5fe1 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 2 Sep 2018 20:41:39 +0100
Subject: [PATCH 26/92] Check for visible nodes before parsing
---
src/Readability.php | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/Readability.php b/src/Readability.php
index 2cad398a..f913d807 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -626,6 +626,12 @@ private function getNodes($node)
$matchString = $node->getAttribute('class') . ' ' . $node->getAttribute('id');
+ if (!$node->isProbablyVisible()) {
+ $this->logger->debug(sprintf('[Get Nodes] Removing hidden node... Match string was: \'%s\'', $matchString));
+ $node = NodeUtility::removeAndGetNext($node);
+ continue;
+ }
+
// Check to see if this node is a byline, and remove it if it is.
if ($this->checkByline($node, $matchString)) {
$this->logger->debug(sprintf('[Get Nodes] Found byline, removing... Node content was: \'%s\'', substr($node->nodeValue, 0, 128)));
From f2db151e599f699ee432fcadf4ae872426202dea Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 2 Sep 2018 20:51:42 +0100
Subject: [PATCH 27/92] Add hasAttribute override
---
src/Nodes/DOM/DOMNode.php | 1 +
src/Nodes/NodeTrait.php | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/src/Nodes/DOM/DOMNode.php b/src/Nodes/DOM/DOMNode.php
index f1944c44..7c3c4f3a 100644
--- a/src/Nodes/DOM/DOMNode.php
+++ b/src/Nodes/DOM/DOMNode.php
@@ -6,6 +6,7 @@
/**
* @method getAttribute($attribute)
+ * @method hasAttribute($attribute)
*/
class DOMNode extends \DOMNode
{
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index 9f878ce6..b4ca746f 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -163,6 +163,24 @@ public function getAttribute($attributeName)
return '';
}
+ /**
+ * Override for native hasAttribute
+ *
+ * @see getAttribute
+ *
+ * @param $attributeName
+ *
+ * @return bool
+ */
+ public function hasAttribute($attributeName)
+ {
+ if (!is_null($this->attributes)) {
+ return parent::hasAttribute($attributeName);
+ }
+
+ return false;
+ }
+
/**
* Get the ancestors of the current node.
*
From 14871f80669d3f299407ce4d0e35e67fa90bc1a5 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Wed, 5 Sep 2018 21:21:11 +0100
Subject: [PATCH 28/92] Update initial parsing and add isWhitespace trait
function.
---
src/Nodes/NodeTrait.php | 10 ++++++++--
src/Readability.php | 25 ++++++++++++++++++++++++-
2 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index b4ca746f..7661e153 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -473,9 +473,9 @@ public function isElementWithoutContent()
*/
public function isPhrasingContent()
{
- return $this->nodeType === XML_TEXT_NODE || !in_array($this->tagName, $this->phrasing_elems) ||
+ return $this->nodeType === XML_TEXT_NODE || !in_array($this->nodeName , $this->phrasing_elems) ||
(!is_null($this->childNodes) &&
- ($this->tagName === 'a' || $this->tagName === 'del' || $this->tagName === 'ins') &&
+ ($this->nodeName === 'a' || $this->nodeName === 'del' || $this->nodeName === 'ins') &&
array_reduce(iterator_to_array($this->childNodes), function ($carry, $node) {
return $carry || $node->isPhrasingContent();
})
@@ -493,4 +493,10 @@ public function isProbablyVisible()
return !$this->hasAttribute('hidden');
}
+
+ public function isWhitespace()
+ {
+ return ($this->nodeType === XML_TEXT_NODE && mb_strlen(trim($this->textContent)) === 0) ||
+ ($this->nodeType === XML_ELEMENT_NODE && $this->nodeName === 'br');
+ }
}
diff --git a/src/Readability.php b/src/Readability.php
index f913d807..3e168fe6 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -671,13 +671,36 @@ private function getNodes($node)
// Turn all divs that don't have children block level elements into p's
if ($node->nodeName === 'div') {
+ // Put phrasing content into paragraphs.
+ $p = null;
+ $childNode = $node->firstChild;
+ while ($childNode) {
+ $nextSibling = $childNode->nextSibling;
+ if ($childNode->isPhrasingContent()) {
+ if ($p !== null) {
+ $p->appendChild($childNode);
+ } else if (!$childNode->isWhitespace()) {
+ $p = $this->dom->createElement('p');
+ $node->replaceChild($p, $childNode);
+ $p->appendChild($childNode);
+ }
+ } else if ($p !== null) {
+ while ($p->lastChild && $p->lastChild->isWhitespace()) {
+ $p->removeChild($p->lastChild);
+ }
+ $p = null;
+ }
+ $childNode = $nextSibling;
+ }
+
+
/*
* Sites like http://mobile.slate.com encloses each paragraph with a DIV
* element. DIVs with only a P element inside and no text content can be
* safely converted into plain P elements to avoid confusing the scoring
* algorithm with DIVs with are, in practice, paragraphs.
*/
- if ($node->hasSingleTagInsideElement('p')) {
+ if ($node->hasSingleTagInsideElement('p') && $node->getLinkDensity() < 0.25) {
$this->logger->debug(sprintf('[Get Nodes] Found DIV with a single P node, removing DIV. Node content is: \'%s\'', substr($node->nodeValue, 0, 128)));
$pNode = $node->getChildren(true)[0];
$node->parentNode->replaceChild($pNode, $node);
From 83b890f20b16993daa453c6bac2d7c0d5057b5e1 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Wed, 5 Sep 2018 21:23:11 +0100
Subject: [PATCH 29/92] Remove experimental if
---
src/Readability.php | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/Readability.php b/src/Readability.php
index 3e168fe6..debdcd5e 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -710,16 +710,6 @@ private function getNodes($node)
$this->logger->debug(sprintf('[Get Nodes] Found DIV with a single child block element, converting to a P node. Node content is: \'%s\'', substr($node->nodeValue, 0, 128)));
$node = NodeUtility::setNodeTag($node, 'p');
$elementsToScore[] = $node;
- } else {
- // EXPERIMENTAL
- foreach ($node->getChildren() as $child) {
- /** @var $child DOMNode */
- if ($child->nodeType === XML_TEXT_NODE && mb_strlen(trim($child->getTextContent())) > 0) {
- $this->logger->debug(sprintf('[Get Nodes] Found DIV a text node inside, converting to a P node. Node content is: \'%s\'', substr($node->nodeValue, 0, 128)));
- $newNode = $node->createNode($child, 'p');
- $child->parentNode->replaceChild($newNode, $child);
- }
- }
}
}
From 6f7492a946860b2ff85cea707ccc873b79614234 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Tue, 11 Sep 2018 23:37:38 +0100
Subject: [PATCH 30/92] Import new metadata search "algorithm"
---
src/Readability.php | 109 +++++++++++++++++++++++---------------------
1 file changed, 57 insertions(+), 52 deletions(-)
diff --git a/src/Readability.php b/src/Readability.php
index debdcd5e..d44052d5 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -286,77 +286,82 @@ private function getMetadata()
$this->logger->debug('[Metadata] Retrieving metadata...');
$values = [];
- // Match "description", or Twitter's "twitter:description" (Cards)
- // in name attribute.
- $namePattern = '/^\s*((twitter)\s*:\s*)?(description|title|image)\s*$/i';
+ // property is a space-separated list of values
+ $propertyPattern = '/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title)\s*/i';
- // Match Facebook's Open Graph title & description properties.
- $propertyPattern = '/^\s*og\s*:\s*(description|title|image)\s*$/i';
+ // name is a single value
+ $namePattern = '/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title)\s*$/i';
+ // Find description tags.
foreach ($this->dom->getElementsByTagName('meta') as $meta) {
/* @var DOMNode $meta */
$elementName = $meta->getAttribute('name');
$elementProperty = $meta->getAttribute('property');
+ $content = $meta->getAttribute('content');
+ $matches = null;
+ $name = null;
- if (in_array('author', [$elementName, $elementProperty])) {
- $this->logger->info(sprintf('[Metadata] Found author: \'%s\'', $meta->getAttribute('content')));
- $this->setAuthor($meta->getAttribute('content'));
- continue;
+ if ($elementProperty) {
+ if (preg_match($propertyPattern, $elementProperty, $matches)) {
+ for ($i = count($matches) - 1; $i >= 0; $i--) {
+ // Convert to lowercase, and remove any whitespace
+ // so we can match below.
+ $name = preg_replace('/\s/', '', mb_strtolower($matches[$i]));
+ // multiple authors
+ $values[$name] = trim($content);
+ }
+ }
}
- $name = null;
- if (preg_match($namePattern, $elementName)) {
+ if (!$matches && $elementName && preg_match($namePattern, $elementName)) {
$name = $elementName;
- } elseif (preg_match($propertyPattern, $elementProperty)) {
- $name = $elementProperty;
- }
-
- if ($name) {
- $content = $meta->getAttribute('content');
if ($content) {
- // Convert to lowercase and remove any whitespace
- // so we can match below.
- $name = preg_replace('/\s/', '', strtolower($name));
+ // Convert to lowercase, remove any whitespace, and convert dots
+ // to colons so we can match below.
+ $name = preg_replace(['/\s/', '/\./'], ['', ':'], mb_strtolower($name));
$values[$name] = trim($content);
}
}
}
- if (array_key_exists('description', $values)) {
- $this->logger->info(sprintf('[Metadata] Found excerpt in \'description\' tag: \'%s\'', $values['description']));
- $this->setExcerpt($values['description']);
- } elseif (array_key_exists('og:description', $values)) {
- // Use facebook open graph description.
- $this->logger->info(sprintf('[Metadata] Found excerpt in \'og:description\' tag: \'%s\'', $values['og:description']));
- $this->setExcerpt($values['og:description']);
- } elseif (array_key_exists('twitter:description', $values)) {
- // Use twitter cards description.
- $this->logger->info(sprintf('[Metadata] Found excerpt in \'twitter:description\' tag: \'%s\'', $values['twitter:description']));
- $this->setExcerpt($values['twitter:description']);
- }
- $this->setTitle($this->getArticleTitle());
+ // get title
+ $this->setTitle(current(array_intersect_key($values, array_flip([
+ 'dc:title',
+ 'dcterm:title',
+ 'og:title',
+ 'weibo:article:title',
+ 'weibo:webpage:title',
+ 'title',
+ 'twitter:title'
+ ]))));
if (!$this->getTitle()) {
- if (array_key_exists('og:title', $values)) {
- // Use facebook open graph title.
- $this->logger->info(sprintf('[Metadata] Found title in \'og:title\' tag: \'%s\'', $values['og:title']));
- $this->setTitle($values['og:title']);
- } elseif (array_key_exists('twitter:title', $values)) {
- // Use twitter cards title.
- $this->logger->info(sprintf('[Metadata] Found title in \'twitter:title\' tag: \'%s\'', $values['twitter:title']));
- $this->setTitle($values['twitter:title']);
- }
+ $this->setTitle($this->getArticleTitle());
}
- if (array_key_exists('og:image', $values) || array_key_exists('twitter:image', $values)) {
- if (array_key_exists('og:image', $values)) {
- $this->logger->info(sprintf('[Metadata] Found main image in \'og:image\' tag: \'%s\'', $values['og:image']));
- $this->setImage($values['og:image']);
- } else {
- $this->logger->info(sprintf('[Metadata] Found main image in \'twitter:image\' tag: \'%s\'', $values['twitter:image']));
- $this->setImage($values['twitter:image']);
- }
- }
+ // get author
+ $this->setAuthor(current(array_intersect_key($values, array_flip([
+ 'dc:creator',
+ 'dcterm:creator',
+ 'author'
+ ]))));
+
+ // get description
+ $this->setExcerpt(current(array_intersect_key($values, array_flip([
+ 'dc:description',
+ 'dcterm:description',
+ 'og:description',
+ 'weibo:article:description',
+ 'weibo:webpage:description',
+ 'description',
+ 'twitter:description'
+ ]))));
+
+ // get main image
+ $this->setImage(current(array_intersect_key($values, array_flip([
+ 'og:image',
+ 'twitter:image'
+ ]))));
}
/**
@@ -1264,7 +1269,7 @@ public function prepArticle(DOMDocument $article)
$row = $tbody->childNodes[0];
if ($row->hasSingleTagInsideElement('td')) {
$cell = $row->childNodes[0];
- $cell = NodeUtility::setNodeTag($cell, (array_reduce(iterator_to_array($this->childNodes), function ($carry, $node) {
+ $cell = NodeUtility::setNodeTag($cell, (array_reduce(iterator_to_array($cell->childNodes), function ($carry, $node) {
return $carry || $node->isPhrasingContent();
})) ? 'p' : 'div');
$table->parentNode->replaceChild($cell, $table);
From 8bac6550009f575214330dc96af802a5767288c4 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Wed, 17 Oct 2018 18:52:02 +0100
Subject: [PATCH 31/92] Improve script node removing function
---
src/Readability.php | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/Readability.php b/src/Readability.php
index d44052d5..2f8b22ff 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -782,16 +782,10 @@ private function isValidByline($text)
*/
private function removeScripts(DOMDocument $dom)
{
- $toRemove = ['script', 'noscript'];
-
- foreach ($toRemove as $tag) {
- while ($script = $dom->getElementsByTagName($tag)) {
- if ($script->item(0)) {
- $script->item(0)->parentNode->removeChild($script->item(0));
- } else {
- break;
- }
- }
+ foreach (['script', 'noscript'] as $tag) {
+ $nodes = $dom->getElementsByTagName($tag);
+ foreach (iterator_to_array($nodes) as $node)
+ NodeUtility::removeNode($node);
}
}
From e62dfbd65f6e17440f8cedb7faef0ee256fca64a Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Wed, 17 Oct 2018 19:00:14 +0100
Subject: [PATCH 32/92] Update comment of hasSingleTagInsideElement
---
src/Nodes/NodeTrait.php | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index 7661e153..a140012a 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -389,9 +389,8 @@ public function hasAncestorTag($node, $tagName, $maxDepth = 3)
}
/**
- * Checks if the current node has a single child and if that child is a P node.
- * Useful to convert nodes to a single
node and avoid confusing the scoring system since div with p
- * tags are, in practice, paragraphs.
+ * Check if this node has only whitespace and a single element with given tag
+ * or if it contains no element with given tag or more than 1 element.
*
* @param $tag string Name of tag
*
From fd5f669768cab64a6c09476d3260422890b817ba Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 21 Oct 2018 19:32:43 +0100
Subject: [PATCH 33/92] Fix incorrect tagName check
---
src/Nodes/NodeTrait.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index a140012a..e811c125 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -472,7 +472,7 @@ public function isElementWithoutContent()
*/
public function isPhrasingContent()
{
- return $this->nodeType === XML_TEXT_NODE || !in_array($this->nodeName , $this->phrasing_elems) ||
+ return $this->nodeType === XML_TEXT_NODE || in_array($this->nodeName, $this->phrasing_elems) !== false ||
(!is_null($this->childNodes) &&
($this->nodeName === 'a' || $this->nodeName === 'del' || $this->nodeName === 'ins') &&
array_reduce(iterator_to_array($this->childNodes), function ($carry, $node) {
From 88d8b70cf6571651efd4cac11bf3b1e2848e3489 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Wed, 24 Oct 2018 19:42:20 +0100
Subject: [PATCH 34/92] Update test expectations
---
test/test-pages/002/expected.html | 496 +-
.../expected.html | 55 +-
.../base-url-base-element/expected.html | 55 +-
.../basic-tags-cleaning/expected.html | 3 +-
test/test-pages/bbc-1/expected-metadata.json | 4 +-
test/test-pages/blogger/expected.html | 168 +-
test/test-pages/breitbart/expected.html | 30 +-
test/test-pages/bug-1255978/expected.html | 97 +-
test/test-pages/buzzfeed-1/expected.html | 8 +-
test/test-pages/clean-links/expected.html | 1646 +---
.../test-pages/cnet-svg-classes/expected.html | 12 +-
test/test-pages/cnet/expected.html | 8 +-
test/test-pages/cnn/expected.html | 106 +-
.../test-pages/daringfireball-1/expected.html | 18 +-
test/test-pages/ehow-1/expected.html | 53 +-
test/test-pages/ehow-2/expected.html | 69 +-
test/test-pages/engadget/expected.html | 537 +-
test/test-pages/gmw/expected.html | 102 +-
test/test-pages/heise/expected.html | 10 +-
test/test-pages/herald-sun-1/expected.html | 9 +-
test/test-pages/herald-sun-1/source.html | 126 +-
.../hidden-nodes/expected-metadata.json | 4 +
test/test-pages/hidden-nodes/expected.html | 4 +
test/test-pages/hidden-nodes/source.html | 29 +
test/test-pages/hukumusume/expected.html | 73 +-
test/test-pages/hukumusume/source.html | 589 +-
test/test-pages/iab-1/expected-metadata.json | 2 +-
test/test-pages/iab-1/expected.html | 3 +-
test/test-pages/ietf-1/expected.html | 191 +-
test/test-pages/keep-images/expected.html | 575 +-
test/test-pages/la-nacion/expected.html | 4 +-
test/test-pages/lemonde-2/expected.html | 2 +-
test/test-pages/liberation-1/expected.html | 2 +-
test/test-pages/links-in-tables/expected.html | 352 +-
test/test-pages/lwn-1/expected.html | 48 +-
test/test-pages/medium-1/expected.html | 44 +-
test/test-pages/medium-2/expected.html | 2 +-
test/test-pages/medium-3/expected.html | 14 +-
test/test-pages/medium-3/source.html | 4 +-
.../missing-paragraphs/expected.html | 6 +-
test/test-pages/mozilla-1/expected.html | 41 +-
test/test-pages/mozilla-2/expected.html | 16 +-
test/test-pages/msn/expected.html | 2 +-
test/test-pages/nytimes-1/expected.html | 16 +-
test/test-pages/nytimes-2/expected.html | 26 +-
test/test-pages/pixnet/expected.html | 184 +-
test/test-pages/qq/expected-metadata.json | 5 +
test/test-pages/qq/expected.html | 35 +
test/test-pages/qq/source.html | 7280 +++++++++++++++++
.../test-pages/remove-extra-brs/expected.html | 27 +-
.../remove-extra-paragraphs/expected.html | 12 +-
.../remove-script-tags/expected.html | 2 +-
test/test-pages/replace-brs/expected.html | 18 +-
test/test-pages/replace-brs/source.html | 18 +-
.../replace-font-tags/expected.html | 3 +-
test/test-pages/rtl-1/source.html | 2 +-
test/test-pages/simplyfound-1/expected.html | 18 +-
test/test-pages/social-buttons/expected.html | 2 +-
.../table-style-attributes/expected.html | 105 +-
.../table-style-attributes/source.html | 2 +
test/test-pages/tmz-1/expected.html | 54 +-
test/test-pages/tumblr/expected.html | 8 +-
test/test-pages/wapo-1/expected.html | 37 +-
test/test-pages/wapo-2/expected.html | 17 +-
test/test-pages/webmd-1/expected.html | 16 +-
test/test-pages/webmd-2/expected.html | 21 +-
test/test-pages/wikipedia/expected.html | 70 +-
test/test-pages/wordpress/expected.html | 10 +-
test/test-pages/yahoo-1/expected.html | 6 +-
test/test-pages/yahoo-2/expected.html | 10 +-
test/test-pages/yahoo-3/expected.html | 23 +-
test/test-pages/yahoo-4/expected.html | 22 +-
72 files changed, 9670 insertions(+), 3998 deletions(-)
create mode 100644 test/test-pages/hidden-nodes/expected-metadata.json
create mode 100644 test/test-pages/hidden-nodes/expected.html
create mode 100644 test/test-pages/hidden-nodes/source.html
create mode 100644 test/test-pages/qq/expected-metadata.json
create mode 100644 test/test-pages/qq/expected.html
create mode 100644 test/test-pages/qq/source.html
diff --git a/test/test-pages/002/expected.html b/test/test-pages/002/expected.html
index 16dca2a0..e1290846 100644
--- a/test/test-pages/002/expected.html
+++ b/test/test-pages/002/expected.html
@@ -1,36 +1,21 @@
-For more than a decade the Web has used XMLHttpRequest (XHR) to achieve
- asynchronous requests in JavaScript. While very useful, XHR is not a very
- nice API. It suffers from lack of separation of concerns. The input, output
- and state are all managed by interacting with one object, and state is
- tracked using events. Also, the event-based model doesn’t play well with
- JavaScript’s recent focus on Promise- and generator-based asynchronous
- programming.
- The Fetch API intends
- to fix most of these problems. It does this by introducing the same primitives
- to JS that are used in the HTTP protocol. In addition, it introduces a
- utility function fetch()
that succinctly captures the intention
- of retrieving a resource from the network.
- The Fetch specification , which
- defines the API, nails down the semantics of a user agent fetching a resource.
- This, combined with ServiceWorkers, is an attempt to:
- Improve the offline experience.
- Expose the building blocks of the Web to the platform as part of the
- extensible web movement .
- As of this writing, the Fetch API is available in Firefox 39 (currently
- Nightly) and Chrome 42 (currently dev). Github has a Fetch polyfill .
-
-Feature detection
-
- Fetch API support can be detected by checking for Headers
,Request
, Response
or fetch
on
- the window
or worker
scope.
-
-Simple fetching
-
- The most useful, high-level part of the Fetch API is the fetch()
function.
- In its simplest form it takes a URL and returns a promise that resolves
- to the response. The response is captured as a Response
object.
-
-
fetch( "/data.json" ) .then ( function ( res) {
+
+
+
+ For more than a decade the Web has used XMLHttpRequest (XHR) to achieve asynchronous requests in JavaScript. While very useful, XHR is not a very nice API. It suffers from lack of separation of concerns. The input, output and state are all managed by interacting with one object, and state is tracked using events. Also, the event-based model doesn’t play well with JavaScript’s recent focus on Promise- and generator-based asynchronous programming.
+ The Fetch API intends to fix most of these problems. It does this by introducing the same primitives to JS that are used in the HTTP protocol. In addition, it introduces a utility function fetch()
that succinctly captures the intention of retrieving a resource from the network.
+ The Fetch specification , which defines the API, nails down the semantics of a user agent fetching a resource. This, combined with ServiceWorkers, is an attempt to:
+
+ Improve the offline experience.
+ Expose the building blocks of the Web to the platform as part of the extensible web movement .
+
+ As of this writing, the Fetch API is available in Firefox 39 (currently Nightly) and Chrome 42 (currently dev). Github has a Fetch polyfill .
+ Feature detection
+ Fetch API support can be detected by checking for Headers
,Request
, Response
or fetch
on the window
or worker
scope.
+ Simple fetching
+ The most useful, high-level part of the Fetch API is the fetch()
function. In its simplest form it takes a URL and returns a promise that resolves to the response. The response is captured as a Response
object.
+
+
+
fetch( "/data.json" ) .then ( function ( res) {
// res instanceof Response == true.
if ( res.ok ) {
res.json ( ) .then ( function ( data) {
@@ -41,12 +26,12 @@ Simple fetching
}
} , function ( e) {
console.log ( "Fetch failed!" , e) ;
-} ) ;
-
-
+} ) ;
+
Submitting some parameters, it would look like this:
-
fetch( "http://www.example.org/submit.php" , {
+
+
fetch( "http://www.example.org/submit.php" , {
method: "POST" ,
headers: {
"Content-Type" : "application/x-www-form-urlencoded"
@@ -60,172 +45,114 @@ Simple fetching
}
} , function ( e) {
alert( "Error submitting form!" ) ;
-} ) ;
-
-
- The fetch()
function’s arguments are the same as those passed
- to the
- Request()
constructor, so you may directly pass arbitrarily
- complex requests to fetch()
as discussed below.
-
-Headers
-
- Fetch introduces 3 interfaces. These are Headers
, Request
and
- Response
. They map directly to the underlying HTTP concepts,
- but have
- certain visibility filters in place for privacy and security reasons,
- such as
- supporting CORS rules and ensuring cookies aren’t readable by third parties.
- The Headers interface is
- a simple multi-map of names to values:
+} ) ;
+
+ The fetch()
function’s arguments are the same as those passed to the Request()
constructor, so you may directly pass arbitrarily complex requests to fetch()
as discussed below.
+ Headers
+ Fetch introduces 3 interfaces. These are Headers
, Request
and Response
. They map directly to the underlying HTTP concepts, but have certain visibility filters in place for privacy and security reasons, such as supporting CORS rules and ensuring cookies aren’t readable by third parties.
+ The Headers interface is a simple multi-map of names to values:
-
var content = "Hello World" ;
+
+
var content = "Hello World" ;
var reqHeaders = new Headers( ) ;
reqHeaders.append ( "Content-Type" , "text/plain"
reqHeaders.append ( "Content-Length" , content.length .toString ( ) ) ;
-reqHeaders.append ( "X-Custom-Header" , "ProcessThisImmediately" ) ;
-
-
- The same can be achieved by passing an array of arrays or a JS object
- literal
- to the constructor:
+reqHeaders.append ( "X-Custom-Header" , "ProcessThisImmediately" ) ;
+
+ The same can be achieved by passing an array of arrays or a JS object literal to the constructor:
-
reqHeaders = new Headers( {
+
+
reqHeaders = new Headers( {
"Content-Type" : "text/plain" ,
"Content-Length" : content.length .toString ( ) ,
"X-Custom-Header" : "ProcessThisImmediately" ,
-} ) ;
-
-
+} ) ;
+
The contents can be queried and retrieved:
-
console.log ( reqHeaders.has ( "Content-Type" ) ) ; // true
+
+
console.log ( reqHeaders.has ( "Content-Type" ) ) ; // true
console.log ( reqHeaders.has ( "Set-Cookie" ) ) ; // false
reqHeaders.set ( "Content-Type" , "text/html" ) ;
reqHeaders.append ( "X-Custom-Header" , "AnotherValue" ) ;
-
+
console.log ( reqHeaders.get ( "Content-Length" ) ) ; // 11
console.log ( reqHeaders.getAll ( "X-Custom-Header" ) ) ; // ["ProcessThisImmediately", "AnotherValue"]
-
+
reqHeaders.delete ( "X-Custom-Header" ) ;
-console.log ( reqHeaders.getAll ( "X-Custom-Header" ) ) ; // []
-
-
- Some of these operations are only useful in ServiceWorkers, but they provide
- a much nicer API to Headers.
- Since Headers can be sent in requests, or received in responses, and have
- various limitations about what information can and should be mutable, Headers
objects
- have a guard property. This is not exposed to the Web, but
- it affects which mutation operations are allowed on the Headers object.
- Possible values are:
- “none”: default.
+console.log ( reqHeaders.getAll ( "X-Custom-Header" ) ) ; // []
+
+ Some of these operations are only useful in ServiceWorkers, but they provide a much nicer API to Headers.
+ Since Headers can be sent in requests, or received in responses, and have various limitations about what information can and should be mutable, Headers
objects have a guard property. This is not exposed to the Web, but it affects which mutation operations are allowed on the Headers object. Possible values are:
+
+ “none”: default.
“request”: guard for a Headers object obtained from a Request (Request.headers
).
- “request-no-cors”: guard for a Headers object obtained from a Request
- created
- with mode “no-cors”.
+ “request-no-cors”: guard for a Headers object obtained from a Request created with mode “no-cors”.
“response”: naturally, for Headers obtained from Response (Response.headers
).
- “immutable”: Mostly used for ServiceWorkers, renders a Headers object
- read-only.
- The details of how each guard affects the behaviors of the Headers object
- are
- in the specification . For example,
- you may not append or set a “request” guarded Headers’ “Content-Length”
- header. Similarly, inserting “Set-Cookie” into a Response header is not
- allowed so that ServiceWorkers may not set cookies via synthesized Responses.
- All of the Headers methods throw TypeError if name
is not a
- valid HTTP Header name . The mutation operations will throw TypeError
- if there is an immutable guard. Otherwise they fail silently. For example:
+ “immutable”: Mostly used for ServiceWorkers, renders a Headers object read-only.
+
+ The details of how each guard affects the behaviors of the Headers object are in the specification . For example, you may not append or set a “request” guarded Headers’ “Content-Length” header. Similarly, inserting “Set-Cookie” into a Response header is not allowed so that ServiceWorkers may not set cookies via synthesized Responses.
+ All of the Headers methods throw TypeError if name
is not a valid HTTP Header name . The mutation operations will throw TypeError if there is an immutable guard. Otherwise they fail silently. For example:
-
var res = Response.error ( ) ;
+
+
var res = Response.error ( ) ;
try {
res.headers .set ( "Origin" , "http://mybank.com" ) ;
} catch ( e) {
console.log ( "Cannot pretend to be a bank!" ) ;
-}
-
-
-
-Request
-
- The Request interface defines a request to fetch a resource over HTTP.
- URL, method and headers are expected, but the Request also allows specifying
- a body, a request mode, credentials and cache hints.
- The simplest Request is of course, just a URL, as you may do to GET a
- resource.
-
-
var req = new Request( "/index.html" ) ;
+}
+
+ Request
+ The Request interface defines a request to fetch a resource over HTTP. URL, method and headers are expected, but the Request also allows specifying a body, a request mode, credentials and cache hints.
+ The simplest Request is of course, just a URL, as you may do to GET a resource.
+
+
+
var req = new Request( "/index.html" ) ;
console.log ( req.method ) ; // "GET"
-console.log ( req.url ) ; // "http://example.com/index.html"
-
-
- You may also pass a Request to the Request()
constructor to
- create a copy.
- (This is not the same as calling the clone()
method, which
- is covered in
- the “Reading bodies” section.).
-
-
var copy = new Request( req) ;
+console.log ( req.url ) ; // "http://example.com/index.html"
+
+ You may also pass a Request to the Request()
constructor to create a copy. (This is not the same as calling the clone()
method, which is covered in the “Reading bodies” section.).
+
+
+
var copy = new Request( req) ;
console.log ( copy.method ) ; // "GET"
-console.log ( copy.url ) ; // "http://example.com/index.html"
-
-
- Again, this form is probably only useful in ServiceWorkers.
- The non-URL attributes of the Request
can only be set by passing
- initial
- values as a second argument to the constructor. This argument is a dictionary.
-
-
var uploadReq = new Request( "/uploadImage" , {
+console.log ( copy.url ) ; // "http://example.com/index.html"
+
+ Again, this form is probably only useful in ServiceWorkers.
+ The non-URL attributes of the Request
can only be set by passing initial values as a second argument to the constructor. This argument is a dictionary.
+
+
+
var uploadReq = new Request( "/uploadImage" , {
method: "POST" ,
headers: {
"Content-Type" : "image/png" ,
} ,
body: "image data"
-} ) ;
-
-
- The Request’s mode is used to determine if cross-origin requests lead
- to valid responses, and which properties on the response are readable.
- Legal mode values are "same-origin"
, "no-cors"
(default)
- and "cors"
.
- The "same-origin"
mode is simple, if a request is made to another
- origin with this mode set, the result is simply an error. You could use
- this to ensure that
- a request is always being made to your origin.
+} ) ;
+
+ The Request’s mode is used to determine if cross-origin requests lead to valid responses, and which properties on the response are readable. Legal mode values are "same-origin"
, "no-cors"
(default) and "cors"
.
+ The "same-origin"
mode is simple, if a request is made to another origin with this mode set, the result is simply an error. You could use this to ensure that a request is always being made to your origin.
-
var arbitraryUrl = document.getElementById ( "url-input" ) .value ;
+
+
var arbitraryUrl = document.getElementById ( "url-input" ) .value ;
fetch( arbitraryUrl, { mode: "same-origin" } ) .then ( function ( res) {
console.log ( "Response succeeded?" , res.ok ) ;
} , function ( e) {
console.log ( "Please enter a same-origin URL!" ) ;
-} ) ;
-
-
- The "no-cors"
mode captures what the web platform does by default
- for scripts you import from CDNs, images hosted on other domains, and so
- on. First, it prevents the method from being anything other than “HEAD”,
- “GET” or “POST”. Second, if any ServiceWorkers intercept these requests,
- they may not add or override any headers except for these .
- Third, JavaScript may not access any properties of the resulting Response.
- This ensures that ServiceWorkers do not affect the semantics of the Web
- and prevents security and privacy issues that could arise from leaking
- data across domains.
- "cors"
mode is what you’ll usually use to make known cross-origin
- requests to access various APIs offered by other vendors. These are expected
- to adhere to
- the CORS protocol .
- Only a limited set of
- headers is exposed in the Response, but the body is readable. For example,
- you could get a list of Flickr’s most interesting photos
- today like this:
+} ) ;
+
+ The "no-cors"
mode captures what the web platform does by default for scripts you import from CDNs, images hosted on other domains, and so on. First, it prevents the method from being anything other than “HEAD”, “GET” or “POST”. Second, if any ServiceWorkers intercept these requests, they may not add or override any headers except for these . Third, JavaScript may not access any properties of the resulting Response. This ensures that ServiceWorkers do not affect the semantics of the Web and prevents security and privacy issues that could arise from leaking data across domains.
+ "cors"
mode is what you’ll usually use to make known cross-origin requests to access various APIs offered by other vendors. These are expected to adhere to the CORS protocol . Only a limited set of headers is exposed in the Response, but the body is readable. For example, you could get a list of Flickr’s most interesting photos today like this:
-
var u = new URLSearchParams( ) ;
+
+
var u = new URLSearchParams( ) ;
u.append ( 'method' , 'flickr.interestingness.getList' ) ;
u.append ( 'api_key' , '<insert api key here>' ) ;
u.append ( 'format' , 'json' ) ;
u.append ( 'nojsoncallback' , '1' ) ;
-
+
var apiCall = fetch( 'https://api.flickr.com/services/rest?' + u) ;
-
+
apiCall.then ( function ( response) {
return response.json ( ) .then ( function ( json) {
// photo is a list of photos.
@@ -235,198 +162,117 @@ Request
photos.forEach ( function ( photo) {
console.log ( photo.title ) ;
} ) ;
-} ) ;
-
-
- You may not read out the “Date” header since Flickr does not allow it
- via
- Access-Control-Expose-Headers
.
+} ) ;
+
+ You may not read out the “Date” header since Flickr does not allow it via Access-Control-Expose-Headers
.
-
response.headers .get ( "Date" ) ; // null
-
-
- The credentials
enumeration determines if cookies for the other
- domain are
- sent to cross-origin requests. This is similar to XHR’s withCredentials
- flag, but tri-valued as "omit"
(default), "same-origin"
and "include"
.
- The Request object will also give the ability to offer caching hints to
- the user-agent. This is currently undergoing some security review .
- Firefox exposes the attribute, but it has no effect.
- Requests have two read-only attributes that are relevant to ServiceWorkers
- intercepting them. There is the string referrer
, which is
- set by the UA to be
- the referrer of the Request. This may be an empty string. The other is
- context
which is a rather large enumeration defining
- what sort of resource is being fetched. This could be “image” if the request
- is from an
- <img>tag in the controlled document, “worker” if it is an attempt to load a
- worker script, and so on. When used with the fetch()
function,
- it is “fetch”.
-
-Response
-
- Response
instances are returned by calls to fetch()
.
- They can also be created by JS, but this is only useful in ServiceWorkers.
- We have already seen some attributes of Response when we looked at fetch()
.
- The most obvious candidates are status
, an integer (default
- value 200) and statusText
(default value “OK”), which correspond
- to the HTTP status code and reason. The ok
attribute is just
- a shorthand for checking that status
is in the range 200-299
- inclusive.
- headers
is the Response’s Headers object, with guard “response”.
- The url
attribute reflects the URL of the corresponding request.
- Response also has a type
, which is “basic”, “cors”, “default”,
- “error” or
- “opaque”.
- "basic"
: normal, same origin response, with all headers exposed
- except
- “Set-Cookie” and “Set-Cookie2″.
- "cors"
: response was received from a valid cross-origin request.
- Certain headers and the body may be accessed.
- "error"
: network error. No useful information describing
- the error is available. The Response’s status is 0, headers are empty and
- immutable. This is the type for a Response obtained from Response.error()
.
- "opaque"
: response for “no-cors” request to cross-origin
- resource. Severely
- restricted
-
- The “error” type results in the fetch()
Promise rejecting with
- TypeError.
- There are certain attributes that are useful only in a ServiceWorker scope.
- The
- idiomatic way to return a Response to an intercepted request in ServiceWorkers
- is:
+
+
response.headers .get ( "Date" ) ; // null
+
+ The credentials
enumeration determines if cookies for the other domain are sent to cross-origin requests. This is similar to XHR’s withCredentials
flag, but tri-valued as "omit"
(default), "same-origin"
and "include"
.
+ The Request object will also give the ability to offer caching hints to the user-agent. This is currently undergoing some security review . Firefox exposes the attribute, but it has no effect.
+ Requests have two read-only attributes that are relevant to ServiceWorkers intercepting them. There is the string referrer
, which is set by the UA to be the referrer of the Request. This may be an empty string. The other is context
which is a rather large enumeration defining what sort of resource is being fetched. This could be “image” if the request is from an <img>tag in the controlled document, “worker” if it is an attempt to load a worker script, and so on. When used with the fetch()
function, it is “fetch”.
+ Response
+ Response
instances are returned by calls to fetch()
. They can also be created by JS, but this is only useful in ServiceWorkers.
+ We have already seen some attributes of Response when we looked at fetch()
. The most obvious candidates are status
, an integer (default value 200) and statusText
(default value “OK”), which correspond to the HTTP status code and reason. The ok
attribute is just a shorthand for checking that status
is in the range 200-299 inclusive.
+ headers
is the Response’s Headers object, with guard “response”. The url
attribute reflects the URL of the corresponding request.
+ Response also has a type
, which is “basic”, “cors”, “default”, “error” or “opaque”.
+
+ "basic"
: normal, same origin response, with all headers exposed except “Set-Cookie” and “Set-Cookie2″.
+ "cors"
: response was received from a valid cross-origin request. Certain headers and the body may be accessed.
+ "error"
: network error. No useful information describing the error is available. The Response’s status is 0, headers are empty and immutable. This is the type for a Response obtained from Response.error()
.
+ "opaque"
: response for “no-cors” request to cross-origin resource. Severely
+ restricted
+
+ The “error” type results in the fetch()
Promise rejecting with TypeError.
+ There are certain attributes that are useful only in a ServiceWorker scope. The idiomatic way to return a Response to an intercepted request in ServiceWorkers is:
-
addEventListener( 'fetch' , function ( event) {
+
+
addEventListener( 'fetch' , function ( event) {
event.respondWith ( new Response( "Response body" , {
headers: { "Content-Type" : "text/plain" }
} ) ;
-} ) ;
-
-
- As you can see, Response has a two argument constructor, where both arguments
- are optional. The first argument is a body initializer, and the second
- is a dictionary to set the status
, statusText
and headers
.
- The static method Response.error()
simply returns an error
- response. Similarly, Response.redirect(url, status)
returns
- a Response resulting in
- a redirect to url
.
-
-Dealing with bodies
-
- Both Requests and Responses may contain body data. We’ve been glossing
- over it because of the various data types body may contain, but we will
- cover it in detail now.
+} ) ;
+
+ As you can see, Response has a two argument constructor, where both arguments are optional. The first argument is a body initializer, and the second is a dictionary to set the status
, statusText
and headers
.
+ The static method Response.error()
simply returns an error response. Similarly, Response.redirect(url, status)
returns a Response resulting in a redirect to url
.
+ Dealing with bodies
+ Both Requests and Responses may contain body data. We’ve been glossing over it because of the various data types body may contain, but we will cover it in detail now.
A body is an instance of any of the following types.
- ArrayBuffer
-
- ArrayBufferView (Uint8Array
- and friends)
- Blob /
- File
-
+ In addition, Request and Response both offer the following methods to
- extract their body. These all return a Promise that is eventually resolved
- with the actual content.
- arrayBuffer()
-
- blob()
-
- json()
-
- text()
-
- formData()
-
- This is a significant improvement over XHR in terms of ease of use of
- non-text data!
+ URLSearchParams
+ FormData – currently not supported by either Gecko or Blink. Firefox expects to ship this in version 39 along with the rest of Fetch.
+
+ In addition, Request and Response both offer the following methods to extract their body. These all return a Promise that is eventually resolved with the actual content.
+
+ arrayBuffer()
+ blob()
+ json()
+ text()
+ formData()
+
+ This is a significant improvement over XHR in terms of ease of use of non-text data!
Request bodies can be set by passing body
parameters:
-
var form = new FormData( document.getElementById ( 'login-form' ) ) ;
+
+
var form = new FormData( document.getElementById ( 'login-form' ) ) ;
fetch( "/login" , {
method: "POST" ,
body: form
-} )
-
-
- Responses take the first argument as the body.
+} )
+
+ Responses take the first argument as the body.
+
-
var res = new Response( new File( [ "chunk" , "chunk" ] , "archive.zip" ,
- { type: "application/zip" } ) ) ;
-
-
-
Both Request and Response (and by extension the fetch()
function),
- will try to intelligently determine the content type .
- Request will also automatically set a “Content-Type” header if none is
- set in the dictionary.
-
-
Streams and cloning
-
-
It is important to realise that Request and Response bodies can only be
- read once! Both interfaces have a boolean attribute bodyUsed
to
- determine if it is safe to read or not.
+
var res = new Response( new File( [ "chunk" , "chunk" ] , "archive.zip" ,
+ { type: "application/zip" } ) ) ;
+
+ Both Request and Response (and by extension the fetch()
function), will try to intelligently determine the content type . Request will also automatically set a “Content-Type” header if none is set in the dictionary.
+ Streams and cloning
+ It is important to realise that Request and Response bodies can only be read once! Both interfaces have a boolean attribute bodyUsed
to determine if it is safe to read or not.
+
-
var res = new Response( "one time use" ) ;
+ var res = new Response( "one time use" ) ;
console.log ( res.bodyUsed ) ; // false
res.text ( ) .then ( function ( v) {
console.log ( res.bodyUsed ) ; // true
} ) ;
console.log ( res.bodyUsed ) ; // true
-
+
res.text ( ) .catch ( function ( e) {
console.log ( "Tried to read already consumed Response" ) ;
-} ) ;
-
-
-
This decision allows easing the transition to an eventual stream-based Fetch
- API. The intention is to let applications consume data as it arrives, allowing
- for JavaScript to deal with larger files like videos, and perform things
- like compression and editing on the fly.
-
Often, you’ll want access to the body multiple times. For example, you
- can use the upcoming Cache API to
- store Requests and Responses for offline use, and Cache requires bodies
- to be available for reading.
-
So how do you read out the body multiple times within such constraints?
- The API provides a clone()
method on the two interfaces. This
- will return a clone of the object, with a ‘new’ body. clone()
MUST
- be called before the body of the corresponding object has been used. That
- is, clone()
first, read later.
+
} ) ;
+
+ This decision allows easing the transition to an eventual stream-based Fetch API. The intention is to let applications consume data as it arrives, allowing for JavaScript to deal with larger files like videos, and perform things like compression and editing on the fly.
+ Often, you’ll want access to the body multiple times. For example, you can use the upcoming Cache API to store Requests and Responses for offline use, and Cache requires bodies to be available for reading.
+ So how do you read out the body multiple times within such constraints? The API provides a clone()
method on the two interfaces. This will return a clone of the object, with a ‘new’ body. clone()
MUST be called before the body of the corresponding object has been used. That is, clone()
first, read later.
+
-
addEventListener( 'fetch' , function ( evt) {
+ addEventListener( 'fetch' , function ( evt) {
var sheep = new Response( "Dolly" ) ;
console.log ( sheep.bodyUsed ) ; // false
var clone = sheep.clone ( ) ;
console.log ( clone.bodyUsed ) ; // false
-
+
clone.text ( ) ;
console.log ( sheep.bodyUsed ) ; // false
console.log ( clone.bodyUsed ) ; // true
-
+
evt.respondWith ( cache.add ( sheep.clone ( ) ) .then ( function ( e) {
return sheep;
} ) ;
-} ) ;
-
-
-
-
Future improvements
-
-
Along with the transition to streams, Fetch will eventually have the ability
- to abort running fetch()
es and some way to report the progress
- of a fetch. These are provided by XHR, but are a little tricky to fit in
- the Promise-based nature of the Fetch API.
-
You can contribute to the evolution of this API by participating in discussions
- on the WHATWG mailing list and
- in the issues in the Fetch and
- ServiceWorker specifications.
-
For a better web!
-
The author would like to thank Andrea Marchesini, Anne van Kesteren and Ben
-Kelly for helping with the specification and implementation.
-
-
\ No newline at end of file
+} ) ;
+
+ Future improvements
+ Along with the transition to streams, Fetch will eventually have the ability to abort running fetch()
es and some way to report the progress of a fetch. These are provided by XHR, but are a little tricky to fit in the Promise-based nature of the Fetch API.
+ You can contribute to the evolution of this API by participating in discussions on the WHATWG mailing list and in the issues in the Fetch and ServiceWorker specifications.
+ For a better web!
+ The author would like to thank Andrea Marchesini, Anne van Kesteren and Ben
+Kelly for helping with the specification and implementation.
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/base-url-base-element-relative/expected.html b/test/test-pages/base-url-base-element-relative/expected.html
index 14d23f67..29e7ac5a 100644
--- a/test/test-pages/base-url-base-element-relative/expected.html
+++ b/test/test-pages/base-url-base-element-relative/expected.html
@@ -1,33 +1,22 @@
-
-
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
- proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
- Links
- link
- link
- link
- link
- link
- link
- link
- link
- Images
-
-
-
-
-
- Foo
-
- Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
- proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
-
\ No newline at end of file
+
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ Links
+ link
+ link
+ link
+ link
+ link
+ link
+ link
+ link
+ Images
+
+
+
+
+
+ Foo
+ Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
diff --git a/test/test-pages/base-url-base-element/expected.html b/test/test-pages/base-url-base-element/expected.html
index 5037eb26..7a52ff89 100644
--- a/test/test-pages/base-url-base-element/expected.html
+++ b/test/test-pages/base-url-base-element/expected.html
@@ -1,33 +1,22 @@
-
-
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
- proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
- Links
- link
- link
- link
- link
- link
- link
- link
- link
- Images
-
-
-
-
-
- Foo
-
- Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
- proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
-
\ No newline at end of file
+
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ Links
+ link
+ link
+ link
+ link
+ link
+ link
+ link
+ link
+ Images
+
+
+
+
+
+ Foo
+ Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
diff --git a/test/test-pages/basic-tags-cleaning/expected.html b/test/test-pages/basic-tags-cleaning/expected.html
index 2701fed9..9da6a53d 100644
--- a/test/test-pages/basic-tags-cleaning/expected.html
+++ b/test/test-pages/basic-tags-cleaning/expected.html
@@ -4,7 +4,7 @@
Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
-
+
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -12,7 +12,6 @@
Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
-
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
diff --git a/test/test-pages/bbc-1/expected-metadata.json b/test/test-pages/bbc-1/expected-metadata.json
index 7569b8f6..545e3171 100644
--- a/test/test-pages/bbc-1/expected-metadata.json
+++ b/test/test-pages/bbc-1/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "Obama admits US gun laws are his 'biggest frustration'",
+ "Title": "Obama admits US gun laws are his 'biggest frustration' - BBC News",
"Author": null,
- "Excerpt": "President Barack Obama tells the BBC his failure to pass"
+ "Excerpt": "President Barack Obama tells the BBC his failure to pass \"common sense gun safety laws\" is the greatest frustration of his presidency."
}
diff --git a/test/test-pages/blogger/expected.html b/test/test-pages/blogger/expected.html
index 10b48746..52c1ab56 100644
--- a/test/test-pages/blogger/expected.html
+++ b/test/test-pages/blogger/expected.html
@@ -1,57 +1,111 @@
-
- I've written a couple of posts in the past few months but they were all for
the blog at work so I figured I'm long overdue for one on Silicon Exposed.
- So what's a GreenPak?
-
Silego Technology is a fabless semiconductor company located in the SF Bay area, which makes (among other things) a line of programmable logic devices known as GreenPak. Their
5th generation parts were just announced, but I started this project before that happened so I'm still targeting the
4th generation .
GreenPak devices are kind of like itty bitty PSoCs - they have a mixed signal fabric with an ADC, DACs, comparators, voltage references, plus a digital LUT/FF fabric and some typical digital MCU peripherals like counters and oscillators (but no CPU).
It's actually an interesting architecture - FPGAs (including some devices marketed as CPLDs) are a 2D array of LUTs connected via wires to adjacent cells, and true (product term) CPLDs are a star topology of AND-OR arrays connected by a crossbar. GreenPak, on the other hand, is a star topology of LUTs, flipflops, and analog/digital hard IP connected to a crossbar.
Without further ado, here's a block diagram showing all the cool stuff you get in the SLG46620V:
-
-
- SLG46620V block diagram (from device datasheet)
-
- They're also tiny (the SLG46620V is a 20-pin 0.4mm pitch STQFN measuring 2x3 mm, and the lower gate count SLG46140V is a mere 1.6x2 mm) and probably the cheapest programmable logic device on the market - $0.50 in low volume and less than $0.40 in larger quantities.
The Vdd range of GreenPak4 is huge, more like what you'd expect from an MCU than an FPGA! It can run on anything from 1.8 to 5V, although performance is only specified at 1.8, 3.3, and 5V nominal voltages. There's also a dual-rail version that trades one of the GPIO pins for a second power supply pin, allowing you to interface to logic at two different voltage levels.
To support low-cost/space-constrained applications, they even have the configuration memory on die. It's one-time programmable and needs external Vpp to program (presumably Silego didn't want to waste die area on charge pumps that would only be used once) but has a SRAM programming mode for prototyping.
The best part is that the development software (GreenPak Designer) is free of charge and provided for all major operating systems including Linux! Unfortunately, the only supported design entry method is schematic entry and there's no way to write your design in a HDL.
While schematics may be fine for quick tinkering on really simple designs, they quickly get unwieldy. The nightmare of a circuit shown below is just a bunch of counters hooked up to LEDs that blink at various rates.
-
-
- Schematic from hell!
-
- As if this wasn't enough of a problem, the largest GreenPak4 device (the SLG46620V) is split into two halves with limited routing between them, and the GUI doesn't help the user manage this complexity at all - you have to draw your schematic in two halves and add "cross connections" between them.
The icing on the cake is that schematics are a pain to diff and collaborate on. Although GreenPak schematics are XML based, which is a touch better than binary, who wants to read a giant XML diff and try to figure out what's going on in the circuit?
This isn't going to be a post on the quirks of Silego's software, though - that would be boring. As it turns out, there's one more exciting feature of these chips that I didn't mention earlier: the configuration bitstream is 100% documented in the device datasheet! This is unheard of in the programmable logic world. As Nick of Arachnid Labs says , the chip is "just dying for someone to write a VHDL or Verilog compiler for it". As you can probably guess by from the title of this post, I've been busy doing exactly that.
- Great! How does it work?
-
Rather than wasting time writing a synthesizer, I decided to write a GreenPak technology library for Clifford Wolf's excellent open source synthesis tool,
Yosys , and then make a place-and-route tool to turn that into a final netlist. The post-PAR netlist can then be loaded into GreenPak Designer in order to program the device.
The first step of the process is to run the "synth_greenpak4" Yosys flow on the Verilog source. This runs a generic RTL synthesis pass, then some coarse-grained extraction passes to infer shift register and counter cells from behavioral logic, and finally maps the remaining logic to LUT/FF cells and outputs a JSON-formatted netlist.
Once the design has been synthesized, my tool (named, surprisingly, gp4par) is then launched on the netlist. It begins by parsing the JSON and constructing a directed graph of cell objects in memory. A second graph, containing all of the primitives in the device and the legal connections between them, is then created based on the device specified on the command line. (As of now only the SLG46620V is supported; the SLG46621V can be added fairly easily but the SLG46140V has a slightly different microarchitecture which will require a bit more work to support.)
After the graphs are generated, each node in the netlist graph is assigned a numeric label identifying the type of cell and each node in the device graph is assigned a list of legal labels: for example, an I/O buffer site is legal for an input buffer, output buffer, or bidirectional buffer.
-
-
- Example labeling for a subset of the netlist and device graphs
-
- The labeled nodes now need to be placed. The initial placement uses a simple greedy algorithm to create a valid (although not necessarily optimal or even routable) placement:
Loop over the cells in the netlist. If any cell has a LOC constraint, which locks the cell to a specific physical site, attempt to assign the node to the specified site. If the specified node is the wrong type, doesn't exist, or is already used by another constrained node, the constraint is invalid so fail with an error.
- Loop over all of the unconstrained cells in the netlist and assign them to the first unused site with the right label. If none are available, the design is too big for the device so fail with an error.
-
- Once the design is placed, the placement optimizer then loops over the design and attempts to improve it. A simulated annealing algorithm is used, where changes to the design are accepted unconditionally if they make the placement better, and with a random, gradually decreasing probability if they make it worse. The optimizer terminates when the design receives a perfect score (indicating an optimal placement) or if it stops making progress for several iterations. Each iteration does the following:
Compute a score for the current design based on the number of unroutable nets, the amount of routing congestion (number of nets crossing between halves of the device), and static timing analysis (not yet implemented, always zero).
- Make a list of nodes that contributed to this score in some way (having some attached nets unroutable, crossing to the other half of the device, or failing timing).
- Remove nodes from the list that are LOC'd to a specific location since we're not allowed to move them.
- Remove nodes from the list that have only one legal placement in the device (for example, oscillator hard IP) since there's nowhere else for them to go.
- Pick a node from the remainder of the list at random. Call this our pivot.
- Find a list of candidate placements for the pivot:
- Consider all routable placements in the other half of the device.
- If none were found, consider all routable placements anywhere in the device.
- If none were found, consider all placements anywhere in the device even if they're not routable.
- Pick one of the candidates at random and move the pivot to that location. If another cell in the netlist is already there, put it in the vacant site left by the pivot.
- Re-compute the score for the design. If it's better, accept this change and start the next iteration.
- If the score is worse, accept it with a random probability which decreases as the iteration number goes up. If the change is not accepted, restore the previous placement.
-
- After optimization, the design is checked for routability. If any edges in the netlist graph don't correspond to edges in the device graph, the user probably asked for something impossible (for example, trying to hook a flipflop's output to a comparator's reference voltage input) so fail with an error.
The design is then routed. This is quite simple due to the crossbar structure of the device. For each edge in the netlist:
If dedicated (non-fabric) routing is used for this path, configure the destination's input mux appropriately and stop.
- If the source and destination are in the same half of the device, configure the destination's input mux appropriately and stop.
- A cross-connection must be used. Check if we already used one to bring the source signal to the other half of the device. If found, configure the destination to route from that cross-connection and stop.
- Check if we have any cross-connections left going in this direction. If they're all used, the design is unroutable due to congestion so fail with an error.
- Pick the next unused cross-connection and configure it to route from the source. Configure the destination to route from the cross-connection and stop.
-
- Once routing is finished, run a series of post-PAR design rule checks. These currently include the following:
If any node has no loads, generate a warning
- If an I/O buffer is connected to analog hard IP, fail with an error if it's not configured in analog mode.
- Some signals (such as comparator inputs and oscillator power-down controls) are generated by a shared mux and fed to many loads. If different loads require conflicting settings for the shared mux, fail with an error.
-
- If DRC passes with no errors, configure all of the individual cells in the netlist based on the HDL parameters. Fail with an error if an invalid configuration was requested.
Finally, generate the bitstream from all of the per-cell configuration and write it to a file.
- Great, let's get started!
- If you don't already have one, you'll need to buy a
GreenPak4 development kit . The kit includes samples of the SLG46620V (among other devices) and a programmer/emulation board. While you're waiting for it to arrive, install
GreenPak Designer .
Download and install Yosys. Although Clifford is pretty good at merging my pull requests, only my fork on Github is guaranteed to have the most up-to-date support for GreenPak devices so don't be surprised if you can't use a bleeding-edge feature with mainline Yosys.
Download and install gp4par. You can get it from the Github repository .
Write your HDL, compile with Yosys, P&R with gp4par, and import the bitstream into GreenPak Designer to program the target device. The most current gp4par manual is included in LaTeX source form in the source tree and is automatically built as part of the compile process. If you're just browsing, there's a relatively recent PDF version on my web server.
If you'd like to see the Verilog that produced the nightmare of a schematic I showed above, here it is .
Be advised that this project is still very much a work in progress and there are still a number of SLG46620V features I don't support (see the manual for exact details).
- I love it / it segfaulted / there's a problem in the manual!
- Hop in our IRC channel (##openfpga on Freenode) and let me know. Feedback is great, pull requests are even better,
- You're competing with Silego's IDE. Have they found out and sued you yet?
- Nope. They're fully aware of what I'm doing and are rolling out the red carpet for me. They love the idea of a HDL flow as an alternative to schematic entry and are pretty amazed at how fast it's coming together.
After I reported a few bugs in their datasheets they decided to skip the middleman and give me direct access to the engineer who writes their documentation so that I can get faster responses. The last time I found a problem (two different parts of the datasheet contradicted each other) an updated datasheet was in my inbox and on their website by the next day. I only wish Xilinx gave me that kind of treatment!
They've even offered me free hardware to help me add support for their latest product family, although I plan to get GreenPak4 support to a more stable state before taking them up on the offer.
- So what's next?
-
Better testing, for starters. I have to verify functionality by hand with a DMM and oscilloscope, which is time consuming.
My contact at Silego says they're going to be giving me documentation on the SRAM emulation interface soon, so I'm going to make a hardware-in-loop test platform that connects to my desktop and the Silego ZIF socket, and lets me load new bitstreams via a scriptable interface. It'll have FPGA-based digital I/O as well as an ADC and DAC on every device pin, plus an adjustable voltage regulator for power, so I can feed in arbitrary mixed-signal test waveforms and write PC-based unit tests to verify correct behavior.
Other than that, I want to finish support for the SLG46620V in the next month or two. The SLG46621V will be an easy addition since only one pin and the relevant configuration bits have changed from the 46620 (I suspect they're the same die, just bonded out differently).
Once that's done I'll have to do some more extensive work to add the SLG46140V since the architecture is a bit different (a lot of the combinatorial logic is merged into multi-function blocks). Luckily, the 46140 has a lot in common architecturally with the GreenPak5 family, so once that's done GreenPak5 will probably be a lot easier to add support for.
My thanks go out to Clifford Wolf, whitequark, the IRC users in ##openfpga, and everyone at Silego I've worked with to help make this possible. I hope that one day this project will become mature enough that Silego will ship it as an officially supported extension to GreenPak Designer, making history by becoming the first modern programmable logic vendor to ship a fully open source synthesis and P&R suite.
-
-
\ No newline at end of file
+
+
+
I've written a couple of posts in the past few months but they were all for the blog at work so I figured I'm long overdue for one on Silicon Exposed.
+
So what's a GreenPak?
+
Silego Technology is a fabless semiconductor company located in the SF Bay area, which makes (among other things) a line of programmable logic devices known as GreenPak. Their 5th generation parts were just announced, but I started this project before that happened so I'm still targeting the 4th generation .
+
GreenPak devices are kind of like itty bitty PSoCs - they have a mixed signal fabric with an ADC, DACs, comparators, voltage references, plus a digital LUT/FF fabric and some typical digital MCU peripherals like counters and oscillators (but no CPU).
+
It's actually an interesting architecture - FPGAs (including some devices marketed as CPLDs) are a 2D array of LUTs connected via wires to adjacent cells, and true (product term) CPLDs are a star topology of AND-OR arrays connected by a crossbar. GreenPak, on the other hand, is a star topology of LUTs, flipflops, and analog/digital hard IP connected to a crossbar.
+
Without further ado, here's a block diagram showing all the cool stuff you get in the SLG46620V:
+
+
+
+
+
+
+ SLG46620V block diagram (from device datasheet)
+
+
+
+
They're also tiny (the SLG46620V is a 20-pin 0.4mm pitch STQFN measuring 2x3 mm, and the lower gate count SLG46140V is a mere 1.6x2 mm) and probably the cheapest programmable logic device on the market - $0.50 in low volume and less than $0.40 in larger quantities.
+
The Vdd range of GreenPak4 is huge, more like what you'd expect from an MCU than an FPGA! It can run on anything from 1.8 to 5V, although performance is only specified at 1.8, 3.3, and 5V nominal voltages. There's also a dual-rail version that trades one of the GPIO pins for a second power supply pin, allowing you to interface to logic at two different voltage levels.
+
To support low-cost/space-constrained applications, they even have the configuration memory on die. It's one-time programmable and needs external Vpp to program (presumably Silego didn't want to waste die area on charge pumps that would only be used once) but has a SRAM programming mode for prototyping.
+
The best part is that the development software (GreenPak Designer) is free of charge and provided for all major operating systems including Linux! Unfortunately, the only supported design entry method is schematic entry and there's no way to write your design in a HDL.
+
While schematics may be fine for quick tinkering on really simple designs, they quickly get unwieldy. The nightmare of a circuit shown below is just a bunch of counters hooked up to LEDs that blink at various rates.
+
+
+
+
+
+
+ Schematic from hell!
+
+
+
+
As if this wasn't enough of a problem, the largest GreenPak4 device (the SLG46620V) is split into two halves with limited routing between them, and the GUI doesn't help the user manage this complexity at all - you have to draw your schematic in two halves and add "cross connections" between them.
+
The icing on the cake is that schematics are a pain to diff and collaborate on. Although GreenPak schematics are XML based, which is a touch better than binary, who wants to read a giant XML diff and try to figure out what's going on in the circuit?
+
This isn't going to be a post on the quirks of Silego's software, though - that would be boring. As it turns out, there's one more exciting feature of these chips that I didn't mention earlier: the configuration bitstream is 100% documented in the device datasheet! This is unheard of in the programmable logic world. As Nick of Arachnid Labs says , the chip is "just dying for someone to write a VHDL or Verilog compiler for it". As you can probably guess by from the title of this post, I've been busy doing exactly that.
+
Great! How does it work?
+
Rather than wasting time writing a synthesizer, I decided to write a GreenPak technology library for Clifford Wolf's excellent open source synthesis tool, Yosys , and then make a place-and-route tool to turn that into a final netlist. The post-PAR netlist can then be loaded into GreenPak Designer in order to program the device.
+
The first step of the process is to run the "synth_greenpak4" Yosys flow on the Verilog source. This runs a generic RTL synthesis pass, then some coarse-grained extraction passes to infer shift register and counter cells from behavioral logic, and finally maps the remaining logic to LUT/FF cells and outputs a JSON-formatted netlist.
+
Once the design has been synthesized, my tool (named, surprisingly, gp4par) is then launched on the netlist. It begins by parsing the JSON and constructing a directed graph of cell objects in memory. A second graph, containing all of the primitives in the device and the legal connections between them, is then created based on the device specified on the command line. (As of now only the SLG46620V is supported; the SLG46621V can be added fairly easily but the SLG46140V has a slightly different microarchitecture which will require a bit more work to support.)
+
After the graphs are generated, each node in the netlist graph is assigned a numeric label identifying the type of cell and each node in the device graph is assigned a list of legal labels: for example, an I/O buffer site is legal for an input buffer, output buffer, or bidirectional buffer.
+
+
+
+
+
+
+ Example labeling for a subset of the netlist and device graphs
+
+
+
+
The labeled nodes now need to be placed. The initial placement uses a simple greedy algorithm to create a valid (although not necessarily optimal or even routable) placement:
+
+ Loop over the cells in the netlist. If any cell has a LOC constraint, which locks the cell to a specific physical site, attempt to assign the node to the specified site. If the specified node is the wrong type, doesn't exist, or is already used by another constrained node, the constraint is invalid so fail with an error.
+ Loop over all of the unconstrained cells in the netlist and assign them to the first unused site with the right label. If none are available, the design is too big for the device so fail with an error.
+
+
Once the design is placed, the placement optimizer then loops over the design and attempts to improve it. A simulated annealing algorithm is used, where changes to the design are accepted unconditionally if they make the placement better, and with a random, gradually decreasing probability if they make it worse. The optimizer terminates when the design receives a perfect score (indicating an optimal placement) or if it stops making progress for several iterations. Each iteration does the following:
+
+ Compute a score for the current design based on the number of unroutable nets, the amount of routing congestion (number of nets crossing between halves of the device), and static timing analysis (not yet implemented, always zero).
+ Make a list of nodes that contributed to this score in some way (having some attached nets unroutable, crossing to the other half of the device, or failing timing).
+ Remove nodes from the list that are LOC'd to a specific location since we're not allowed to move them.
+ Remove nodes from the list that have only one legal placement in the device (for example, oscillator hard IP) since there's nowhere else for them to go.
+ Pick a node from the remainder of the list at random. Call this our pivot.
+ Find a list of candidate placements for the pivot:
+
+ Consider all routable placements in the other half of the device.
+ If none were found, consider all routable placements anywhere in the device.
+ If none were found, consider all placements anywhere in the device even if they're not routable.
+
+ Pick one of the candidates at random and move the pivot to that location. If another cell in the netlist is already there, put it in the vacant site left by the pivot.
+ Re-compute the score for the design. If it's better, accept this change and start the next iteration.
+ If the score is worse, accept it with a random probability which decreases as the iteration number goes up. If the change is not accepted, restore the previous placement.
+
+
After optimization, the design is checked for routability. If any edges in the netlist graph don't correspond to edges in the device graph, the user probably asked for something impossible (for example, trying to hook a flipflop's output to a comparator's reference voltage input) so fail with an error.
+
The design is then routed. This is quite simple due to the crossbar structure of the device. For each edge in the netlist:
+
+ If dedicated (non-fabric) routing is used for this path, configure the destination's input mux appropriately and stop.
+ If the source and destination are in the same half of the device, configure the destination's input mux appropriately and stop.
+ A cross-connection must be used. Check if we already used one to bring the source signal to the other half of the device. If found, configure the destination to route from that cross-connection and stop.
+ Check if we have any cross-connections left going in this direction. If they're all used, the design is unroutable due to congestion so fail with an error.
+ Pick the next unused cross-connection and configure it to route from the source. Configure the destination to route from the cross-connection and stop.
+
+
Once routing is finished, run a series of post-PAR design rule checks. These currently include the following:
+
+ If any node has no loads, generate a warning
+ If an I/O buffer is connected to analog hard IP, fail with an error if it's not configured in analog mode.
+ Some signals (such as comparator inputs and oscillator power-down controls) are generated by a shared mux and fed to many loads. If different loads require conflicting settings for the shared mux, fail with an error.
+
+
If DRC passes with no errors, configure all of the individual cells in the netlist based on the HDL parameters. Fail with an error if an invalid configuration was requested.
+
Finally, generate the bitstream from all of the per-cell configuration and write it to a file.
+
Great, let's get started!
+
If you don't already have one, you'll need to buy a GreenPak4 development kit . The kit includes samples of the SLG46620V (among other devices) and a programmer/emulation board. While you're waiting for it to arrive, install GreenPak Designer .
+
Download and install Yosys. Although Clifford is pretty good at merging my pull requests, only my fork on Github is guaranteed to have the most up-to-date support for GreenPak devices so don't be surprised if you can't use a bleeding-edge feature with mainline Yosys.
+
Download and install gp4par. You can get it from the Github repository .
+
Write your HDL, compile with Yosys, P&R with gp4par, and import the bitstream into GreenPak Designer to program the target device. The most current gp4par manual is included in LaTeX source form in the source tree and is automatically built as part of the compile process. If you're just browsing, there's a relatively recent PDF version on my web server.
+
If you'd like to see the Verilog that produced the nightmare of a schematic I showed above, here it is .
+
Be advised that this project is still very much a work in progress and there are still a number of SLG46620V features I don't support (see the manual for exact details).
+
I love it / it segfaulted / there's a problem in the manual!
+
Hop in our IRC channel (##openfpga on Freenode) and let me know. Feedback is great, pull requests are even better,
+
You're competing with Silego's IDE. Have they found out and sued you yet?
+
Nope. They're fully aware of what I'm doing and are rolling out the red carpet for me. They love the idea of a HDL flow as an alternative to schematic entry and are pretty amazed at how fast it's coming together.
+
After I reported a few bugs in their datasheets they decided to skip the middleman and give me direct access to the engineer who writes their documentation so that I can get faster responses. The last time I found a problem (two different parts of the datasheet contradicted each other) an updated datasheet was in my inbox and on their website by the next day. I only wish Xilinx gave me that kind of treatment!
+
They've even offered me free hardware to help me add support for their latest product family, although I plan to get GreenPak4 support to a more stable state before taking them up on the offer.
+
So what's next?
+
Better testing, for starters. I have to verify functionality by hand with a DMM and oscilloscope, which is time consuming.
+
My contact at Silego says they're going to be giving me documentation on the SRAM emulation interface soon, so I'm going to make a hardware-in-loop test platform that connects to my desktop and the Silego ZIF socket, and lets me load new bitstreams via a scriptable interface. It'll have FPGA-based digital I/O as well as an ADC and DAC on every device pin, plus an adjustable voltage regulator for power, so I can feed in arbitrary mixed-signal test waveforms and write PC-based unit tests to verify correct behavior.
+
Other than that, I want to finish support for the SLG46620V in the next month or two. The SLG46621V will be an easy addition since only one pin and the relevant configuration bits have changed from the 46620 (I suspect they're the same die, just bonded out differently).
+
Once that's done I'll have to do some more extensive work to add the SLG46140V since the architecture is a bit different (a lot of the combinatorial logic is merged into multi-function blocks). Luckily, the 46140 has a lot in common architecturally with the GreenPak5 family, so once that's done GreenPak5 will probably be a lot easier to add support for.
+
My thanks go out to Clifford Wolf, whitequark, the IRC users in ##openfpga, and everyone at Silego I've worked with to help make this possible. I hope that one day this project will become mature enough that Silego will ship it as an officially supported extension to GreenPak Designer, making history by becoming the first modern programmable logic vendor to ship a fully open source synthesis and P&R suite.
+
+
\ No newline at end of file
diff --git a/test/test-pages/breitbart/expected.html b/test/test-pages/breitbart/expected.html
index eabc20da..887c74d3 100644
--- a/test/test-pages/breitbart/expected.html
+++ b/test/test-pages/breitbart/expected.html
@@ -1,41 +1,41 @@
-
-
-
JIM WATSON/AFP/Getty Images
+
+
+
JIM WATSON/AFP/Getty Images
22 Dec, 2016 22 Dec, 2016
-
+
SIGN UP FOR OUR NEWSLETTER
-
+
Snopes fact checker and staff writer David Emery posted to Twitter asking if there were “any un-angry Trump supporters?”
Emery, a writer for partisan “fact-checking” website Snopes.com which soon will be in charge of labelling “fake news” alongside ABC News and Politifact, retweeted an article by Vulture magazine relating to the protests of the Hamilton musical following the decision by the cast of the show to make a public announcement to Vice-president elect Mike Pence while he watched the performance with his family.
SIGN UP FOR OUR NEWSLETTER
-
+
The tweet from Vulture magazine reads, “ #Hamilton Chicago show interrupted by angry Trump supporter.” Emery retweeted the story, saying, “Are there un-angry Trump supporters?”
-
-
-
+
+
+
This isn’t the first time the Snopes.com writer has expressed anti-Trump sentiment on his Twitter page. In another tweet in which Emery links to an article that falsely attributes a quote to President-elect Trump, Emery states, “Incredibly, some people actually think they have to put words in Trump’s mouth to make him look bad.”
-
-
+
+
Emery also retweeted an article by New York magazine that claimed President-elect Trump relied on lies to win during his campaign and that we now lived in a “post-truth” society. “Before long we’ll all have forgotten what it was like to live in the same universe; or maybe we already have,” Emery tweeted.
-
-
-
+
+
+
Facebook believe that Emery, along with other Snopes writers, ABC News, and Politifact are impartial enough to label and silence what they believe to be “fake news” on social media.
Lucas Nolan is a reporter for Breitbart Tech covering issues of free speech and online censorship. Follow him on Twitter @LucasNolan_ or email him at lnolan@breitbart.com
-
+
\ No newline at end of file
diff --git a/test/test-pages/bug-1255978/expected.html b/test/test-pages/bug-1255978/expected.html
index 78f2f890..70f30fc4 100644
--- a/test/test-pages/bug-1255978/expected.html
+++ b/test/test-pages/bug-1255978/expected.html
@@ -9,18 +9,18 @@
Here are some of the secrets that the receptionist will never tell you when you check in, according to answers posted on Quora .
-
+
-
-
-
+
+
+
+
+
+
Even posh hotels might not wash a blanket in between stays
+
-
- Even posh hotels might not wash a blanket in between stays
-
-
1. Take any blankets or duvets off the bed
@@ -28,83 +28,80 @@
Forrest Jones said that anything that comes into contact with any of the previous guest’s skin should be taken out and washed every time the room is made, but that even the fanciest hotels don’t always do so. "Hotels are getting away from comforters. Blankets are here to stay, however. But some hotels are still hesitant about washing them every day if they think they can get out of it," he said.
-
+
Video shows bed bug infestation at New York hotel
-
+
-
-
-
+
+
+
+
+
+
Forrest Jones advised stuffing the peep hole with a strip of rolled up notepaper when not in use.
+
-
- Forrest Jones advised stuffing the peep hole with a strip of rolled up notepaper when not in use.
-
-
2. Check the peep hole has not been tampered with
This is not common, but can happen, Forrest Jones said. He advised stuffing the peep hole with a strip of rolled up notepaper when not in use. When someone knocks on the door, the paper can be removed to check who is there. If no one is visible, he recommends calling the front desk immediately. “I look forward to the day when I can tell you to choose only hotels where every employee who has access to guestroom keys is subjected to a complete public records background check, prior to hire, and every year or two thereafter. But for now, I can't,” he said.
-
+
-
-
-
+
+
+
-
- Put luggage on the floor
-
-
+
3. Don’t use a wooden luggage rack
Bedbugs love wood. Even though a wooden luggage rack might look nicer and more expensive than a metal one, it’s a breeding ground for bugs. Forrest Jones says guests should put the items they plan to take from bags on other pieces of furniture and leave the bag on the floor.
-
+
-
-
-
+
+
+
+
+
+
The old rule of thumb is that for every 00 invested in a room, the hotel should charge in average daily rate
+
-
- The old rule of thumb is that for every 00 invested in a room, the hotel should charge in average daily rate
-
-
4. Hotel rooms are priced according to how expensive they were to build
Zeev Sharon said that the old rule of thumb is that for every $1000 invested in a room, the hotel should charge $1 in average daily rate. So a room that cost $300,000 to build, should sell on average for $300/night.
-
+
5. Beware the wall-mounted hairdryer
It contains the most germs of anything in the room. Other studies have said the TV remote and bedside lamp switches are the most unhygienic. “Perhaps because it's something that's easy for the housekeepers to forget to check or to squirt down with disinfectant,” Forrest Jones said.
-
+
-
+
-
+
Business news in pictures
-
+
-
-
+
+
@@ -112,18 +109,18 @@ 6. Mini bars almost always lose money
Despite the snacks in the minibar seeming like the most overpriced food you have ever seen, hotel owners are still struggling to make a profit from those snacks. "Minibars almost always lose money, even when they charge $10 for a Diet Coke,” Sharon said.
-
+
-
-
-
+
+
+
+
+
+
Towels should always be cleaned between stays
+
-
- Towels should always be cleaned between stays
-
-
7. Always made sure the hand towels are clean when you arrive
@@ -135,5 +132,5 @@ 6. Mini bars almost always lose money
Hotels
Hygiene
- Reuse content
-
\ No newline at end of file
+ Reuse content
+
\ No newline at end of file
diff --git a/test/test-pages/buzzfeed-1/expected.html b/test/test-pages/buzzfeed-1/expected.html
index 82dc3a10..aef43a1a 100644
--- a/test/test-pages/buzzfeed-1/expected.html
+++ b/test/test-pages/buzzfeed-1/expected.html
@@ -1,7 +1,7 @@
The mother of a woman who took suspected diet pills bought online has described how her daughter was “literally burning up from within” moments before her death.
-
+
West Merica Police
@@ -15,17 +15,17 @@
The mother of a woman who took suspected diet pills bought online has descri
-
+
Facebook
-
+
Facebook
-
+
diff --git a/test/test-pages/clean-links/expected.html b/test/test-pages/clean-links/expected.html
index 41539618..15d43471 100644
--- a/test/test-pages/clean-links/expected.html
+++ b/test/test-pages/clean-links/expected.html
@@ -1,1387 +1,261 @@
-
-
- Study Webtext
- "Bartleby the Scrivener: A Story of Wall-Street " (1853)
- Herman Melville
-
-
-
-
\ No newline at end of file
+
Click on text in red for hypertext notes and questions I am a rather elderly man. The nature of my avocations for the last thirty years has brought me into more than ordinary contact with what would seem an interesting and somewhat singular set of men of whom as yet nothing that I know of has ever been written:-- I mean the law-copyists or scriveners. I have known very many of them, professionally and privately, and if I pleased, could relate divers histories, at which good-natured gentlemen might smile, and sentimental souls might weep. But I waive the biographies of all other scriveners for a few passages in the life of Bartleby, who was a scrivener the strangest I ever saw or heard of. While of other law-copyists I might write the complete life, of Bartleby nothing of that sort can be done. I believe that no materials exist for a full and satisfactory biography of this man. It is an irreparable loss to literature. Bartleby was one of those beings of whom nothing is ascertainable, except from the original sources, and in his case those are very small. What my own astonished eyes saw of Bartleby, that is all I know of him, except, indeed, one vague report which will appear in the sequel.
+
Ere introducing the scrivener, as he first appeared to me, it is fit I make some mention of myself, my employees, my business, my chambers, and general surroundings; because some such description is indispensable to an adequate understanding of the chief character about to be presented.
+
Imprimis : I am a man who, from his youth upwards, has been filled with a profound conviction that the easiest way of life is the best.. Hence, though I belong to a profession proverbially energetic and nervous, even to turbulence, at times, yet nothing of that sort have I ever suffered to invade my peace. I am one of those unambitious lawyers who never addresses a jury, or in any way draws down public applause; but in the cool tranquillity of a snug retreat, do a snug business among rich men's bonds and mortgages and title-deeds. The late John Jacob Astor, a personage little given to poetic enthusiasm, had no hesitation in pronouncing my first grand point to be prudence; my next, method. I do not speak it in vanity, but simply record the fact, that I was not unemployed in my profession by the last John Jacob Astor; a name which, I admit, I love to repeat, for it hath a rounded and orbicular sound to it, and rings like unto bullion. I will freely add, that I was not insensible to the late John Jacob Astor's good opinion.
+
Some time prior to the period at which this little history begins, my avocations had been largely increased. The good old office, now extinct in the State of New York, of a Master in Chancery, had been conferred upon me. It was not a very arduous office, but very pleasantly remunerative. I seldom lose my temper; much more seldom indulge in dangerous indignation at wrongs and outrages; but I must be permitted to be rash here and declare, that I consider the sudden and violent abrogation of the office of Master of Chancery, by the new Constitution, as a----premature act; inasmuch as I had counted upon a life-lease of the profits, whereas I only received those of a few short years. But this is by the way.
+
My chambers were up stairs at No.--Wall-street. At one end they looked upon the white wall of the interior of a spacious sky-light shaft, penetrating the building from top to bottom. This view might have been considered rather tame than otherwise, deficient in what landscape painters call "life." But if so, the view from the other end of my chambers offered, at least, a contrast, if nothing more. In that direction my windows commanded an unobstructed view of a lofty brick wall,black by age and everlasting shade; which wall required no spy-glass to bring out its lurking beauties, but for the benefit of all near-sighted spectators, was pushed up to within ten feet of my window panes. Owing to the great height of the surrounding buildings, and my chambers being on the second floor, the interval between this wall and mine not a little resembled a huge square cistern.
+
At the period just preceding the advent of Bartleby, I had two persons as copyists in my employment, and a promising lad as an office-boy. First, Turkey; second, Nippers; third, Ginger Nut.These may seem names, the like of which are not usually found in the Directory. In truth they were nicknames, mutually conferred upon each other by my three clerks, and were deemed expressive of their respective persons or characters. Turkey was a short, pursy Englishman of about my own age, that is, somewhere not far from sixty. In the morning, one might say, his face was of a fine florid hue, but after twelve o'clock, meridian-- his dinner hour-- it blazed like a grate full of Christmas coals; and continued blazing--but, as it were, with a gradual wane--till 6 o'clock, P.M. or thereabouts, after which I saw no more of the proprietor of the face, which gaining its meridian with the sun, seemed to set with it, to rise, culminate, and decline the following day, with the like regularity and undiminished glory. There are many singular coincidences I have known in the course of my life, not the least among which was the fact that exactly when Turkey displayed his fullest beams from his red and radiant countenance, just then, too, at the critical moment, began the daily period when I considered his business capacities as seriously disturbed for the remainder of the twenty-four hours. Not that he was absolutely idle, or averse to business then; far from it. The difficulty was, he was apt to be altogether too energetic. There was a strange, inflamed, flurried, flighty recklessness of activity about him. He would be incautious in dipping his pen into his inkstand. All his blots upon my documents, were dropped there after twelve o'clock, meridian. Indeed, not only would he be reckless and sadly given to making blots in the afternoon, but some days he went further, and was rather noisy. At such times, too, his face flamed with augmented blazonry, as if cannel coal had been heaped on anthracite. He made an unpleasant racket with his chair; spilled his sand-box; in mending his pens, impatiently split them all to pieces, and threw them on the floor in a sudden passion; stood up and leaned over his table, boxing his papers about in a most indecorous manner, very sad to behold in an elderly manlike him. Nevertheless, as he was in many ways a most valuable person to me, and all the time before twelve o'clock, meridian, was the quickest, steadiest creature too, accomplishing a great deal of work in a style not easy to be matched--for these reasons, I was willingto overlook his eccentricities, though indeed, occasionally, I remonstrated with him. I did this very gently, however, because, though the civilest, nay, the blandest and most reverential of men in the morning, yet in the afternoon he was disposed, upon provocation, to be slightly rash with his tongue, in fact, insolent. Now, valuing his morning services as I did, and resolved not to lose them; yet, at the same time made uncomfortable by his inflamed ways after twelve o'clock; and being a man of peace, unwilling by my admonitions to call forth unseemingly retorts from him; I took upon me, one Saturday noon (he was always worse on Saturdays), to hint to him, very kindly, that perhaps now that he was growing old, it might be well to abridge his labors; in short, he need not come to my chambers after twelve o'clock, but, dinner over, had best go home to his lodgings and rest himself till tea-time. But no; he insisted upon his afternoon devotions. His countenance became intolerably fervid, as he oratorically assured me--gesticulating with a long ruler at the other end of the room--that if his services in the morning were useful, how indispensible, then, in the afternoon?
+
"With submission, sir," said Turkey on this occasion, "I consider myself your right-hand man. In the morning I but marshal and deploy my columns; but in the afternoon I put myself at their head, and gallantly charge the foe, thus!"--and he made a violent thrust with the ruler.
+
"But the blots, Turkey," intimated I.
+
"True,--but, with submission, sir, behold these hairs! I am getting old. Surely, sir, a blot or two of a warm afternoon is not the page--is honorable. With submission, sir, we both are getting old."
+
This appeal to my fellow-feeling was hardly to be resisted. At all events, I saw that go he would not. So I made up my mind to let him stay, resolving, nevertheless, to see to it, that during the afternoon he had to do with my less important papers.
+
Nippers, the second on my list, was a whiskered, sallow, and, upon the whole, rather piratical-looking young man of about five and twenty. I always deemed him the victim of two evil powers-- ambition and indigestion. The ambition was evinced by a certain impatience of the duties of a mere copyist, an unwarrantable usurpation of strictly profession affairs, such as the original drawing up of legal documents. The indigestion seemed betokened in an occasional nervous testiness and grinning irritability, causing the teeth to audibly grind together over mistakes committed in copying; unnecessary maledictions, hissed, rather than spoken, in the heat of business; and especially by a continual discontent with the height of the table where he worked. Though of a very ingenious mechanical turn, Nippers could never get this table to suit him. He put chips under it, blocks of various sorts, bits of pasteboard, and at last went so far as to attempt an exquisite adjustment by final pieces of folded blotting-paper. But no invention would answer. If, for the sake of easing his back, he brought the table lid at a sharp angle well up towards his chin, and wrote there like a man using the steep roof of a Dutch house for his desk:--then he declared that it stopped the circulation in his arms. If now he lowered the table to his waistbands, and stooped over it in writing, then there was a sore aching in his back. In short, the truth of the matter was, Nippers knew not what he wanted. Or, if he wanted anything, it was to be rid of a scrivener's table altogether. Among the manifestations of his diseased ambition was a fondness he had for receiving visits from certain ambiguous-looking fellows in seedy coats, whom he called his clients. Indeed I was aware that not only was he, at times, considerable of a ward-politician, but he occasionally did a little businessat the Justices' courts, and was not unknown on the steps of the Tombs. I have good reason to believe, however, that one individual who called upon him at my chambers, and who, with a grand air, he insisted was his client, was no other than a dun, and the alleged title-deed, a bill. But with all his failings, and the annoyances he caused me, Nippers, like his compatriot Turkey, was a very useful man to me; wrote a neat, swift hand; and, when he chose, was not deficient in a gentlemanly sort of deportment. Added to this, he always dressedin a gentlemanly sort of way; and so, incidentally, reflected credit upon my chambers. Whereas with respect to Turkey, I had much ado to keep him from being a reproach to me. His clothes were apt to look oily and smell of eating-houses. He wore his pantaloons very loose and baggy in summer. His coats were execrable; his hat not to be handled. But while the hat was a thing of indifference to me, inasmuch as his natural civility and deference, as a dependent Englishman, always led him to doff it the moment he entered the room, yet his coat was another matter. Concerning his coats, I reasoned with him; but with no effect. The truth was, I suppose, that a man with so small an income, could not afford to sport such a lustrous face and a lustrous coat at one and the same time. As Nippers once observed, Turkey's money went chiefly for red ink. One winter day I presented Turkey with a highly-respectable looking coat of my own, a padded gray coat, of a most comfortable warmth, and which buttoned straight up from the knee to the neck. I thought Turkey would appreciate the favor, and abate his rashness and obstreperousness of afternoons. But no. I verily believe that buttoning himself up in so downy and blanket-like a coat had a pernicious effect upon him; upon the same principle that too much oats are bad for horses. In fact, precisely as a rash, restive horse is said to feel his oats, so Turkey felt his coat. It made him insolent. He was a man whom prosperity harmed.
+
Though concerning the self-indulgent habits of Turkey I had my own private surmises, yet touching Nippers I was well persuaded that whatever might be his faults in other respects, he was, at least, a temperate young man. But indeed, nature herself seemed to have been his vintner, and at his birth charged him so thoroughly with an irritable, brandy-like disposition, that all subsequent potations were needless. When I consider how, amid the stillness of my chambers, Nippers would sometimes impatiently rise from his seat, and stooping over his table, spread his arms wide apart, seize the whole desk, and move it, and jerk it, with a grim, grinding motion on the floor, as if the table were a perverse voluntary agent, intent on thwarting and vexing him; I plainly perceive that for Nippers, brandy and water were altogether superfluous.
+
It was fortunate for me that, owing to its course--indigestion--the irritability and consequent nervousness of Nippers, were mainly observable in the morning, while in the afternoon he was comparatively mild. So that Turkey's paroxysms only coming on about twelve o'clock, I never had to do with their eccentricities at one time. Their fits relieved each other like guards. When Nippers' was on, Turkey's was off, and vice versa. This was a good natural arrangement under the circumstances.
+
Ginger Nut, the third on my list, was a lad some twelve years old. His father was a carman, ambitious of seeing his son on the bench instead of a cart, before he died. So he sent him to my office as a student at law, errand boy, and cleaner and sweeper, at the rate of one dollar a week. He had a little desk to himself, but he did not use it much. Upon inspection, the drawer exhibited a great array of the shells of various sorts of nuts. Indeed, to this quick-witted youth the whole noble science of the law was contained in a nut-shell. Not the least among the employments of Ginger Nut, as well as one which he discharged with the most alacrity, was his duty as cake and apple purveyor for Turkey and Nippers. Copying law papers being proverbially a dry, husky sort of business, my two scriveners were fain to moisten their mouths very often with Spitzenbergs to be had at the numerous stalls nigh the Custom House and Post Office. Also, they sent Ginger Nut very frequently for that peculiar cake--small, flat, round, and very spicy--after which he had been named by them. Of a cold morning when business was but dull, Turkey would gobble up scores of these cakes, as if they were mere wafers--indeed they sell them at the rate of six or eight for a penny--the scrape of his pen blending with the crunching of the crisp particles in his mouth. Of all the fiery afternoon blunders and flurried rashnesses of Turkey, was his once moistening a ginger-cake between his lips, and clapping it on to a mortgage for a seal. I came within an ace of dismissing him then. But he mollified me by making an oriental bow, and saying--"With submission, sir, it was generous of me to find you in stationery on my own account."
+
Now my original business--that of a conveyancer and title hunter, and drawer-up of recondite documents of all sorts--was considerably increased by receiving the master's office. There was now great work for scriveners. Not only must I push the clerks already with me, but I must have additional help. In answer to my advertisement, a motionless young man one morning, stood upon my office threshold, the door being open, for it was summer. I can see that figure now--pallidly neat, pitiably respectable, incurably forlorn! It was Bartleby.
+
After a few words touching his qualifications, I engaged him, glad to have among my corps of copyists a man of so singularly sedate an aspect, which I thought might operate beneficially upon the flighty temper of Turkey, and the fiery one of Nippers.
+
I should have stated before that ground glass folding-doors divided my premises into two parts, one of which was occupied by my scriveners, the other by myself. According to my humor I threw open these doors, or closed them. I resolved to assign Bartleby a corner by the folding-doors, but on my side of them, so as to have this quiet man within easy call, in case any trifling thing was to be done. I placed his desk close up to a small side window in that part of the room, a window which originally had afforded a lateral view of certain grimy back-yards and bricks, but which, owing to subsequent erections, commanded at present no view at all, though it gave some light. Within three feet of the panes was a wall, and the light came down from far above, between two lofty buildings, as from a very small opening in a dome. Still further to a satisfactory arrangement, I procured a high green folding screen, which might entirely isolate Bartleby from my sight, though not remove him from my voice. And thus, in a manner, privacy and society were conjoined.
+
At first Bartleby did an extraordinary quantity of writing. As if long famishingfor something to copy, he seemed to gorge himself on my documents. There was no pause for digestion. He ran a day and night line, copying by sun-light and by candle-light. I should have been quite delighted with his application, had be been cheerfully industrious. But he wrote on silently, palely, mechanically.
+
It is, of course, an indispensable part of a scrivener's business to verify the accuracy of his copy, word by word. Where there are two or more scriveners in an office, they assist each other in this examination, one reading from the copy, the other holding the original. It is a very dull, wearisome, and lethargic affair. I can readily imagine that to some sanguine temperaments it would be altogether intolerable. For example, I cannot credit that the mettlesome poet Byron would have contentedly sat down with Bartleby to examine a law document of, say five hundred pages, closely written in a crimpy hand.
+
Now and then, in the haste of business, it had been my habit to assist in comparing some brief document myself, calling Turkey or Nippers for this purpose. One object I had in placing Bartleby so handy to me behind the screen, was to avail myself of his services on such trivial occasions. It was on the third day, I think, of his being with me, and before any necessity had arisen for having his own writing examined, that, being much hurried to complete a small affair I had in hand, I abruptly called to Bartleby. In my haste and natural expectancy of instant compliance, I sat with my head bent over the original on my desk, and my right hand sideways, and somewhat nervously extended with the copy, so that immediately upon emerging from his retreat, Bartleby might snatch it and proceed to business without the least delay.
+
In this very attitude did I sit when I called to him, rapidly stating what it was I wanted him to do--namely, to examine a small paper with me. Imagine my surprise, nay, my consternation, when without moving from his privacy, Bartleby in a singularly mild, firm voice, replied,"I would prefer not to."
+
I sat awhile in perfect silence, rallying my stunned faculties. Immediately it occurred to me that my ears had deceived me, or Bartleby had entirely misunderstood my meaning. I repeated my request in the clearest tone I could assume. But in quite as clear a one came the previous reply, "I would prefer not to."
+
"Prefer not to," echoed I, rising in high excitement, and crossing the room with a stride, "What do you mean? Are you moon-struck? I want you to help me compare this sheet here--take it," and I thrust it towards him.
+
"I would prefer not to," said he.
+
I looked at him steadfastly. His face was leanly composed; his gray eye dimly calm. Not a wrinkle of agitation rippled him. Had there been the least uneasiness, anger, impatience or impertinence in his manner; in other words, had there been any thing ordinarily human about him, doubtless I should have violently dismissed him from the premises. But as it was, I should have as soon thought of turning my pale plaster-of-paris bust of Cicero out of doors. I stood gazing at him awhile, as he went on with his own writing, and then reseated myself at my desk. This is very strange, thought I. What had one best do? But my business hurried me. I concluded to forget the matter for the present, reserving it for my future leisure. So calling Nippers from the other room, the paper was speedily examined.
+
A few days after this, Bartleby concluded four lengthy documents, being quadruplicates of a week's testimony taken before me in my High Court of Chancery. It became necessary to examine them. It was an important suit, and great accuracy was imperative. Having all things arranged I called Turkey, Nippers and Ginger Nut from the next room, meaning to place the four copies in the hands of my four clerks, while I should read from the original. Accordingly Turkey, Nippers and Ginger Nut had taken their seats in a row, each with his document in hand, when I called to Bartleby to join this interesting group.
+
"Bartleby! quick, I am waiting."
+
I heard a low scrape of his chair legs on the unscraped floor, and soon he appeared standing at the entrance of his hermitage.
+
"What is wanted?" said he mildly.
+
"The copies, the copies," said I hurriedly. "We are going to examine them. There"--and I held towards him the fourth quadruplicate.
+
"I would prefer not to," he said, and gently disappeared behind the screen.
+
For a few moments I was turned into a pillar of salt, standing at the head of my seated column of clerks. Recovering myself, I advanced towards the screen, and demanded the reason for such extraordinary conduct.
+
"Why do you refuse?"
+
"I would prefer not to."
+
With any other man I should have flown outright into a dreadful passion, scorned all further words, and thrust him ignominiously from my presence. But there was something about Bartleby that not only strangely disarmed me, but in a wonderful manner touched and disconcerted me. I began to reason with him.
+
"These are your own copies we are about to examine. It is labor saving to you, because one examination will answer for your four papers. It is common usage. Every copyist is bound to help examine his copy. Is it not so? Will you not speak? Answer!"
+
"I prefer not to," he replied in a flute-like tone. It seemed to me that while I had been addressing him, he carefully revolved every statement that I made; fully comprehended the meaning; could not gainsay the irresistible conclusion; but, at the same time, some paramount consideration prevailed with him to reply as he did.
+
"You are decided, then, not to comply with my request--a request made according to common usage and common sense?"
+
He briefly gave me to understand that on that point my judgment was sound. Yes: his decision was irreversible.
+
It is not seldom the case that when a man is browbeaten in some unprecedented and violently unreasonable way, he begins to stagger in his own plainest faith. He begins, as it were, vaguely to surmise that, wonderful as it may be, all the justice and all the reason is on the other side. Accordingly, if any disinterested persons are present, he turns to them for some reinforcement for his own faltering mind.
+
"Turkey," said I, "what do you think of this? Am I not right?"
+
"With submission, sir," said Turkey, with his blandest tone, "I think that you are."
+
"Nippers," said I, "what do you think of it?"
+
"I think I should kick him out of the office."
+
(The reader of nice perceptions will here perceive that, it being morning, Turkey's answer is couched in polite and tranquil terms, but Nippers replies in ill-tempered ones. Or, to repeat a previous sentence, Nipper's ugly mood was on duty, and Turkey's off.)
+
"Ginger Nut," said I, willing to enlist the smallest suffrage in my behalf, "what do you think of it?"
+
"I think, sir, he's a little luny ," replied Ginger Nut, with a grin.
+
"You hear what they say," said I, turning towards the screen, "come forth and do your duty."
+
But he vouchsafed no reply. I pondered a moment in sore perplexity. But once more business hurried me. I determined again to postpone the consideration of this dilemma to my future leisure. With a little trouble we made out to examine the papers without Bartleby, though at every page or two, Turkey deferentially dropped his opinion that this proceeding was quite out of the common; while Nippers, twitching in his chair with a dyspeptic nervousness, ground out between his set teeth occasional hissing maledictions against the stubborn oaf behind the screen. And for his (Nipper's) part, this was the first and the last time he would do another man's business without pay.
+
Meanwhile Bartleby sat in his hermitage, oblivious to every thing but his own peculiar business there.
+
Some days passed, the scrivener being employed upon another lengthy work. His late remarkable conduct led me to regard his way narrowly. I observed that he never went to dinner; indeed that he never went any where. As yet I had never of my personal knowledge known him to be outside of my office. He was a perpetual sentry in the corner. At about eleven o'clock though, in the morning, I noticed that Ginger Nut would advance toward the opening in Bartleby's screen, as if silently beckoned thither by a gesture invisible to me where I sat. That boy would then leave the office jingling a few pence, and reappear with a handful of ginger-nuts which he delivered in the hermitage, receiving two of the cakes for his trouble.
+
He lives, then, on ginger-nuts, thought I; never eats a dinner, properly speaking; he must be a vegetarian then, but no; he never eats even vegetables, he eats nothing but ginger-nuts. My mind then ran on in reveries concerning the probable effects upon the human constitution of living entirely on ginger-nuts. Ginger-nuts are so called because they contain ginger as one of their peculiar constituents, and the final flavoring one. Now what was ginger? A hot, spicy thing. Was Bartleby hot and spicy? Not at all. Ginger, then, had no effect upon Bartleby. Probably he preferred it should have none.
+
Nothing so aggravates an earnest person as a passive resistance. If the individual so resisted be of a not inhumane temper, and the resisting one perfectly harmless in his passivity; then, in the better moods of the former, he will endeavor charitably to construe to his imagination what proves impossible to be solved by his judgment. Even so, for the most part, I regarded Bartleby and his ways. Poor fellow! thought I, he means no mischief; it is plain he intends no insolence; his aspect sufficiently evinces that his eccentricities are involuntary. He is useful to me. I can get along with him. If I turn him away, the chances are he will fall in with some less indulgent employer, and then he will be rudely treated, and perhaps driven forth miserably to starve. Yes. Here I can cheaply purchase a delicious self-approval. To befriend Bartleby; to humor him in his strange willfulness, will cost me little or nothing, while I lay up in my soul what will eventually prove a sweet morsel for my conscience. But this mood was not invariable with me. The passiveness of Bartleby sometimes irritated me. I felt strangely goaded on to encounter him in new opposition, to elicit some angry spark from him answerable to my own. But indeed I might as well have essayed to strike fire with my knuckles against a bit of Windsor soap. But one afternoon the evil impulse in me mastered me, and the following little scene ensued:
+
"Bartleby," said I, "when those papers are all copied, I will compare them with you."
+
"I would prefer not to."
+
"How? Surely you do not mean to persist in that mulish vagary?"
+
No answer.
+
I threw open the folding-doors near by, and turning upon Turkey and Nippers, exclaimed in an excited manner--
+
"He says, a second time, he won't examine his papers. What do you think of it, Turkey?"
+
It was afternoon, be it remembered. Turkey sat glowing like a brass boiler, his bald head steaming, his hands reeling among his blotted papers.
+
"Think of it?" roared Turkey; "I think I'll just step behind his screen, and black his eyes for him!"
+
So saying, Turkey rose to his feet and threw his arms into a pugilistic position. He was hurrying away to make good his promise, when I detained him, alarmed at the effect of incautiously rousing Turkey's combativeness after dinner.
+
"Sit down, Turkey," said I, "and hear what Nippers has to say. What do you think of it, Nippers? Would I not be justified in immediately dismissing Bartleby?"
+
"Excuse me, that is for you to decide, sir. I think his conduct quite unusual, and indeed unjust, as regards Turkey and myself. But it may only be a passing whim."
+
"Ah," exclaimed I, "you have strangely changed your mind then--you speak very gently of him now."
+
"All beer," cried Turkey; "gentleness is effects of beer--Nippers and I dined together to-day. You see how gentle I am, sir. Shall I go and black his eyes?"
+
"You refer to Bartleby, I suppose. No, not to-day, Turkey," I replied; "pray, put up your fists."
+
I closed the doors, and again advanced towards Bartleby. I felt additional incentives tempting me to my fate. I burned to be rebelled against again. I remembered that Bartleby never left the office.
+
"Bartleby," said I, "Ginger Nut is away; just step round to the Post Office, won't you? (it was but a three minutes walk,) and see if there is any thing for me."
+
"I would prefer not to."
+
"You will not?"
+
"I prefer not."
+
I staggered to my desk, and sat there in a deep study. My blind inveteracy returned. Was there any other thing in which I could procure myself to be ignominiously repulsed by this lean, penniless with?--my hired clerk? What added thing is there, perfectly reasonable, that he will be sure to refuse to do?
+
"Bartleby!"
+
No answer.
+
"Bartleby," in a louder tone.
+
No answer.
+
"Bartleby," I roared.
+
Like a very ghost, agreeably to the laws of magical invocation, at the third summons, he appeared at the entrance of his hermitage.
+
"Go to the next room, and tell Nippers to come to me."
+
"I prefer not to," he respectfully and slowly said, and mildly disappeared.
+
"Very good, Bartleby," said I, in a quiet sort of serenely severe self-possessed tone, intimating the unalterable purpose of some terrible retribution very close at hand. At the moment I half intended something of the kind. But upon the whole, as it was drawing towards my dinner-hour, I thought it best to put on my hat and walk home for the day, suffering much from perplexity and distress of mind.
+
Shall I acknowledge it? The conclusion of this whole business was that it soon became a fixed fact of my chambers, that a pale young scrivener, by the name of Bartleby, had a desk there; that he copied for me at the usual rate of four cents a folio (one hundred words); but he was permanently exempt from examining the work done by him, that duty being transferred to Turkey and Nippers, one of compliment doubtless to their superior acuteness; moreover, said Bartleby was never on any account to be dispatched on the most trivial errand of any sort; and that even if entreated to take upon him such a matter, it was generally understood that he would prefer not to--in other words, that he would refuse point-blank.
+
32 As days passed on, I became considerably reconciled to Bartleby. His steadiness, his freedom from all dissipation, his incessant industry (except when he chose to throw himself into a standing revery behind his screen), his great stillness, his unalterableness of demeanor under all circumstances, made him a valuable acquisition. One prime thing was this,--he was always there;--first in the morning, continually through the day, and the last at night. I had a singular confidence in his honesty. I felt my most precious papers perfectly safe in his hands. Sometimes to be sure I could not, for the very soul of me, avoid falling into sudden spasmodic passions with him. For it was exceeding difficult to bear in mind all the time those strange peculiarities, privileges, and unheard of exemptions, forming the tacit stipulations on Bartleby's part under which he remained in my office. Now and then, in the eagerness of dispatching pressing business, I would inadvertently summon Bartleby, in a short, rapid tone, to put his finger, say, on the incipient tie of a bit of red tape with which I was about compressing some papers. Of course, from behind the screen the usual answer, "I prefer not to," was sure to come; and then, how could a human creature with the common infirmities of our nature, refrain from bitterly exclaiming upon such perverseness--such unreasonableness. However, every added repulse of this sort which I received only tended to lessen the probability of my repeating the inadvertence.
+
Here is must be said, that according to the custom of most legal gentlemen occupying chambers in densely-populated law buildings, there were several keys to my door. One was kept by a woman residing in the attic, which person weekly scrubbed and daily swept and dusted my apartments. Another was kept by Turkey for convenience sake. The third I sometimes carried in my own pocket. The fourth I knew not who had.
+
Now, one Sunday morning I happened to go to Trinity Church, to hear a celebrated preacher, and finding myself rather early on the ground, I thought I would walk round to my chambers for a while. Luckily I had my key with me; but upon applying it to the lock, I found it resisted by something inserted from the inside. Quite surprised, I called out; when to my consternation a key was turned from within; and thrusting his lean visage at me, and holding the door ajar, the apparition of Bartleby appeared, in his shirt sleeves, and otherwise in a strangely tattered dishabille, saying quietly that he was sorry, but he was deeply engaged just then, and--preferred not admitting me at present. In a brief word or two, he moreover added, that perhaps I had better walk round the block two or three times, and by that time he would probably have concluded his affairs. Now, the utterly unsurmised appearance of Bartleby, tenanting my law-chambers of a Sunday morning, with his cadaverously gentlemanly nonchalance, yet withal firm and self-possessed, had such a strange effect upon me, that incontinently I slunk away from my own door, and did as desired. But not without sundry twinges of impotent rebellion against the mild effrontery of this unaccountable scrivener. Indeed, it was his wonderful mildness chiefly, which not only disarmed me, but unmanned me, as it were. For I consider that one, for the time, is a sort of unmanned when he tranquilly permits his hired clerk to dictate to him, and order him away from his own premises. Furthermore, I was full of uneasiness as to what Bartleby could possibly be doing in my office in his shirt sleeves, and in an otherwise dismantled condition of a Sunday morning. Was any thing amiss going on? Nay, that was out of the question. It was not to be thought of for a moment that Bartleby was an immoral person. But what could he be doing there?--copying? Nay again, whatever might be his eccentricities, Bartleby was an eminently decorous person. He would be the last man to sit down to his desk in any state approaching to nudity. Besides, it was Sunday; and there was something about Bartleby that forbade the supposition that we would by any secular occupation violate the proprieties of the day.
+
Nevertheless, my mind was not pacified; and full of a restless curiosity, at last I returned to the door. Without hindrance I inserted my key, opened it, and entered. Bartleby was not to be seen. I looked round anxiously, peeped behind his screen; but it was very plain that he was gone. Upon more closely examining the place, I surmised that for an indefinite period Bartleby must have ate, dressed, and slept in my office, and that too without plate, mirror, or bed. The cushioned seat of a rickety old sofa in one corner bore t faint impress of a lean, reclining form. Rolled away under his desk, I found a blanket; under the empty grate, a blacking box and brush; on a chair, a tin basin, with soap and a ragged towel; in a newspaper a few crumbs of ginger-nuts and a morsel of cheese. Yet, thought I, it is evident enough that Bartleby has been making his home here, keeping bachelor's hallall by himself. Immediately then the thought came sweeping across me, What miserable friendlessness and loneliness are here revealed! His poverty is great; but his solitude, how horrible! Think of it. Of a Sunday, Wall-street is deserted as Petra; and every night of every day it is an emptiness. This building too, which of week-days hums with industry and life, at nightfall echoes with sheer vacancy, and all through Sunday is forlorn. And here Bartleby makes his home; sole spectator of a solitude which he has seen all populous--a sort of innocent and transformed Marius brooding among the ruins of Carthage!
+
For the first time in my life a feeling of overpowering stinging melancholy seized me. Before, I had never experienced aught but a not-unpleasing sadness. The bond of a common humanity now drew me irresistibly to gloom. A fraternal melancholy! For both I and Bartleby were sons of Adam. I remembered the bright silks and sparkling faces I had seen that day in gala trim, swan-like sailing down the Mississippi of Broadway; and I contrasted them with the pallid copyist, and thought to myself, Ah, happiness courts the light, so we deem the world is gay; but misery hides aloof, so we deem that misery there is none. These sad fancyings-- chimeras, doubtless, of a sick and silly brain--led on to other and more special thoughts, concerning the eccentricities of Bartleby. Presentiments of strange discoveries hovered round me. The scrivener's pale form appeared to me laid out, among uncaring strangers, in its shivering winding sheet.
+
Suddenly I was attracted by Bartleby's closed desk, the key in open sight left in the lock.
+
I mean no mischief, seek the gratification of no heartless curiosity, thought I; besides, the desk is mine, and its contents too, so I will make bold to look within. Every thing was methodically arranged, the papers smoothly placed. The pigeon holes were deep, and removing the files of documents, I groped into their recesses. Presently I felt something there, and dragged it out. It was an old bandanna handkerchief, heavy and knotted. I opened it, and saw it was a savings' bank.
+
I now recalled all the quiet mysteries which I had noted in the man. I remembered that he never spoke but to answer; that though at intervals he had considerable time to himself, yet I had never seen him reading--no, not even a newspaper; that for long periods he would stand looking out, at his pale window behind the screen, upon the dead brick wall; I was quite sure he never visited any refectory or eating house; while his pale face clearly indicated that he never drank beer like Turkey, or tea and coffee even, like other men; that he never went any where in particular that I could learn; never went out for a walk, unless indeed that was the case at present; that he had declined telling who he was, or whence he came, or whether he had any relatives in the world; that though so thin and pale, he never complained of ill health. And more than all, I remembered a certain unconscious air of pallid--how shall I call it?--of pallid haughtiness, say, or rather an austere reserve about him, which had positively awed me into my tame compliance with his eccentricities, when I had feared to ask him to do the slightest incidental thing for me, even though I might know, from his long-continued motionlessness, that behind his screen he must be standing in one of those dead-wall reveries of his.
+
Revolving all these things, and coupling them with the recently discovered fact that he made my office his constant abiding place and home, and not forgetful of his morbid moodiness; revolving all these things, a prudential feeling began to steal over me. My first emotions had been those of pure melancholy and sincerest pity; but just in proportion as the forlornness of Bartleby grew and grew to my imagination, did that same melancholy merge into fear, that pity into repulsion. So true it is, and so terrible too, that up to a certain point the thought or sight of misery enlists our best affections; but, in certain special cases, beyond that point it does not. They err who would assert that invariably this is owing to the inherent selfishness of the human heart. It rather proceeds from a certain hopelessness of remedying excessive and organic ill. To a sensitive being, pity is not seldom pain. And when at last it is perceived that such pity cannot lead to effectual succor, common sense bids the soul be rid of it. What I saw that morning persuaded me that the scrivener was the victim of innate and incurable disorder. I might give alms to his body; but his body did not pain him; it was his soul that suffered, and his soul I could not reach.
+
I did not accomplish the purpose of going to Trinity Church that morning. Somehow, the things I had seen disqualified me for the time from church-going. I walked homeward, thinking what I would do with Bartleby. Finally, I resolvedupon this;--I would put certain calm questions to him the next morning, touching his history, &c., and if he declined to answer then openly and reservedly (and I supposed he would prefer not), then to give him a twenty dollar bill over and above whatever I might owe him, and tell him his services were no longer required; but that if in any other way I could assist him, I would be happy to do so, especially if he desired to return to his native place, wherever that might be, I would willingly help to defray the expenses. Moreover, if after reaching home, he found himself at any time in want of aid, a letter from him would be sure of a reply.
+
The next morning came.
+
"Bartleby," said I, gently calling to him behind the screen.
+
No reply.
+
"Bartleby," said I, in a still gentler tone, "come here; I am not going to ask you to do any thing you would prefer not to do--I simply wish to speak to you."
+
Upon this he noiselessly slid into view.
+
"Will you tell me, Bartleby, where you were born?"
+
"I would prefer not to."
+
"Will you tell me anything about yourself?"
+
"I would prefer not to."
+
"But what reasonable objection can you have to speak to me? I feel friendly towards you."
+
He did not look at me while I spoke, but kept his glance fixed upon my bust of Cicero, which as I then sat, was directly behind me, some six inches above my head. "What is your answer, Bartleby?" said I, after waiting a considerable time for a reply, during which his countenance remained immovable, only there was the faintest conceivable tremor of the white attenuated mouth.
+
"At present I prefer to give no answer," he said, and retired into his hermitage.
+
It was rather weak in me I confess, but his manner on this occasion nettled me. Not only did there seem to lurk in it a certain disdain, but his perverseness seemed ungrateful, considering the undeniable good usage and indulgence he had received from me.
+
Again I sat ruminating what I should do.Mortified as I was at his behavior, and resolved as I had been to dismiss him when I entered my office, nevertheless I strangely felt something superstitious knocking at my heart, and forbidding me to carry out my purpose, and denouncing me for a villain if I dared to breathe one bitter word against this forlornest of mankind. At last, familiarly drawing my chair behind his screen, I sat down and said: "Bartleby, never mind then about revealing your history; but let me entreat you, as a friend, to comply as far as may be with the usages of this office. Say now you will help to examine papers tomorrow or next day: in short, say now that in a day or two you will begin to be a little reasonable:--say so, Bartleby."
+
"At present I would prefer not to be a little reasonable was his idly cadaverous reply.,"
+
Just then the folding-doors opened, and Nippers approached. He seemed suffering from an unusually bad night's rest, induced by severer indigestion than common. He overheard those final words of Bartleby.
+
"Prefer not, eh?" gritted Nippers--"I'd prefer him, if I were you, sir," addressing me--"I'd prefer him; I'd give him preferences, the stubborn mule! What is it, sir, pray, that he prefers not to do now?"
+
Bartleby moved not a limb.
+
"Mr. Nippers," said I, "I'd prefer that you would withdraw for the present."
+
Somehow, of late I had got into the way of involuntary using this word "prefer" upon all sorts of not exactly suitable occasions. And I trembled to think that my contact with the scrivener had already and seriously affected me in a mental way. And what further and deeper aberration might it not yet produce? This apprehension had not been without efficacy in determining me to summary means.
+
As Nippers, looking very sour and sulky, was departing, Turkey blandly and deferentially approached.
+
"With submission, sir," said he, "yesterday I was thinking about Bartleby here, and I think that if he would but prefer to take a quart of good ale every day, it would do much towards mending him, and enabling him to assist in examining his papers."
+
"So you have got the word too," said I, slightly excited.
+
"With submission, what word, sir," asked Turkey, respectfully crowding himself into the contracted space behind the screen, and by so doing, making me jostle the scrivener. "What word, sir?"
+
"I would prefer to be left alone here," said Bartleby, as if offended at being mobbed in his privacy.
+
"That's the word, Turkey," said I--"that's it."
+
"Oh, prefer oh yes--queer word. I never use it myself. But, sir as I was saying, if he would but prefer--"
+
"Turkey," interrupted I, "you will please withdraw."
+
"Oh, certainly, sir, if you prefer that I should."
+
As he opened the folding-door to retire, Nippers at his desk caught a glimpse of me, and asked whether I would prefer to have a certain paper copied on blue paper or white. He did not in the least roguishly accent the word prefer. It was plain that it involuntarily rolled from his tongue. I thought to myself, surely I must get rid of a demented man, who already has in some degree turned the tongues, if not the heads of myself and clerks. But I thought it prudent not to break the dismission at once.
+
The next day I noticed that Bartleby did nothing but stand at his window in his dead-wall revery. Upon asking him why he did not write, he said that he had decided upon doing no more writing.
+
"Why, how now? what next?" exclaimed I, "do no more writing?"
+
"No more."
+
"And what is the reason?"
+
"Do you not see the reason for yourself," he indifferently replied.
+
I looked steadfastly at him, and perceived that his eyes looked dull and glazed. Instantly it occurred to me, that his unexampled diligence in copying by his dim window for the first few weeks of his stay with me might have temporarily impaired his vision.
+
I was touched. I said something in condolence with him. I hinted that of course he did wisely in abstaining from writing for a while; and urged him to embrace that opportunity of taking wholesome exercise in the open air. This, however, he did not do. A few days after this, my other clerks being absent, and being in a great hurry to dispatch certain letters by the mail, I thought that, having nothing else earthly to do, Bartleby would surely be less inflexible than usual, and carry these letters to the post-office. But he blankly declined. So, much to my inconvenience, I went myself.
+
Still added days went by. Whether Bartleby's eyes improved or not, I could not say. To all appearance, I thought they did. But when I asked him if they did, he vouchsafed no answer. At all events, he would do no copying. At last, in reply to my urgings, he informed me that he had permanently given up copying.
+
"What!" exclaimed I; "suppose your eyes should get entirely well- better than ever before--would you not copy then?"
+
"I have given up copying," he answered, and slid aside.
+
He remained as ever, a fixture in my chamber. Nay--if that were possible--he became still more of a fixture than before. What was to be done? He would do nothing in the office: why should he stay there? In plain fact, he had now become a millstone to me, not only useless as a necklace, but afflictive to bear. Yet I was sorry for him. I speak less than truth when I say that, on his own account, he occasioned me uneasiness. If he would but have named a single relative or friend, I would instantly have written, and urged their taking the poor fellow away to some convenient retreat. But he seemed alone, absolutely alone in the universe. A bit of wreck</font> in the mid Atlantic. At length, necessities connected with my business tyrannized over all other considerations. Decently as I could, I told Bartleby that in six days' time he must unconditionally leave the office. I warned him to take measures, in the interval, for procuring some other abode. I offered to assist him in this endeavor, if he himself would but take the first step towards a removal. "And when you finally quit me, Bartleby," added I, "I shall see that you go not away entirely unprovided. Six days from this hour, remember."
+
At the expiration of that period, I peeped behind the screen, and lo! Bartleby was there.
+
I buttoned up my coat, balanced myself; advanced slowly towards him, touched his shoulder, and said, "The time has come; you must quit this place; I am sorry for you; here is money; but you must go."
+
"I would prefer not," he replied, with his back still towards me.
+
"You must ."
+
He remained silent.
+
Now I had an unbounded confidence in this man's common honesty. He had frequently restored to me six pences and shillings carelessly dropped upon the floor, for I am apt to be very reckless in such shirt-button affairs. The proceeding then which followed will not be deemed extraordinary. "Bartleby," said I, "I owe you twelve dollars on account; here are thirty-two; the odd twenty are yours.--Will you take it? and I handed the bills towards him.
+
But he made no motion.
+
"I will leave them here then," putting them under a weight on the table. Then taking my hat and cane and going to the door I tranquilly turned and added--"After you have removed your things from these offices, Bartleby, you will of course lock the door--since every one is now gone for the day but you--and if you please, slip your key underneath the mat, so that I may have it in the morning. I shall not see you again; so good-bye to you. If hereafter in your new place of abode I can be of any service to you, do not fail to advise me by letter. Good-bye, Bartleby, and fare you well."
+
But he answered not a word; like the last column of some ruined temple, he remained standing mute and solitary in the middle of the otherwise deserted room.
+
As I walked home in a pensive mood, my vanity got the better of my pity. I could not but highly plume myself on my masterly management in getting rid of Bartleby. Masterly I call it, and such it must appear to any dispassionate thinker. The beauty of my procedure seemed to consist in its perfect quietness. There was no vulgar bullying, no bravado of any sort, no choleric hectoring and striding to and fro across the apartment, jerking out vehement commands for Bartleby to bundle himself off with his beggarly traps. Nothing of the kind. Without loudly bidding Bartleby depart--as an inferior genius might have done--I assumed the ground that depart he must; and upon the assumption built all I had to say. The more I thought over my procedure, the more I was charmed with it. Nevertheless, next morning, upon awakening, I had my doubts,--I had somehow slept off the fumes of vanity. One of the coolest and wisest hours a man has, is just after he awakes in the morning. My procedure seemed as sagacious as ever,--but only in theory. How it would prove in practice--there was the rub. It was truly a beautiful thought to have assumed Bartleby's departure; but, after all, that assumption was simply my own, and none of Bartleby's. The great point was, not whether I had assumed that he would quit me, but whether he would prefer so to do. He was more a man of preferences than assumptions.
+
After breakfast, I walked down town, arguing the probabilities pro and con. One moment I thought it would prove a miserable failure, and Bartleby would be found all alive at my office as usual; the next moment it seemed certain that I should see his chair empty. And so I kept veering about. At the corner of Broadway and Canal- street, I saw quite an excited group of people standing in earnest conversation.
+
"I'll take odds he doesn't," said a voice as I passed.
+
"Doesn't go?--done!" said I, "put up your money."
+
I was instinctively putting my hand in my pocket to produce my own, when I remembered that this was an election day. The words I had overheard bore no reference to Bartleby, but to the success or non-success of some candidate for the mayoralty. In my intent frame of mind, I had, as it were, imagined that all Broadway shared in my excitement, and were debating the same question with me. I passed on, very thankful that the uproar of the street screened my momentary absent-mindedness.
+
As I had intended, I was earlier than usual at my office door. I stood listening for a moment. All was still. He must be gone. I tried the knob. The door was locked. Yes, my procedure had worked to a charm; he indeed must be vanished. Yet a certain melancholy mixed with this: I was almost sorry for my brilliant success. I was fumbling under the door mat for the key, which Bartleby was to have left there for me, when accidentally my knee knocked against a panel, producing a summoning sound, and in response a voice came to me from within--"Not yet; I am occupied."
+
It was Bartleby.
+
I was thunderstruck. For an instant I stood like the man who, pipe in mouth, was killed one cloudless afternoon long ago in Virginia, by summer lightning; at his own warm open window he was killed, and remained leaning out there upon the dreamy afternoon, till some one touched him, when he fell. "Not gone!" I murmured at last. But again obeying that wondrous ascendancy which the inscrutable scrivener had over me, and from which ascendancy, for all my chafing, I could not completely escape, I slowly went down stairs and out into the street, and while walking round the block, considered what I should next do in this unheard-of-perplexity. Turn the man out by an actual thrusting I could not; to drive him away by calling him hard names would not do; calling in the police was an unpleasant idea; and yet, permit him to enjoy his cadaverous triumph over me,--this too I could not think of. What was to be done? or, if nothing could be done, was there any thing further that I could assume in the matter? Yes, as before I had prospectively assumed that Bartleby would depart, so now I might retrospectively assume that departed he was. In the legitimate carrying out of this assumption, I might enter my office in a great hurry, and pretending not to see Bartleby at all, walk straight against him as if he were air. Such a proceeding would in a singular degree have the appearance of a home-thrust. It was hardly possible that Bartleby could withstand such an application of the doctrine of assumptions. But upon second thoughts the success of the plan seemed rather dubious. I resolved to argue the matter over with him again.
+
Bartleby," said I, entering the office, with a quietly severe expression. "I am seriously displeased. I am pained, Bartleby. I had thought better of you. I had imagined you of such a gentlemanly organization, that in any delicate dilemma a slight hint would suffice--in short, an assumption. But it appears I am deceived. Why," I added, unaffectedly starting, "you have not even touched the money yet," pointing to it, just where I had left it the evening previous.
+
He answered nothing.
+
"Will you, or will you not, quit me?" I now demanded in a sudden passion, advancing close to him.
+
"I would prefer not to quit you," he replied, gently emphasizing the not .
+
"What earthly right have you to stay here? do you pay any rent? Do you pay my taxes? Or is this property yours?"
+
He answered nothing.
+
"Are you ready to go on and write now? Are your eyes recovered? Could you copy a small paper for me this morning? or help examine a few lines? or step round to the post-office? In a word, will you do any thing at all, to give a coloring to your refusal to depart the premises?"
+
He silently retired into his hermitage.
+
I was now in such a state of nervous resentment that I thought it but prudentto check myself at present from further demonstrations. Bartleby and I were alone. I remembered the tragedy of the unfortunate Adams and the still more unfortunate Colt in the solitary office of the latter; and how poor Colt, being dreadfully incensed by Adams, and imprudently permitting himself to get wildly excited, was at unawares hurried into his fatal act--an act which certainly no man could possibly deplore more than the actor himself. Often it had occurred to me in my ponderings upon the subject, that had that altercation taken place in the public street, or at a private residence, it would not have terminated as it did. It was the circumstance of being alone in a solitary office, up stairs, of a building entirely unhallowed by humanizing domestic associations--an uncarpeted office, doubtless of a dusty, haggard sort of appearance;--this it must have been, which greatly helped to enhance the irritable desperation of the hapless Colt.
+
But when this old Adam of resentment rose in me and tempted me concerning Bartleby, I grappled him and threw him. How? Why, simply by recalling the divine injunction: "A new commandment give I unto you, that ye love one another." Yes, this it was that saved me. Aside from higher considerations, charity often operates as a vastly wise and prudent principle--a great safeguard to its possessor. Men have committed murder for jealousy's sake, and anger's sake, and hatred's sake, and selfishness' sake, and spiritual pride's sake; but no man that ever I heard of, ever committed a diabolical murder for sweet charity's sake. Mere self-interest, then, if no better motive can be enlisted, should, especially with high-tempered men, prompt all beings to charity and philanthropy. At any rate, upon the occasion in question, I strove to drown my exasperated feelings towards the scrivener by benevolently construing his conduct. Poor fellow, poor fellow! thought I, he don't mean any thing; and besides, he has seen hard times, and ought to be indulged.
+
I endeavored also immediately to occupy myself, and at the same time to comfort my despondency.I tried to fancy that in the course of the morning, at such time as might prove agreeable to him, Bartleby, of his own free accord, would emerge from his hermitage, and take up some decided line of march in the direction of the door. But no. Half-past twelve o'clock came; Turkey began to glow in the face, overturn his inkstand, and become generally obstreperous; Nippers abated down into quietude and courtesy; Ginger Nut munched his noon apple; and Bartleby remained standing at his window in one of his profoundest deadwall reveries. Will it be credited? Ought I to acknowledge it? That afternoon I left the office without saying one further word to him.
+
Some days now passed, during which, at leisure intervals I looked a little into Edwards on the Will," and "Priestly on Necessity." Under the circumstances, those books induced a salutary feeling. Gradually I slid into the persuasion that these troubles of mine touching the scrivener, had been all predestinated from eternity, and Bartleby was billeted upon me for some mysterious purpose of an all-wise Providence, which it was not for a mere mortal like me to fathom. Yes, Bartleby, stay there behind your screen, thought I; I shall persecute you no more; you are harmless and noiseless as any of these old chairs; in short, I never feel so private as when I know you are here. At least I see it, I feel it; I penetrate to the predestinated purpose of my life. I am content. Others may have loftier parts to enact; but my mission in this world, Bartleby, is to furnish you with office-room for such period as you may see fit to remain.
+
I believe that this wise and blessed frame of mind would have continued with me, had it not been for the unsolicited and uncharitable remarks obtruded upon me by my professional friends who visited the rooms. But thus it often is, that the constant friction of illiberal minds wears out at last the best resolves of the more generous. Though to be sure, when I reflected upon it, it was not strange that people entering my office should be struck by the peculiar aspect of the unaccountable Bartleby, and so be tempted to throw out some sinister observations concerning him. Sometimes an attorney having business with me, and calling at my office, and finding no one but the scrivener there, would undertake to obtain some sort of precise information from him touching my whereabouts; but without heeding his idle talk, Bartleby would remain standing immovable in the middle of the room. So after contemplating him in that position for a time, the attorney would depart, no wiser than he came.
+
Also, when a Reference was going on, and the room full of lawyers and witnesses and business was driving fast; some deeply occupied legal gentleman present, seeing Bartleby wholly unemployed, would request him to run round to his (the legal gentleman's) office and fetch some papers for him. Thereupon, Bartleby would tranquilly decline, and remain idle as before. Then the lawyer would give a great stare, and turn to me. And what could I say? At last I was made aware that all through the circle of my professional acquaintance, a whisper of wonder was running round, having reference to the strange creature I kept at my office. This worried me very much. And as the idea came upon me of his possibly turning out a long-lived man, and keep occupying my chambers, and denying my authority; and perplexing my visitors; and scandalizing my professional reputation; and casting a general gloom over the premises; keeping soul and body together to the last upon his savings (for doubtless he spent but half a dime a day), and in the end perhaps outlive me, and claim possession of my office by right of his perpetual occupancy: as all these dark anticipations crowded upon me more and more, and my friends continually intruded their relentless remarks upon the apparition in my room; a great change was wrought in me. I resolved to gather all my faculties together, and for ever rid me of this intolerable incubus.
+
Ere revolving any complicated project, however, adapted to this end, I first simply suggested to Bartleby the propriety of his permanent departure. In a calm and serious tone, I commended the idea to his careful and mature consideration. But having taken three days to meditate upon it, he apprised me that his original determination remained the same; in short, that he still preferred to abide with me.
+
What shall I do? I now said to myself, buttoning up my coat to the last button. What shall I do? what ought I to do? what does conscience say I should do with this man, or rather ghost. Rid myself of him, I must; go, he shall. But how? You will not thrust him, the poor, pale, passive mortal,--you will not thrust such a helpless creature out of your door? you will not dishonor yourself by such cruelty? No, I will not, I cannot do that. Rather would I let him live and die here, and then mason up his remains in the wall. What then will you do? For all your coaxing, he will not budge. Bribes he leaves under your own paperweight on your table; in short, it is quite plain that he prefers to cling to you.
+
Then something severe, something unusual must be done. What! surely you will not have him collared by a constable, and commit his innocent pallor to the common jail? And upon what ground could you procure such a thing to be done?--a vagrant, is he? What! he a vagrant, a wanderer, who refuses to budge? It is because he will not be a vagrant, then, that you seek to count him as a vagrant. That is too absurd. No visible means of support: there I have him. Wrong again: for indubitably he does support himself, and that is the only unanswerable proof that any man can show of his possessing the means so to do. No more then. Since he will not quit me, I must quit him. I will change my offices; I will move elsewhere; and give him fair notice, that if I find him on my new premises I will then proceed against him as a common trespasser.
+
Acting accordingly, next day I thus addressed him: "I find these chambers too far from the City Hall; the air is unwholesome. In a word, I propose to remove my offices next week, and shall no longer require your services. I tell you this now, in order that you may seek another place."
+
He made no reply, and nothing more was said.
+
On the appointed day I engaged carts and men, proceeded to my chambers, and having but little furniture, every thing was removed in a few hours. Throughout, the scrivener remained standing behind the screen, which I directed to be removed the last thing. It was withdrawn; and being folded up like a huge folio, left him the motionless occupant of a naked room. I stood in the entry watching him a moment, while something from within me upbraided me.
+
I re-entered, with my hand in my pocket--and--and my heart in my mouth.
+
"Good-bye, Bartleby; I am going--good-bye, and God some way bless you; and take that," slipping something in his hand. But it dropped to the floor, and then,--strange to say--I tore myself from him whom I had so longed to be rid of.
+
Established in my new quarters, for a day or two I kept the door locked, and started at every footfall in the passages. When I returned to my rooms after any little absence, I would pause at the threshold for an instant, and attentively listen, ere applying my key. But these fears were needless. Bartleby never came nigh me.
+
I thought all was going well, when a perturbed looking stranger visited me, inquiring whether I was the person who had recently occupied rooms at No.--Wall-street.
+
Full of forebodings, I replied that I was.
+
"Then, sir," said the stranger, who proved a lawyer, "you are responsible for the man you left there. He refuses to do any copying; he refuses to do any thing; he says he prefers not to; and he refuses to quit the premises."
+
"I am very sorry, sir," said I, with assumed tranquillity, but an inward tremor, "but, really, the man you allude to is nothing to me --he is no relation or apprentice of mine, that you should hold me responsible for him."
+
"In mercy's name, who is he?"
+
"I certainly cannot inform you. I know nothing about him. Formerly I employed him as a copyist; but he has done nothing for me now for some time past."
+
"I shall settle him then,--good morning, sir."
+
Several days passed, and I heard nothing more; and though I often felt a charitable prompting to call at the place and see poor Bartleby, yet a certain squeamishness of I know not what withheld me.
+
All is over with him, by this time, thought I at last, when through another week no further intelligence reached me. But coming to my room the day after, I found several persons waiting at my door in a high state of nervous excitement.
+
"That's the man--here he comes," cried the foremost one, whom recognized as the lawyer who had previously called upon me alone.
+
"You must take him away, sir, at once," cried a portly person among them, advancing upon me, and whom I knew to be the landlord of No.--Wall-street. "These gentlemen, my tenants, cannot stand it any longer; Mr. B--" pointing to the lawyer, "has turned him out of his room, and he now persists in haunting the buildinggenerally, sitting upon the banisters of the stairs by day, and sleeping in the entry by night. Every body is concerned; clients are leaving the offices; some fears are entertained of a mob; something you must do, and that without delay."
+
Aghast at this torment, I fell back before it, and would fain have locked myselfin my new quarters. In vain I persisted that Bartleby was nothing to me--no more than to any one else. In vain:--I was the last person known to have any thing to do with him, and they held me to the terrible account. Fearful then of being exposed in the papers (as one person present obscurely threatened) I considered the matter, and at length said, that if the lawyer would give me a confidential interview with the scrivener, in his (the lawyer's) own room, I would that afternoon strive my best to rid them of the nuisance they complained of.
+
Going up stairs to my old haunt, there was Bartleby silently sitting upon the banister at the landing.
+
"What are you doing here, Bartleby?" said I.
+
"Sitting upon the banister," he mildly replied.
+
I motioned him into the lawyer's room, who then left us.
+
"Bartleby," said I, "are you aware that you are the cause of great tribulation to me, by persisting in occupying the entry after being dismissed from the office?"
+
No answer.
+
"Now one of two things must take place. Either you must do something or something must be done to you. Now what sort of business would you like to engage in? Would you like to re-engage in copying for some one?"
+
"No; I would prefer not to make any change."
+
"Would you like a clerkship in a dry-goods store?"
+
"There is too much confinement about that. No, I would not like a clerkship; but I am not particular."
+
"Too much confinement," I cried, "why you keep yourself confined all the time!"
+
"I would prefer not to take a clerkship," he rejoined, as if to settle that little item at once.
+
"How would a bar-tender's business suit you? There is no trying of the eyesight in that."
+
"I would not like it at all; though, as I said before, I am not particular."
+
His unwonted wordiness inspirited me. I returned to the charge.
+
"Well then, would you like to travel through the country collecting bills for the merchants? That would improve your health."
+
"No, I would prefer to be doing something else."
+
"How then would going as a companion to Europe, to entertain some young gentleman with your conversation,--how would that suit you?"
+
"Not at all. It does not strike me that there is any thing definite about that. I like to be stationary. But I am not particular.
+
"Stationary you shall be then," I cried, now losing all patience, and for the first time in all my exasperating connection with him fairly flying into a passion. "If you do not go away from these premises before night, I shall feel bound--indeed I am bound--to-- to--to quit the premises myself!" I rather absurdly concluded, knowing not with what possible threat to try to frighten his immobility into compliance. Despairing of all further efforts, I was precipitately leaving him, when a final thought occurred to me--one which had not been wholly unindulged before.
+
"Bartleby," said I, in the kindest tone I could assume under such exciting circumstances, "will you go home with me now--not to my office, but my dwelling--and remain there till we can conclude upon some convenient arrangement for you at our leisure? Come, let us start now, right away."
+
"No: at present I would prefer not to make any change at all."
+
I answered nothing; but effectualy dodging every one by the suddenness and rapidity of my flight, rushed from the building, ran up Wall-street towards Broadway, and jumping into the first omnibus was soon removed from pursuit. As soon as tranquility returned I distinctly perceived that I had now done all that I possibly could, both in respect to the demands of the landlord and his tenants, and with regard to my own desire and sense of duty, to benefit Bartleby, and shield him from rude persecution. I now strove to be entirely care-free and quiescent; and my conscience justified me in the attempt; though indeed it was not so successful as I could have wished. So fearful was I of being again hunted out by the incensed landlord and his exasperated tenants, that, surrendering my business to Nippers, for a few days I drove about the upper part of the town and through the suburbs, in my rockaway; crossed over to Jersey City and Hoboken, and paid fugitive visits to Manhattanville and Astoria. In fact I almost lived in my rockaway for the time.
+
When again I entered my office, lo, a note from the landlord lay upon desk. opened it with trembling hands. informed me that writer had sent to police, and Bartleby removed the Tombs as a vagrant. Moreover, since I knew more about him than any one else, he wished me to appear at that place, and make a suitable statement of the facts. These tidings had a conflicting effect upon me. At first I was indignant; but at last almost approved. The landlord's energetic, summary disposition, had led him to adopt a procedure which I do not think I would have decided upon myself; and yet as a last resort, under such peculiar circumstances, it seemed the only plan.
+
As I afterwards learned, the poor scrivener, when told that he must be conducted to the Tombs, offered not the slightest obstacle, but in his pale unmoving way, silently acquiesced.
+
Some of the compassionate and curious bystanders joined the party; and headed by one of the constables arm in arm with Bartleby, the silent procession filed its way through all the noise, and heat, and joy of the roaring thoroughfares at noon.
+
The same day I received the note I went to the Tombs, or to speak more properly, the Halls of Justice. Seeking the right officer, I stated the purpose of my call, and was informed that the individual I described was indeed within. I then assured the functionary that Bartleby was a perfectly honest man, and greatly to be compassionated, however unaccountably eccentric. I narrated all I knew,and closed by suggesting the idea of letting him remain in as indulgent confinement as possible till something less harsh might be done--though indeed I hardly knew what. At all events, if nothing else could be decided upon, the alms-house must receive him. I then begged to have an interview.
+
Being under no disgraceful charge, and quite serene and harmless in all his ways, they had permitted him freely to wander about the prison, and especially in the inclosed grass-platted yards thereof. And so I found him there, standing all alone in the quietest of the yards, his face towards a high wall, while all around, from the narrow slits of the jail windows, I thought I saw peering out upon him the eyes of murderers and thieves.
+
"Bartleby!"
+
"I know you," he said, without looking round,--"and I want nothing to say to you."
+
"It was not I that brought you here, Bartleby," said I, keenly pained at his implied suspicion. "And to you, this should not be so vile a place. Nothing reproachful attaches to you by being here. And see, it is not so sad a place as one might think. Look, there is the sky, and here is the grass."
+
"I know where I am," he replied, but would say nothing more, and so I left him.
+
As I entered the corridor again, a broad meat-like man in an apron, accosted me, and jerking his thumb over his shoulder said--"Is that your friend?"
+
"Yes."
+
"Does he want to starve? If he does, let him live on the prison fare, that's all.
+
"Who are you?" asked I, not knowing what to make of such an unofficially speaking person in such a place.
+
"I am the grub-man. Such gentlemen as have friends here, hire me to provide them with something good to eat."
+
"Is this so?" said I, turning to the turnkey.
+
He said it was.
+
"Well then," said I, slipping some silver into the grub-man's hands (for so they called him). "I want you to give particular attention to my friend there; let him have the best dinner you can get. And you must be as polite to him as possible."
+
"Introduce me, will you?" said the grub-man, looking at me with an expression which seemed to say he was all impatience for an opportunity to give a specimen of his breeding.
+
Thinking it would prove of benefit to the scrivener, I acquiesced; and asking the grub-man his name, went up with him to Bartleby.
+
"Bartleby, this is a friend; you will find him very useful to you."
+
"Your sarvant, sir, your sarvant," said the grub-man, making a low salutation behind his apron. "Hope you find it pleasant here, sir;--spacious grounds--cool apartments, sir--hope you'll stay with us some time--try to make it agreeable. What will you have for dinner today?"
+
"I prefer not to dine to-day," said Bartleby, turning away. "It would disagree with me; I am unused to dinners." So saying he slowly moved to the other side of the inclosure, and took up a position fronting the dead-wall.
+
"How's this?" said the grub-man, addressing me with a stare of astonishment. "He's odd, aint he?"
+
"I think he is a little deranged," said I, sadly.
+
"Deranged? deranged is it? Well now, upon my word, I thought that friend of yourn was a gentleman forger; they are always pale and genteel-like, them forgers. I can't help pity 'em--can't help it, sir. Did you know Monroe Edwards?" he added touchingly, and paused. Then, laying his hand pityingly on my shoulder, sighed, "he died of consumption at Sing-Sing. so you weren't acquainted with Monroe?"
+
"No, I was never socially acquainted with any forgers. But I cannot stop longer. Look to my friend yonder. You will not lose by it. I will see you again."
+
Some few days after this, I again obtained admission to the Tombs, and went through the corridors in quest of Bartleby; but without finding him.
+
"I saw him coming from his cell not long ago," said a turnkey, "may be he's gone to loiter in the yards."
+
So I went in that direction.
+
"Are you looking for the silent man?" said another turnkey passing me. "Yonder he lies--sleeping in the yard there. 'Tis not twenty minutes since I saw him lie down."
+
The yard was entirely quiet. It was not accessible to the common prisoners. The surrounding walls, of amazing thickness, kept off all sound behind them. The Egyptian character of the masonry weighed upon me with its gloom. But a soft imprisoned turf grew under foot. The heart of the eternal pyramids, it seemed, wherein, by some strange magic, through the clefts, grass-seed, dropped by birds, had sprung.
+
Strangely huddled at the base of the wall, his knees drawn up, and lying on his side, his head touching the cold stones, I saw the wasted Bartleby. But nothing stirred. I paused; then went close up to him; stooped over, and saw that his dim eyes were open; otherwise he seemed profoundly sleeping. Something prompted me to touch him. I felt his hand, when a tingling shiver ran up my arm and down my spine to my feet.
+
The round face of the grub-man peered upon me now. "His dinner is ready. Won't he dine to-day, either? Or does he live without dining?"
+
"Lives without dining," said I, and closed the eyes.
+
"Eh!--He's asleep, aint he?"
+
"With kings and counsellors," murmured I.
+
* * * * * * * *
+
There would seem little need for proceeding further in this history. Imagination will readily supply the meagre recital of poor Bartleby's interment. But ere parting with the reader, let me say, that if this little narrative has sufficiently interested him, to awaken curiosity as to who Bartleby was, and what manner of life he led prior to the present narrator's making his acquaintance, I can only reply, that in such curiosity I fully share, but am wholly unable to gratify it. Yet here I hardly know whether I should divulge one little item of rumor, which came to my ear a few months after the scrivener's decease. Upon what basis it rested, I could never ascertain; and hence how true it is I cannot now tell. But inasmuch as this vague report has not been without a certain strange suggestive interest to me, however said, it may prove the same with some others; and so I will briefly mention it. The report was this: that Bartleby had been a subordinate clerk in the Dead Letter Office at Washington , from which he had been suddenly removed by a change in the administration. When I think over this rumor, I cannot adequately express the emotions which seize me. Dead letters! does it not sound like dead men? Conceive a man by nature and misfortune prone to a pallid hopelessness, can any business seem more fitted to heighten it than that of continually handling these dead letters and assorting them for the flames? For by the cart-load they are annually burned. Sometimes from out the folded paper the pale clerk takes a ring:--the bank-note sent in swiftest charity:--he whom it would relieve, nor eats nor hungers any more; pardon for those who died despairing; hope for those who died unhoping; good tidings for those who died stifled by unrelieved calamities. On errands of life, these letters speed to death.
+
Ah Bartleby! Ah humanity!
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/cnet-svg-classes/expected.html b/test/test-pages/cnet-svg-classes/expected.html
index 26b7440a..c8f00f80 100644
--- a/test/test-pages/cnet-svg-classes/expected.html
+++ b/test/test-pages/cnet-svg-classes/expected.html
@@ -5,19 +5,19 @@
Twitter ha dado a conocer que Twitter Lite llegará a un total de 24 nuevos países a partir de hoy, 11 de ellos de América Latina.
Según explicó en un comunicado Twitter Lite ahora estará disponible en Bolivia, Brasil, Chile, Colombia, Costa Rica, Ecuador, México, Panamá, Perú, El Salvador y Venezuela.
Twitter Lite es la versión ligera de la aplicación de la red social para Android, disponible en la Google Play Store. Con este app los usuarios que experimentan fallos de red o que viven en países con redes con poca velocidad de conexión como Venezuela podrán descargar los tuits de forma más rápida.
-
+
Entre sus novedades, Twitter Lite permite la carga rápida de tuits en redes 2G y 3G, y ofrece ayuda offline en caso de que pierdas tu conexión; a eso debemos sumar que minimiza el uso de datos y ofrece un modo de ahorro, en el que únicamente se descargan las fotos o videos de los tuits que quieres ver.
-
-
+
+
Además, el app ocupa menos espacio en tu teléfono móvil, al reducir a 3MB su peso.
Twitter dio a conocer Twitter Lite en abril en India, y desde entonces ha estado trabajando para llevarlo a más países. La empresa en los últimos meses también se ha involucrado de forma definitiva en la eliminación de los abusos en la red social , tomando medidas incluso en la verificación de cuentas.
-
+
Reproduciendo: Mira esto: Google Assistant mejora, hay más cambios en Twitter y...
-
+
8:09
-
+
\ No newline at end of file
diff --git a/test/test-pages/cnet/expected.html b/test/test-pages/cnet/expected.html
index 4f401dad..69402b0c 100644
--- a/test/test-pages/cnet/expected.html
+++ b/test/test-pages/cnet/expected.html
@@ -6,7 +6,7 @@
Facebook CEO Mark Zuckerberg, the man with the acquisition plan.
Photo by James Martin/CNET
Anyone who has ever been involved in closing a billion-dollar acquisition deal will tell you that you don't go in without a clear, well thought out plan.
-
+
Facebook CEO Mark Zuckerberg knows a thing or two about how to seal the deal on blockbuster buys. After all, he's the man behind his company's $19 billion acquisition of WhatsApp, he personally brokered its $1 billion buyout of Instagram and closed the $3 billion deal to buy Oculus VR.
Zuckerberg offered a primer on the strategies he and his company employ when they see an attractive target during testimony Tuesday in a lawsuit with ZeniMax Media , which accuses Oculus and Facebook of "misappropriating" trade secrets and copyright infringement. At the heart of the lawsuit is technology that helped create liftoff for virtual reality, one of the hottest gadget trends today.
A key Facebook approach is building a long-term relationship with your target, Zuckerberg said at the trial. These deals don't just pop up over night, he said according to a transcript reviewed by Business Insider . They take time to cultivate.
@@ -20,7 +20,7 @@
-
+
When that doesn't work, Zuckerberg said scare tactics is an effective, if undesirable, way of persuading small startups that they face a better chance of survival if they have Facebook to guide their way rather than going it alone.
That's less my thing, but I think if you are trying to help convince people that they want to join you, helping them understand all the pain that they would have to go through to build it out independently is a valuable tactic.
It also pays to be weary of competing suitors for your startup, Zuckerberg said, and be willing to move fast to stave off rivals and get the deal done.
@@ -31,13 +31,13 @@
-
+
Tech Enabled: CNET chronicles tech's role in providing new kinds of accessibility. Check it out here .
Technically Literate: Original works of short fiction with unique perspectives on tech, exclusively on CNET. Here .
-
+
\ No newline at end of file
diff --git a/test/test-pages/cnn/expected.html b/test/test-pages/cnn/expected.html
index 66c778db..0aafe570 100644
--- a/test/test-pages/cnn/expected.html
+++ b/test/test-pages/cnn/expected.html
@@ -1,68 +1,38 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The U.S. has long been heralded as a land of opportunity -- a place where anyone can succeed regardless of the economic class they were born into.
-
But a new report released on Monday by Stanford University's Center on Poverty and Inequality calls that into question.
-
-
The report assessed poverty levels, income and wealth inequality, economic mobility and unemployment levels among 10 wealthy countries with social welfare programs.
-
-
-
-
-
-
- Powered by SmartAsset.com
-
-
-
-
-
-
-
-
-
-
-
-
-
Among its key findings: the class you're born into matters much more in the U.S. than many of the other countries.
-
As the report states : "[T]he birth lottery matters more in the U.S. than in most well-off countries."
-
-
But this wasn't the only finding that suggests the U.S. isn't quite living up to its reputation as a country where everyone has an equal chance to get ahead through sheer will and hard work.
-
Related: Rich are paying more in taxes but not as much as they used to
-
-
The report also suggested the U.S. might not be the "jobs machine" it thinks it is, when compared to other countries.
-
It ranked near the bottom of the pack based on the levels of unemployment among men and women of prime working age. The study determined this by taking the ratio of employed men and women between the ages of 25 and 54 compared to the total population of each country.
-
The overall rankings of the countries were as follows: 1. Finland 2. Norway 3. Australia 4. Canada 5. Germany 6. France 7. United Kingdom 8. Italy 9. Spain 10. United States
-
-
-
-
-
-
-
-
-
-
The low ranking the U.S. received was due to its extreme levels of wealth and income inequality and the ineffectiveness of its "safety net" -- social programs aimed at reducing poverty.
-
Related: Chicago is America's most segregated city
-
The report concluded that the American safety net was ineffective because it provides only half the financial help people need. Additionally, the levels of assistance in the U.S. are generally lower than in other countries.
-
-
-
CNNMoney (New York) First published February 1, 2016: 1:28 AM ET
-
\ No newline at end of file
+
+
+
The U.S. has long been heralded as a land of opportunity -- a place where anyone can succeed regardless of the economic class they were born into.
+
But a new report released on Monday by Stanford University's Center on Poverty and Inequality calls that into question.
+
The report assessed poverty levels, income and wealth inequality, economic mobility and unemployment levels among 10 wealthy countries with social welfare programs.
+
+
+
+
+
+
Powered by SmartAsset.com
+
+
+
+
+
+
Among its key findings: the class you're born into matters much more in the U.S. than many of the other countries.
+
As the report states : "[T]he birth lottery matters more in the U.S. than in most well-off countries."
+
But this wasn't the only finding that suggests the U.S. isn't quite living up to its reputation as a country where everyone has an equal chance to get ahead through sheer will and hard work.
+
Related: Rich are paying more in taxes but not as much as they used to
+
The report also suggested the U.S. might not be the "jobs machine" it thinks it is, when compared to other countries.
+
It ranked near the bottom of the pack based on the levels of unemployment among men and women of prime working age. The study determined this by taking the ratio of employed men and women between the ages of 25 and 54 compared to the total population of each country.
+
The overall rankings of the countries were as follows: 1. Finland 2. Norway 3. Australia 4. Canada 5. Germany 6. France 7. United Kingdom 8. Italy 9. Spain 10. United States
+
+
+
+
+
+
+
+
+
+
The low ranking the U.S. received was due to its extreme levels of wealth and income inequality and the ineffectiveness of its "safety net" -- social programs aimed at reducing poverty.
+
Related: Chicago is America's most segregated city
+
The report concluded that the American safety net was ineffective because it provides only half the financial help people need. Additionally, the levels of assistance in the U.S. are generally lower than in other countries.
+
CNNMoney (New York) First published February 1, 2016: 1:28 AM ET
+
+
\ No newline at end of file
diff --git a/test/test-pages/daringfireball-1/expected.html b/test/test-pages/daringfireball-1/expected.html
index 6c3f1544..fd7ecb23 100644
--- a/test/test-pages/daringfireball-1/expected.html
+++ b/test/test-pages/daringfireball-1/expected.html
@@ -1,10 +1,10 @@
-
-
-
+
+
+
-
+
Daring Fireball is written and produced by John Gruber.
@@ -29,10 +29,10 @@
Web Standards
Web standards are important, and Daring Fireball adheres to them. Specifically, Daring Fireball’s HTML markup should validate as either HTML 5 or XHTML 4.01 Transitional, its layout is constructed using valid CSS , and its syndicated feed is valid Atom .
If Daring Fireball looks goofy in your browser, you’re likely using a shitty browser that doesn’t support web standards. Internet Explorer, I’m looking in your direction. If you complain about this, I will laugh at you, because I do not care. If, however, you are using a modern, standards-compliant browser and have trouble viewing or reading Daring Fireball, please do let me know.
-
-
-
-
+
+
+
+
-
+
\ No newline at end of file
diff --git a/test/test-pages/ehow-1/expected.html b/test/test-pages/ehow-1/expected.html
index 06e78ccb..0e5d3b0f 100644
--- a/test/test-pages/ehow-1/expected.html
+++ b/test/test-pages/ehow-1/expected.html
@@ -1,17 +1,16 @@
Glass cloche terrariums are not only appealing to the eye, but they also preserve a bit of nature in your home and serve as a simple, yet beautiful, piece of art. Closed terrariums are easy to care for, as they retain much of their own moisture and provide a warm environment with a consistent level of humidity. You won’t have to water the terrariums unless you see that the walls are not misting up. Small growing plants that don’t require a lot of light work best such as succulents, ferns, moss, even orchids.
Glass cloche terrariums (Lucy Akins)
-
+
-
What You'll Need:
-
Cloche
+ What You'll Need:
Cloche
Planter saucer, small shallow dish or desired platform
Floral foam oasis
Ruler
@@ -26,80 +25,70 @@
-
Step 1
-
Measure the circumference of your cloche and cut the foam oasis about 3/4 inch (2 cm) smaller. Place the foam oasis into a container full of water and allow to soak until it sinks to the bottom. Dig out a hole on the oasis large enough to fit your plant, being careful not to pierce all the way through to the bottom.
+
Step 1
Measure the circumference of your cloche and cut the foam oasis about 3/4 inch (2 cm) smaller. Place the foam oasis into a container full of water and allow to soak until it sinks to the bottom. Dig out a hole on the oasis large enough to fit your plant, being careful not to pierce all the way through to the bottom.
Dig a hole in the oasis. (Lucy Akins)
-
-
+
+
-
Step 2
-
Insert your plant into the hole.
+
Step 2
Insert your plant into the hole.
Orchid in foam oasis (Lucy Akins)
-
Step 3
-
You can add various plants if you wish.
+
Step 3
You can add various plants if you wish.
Various foliage (Lucy Akins)
-
Step 4
-
Using floral pins, attach enough moss around the oasis to cover it.
+
Step 4
Using floral pins, attach enough moss around the oasis to cover it.
Attach moss. (Lucy Akins)
-
Step 5
-
Gently place the cloche over the oasis. The glass may push some of the moss upward, exposing some of the foam.
+
Step 5
Gently place the cloche over the oasis. The glass may push some of the moss upward, exposing some of the foam.
Place cloche over oasis. (Lucy Akins)
-
Step 6
-
Simply pull down the moss with tweezers or insert more moss to fill in the empty spaces.
+
Step 6
Simply pull down the moss with tweezers or insert more moss to fill in the empty spaces.
Rearrange moss. (Lucy Akins)
-
Step 7
-
You can use any platform you wish. In this case, a small saucer was used.
+
Step 7
You can use any platform you wish. In this case, a small saucer was used.
Place cloche on a platform to sit on. (Lucy Akins)
-
Step 8
-
This particular terrarium rests on a planter saucer and features a small white pumpkin.
+
Step 8
This particular terrarium rests on a planter saucer and features a small white pumpkin.
Cloche placed on a terracotta saucer (Lucy Akins)
-
Step 9
-
This particular terrarium was placed on a wood slice and a little toy squirrel was placed inside to add a little whimsy.
+
Step 9
This particular terrarium was placed on a wood slice and a little toy squirrel was placed inside to add a little whimsy.
Placed on a wooden slice (Lucy Akins)
-
Finished Terrarium
-
Displayed alone or in a group, these pretty arrangements allow you to add a little nature to your decor or tablescape.
+
Finished Terrarium
Displayed alone or in a group, these pretty arrangements allow you to add a little nature to your decor or tablescape.
Cloche terrarium (Lucy Akins)
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/ehow-2/expected.html b/test/test-pages/ehow-2/expected.html
index e7d33e85..78b990fa 100644
--- a/test/test-pages/ehow-2/expected.html
+++ b/test/test-pages/ehow-2/expected.html
@@ -1,23 +1,20 @@
-
+
@@ -30,14 +27,13 @@
(Mike Watson Images/Moodboard/Getty)
-
-
+
+
-
-
Parties hosted at restaurants, clubhouses and country clubs eliminate the need to spend hours cleaning up once party guests have gone home. But that convenience comes with a price tag. A country club may charge as much as $2,000 for room rental and restaurant food and beverage will almost always cost more than food prepped and served at home.
+
Parties hosted at restaurants, clubhouses and country clubs eliminate the need to spend hours cleaning up once party guests have gone home. But that convenience comes with a price tag. A country club may charge as much as $2,000 for room rental and restaurant food and beverage will almost always cost more than food prepped and served at home.
Thomas Jackson/Digital Vision/Getty Images
@@ -47,9 +43,8 @@
-
-
Instead of hiring a DJ, use your iPod or Smartphone to spin the tunes. Both easily hook up to most speakers or mp3 compatible docks to play music from your music library. Or download Pandora, the free online radio app, and play hours of music for free.
-Personalize the music with a playlist of the grad’s favorite songs or songs that were big hits during his or her years in school.
+
Instead of hiring a DJ, use your iPod or Smartphone to spin the tunes. Both easily hook up to most speakers or mp3 compatible docks to play music from your music library. Or download Pandora, the free online radio app, and play hours of music for free.
+Personalize the music with a playlist of the grad’s favorite songs or songs that were big hits during his or her years in school.
Spencer Platt/Getty Images News/Getty Images
@@ -59,20 +54,18 @@
-
-
Avoid canned drinks, which guests often open, but don't finish. Serve pitchers of tap water with lemon and cucumber slices or sliced strawberries for an interesting and refreshing flavor. Opt for punches and non-alcoholic drinks for high school graduates that allow guests to dole out the exact amount they want to drink.
+
Avoid canned drinks, which guests often open, but don't finish. Serve pitchers of tap water with lemon and cucumber slices or sliced strawberries for an interesting and refreshing flavor. Opt for punches and non-alcoholic drinks for high school graduates that allow guests to dole out the exact amount they want to drink.
evgenyb/iStock/Getty Images
-
+
-
-
Instead of inviting everyone you – and the graduate – know or ever knew, scale back the guest list. Forgo inviting guests that you or your grad haven't seen for eons. There is no reason to provide provisions for people who are essentially out of your lives. Sticking to a small, but personal, guest list allows more time to mingle with loved ones during the party, too.
+
Instead of inviting everyone you – and the graduate – know or ever knew, scale back the guest list. Forgo inviting guests that you or your grad haven't seen for eons. There is no reason to provide provisions for people who are essentially out of your lives. Sticking to a small, but personal, guest list allows more time to mingle with loved ones during the party, too.
Kane Skennar/Photodisc/Getty Images
@@ -82,8 +75,7 @@
-
-
See if your grad and his best friend, girlfriend or close family member would consider hosting a joint party. You can split some of the expenses, especially when the two graduates share mutual friends. You'll also have another parent to bounce ideas off of and to help you stick to your budget when you're tempted to splurge.
+
See if your grad and his best friend, girlfriend or close family member would consider hosting a joint party. You can split some of the expenses, especially when the two graduates share mutual friends. You'll also have another parent to bounce ideas off of and to help you stick to your budget when you're tempted to splurge.
Mike Watson Images/Moodboard/Getty
@@ -93,9 +85,8 @@
-
-
Skip carving stations of prime rib and jumbo shrimp as appetizers, especially for high school graduation parties. Instead, serve some of the graduate's favorite side dishes that are cost effective, like a big pot of spaghetti with breadsticks. Opt for easy and simple food such as pizza, finger food and mini appetizers.
-Avoid pre-packaged foods and pre-made deli platters. These can be quite costly. Instead, make your own cheese and deli platters for less than half the cost of pre-made.
+
Skip carving stations of prime rib and jumbo shrimp as appetizers, especially for high school graduation parties. Instead, serve some of the graduate's favorite side dishes that are cost effective, like a big pot of spaghetti with breadsticks. Opt for easy and simple food such as pizza, finger food and mini appetizers.
+Avoid pre-packaged foods and pre-made deli platters. These can be quite costly. Instead, make your own cheese and deli platters for less than half the cost of pre-made.
Mark Stout/iStock/Getty Images
@@ -105,35 +96,33 @@
-
-
Instead of an evening dinner party, host a grad lunch or all appetizers party. Brunch and lunch fare or finger food costs less than dinner. Guests also tend to consume less alcohol in the middle of the day, which keeps cost down.
+
Instead of an evening dinner party, host a grad lunch or all appetizers party. Brunch and lunch fare or finger food costs less than dinner. Guests also tend to consume less alcohol in the middle of the day, which keeps cost down.
Mark Stout/iStock/Getty Images
-
-
+
+
-
-
Decorate your party in the graduate's current school colors or the colors of the school he or she will be headed to next. Décor that is not specifically graduation-themed may cost a bit less, and any leftovers can be re-used for future parties, picnics and events.
+
Decorate your party in the graduate's current school colors or the colors of the school he or she will be headed to next. Décor that is not specifically graduation-themed may cost a bit less, and any leftovers can be re-used for future parties, picnics and events.
jethuynh/iStock/Getty Images
-
-
+
+
Related Searches
-
-
+
+
Promoted By Zergnet
-
-
+
+
\ No newline at end of file
diff --git a/test/test-pages/engadget/expected.html b/test/test-pages/engadget/expected.html
index b39adbb0..f80f9a47 100644
--- a/test/test-pages/engadget/expected.html
+++ b/test/test-pages/engadget/expected.html
@@ -1,488 +1,265 @@
-
-
-
-
-
But only hardcore
- gamers will appreciate it.
-
+
+
+
+
+
+
+
But only hardcore gamers will appreciate it.
+
+
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
Gallery: Xbox One
- X | 14 Photos
-
-
-
-
- 14
-
-
-
+
+ Gallery: Xbox One X | 14 Photos
+
+
-
-
+
+
-
-
-
-
-
-
Most
- powerful hardware ever in a home console
-
- Solid
- selection of enhanced titles
-
- 4K Blu-ray
- drive is great for movie fans
-
-
-
-
-
Expensive
-
- Not worth
- it if you don’t have a 4K TV
-
- Still no VR
- support
-
-
+
+ Most powerful hardware ever in a home console
+ Solid selection of enhanced titles
+ 4K Blu-ray drive is great for movie fans
+
+
+
+
+ Expensive
+ Not worth it if you don’t have a 4K TV
+ Still no VR support
+
-
-
-
As promised, the Xbox One X is the
- most powerful game console ever. In practice, though, it
- really just puts Microsoft on equal footing with Sony’s
- PlayStation 4 Pro. 4K/HDR enhanced games look great, but
- it’s lack of VR is disappointing in 2017.
-
+
+
+
As promised, the Xbox One X is the most powerful game console ever. In practice, though, it really just puts Microsoft on equal footing with Sony’s PlayStation 4 Pro. 4K/HDR enhanced games look great, but it’s lack of VR is disappointing in 2017.
+
+
-
-
-
Hardware
-
-
Despite all the power inside, the One X is
- Microsoft's smallest console to date. It looks
- similar to the Xbox One S, except it has an entirely
- matte black case and is slightly slimmer. It's also
- surprisingly dense -- the console weighs 8.4 pounds,
- but it feels far heavier than you'd expect for its
- size, thanks to all of its new hardware. The One S,
- in comparison, weighs two pounds less.
-
The Xbox One X's real upgrades are under the hood. It
- features an 8-core CPU running at 2.3Ghz, 12GB of
- GDDR5 RAM, a 1 terabyte hard drive and an upgraded
- AMD Polaris GPU with 6 teraflops of computing power.
- The PS4 Pro has only 8GB of RAM and tops out at 4.2
- teraflops. Microsoft's console is clearly faster.
- That additional horsepower means the Xbox One X can
- run more games in full native 4K than the Sony's
- console.
-
-
Along the front, there's the slot-loading 4K Blu-ray
- drive, a physical power button, a single USB port
- and a controller pairing button. And around back,
- there are HDMI out and in ports, the latter of which
- lets you plug in your cable box. Additionally, there
- are two USB ports, connections for optical audio, IR
- out, and gigabit Ethernet. If you've still got a
- Kinect around, you'll need to use a USB adapter to
- plug it in.
-
+
Hardware
+
+
Despite all the power inside, the One X is Microsoft's smallest console to date. It looks similar to the Xbox One S, except it has an entirely matte black case and is slightly slimmer. It's also surprisingly dense -- the console weighs 8.4 pounds, but it feels far heavier than you'd expect for its size, thanks to all of its new hardware. The One S, in comparison, weighs two pounds less.
+
The Xbox One X's real upgrades are under the hood. It features an 8-core CPU running at 2.3Ghz, 12GB of GDDR5 RAM, a 1 terabyte hard drive and an upgraded AMD Polaris GPU with 6 teraflops of computing power. The PS4 Pro has only 8GB of RAM and tops out at 4.2 teraflops. Microsoft's console is clearly faster. That additional horsepower means the Xbox One X can run more games in full native 4K than the Sony's console.
+
+
Along the front, there's the slot-loading 4K Blu-ray drive, a physical power button, a single USB port and a controller pairing button. And around back, there are HDMI out and in ports, the latter of which lets you plug in your cable box. Additionally, there are two USB ports, connections for optical audio, IR out, and gigabit Ethernet. If you've still got a Kinect around, you'll need to use a USB adapter to plug it in.
+
+
-
-
-
-
-
Devindra Hardawar/AOL
-
+
+
+ Devindra Hardawar/AOL
+
+
+
-
-
The console's controller hasn't changed since its
- last mini-upgrade with the Xbox One S. That revision
- rounded out its seams, improved bumper performance
- and added a 3.5mm headphone jack. It's still a great
- controller, though I'm annoyed Microsoft is sticking
- with AA batteries as their default power source.
- Sure, you could just pick up some renewable
- batteries, or the Play and Charge kit, but that's an
- extra expense. And manually swapping batteries feels
- like a bad user experience when every other console
- has rechargeable controllers.
-
In use
-
+
The console's controller hasn't changed since its last mini-upgrade with the Xbox One S. That revision rounded out its seams, improved bumper performance and added a 3.5mm headphone jack. It's still a great controller, though I'm annoyed Microsoft is sticking with AA batteries as their default power source. Sure, you could just pick up some renewable batteries, or the Play and Charge kit, but that's an extra expense. And manually swapping batteries feels like a bad user experience when every other console has rechargeable controllers.
+
In use
+
+
-
-
-
-
-
Devindra Hardawar/AOL
-
+
+
+ Devindra Hardawar/AOL
+
+
+
-
-
You won't find any major differences between the One
- X and the last Xbox at first — aside from a more
- dramatic startup sequence. Navigating the Xbox
- interface is fast and zippy, but mostly that's due
- to a recent OS upgrade. If you're moving over from
- an older Xbox One, you can use the backup tool to
- transfer your games and settings to an external hard
- drive. Just plug that into the new console during
- setup and it'll make it feel just like your old
- machine. It's also a lot faster than waiting for
- everything to download from Xbox Live.
-
You'll still have to set aside some time if you want
- to play an Xbox One X-enhanced title, though. Those
- 4K textures will make games significantly larger,
- but Microsoft says it's come up with a few ways to
- help developers make downloading them more
- efficient. For example, language packs and other
- optional content won't get installed by default.
-
We only had a few enhanced titles to test out during
- our review: Gears of War 4 , Killer
- Instinct and Super Lucky's Tale .
- They each took advantage of the console in different
- ways. Gears of War 4 runs natively in 4K at
- 30 FPS with Dolby Atmos and HDR (high dynamic range
- lighting) support. It looked great -- especially
- with HDR, which highlighted bright elements like
- lightning strikes -- but I noticed the frame rate
- dip occasionally. I was also surprised that load
- times were on-par with what I've seen with the game
- on the Xbox One S.
-
+
You won't find any major differences between the One X and the last Xbox at first — aside from a more dramatic startup sequence. Navigating the Xbox interface is fast and zippy, but mostly that's due to a recent OS upgrade. If you're moving over from an older Xbox One, you can use the backup tool to transfer your games and settings to an external hard drive. Just plug that into the new console during setup and it'll make it feel just like your old machine. It's also a lot faster than waiting for everything to download from Xbox Live.
+
You'll still have to set aside some time if you want to play an Xbox One X-enhanced title, though. Those 4K textures will make games significantly larger, but Microsoft says it's come up with a few ways to help developers make downloading them more efficient. For example, language packs and other optional content won't get installed by default.
+
We only had a few enhanced titles to test out during our review: Gears of War 4 , Killer
+ Instinct and Super Lucky's Tale . They each took advantage of the console in different ways. Gears of War 4 runs natively in 4K at 30 FPS with Dolby Atmos and HDR (high dynamic range lighting) support. It looked great -- especially with HDR, which highlighted bright elements like lightning strikes -- but I noticed the frame rate dip occasionally. I was also surprised that load times were on-par with what I've seen with the game on the Xbox One S.
+
+
-
-
-
+
+
-
-
-
-
+
+
+
+
+
+
-
-
You can also play in Performance mode, which bumps
- the frame rate up to 60FPS and uses higher quality
- graphical effects, while rendering it lower in
- 1080p. Personally, I preferred this, since it makes
- the game much smoother -- as if you're playing it on
- a high-end gaming PC, not a console. Some
- PlayStation 4 Pro games also let you choose how you
- wanted to distribute its power, so in some ways
- Microsoft is just following in its footsteps.
-
I've been playing Gears of War 4 on my
- gaming PC (which is connected to my home theater)
- over the past year, and I was impressed that the
- Xbox One X is able to deliver a similar experience.
- It didn't quite match my rig though, which is
- powered by Intel Core i7 4790k CPU running at 4GHz,
- 16GB DDR3 RAM and an NVIDIA GTX 1080 GPU. Typically,
- I play at 1,440p (2,560 by 1,440 pixels) with HDR
- and all of the graphical settings set to their
- highest level, and I can easily maintain a 60FPS
- frame rate. The One X felt just as solid at 1080p,
- but there were clearly plenty of graphics settings
- it couldn't take advantage of, in particular higher
- levels of bloom lighting and shadow detail.
-
-
+
You can also play in Performance mode, which bumps the frame rate up to 60FPS and uses higher quality graphical effects, while rendering it lower in 1080p. Personally, I preferred this, since it makes the game much smoother -- as if you're playing it on a high-end gaming PC, not a console. Some PlayStation 4 Pro games also let you choose how you wanted to distribute its power, so in some ways Microsoft is just following in its footsteps.
+
I've been playing Gears of War 4 on my gaming PC (which is connected to my home theater) over the past year, and I was impressed that the Xbox One X is able to deliver a similar experience. It didn't quite match my rig though, which is powered by Intel Core i7 4790k CPU running at 4GHz, 16GB DDR3 RAM and an NVIDIA GTX 1080 GPU. Typically, I play at 1,440p (2,560 by 1,440 pixels) with HDR and all of the graphical settings set to their highest level, and I can easily maintain a 60FPS frame rate. The One X felt just as solid at 1080p, but there were clearly plenty of graphics settings it couldn't take advantage of, in particular higher levels of bloom lighting and shadow detail.
-
+
+
-
-
-
Gallery: Xbox
- One X screenshots | 9 Photos
-
-
-
-
- 9
-
-
-
+
+
+ Gallery: Xbox One X screenshots | 9 Photos
+
+
+
+
-
-
Killer Instinct and Super Lucky's
- Tale run in 4K at a smooth 60FPS. They both
- looked and played better than their standard
- versions, though I was surprised they didn't take
- advantage of HDR. As usual, I noticed the
- improvement in frame rates more than the higher
- resolution. Unless you're sitting very close to a TV
- above 50-inches, you'd likely have a hard time
- telling between 4K and 1080p.
-
That poses a problem for Microsoft: It's betting that
- gamers will actually want true 4K rendering. In
- practice, though, PlayStation 4 Pro titles running
- in HDR and resolutions between 1080p and 4K often
- look just as good to the naked eye. The Xbox One X's
- big advantage is that its hardware could let more
- games reach 60FPS compared to Sony's console.
-
Microsoft says over 130 Xbox One X-enhanced titles
- are in the works. That includes already-released
- games like Forza Motorsport 7 and Assassin's
- Creed Origins , as well as upcoming titles
- like Call of Duty: WW2 . You'll be able to
- find them easily in a special section in the Xbox
- store. There is also a handful of Xbox 360 games
- that'll get enhanced eventually, including Halo
- 3 and Fallout 3 . Some of those
- titles will get bumped up to a higher resolution,
- while others will get HDR support. Microsoft
- describes these upgrades as a bonus for developers
- who were prescient about how they built their games.
- Basically, don't expect your entire 360 library to
- get enhanced.
-
+
Killer Instinct and Super Lucky's
+ Tale run in 4K at a smooth 60FPS. They both looked and played better than their standard versions, though I was surprised they didn't take advantage of HDR. As usual, I noticed the improvement in frame rates more than the higher resolution. Unless you're sitting very close to a TV above 50-inches, you'd likely have a hard time telling between 4K and 1080p.
+
That poses a problem for Microsoft: It's betting that gamers will actually want true 4K rendering. In practice, though, PlayStation 4 Pro titles running in HDR and resolutions between 1080p and 4K often look just as good to the naked eye. The Xbox One X's big advantage is that its hardware could let more games reach 60FPS compared to Sony's console.
+
Microsoft says over 130 Xbox One X-enhanced titles are in the works. That includes already-released games like Forza Motorsport 7 and Assassin's
+ Creed Origins , as well as upcoming titles like Call of Duty: WW2 . You'll be able to find them easily in a special section in the Xbox store. There is also a handful of Xbox 360 games that'll get enhanced eventually, including Halo
+ 3 and Fallout 3 . Some of those titles will get bumped up to a higher resolution, while others will get HDR support. Microsoft describes these upgrades as a bonus for developers who were prescient about how they built their games. Basically, don't expect your entire 360 library to get enhanced.
+
+
-
-
-
+
+
-
-
-
-
+
+
+
+
+
+
-
-
Even if a game isn't specifically tuned for the new
- console, Microsoft says you might still see some
- performance improvements. The PlayStation 4 Pro,
- meanwhile, has over one hundred games built for its
- hardware, and its boost mode can speed up some older
- games.
-
Microsoft is still pushing the Xbox as more than just
- a game console, though. 4K Blu-rays loaded up
- quickly, and I didn't notice many delays as I
- skipped around films. Planet Earth II , in
- particular, looked fantastic thanks to its brilliant
- use of HDR. Unfortunately, the One X doesn't support
- Dolby Vision, so you're stuck with the slightly less
- capable HDR 10 standard. That makes sense since it's
- more widely supported, but it would have been nice
- to see Dolby's, too.
-
- VIDEO
-
-
And speaking of Dolby technology, Microsoft is also
- highlighting Atmos support on the One X, just like
- it did with the One S. The company's app lets you
- configure the console to pass audio Atmos signals to
- your audio receiver. You can also shell out $15 to
- get Atmos support for headphones, which simulates
- immersive surround sound. It's strange to pay money
- to unlock Dolby features, but it's worth it since
- it's significantly better than Microsoft's audio
- virtualization technology. The Netflix app also
- supports Atmos for a handful of films (something
- that the Xbox One S and PlayStation 4 offer, as
- well).
-
One thing you won't find in the new Xbox is VR
- support. Microsoft has mentioned that the console
- will offer some sort of mixed reality, but it hasn't
- offered up any details yet. It's technically
- powerful enough to work with any of the Windows
- Mixed Reality headsets launching this fall. It's a
- shame that Microsoft is being so wishy-washy because
- Sony has had a very successful head start with the
- PlayStation VR.
-
Pricing and the competition
-
+
Even if a game isn't specifically tuned for the new console, Microsoft says you might still see some performance improvements. The PlayStation 4 Pro, meanwhile, has over one hundred games built for its hardware, and its boost mode can speed up some older games.
+
Microsoft is still pushing the Xbox as more than just a game console, though. 4K Blu-rays loaded up quickly, and I didn't notice many delays as I skipped around films. Planet Earth II , in particular, looked fantastic thanks to its brilliant use of HDR. Unfortunately, the One X doesn't support Dolby Vision, so you're stuck with the slightly less capable HDR 10 standard. That makes sense since it's more widely supported, but it would have been nice to see Dolby's, too.
+
VIDEO
+
And speaking of Dolby technology, Microsoft is also highlighting Atmos support on the One X, just like it did with the One S. The company's app lets you configure the console to pass audio Atmos signals to your audio receiver. You can also shell out $15 to get Atmos support for headphones, which simulates immersive surround sound. It's strange to pay money to unlock Dolby features, but it's worth it since it's significantly better than Microsoft's audio virtualization technology. The Netflix app also supports Atmos for a handful of films (something that the Xbox One S and PlayStation 4 offer, as well).
+
One thing you won't find in the new Xbox is VR support. Microsoft has mentioned that the console will offer some sort of mixed reality, but it hasn't offered up any details yet. It's technically powerful enough to work with any of the Windows Mixed Reality headsets launching this fall. It's a shame that Microsoft is being so wishy-washy because Sony has had a very successful head start with the PlayStation VR.
+
Pricing and the competition
+
+
-
-
-
-
-
Devindra Hardawar/AOL
-
+
+
+ Devindra Hardawar/AOL
+
+
+
-
-
The biggest knock against the Xbox One X is its $500
- price. The PS4 Pro launched at $400 last year, and
- there's a good chance we'll see plenty of deals
- around the holidays. If your friends are on Xbox
- Live, or you're a devotee of Microsoft's first party
- franchises, then the X makes more sense. If you just
- want to play third-party titles that come to both
- platforms, though, the PS4 Pro is clearly the better
- deal.
-
If you're looking to upgrade from an original Xbox
- One, and you have a new TV, the One X might be more
- compelling. It's faster and offers more features
- than the One S, and more importantly, it'll last you
- much longer without needing an upgrade. There's also
- plenty of wisdom in simply waiting a while before
- you buy the One X, especially if you haven't moved
- to a 4K TV yet. The new console can make games look
- better on 1080p sets, since it'll supersample
- high-res textures and have more graphical effects,
- but it's simply not worth the upgrade since those
- TVs don't support HDR.
-
If price isn't a huge concern for you, it's worth
- considering investing in a gaming PC. A decent one
- costs between $600 and $800, plus the price of a
- monitor, but it'll easily be more powerful than the
- One X. And you have the added benefit of upgrading
- components down the line. Now that Microsoft and
- game publishers are offering most major titles on
- PC, you won't be missing out on much by ditching
- consoles.
-
Wrap-up
-
-
Ultimately, the Xbox One X offers some major
- performance upgrades that gamers will notice --
- especially if you're coming from an original Xbox
- One. But it's also a bit disappointing since it's
- coming a year after the PS4 Pro, and it doesn't
- offer VR yet. For Microsoft fans, though, none of
- that will matter. It's exactly what the company
- promised: the fastest game console ever made.
-
+
The biggest knock against the Xbox One X is its $500 price. The PS4 Pro launched at $400 last year, and there's a good chance we'll see plenty of deals around the holidays. If your friends are on Xbox Live, or you're a devotee of Microsoft's first party franchises, then the X makes more sense. If you just want to play third-party titles that come to both platforms, though, the PS4 Pro is clearly the better deal.
+
If you're looking to upgrade from an original Xbox One, and you have a new TV, the One X might be more compelling. It's faster and offers more features than the One S, and more importantly, it'll last you much longer without needing an upgrade. There's also plenty of wisdom in simply waiting a while before you buy the One X, especially if you haven't moved to a 4K TV yet. The new console can make games look better on 1080p sets, since it'll supersample high-res textures and have more graphical effects, but it's simply not worth the upgrade since those TVs don't support HDR.
+
If price isn't a huge concern for you, it's worth considering investing in a gaming PC. A decent one costs between $600 and $800, plus the price of a monitor, but it'll easily be more powerful than the One X. And you have the added benefit of upgrading components down the line. Now that Microsoft and game publishers are offering most major titles on PC, you won't be missing out on much by ditching consoles.
+
Wrap-up
+
+
Ultimately, the Xbox One X offers some major performance upgrades that gamers will notice -- especially if you're coming from an original Xbox One. But it's also a bit disappointing since it's coming a year after the PS4 Pro, and it doesn't offer VR yet. For Microsoft fans, though, none of that will matter. It's exactly what the company promised: the fastest game console ever made.
-
-
+
-
+
+
-
-
-
From around the web
-
-
-
-
\ No newline at end of file
+
+
+
From around the web
+
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/gmw/expected.html b/test/test-pages/gmw/expected.html
index b3c62d33..95354944 100644
--- a/test/test-pages/gmw/expected.html
+++ b/test/test-pages/gmw/expected.html
@@ -1,57 +1,45 @@
-
-
-
-
-
翱翔于距地球数千公里的太空中,进入广袤漆黑的未知领域,是一项艰苦卓绝的工作。这让人感到巨大压力和极度恐慌。那么,为什么不能让宇航员来一杯“地球末日”鸡尾酒来放松一下?
-
不幸的是,对于希望能喝上一杯的太空探险者,那些将他们送上太空的政府机构普遍禁止他们染指包括酒在内的含酒精饮料。
-
但是,很快普通人都会有机会向人类“最终的边疆”出发——以平民化旅行的形式,去探索和殖民火星。确实,火星之旅将是一次令人感到痛苦的旅行,可能一去不复返并要几年时间才能完成,但是否应该允许参与者在旅程中痛饮一番?或至少携带能在火星上发酵自制酒精饮料的设备?
-
-
- 图注:巴兹?奥尔德林(Buzz Aldrin)可能是第二个在月球上行走的人,但他是第一个在月球上喝酒的人
-
-
事实是,历史上酒与太空探险有一种复杂的关系。让我们来看看喝了酒的航天员究竟会发生什么—— 如果我们开始给予进入太空的人类更大的自由度,又可能会发生什么。
-
人们普遍认为,当一个人所处的海拔越高,喝醉后会越容易感到头昏。因此,人们自然地想到,当人身处地球轨道上时,饮酒会对人体有更强烈的致眩作用。但这种说法可能不是正确的。
-
事实上,有证据表明,早在上世纪八十年代就澄清了这一传言。1985年,美国联邦航空管理局(UFAA)开展了一项研究,以验证人在不同的海拔高度饮酒,是否会影响执行复杂任务时的表现和酒精测定仪的读数。
-
在这项研究中,17名男子被要求在地面和一间模拟海拔3.7公里的房间内喝下一些伏特加。然后,他们被要求完成各种任务,包括心算口算问题、用操纵杆在示波器上跟踪灯光以及各种其它测试。研究人员发现,“酒精和海拔高度对酒精测定仪读数或完成任务的表现情况没有交互作用”。
-
所以,人乘坐飞机时醉得更快是个传说?纽约州立大学(State University of New York,SUNY)社会学荣誉教授戴夫·汉森(Dave Hanson)研究酒精和饮酒超过40年,他认为确实如此。他说:“我不认为它(在太空中饮酒)会有任何不同。”
-
他认为高原反应可能类似于宿醉,但它也可能类似于中毒。他说:“如果人们没有感受到充分的大气压力,他们也会觉得喝醉了一样。”
-
相反,那些声称在飞机上比在地面上醉得更快的人,可能只是经历了“自认喝醉(think-drink)”效应,这种效应多年来已被广泛研究。它表明,如果人们认为自己喝醉了,那他们的一举一动会真的像喝醉了一样—— 而不是实际上他们真的醉了。
-
汉森指出:“如果人们脑子里一直认为在飞机上酒精会对他们产生与平常不同的作用,那么他们乘坐飞机时真的会觉得酒精对他们产生了不同的作用。”
-
所以,如果酒精对人体的物理效应与海拔高度无关,那么在国际空间站上睡前小饮一杯不应该是一个大问题,对吧?错了。
-
美国宇航局约翰逊航天中心发言人丹尼尔·霍特(Daniel Huot)表示:“国际空间站上的宇航员不允许喝酒。在国际空间站上,酒精和其它挥发性化合物的使用受到控制,因为它们的挥发物可能对该站的水回收系统产生影响。”
-
为此,国际空间站上的宇航员甚至没有被提供含有酒精的产品,例如漱口水、香水或须后水。如果在国际空间站上饮酒狂欢,溢出的啤酒也可能存在损坏设备的风险。
-
-
- 图注:测试表明,有关人在高空中喝酒更容易醉的传言是不正确的
-
-
然后是责任的问题。我们不允许汽车司机或飞机飞行员喝醉后驾驶,所以并不奇怪同样的规则适用于国际空间站上的宇航员。毕竟国际空间站的造价高达1500亿美元,而且在接近真空的太空中其运行速度达到了每小时27680公里。
-
然而,2007年,美国宇航局(NASA)成立了一个负责调查宇航员健康状况的独立小组,称历史上该机构至少有两名宇航员在即将飞行前喝了大量的酒,但仍然被允许飞行。Nasa安全负责人随后的审查发现并没有证据支持这一指控。宇航员在飞行前12小时是严禁饮酒的,因为他们需要充分的思维能力和清醒的意识。
-
出台这一规则的原因很清楚。在1985年UFAA开展的关于酒精在不同海拔高度影响的研究中,研究人员得出结论,酒精的影响与海拔高度无关。无论参与测试的人员在什么海拔高度喝酒,其酒精测量仪的读数都是一样的。他们的行为表现受到的影响也相同,但如果提供给测试人员的是安慰剂,则身处高空比身处海平面的行为表现要更差一些。这表明,无论是否摄入酒精,海拔高度可能对心理表现有轻微的影响。
-
国际空间站禁止享用啤酒等有大量泡沫的饮料,可能有另一个原因:没有重力的帮助,液体和气体会在宇航员的胃里不停地翻滚,导致他们不断地打嗝。
-
然而,尽管有严格的规则,这并不意味着太空中的人类不会接触发酵液体。在国际空间站上进行了大量有关酒精的实验—— 但没有发生让众人去饮酒的情况,所以没有人真正了解太空中人体对酒精具体有怎样的反应。
-
NASA发言人斯蒂芬妮?席尔霍尔茨(Stephanie Schierhol)表示:“我们研究了太空中宇航员身体的各种变化,包括微生物层面的。我们有一个营养计划,以确保他们的身体获得保持健康所需要的营养。显然,在实施‘天空实验室(skylab)’项目时,他们曾将雪利酒与宇航员一起送到太空中,但宇航员在零重力飞行时使用雪利酒的测试结果不太好。”天空实验室是美国第一座空间站。
-
席尔霍尔茨补充说,在测试中使用雪利酒“引发呕吐反射,公众也反对”。
-
也许最令人惊讶的是,人类在月球表面上喝的第一种液体是葡萄酒。前NASA宇航员巴兹·奥尔德林(Buzz Aldrin)在采访和他撰写的书中表示,1969年,在和尼尔·阿姆斯特朗(Neil Armstrong)走出登月舱之前的圣餐仪式上,他喝了少量葡萄酒。举行这一仪式时与地面的通信出现了暂停,因此这一过程从来没有播出。
-
虽然Nasa对太空中酒精的使用有严格的规定,但在这方面俄罗斯过去似乎更为宽松。在其“和平号”空间站上,宇航员允许喝点干邑和伏特加。当他们发现国际空间站将严格禁止饮酒时,显然有不少怨言。
-
然而,奇怪的是,酒仍然能通过各种方式出现在国际空间站上。2015年,日本酿酒商三得利(Suntory)的全球创新中心将该公司一些获奖的威士忌运送到国际空间站,参与一项旨在验证“能否通过利用微重力环境增强酒精饮料醇厚性”的实验。换句话说,在微重力下酒的陈酿过程可能不同,导致它的陈酿进程更快、味道更好。对此,地球上的每家酿酒商都想进一步地了解。
-
几年前,即2011年9月至2014年9月,Nasa赞助了一个试验,研究微重力环境对威士忌中未发酵麦芽与烧焦橡木颗粒的影响,这两种物质能对威士忌的陈酿起帮助作用。在太空中逗留将近1000天后,用于测试的威士忌的单宁成分保持不变——但是太空中橡木颗粒产生了更高浓度的木质素分解产物,这种物质能赋予威士忌特别的风味。
-
Nasa表示:“这种试验不仅对麦芽威士忌行业有影响,而且对整个食品和饮料行业也有影响。送上太空的威士忌与对照样品之间的风味差异是如此显著,需要进一步分析以破解不同口味产生的原因。”
-
因此,即使宇航员自己被禁止在地球轨道上饮酒,但他们正在做的工作可以提高在地上消费的酒的质量。
-
相比之下,执行登陆火星任务的人将远离家乡几年,而不是几个月,因此可能会有人提出有关禁止饮酒的规定可以放松一些。
-
然而,像戴夫?汉森这样的专家认为,继续禁止饮酒并没有什么害处。除了实际的安全问题,饮酒还可能有其它挑战。汉森认为,地球人存在许多社会文化方面的差异,而且人连续几年时间呆在一个狭小的空间里,很容易突然发怒,这些因素都使饮酒问题变得很棘手。
-
-
- 图注:奥尔德林的圣餐杯回到了地球上
-
-
他说:“这是一个政治问题,也是一个文化方面的问题,但不是一个科学上的问题。这将是未来一个可能产生冲突领域,因为人们具有不同的文化背景,他们对饮酒的态度不同。”他进一步指出,如果你与穆斯林、摩门教徒或禁酒主义者分配在同一间宿舍怎么办?面对未来人们可能在一个没有期限的时间内呆在一个有限的空间里,需要“尽早解决”如何协调不同文化观点的问题。
-
所以,当宇航员在地球轨道上时,将还不得不满足于通过欣赏外面的景色来振作精神,而不要指望沉溺于烈酒中。我们留在地球上的人,则可以准备好适量的香槟酒,以迎接他们的归来。
-
原标题:他晚于阿姆斯特朗登月 却是首个敢在月球喝酒的人
-
出品︱网易科学人栏目组 胖胖
-
作者︱春春
-
-
-
-
[责任编辑:肖春芳]
-
-
-
\ No newline at end of file
+
+
+
翱翔于距地球数千公里的太空中,进入广袤漆黑的未知领域,是一项艰苦卓绝的工作。这让人感到巨大压力和极度恐慌。那么,为什么不能让宇航员来一杯“地球末日”鸡尾酒来放松一下?
+
不幸的是,对于希望能喝上一杯的太空探险者,那些将他们送上太空的政府机构普遍禁止他们染指包括酒在内的含酒精饮料。
+
但是,很快普通人都会有机会向人类“最终的边疆”出发——以平民化旅行的形式,去探索和殖民火星。确实,火星之旅将是一次令人感到痛苦的旅行,可能一去不复返并要几年时间才能完成,但是否应该允许参与者在旅程中痛饮一番?或至少携带能在火星上发酵自制酒精饮料的设备?
+
+
图注:巴兹?奥尔德林(Buzz Aldrin)可能是第二个在月球上行走的人,但他是第一个在月球上喝酒的人
+
事实是,历史上酒与太空探险有一种复杂的关系。让我们来看看喝了酒的航天员究竟会发生什么—— 如果我们开始给予进入太空的人类更大的自由度,又可能会发生什么。
+
人们普遍认为,当一个人所处的海拔越高,喝醉后会越容易感到头昏。因此,人们自然地想到,当人身处地球轨道上时,饮酒会对人体有更强烈的致眩作用。但这种说法可能不是正确的。
+
事实上,有证据表明,早在上世纪八十年代就澄清了这一传言。1985年,美国联邦航空管理局(UFAA)开展了一项研究,以验证人在不同的海拔高度饮酒,是否会影响执行复杂任务时的表现和酒精测定仪的读数。
+
在这项研究中,17名男子被要求在地面和一间模拟海拔3.7公里的房间内喝下一些伏特加。然后,他们被要求完成各种任务,包括心算口算问题、用操纵杆在示波器上跟踪灯光以及各种其它测试。研究人员发现,“酒精和海拔高度对酒精测定仪读数或完成任务的表现情况没有交互作用”。
+
所以,人乘坐飞机时醉得更快是个传说?纽约州立大学(State University of New York,SUNY)社会学荣誉教授戴夫·汉森(Dave Hanson)研究酒精和饮酒超过40年,他认为确实如此。他说:“我不认为它(在太空中饮酒)会有任何不同。”
+
他认为高原反应可能类似于宿醉,但它也可能类似于中毒。他说:“如果人们没有感受到充分的大气压力,他们也会觉得喝醉了一样。”
+
相反,那些声称在飞机上比在地面上醉得更快的人,可能只是经历了“自认喝醉(think-drink)”效应,这种效应多年来已被广泛研究。它表明,如果人们认为自己喝醉了,那他们的一举一动会真的像喝醉了一样—— 而不是实际上他们真的醉了。
+
汉森指出:“如果人们脑子里一直认为在飞机上酒精会对他们产生与平常不同的作用,那么他们乘坐飞机时真的会觉得酒精对他们产生了不同的作用。”
+
所以,如果酒精对人体的物理效应与海拔高度无关,那么在国际空间站上睡前小饮一杯不应该是一个大问题,对吧?错了。
+
美国宇航局约翰逊航天中心发言人丹尼尔·霍特(Daniel Huot)表示:“国际空间站上的宇航员不允许喝酒。在国际空间站上,酒精和其它挥发性化合物的使用受到控制,因为它们的挥发物可能对该站的水回收系统产生影响。”
+
为此,国际空间站上的宇航员甚至没有被提供含有酒精的产品,例如漱口水、香水或须后水。如果在国际空间站上饮酒狂欢,溢出的啤酒也可能存在损坏设备的风险。
+
+
图注:测试表明,有关人在高空中喝酒更容易醉的传言是不正确的
+
然后是责任的问题。我们不允许汽车司机或飞机飞行员喝醉后驾驶,所以并不奇怪同样的规则适用于国际空间站上的宇航员。毕竟国际空间站的造价高达1500亿美元,而且在接近真空的太空中其运行速度达到了每小时27680公里。
+
然而,2007年,美国宇航局(NASA)成立了一个负责调查宇航员健康状况的独立小组,称历史上该机构至少有两名宇航员在即将飞行前喝了大量的酒,但仍然被允许飞行。Nasa安全负责人随后的审查发现并没有证据支持这一指控。宇航员在飞行前12小时是严禁饮酒的,因为他们需要充分的思维能力和清醒的意识。
+
出台这一规则的原因很清楚。在1985年UFAA开展的关于酒精在不同海拔高度影响的研究中,研究人员得出结论,酒精的影响与海拔高度无关。无论参与测试的人员在什么海拔高度喝酒,其酒精测量仪的读数都是一样的。他们的行为表现受到的影响也相同,但如果提供给测试人员的是安慰剂,则身处高空比身处海平面的行为表现要更差一些。这表明,无论是否摄入酒精,海拔高度可能对心理表现有轻微的影响。
+
国际空间站禁止享用啤酒等有大量泡沫的饮料,可能有另一个原因:没有重力的帮助,液体和气体会在宇航员的胃里不停地翻滚,导致他们不断地打嗝。
+
然而,尽管有严格的规则,这并不意味着太空中的人类不会接触发酵液体。在国际空间站上进行了大量有关酒精的实验—— 但没有发生让众人去饮酒的情况,所以没有人真正了解太空中人体对酒精具体有怎样的反应。
+
NASA发言人斯蒂芬妮?席尔霍尔茨(Stephanie Schierhol)表示:“我们研究了太空中宇航员身体的各种变化,包括微生物层面的。我们有一个营养计划,以确保他们的身体获得保持健康所需要的营养。显然,在实施‘天空实验室(skylab)’项目时,他们曾将雪利酒与宇航员一起送到太空中,但宇航员在零重力飞行时使用雪利酒的测试结果不太好。”天空实验室是美国第一座空间站。
+
席尔霍尔茨补充说,在测试中使用雪利酒“引发呕吐反射,公众也反对”。
+
也许最令人惊讶的是,人类在月球表面上喝的第一种液体是葡萄酒。前NASA宇航员巴兹·奥尔德林(Buzz Aldrin)在采访和他撰写的书中表示,1969年,在和尼尔·阿姆斯特朗(Neil Armstrong)走出登月舱之前的圣餐仪式上,他喝了少量葡萄酒。举行这一仪式时与地面的通信出现了暂停,因此这一过程从来没有播出。
+
虽然Nasa对太空中酒精的使用有严格的规定,但在这方面俄罗斯过去似乎更为宽松。在其“和平号”空间站上,宇航员允许喝点干邑和伏特加。当他们发现国际空间站将严格禁止饮酒时,显然有不少怨言。
+
然而,奇怪的是,酒仍然能通过各种方式出现在国际空间站上。2015年,日本酿酒商三得利(Suntory)的全球创新中心将该公司一些获奖的威士忌运送到国际空间站,参与一项旨在验证“能否通过利用微重力环境增强酒精饮料醇厚性”的实验。换句话说,在微重力下酒的陈酿过程可能不同,导致它的陈酿进程更快、味道更好。对此,地球上的每家酿酒商都想进一步地了解。
+
几年前,即2011年9月至2014年9月,Nasa赞助了一个试验,研究微重力环境对威士忌中未发酵麦芽与烧焦橡木颗粒的影响,这两种物质能对威士忌的陈酿起帮助作用。在太空中逗留将近1000天后,用于测试的威士忌的单宁成分保持不变——但是太空中橡木颗粒产生了更高浓度的木质素分解产物,这种物质能赋予威士忌特别的风味。
+
Nasa表示:“这种试验不仅对麦芽威士忌行业有影响,而且对整个食品和饮料行业也有影响。送上太空的威士忌与对照样品之间的风味差异是如此显著,需要进一步分析以破解不同口味产生的原因。”
+
因此,即使宇航员自己被禁止在地球轨道上饮酒,但他们正在做的工作可以提高在地上消费的酒的质量。
+
相比之下,执行登陆火星任务的人将远离家乡几年,而不是几个月,因此可能会有人提出有关禁止饮酒的规定可以放松一些。
+
然而,像戴夫?汉森这样的专家认为,继续禁止饮酒并没有什么害处。除了实际的安全问题,饮酒还可能有其它挑战。汉森认为,地球人存在许多社会文化方面的差异,而且人连续几年时间呆在一个狭小的空间里,很容易突然发怒,这些因素都使饮酒问题变得很棘手。
+
+
图注:奥尔德林的圣餐杯回到了地球上
+
他说:“这是一个政治问题,也是一个文化方面的问题,但不是一个科学上的问题。这将是未来一个可能产生冲突领域,因为人们具有不同的文化背景,他们对饮酒的态度不同。”他进一步指出,如果你与穆斯林、摩门教徒或禁酒主义者分配在同一间宿舍怎么办?面对未来人们可能在一个没有期限的时间内呆在一个有限的空间里,需要“尽早解决”如何协调不同文化观点的问题。
+
所以,当宇航员在地球轨道上时,将还不得不满足于通过欣赏外面的景色来振作精神,而不要指望沉溺于烈酒中。我们留在地球上的人,则可以准备好适量的香槟酒,以迎接他们的归来。
+
原标题:他晚于阿姆斯特朗登月 却是首个敢在月球喝酒的人
+
出品︱网易科学人栏目组 胖胖
+
作者︱春春
+
[责任编辑:肖春芳]
+
+
\ No newline at end of file
diff --git a/test/test-pages/heise/expected.html b/test/test-pages/heise/expected.html
index 95ab304b..8ba7bd2f 100644
--- a/test/test-pages/heise/expected.html
+++ b/test/test-pages/heise/expected.html
@@ -1,11 +1,11 @@
-
-
+
+
1Password scannt auch QR-Codes.
-
-
+
+
(Bild: Hersteller)
-
+
Das in der iOS-Version bereits enthaltene TOTP-Feature ist nun auch für OS X 10.10 verfügbar. Zudem gibt es neue Zusatzfelder in der Datenbank und weitere Verbesserungen.
AgileBits hat Version 5.3 seines bekannten Passwortmanagers 1Password für OS X freigegeben. Mit dem Update wird eine praktische Funktion nachgereicht, die die iOS-Version der Anwendung bereits seit längerem beherrscht : Das direkte Erstellen von Einmal-Passwörtern. Unterstützt wird dabei der TOTP-Standard (Time-Based One-Time Passwords), den unter anderem Firmen wie Evernote, Dropbox oder Google einsetzen, um ihre Zugänge besser abzusichern. Neben Account und regulärem Passwort wird dabei dann ein Zusatzcode verlangt, der nur kurze Zeit gilt.
Zur TOTP-Nutzung muss zunächst ein Startwert an 1Password übergeben werden. Das geht unter anderem per QR-Code, den die App über ein neues Scanfenster selbst einlesen kann – etwa aus dem Webbrowser. Eine Einführung in die Technik gibt ein kurzes Video . Die TOTP-Unterstützung in 1Password erlaubt es, auf ein zusätzliches Gerät (z.B. ein iPhone) neben dem Mac zu verzichten, das den Code liefert – was allerdings auch die Sicherheit verringert, weil es keinen "echten" zweiten Faktor mehr gibt.
diff --git a/test/test-pages/herald-sun-1/expected.html b/test/test-pages/herald-sun-1/expected.html
index 6b0cbe6e..5489371f 100644
--- a/test/test-pages/herald-sun-1/expected.html
+++ b/test/test-pages/herald-sun-1/expected.html
@@ -1,8 +1,7 @@
-
-
+
A new Bill would require telecommunications service providers to store so-called ‘metadata’ for two years.
Source:
@@ -15,11 +14,11 @@
The roadshow featured the Prime Minister’s national security adviser, Andrew Shearer, Justin Bassi, who advises Attorney-General George Brandis on crime and security matters, and Australian Federal Police Commissioner Andrew Colvin. Staffers from the office of Communications Minister Malcolm Turnbull also took part.
They held meetings with executives from News Corporation and Fairfax, representatives of the TV networks, the ABC top brass and a group from the media union and the Walkley journalism foundation. I was involved as a member of the Walkley board.
The initiative, from Tony Abbott’s office, is evidence that the Government has been alarmed by the strength of criticism from media of the Data Retention Bill it wants passed before Parliament rises in a fortnight. Bosses, journalists, even the Press Council, are up in arms, not only over this measure, but also over aspects of two earlier pieces of national security legislation that interfere with the ability of the media to hold government to account.
-
+
-
-
+
+
The Bill would require telecommunications service providers to store so-called “metadata” — the who, where, when and how of a communication, but not its content — for two years so security and law enforcement agencies can access it without warrant. Few would argue against the use of such material to catch criminals or terrorists. But, as Parliament’s Joint Committee on Intelligence and Security has pointed out, it would also be used “for the purpose of determining the identity of a journalist’s sources”.
And that should ring warning bells for anyone genuinely concerned with the health of our democracy. Without the ability to protect the identity of sources, journalists would be greatly handicapped in exposing corruption, dishonesty, waste, incompetence and misbehaviour by public officials.
The Press Council is concerned the laws would crush investigative journalism.
“These legitimate concerns cannot be addressed effectively short of exempting journalists and media organisations,” says president David Weisbrot.
The media union is adamant journalists’ metadata must be exempted from the law. That’s what media bosses want, too, though they have a fallback position based on new safeguards being implemented in Britain.
That would prevent access to the metadata of journalists or media organisations without a judicial warrant. There would be a code including — according to the explanatory notes of the British Bill — “provision to protect the public interest in the confidentiality of journalistic sources”.
In their meetings this week, the government team boasted of concessions in the new Data Retention Bill. The number of agencies able to access metadata will be reduced by excluding such organisations as the RSPCA and local councils. And whenever an authorisation is issued for access to information about a journalist’s sources, the Ombudsman (or, where ASIO is involved, the Inspector-General of Intelligence and Security) will receive a copy.
That does nothing to solve the problem. The Government has effectively admitted as much by agreeing that the parliamentary committee should conduct a separate review of how to deal with the issue of journalists’ sources.
But another inquiry would be a waste of time — the committee has already received and considered dozens of submissions on the subject. The bottom line is that the Government does not deny that the legislation is flawed, but is demanding it be passed anyway with the possibility left open of a repair job down the track. That is a ridiculous approach.
Claims that immediate action is imperative do not stand up. These are measures that won’t come into full effect for two years. Anyway, amending the Bill to either exempt journalists or adopt the UK model could be done quickly, without any risk to national security.
AS Opposition Leader Bill Shorten said in a letter to Abbott last month: “Press freedom concerns about mandatory data retention would ideally be addressed in this Bill to avoid the need for future additional amendments or procedures to be put in place in the future.”
The Data Retention Bill will be debated in the House of Representatives this week. Then, on Friday, CEOs from leading media organisations will front the parliamentary committee to air their concerns before the legislation goes to the Senate.
Those CEOs should make it clear they are just as angry about this as they were about Stephen Conroy’s attempt to impinge on press freedom through media regulation under the previous Labor government.
Memories of the grief Conroy brought down on his head would undoubtedly make Abbott sit up and take notice.
LAURIE OAKES IS THE NINE NETWORK POLITICAL EDITOR
diff --git a/test/test-pages/herald-sun-1/source.html b/test/test-pages/herald-sun-1/source.html
index f0424683..050bed44 100644
--- a/test/test-pages/herald-sun-1/source.html
+++ b/test/test-pages/herald-sun-1/source.html
@@ -1,35 +1,35 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
@@ -38,10 +38,10 @@
-
+
-
-
+
+
-
+
Angry media won’t buckle over new surveillance laws
| Herald Sun
@@ -88,12 +88,12 @@
ndm.account = {
urls: { login: "http://www.heraldsun.com.au/login", signup: "http://subscription.news.com.au/heraldsun/offers", account: "https://myaccount.news.com.au/heraldsun/viewAccount" }
};
-
-
-
-
-
-
+
+
+
+
+
+
window.ndm = window.ndm || {};window.ndm.cam = {'status': 'logged-out', 'memtype': 'anonymous'};ndm.config = {idp: {relayState: 'http://m.heraldsun.com.au/news/opinion/angry-media-wont-buckle-over-new-surveillance-laws/story-fni0fha6-1227261886014?nk=e65db50ff7e443a778cb38df8e9ad061',samlLoc: 'http://saml.cam.idmndm.com',channel: 'msite',site: 'HeraldSun'}, metered: {mode: 'free',state: {'max': 5, 'access': 'true', 'count': 1},endpoint: {registration: 'https://idp.news.com.au/idp/Authn/rest',products: 'http://digitalpass.heraldsun.com.au'},productInfo: {offerCode: '2_1_',sourceCode: 'HSWEB_MOB100_a'}}};
window.ndm.idp = window.ndm.idp || {};
window.ndm.idp.socialEnabled = !window.ndm.cam.paywalldisabled;
@@ -222,8 +222,8 @@
//]]>
-
-
+
+
-
+
@@ -285,7 +285,7 @@
-
+
-
+
We designed many of these slides to help explain to ourselves what we were doing
When a newsroom decides to create a position for the web, it’s often with
the intent of having content flow steadily from writers onto the web. This
@@ -179,8 +179,8 @@
A train or light at the end of the tunnel: are student
steps towards having all their editors involved in the stories for the
web.
-
-
+
+
The current Open Journalism site was a few years in the making. This was
an original launch page we use in 2012 What we know
New process
@@ -250,8 +250,8 @@ A note to professional news orgs
writing about it, and sharing code. We need to start building a bridge
between student journalism and professional newsrooms.
-
-
+
+
2012 This is a start
We going to continue slowly growing the content on Open Journalism . We still consider this the beta version,
but expect to polish it, and beef up the content for a real launch at the
@@ -268,8 +268,8 @@
A note to professional news orgs
smell a bit different, we feel lacing up a new pair of kicks can change
a lot.
-
-
+
+
Let’s talk. Let’s listen.
@@ -277,8 +277,8 @@
A note to professional news orgs
pippin@pippinlee.com
-
-
+
+
This isn’t supposed to be a
manifesto™©
we just think it’s pretty cool to share what we’ve learned so far, and hope you’ll do the same. We’re all in this together.
diff --git a/test/test-pages/medium-2/expected.html b/test/test-pages/medium-2/expected.html
index b3711807..222b09db 100644
--- a/test/test-pages/medium-2/expected.html
+++ b/test/test-pages/medium-2/expected.html
@@ -1 +1 @@
-Words need defenders. On Behalf of “Literally” You either are a “literally” abuser or know of one. If you’re anything like me, hearing the word “literally” used incorrectly causes a little piece of your soul to whither and die. Of course I do not mean that literally, I mean that figuratively. An abuser would have said: “Every time a person uses that word, a piece of my soul literally withers and dies.” Which is terribly, horribly wrong.
For whatever bizarre reason, people feel the need to use literally as a sort of verbal crutch. They use it to emphasize a point, which is silly because they’re already using an analogy or a metaphor to illustrate said point. For example: “Ugh, I literally tore the house apart looking for my remote control!” No, you literally did not tear apart your house, because it’s still standing. If you’d just told me you “tore your house apart” searching for your remote, I would’ve understood what you meant. No need to add “literally” to the sentence.
Maybe I should define literally.
Literally means actually. When you say something literally happened, you’re describing the scene or situation as it actually happened. So you should only use literally when you mean it. It should not be used in hyperbole. Example: “That was so funny I literally cried.” Which is possible. Some things are funny enough to elicit tears. Note the example stops with “literally cried.” You cannot literally cry your eyes out . The joke wasn’t so funny your eyes popped out of their sockets.
When in Doubt, Leave it Out “I’m so hungry I could eat a horse,” means you’re hungry. You don’t need to say “I’m so hungry I could literally eat a horse.” Because you can’t do that in one sitting, I don’t care how big your stomach is.
“That play was so funny I laughed my head off,” illustrates the play was amusing. You don’t need to say you literally laughed your head off, because then your head would be on the ground and you wouldn’t be able to speak, much less laugh.
“I drove so fast my car was flying,” we get your point: you were speeding. But your car is never going fast enough to fly, so don’t say your car was literally flying.
Insecurities? Maybe no one believed a story you told as a child, and you felt the need to prove that it actually happened. No really, mom, I literally climbed the tree. In efforts to prove truth, you used literally to describe something real, however outlandish it seemed. Whatever the reason, now your overuse of literally has become a habit.
Hard Habit to Break? Abusing literally isn’t as bad a smoking, but it’s still an unhealthy habit (I mean that figuratively). Help is required in order to break it.
This is my version of an intervention for literally abusers. I’m not sure how else to do it other than in writing. I know this makes me sound like a know-it-all, and I accept that. But there’s no excuse other than blatant ignorance to misuse the word “literally.” So just stop it.
Don’t say “Courtney, this post is so snobbish it literally burned up my computer.” Because nothing is that snobbish that it causes computers to combust. Or: “Courtney, your head is so big it literally cannot get through the door.” Because it can, unless it’s one of those tiny doors from Alice in Wonderland and I need to eat a mushroom to make my whole body smaller.
No One’s Perfect And I’m not saying I am. I’m trying to restore meaning to a word that’s lost meaning. I’m standing up for literally. It’s a good word when used correctly. People are butchering it and destroying it every day (figuratively speaking) and the massacre needs to stop. Just as there’s a coalition of people against the use of certain fonts (like Comic Sans and Papyrus ), so should there be a coalition of people against the abuse of literally.
Saying it to Irritate? Do you misuse the word “literally” just to annoy your know-it-all or grammar police friends/acquaintances/total strangers? If so, why? Doing so would be like me going outside when it’s freezing, wearing nothing but a pair of shorts and t-shirt in hopes of making you cold by just looking at me. Who suffers more?
Graphical Representation Matthew Inman of “The Oatmeal” wrote a comic about literally. Abusers and defenders alike should check it out . It’s clear this whole craze about literally is driving a lot of us nuts. You literally abusers are killing off pieces of our souls. You must be stopped, or the world will be lost to meaninglessness forever. Figuratively speaking.
\ No newline at end of file
+Words need defenders. On Behalf of “Literally” You either are a “literally” abuser or know of one. If you’re anything like me, hearing the word “literally” used incorrectly causes a little piece of your soul to whither and die. Of course I do not mean that literally, I mean that figuratively. An abuser would have said: “Every time a person uses that word, a piece of my soul literally withers and dies.” Which is terribly, horribly wrong.
For whatever bizarre reason, people feel the need to use literally as a sort of verbal crutch. They use it to emphasize a point, which is silly because they’re already using an analogy or a metaphor to illustrate said point. For example: “Ugh, I literally tore the house apart looking for my remote control!” No, you literally did not tear apart your house, because it’s still standing. If you’d just told me you “tore your house apart” searching for your remote, I would’ve understood what you meant. No need to add “literally” to the sentence.
Maybe I should define literally.
Literally means actually. When you say something literally happened, you’re describing the scene or situation as it actually happened. So you should only use literally when you mean it. It should not be used in hyperbole. Example: “That was so funny I literally cried.” Which is possible. Some things are funny enough to elicit tears. Note the example stops with “literally cried.” You cannot literally cry your eyes out . The joke wasn’t so funny your eyes popped out of their sockets.
When in Doubt, Leave it Out “I’m so hungry I could eat a horse,” means you’re hungry. You don’t need to say “I’m so hungry I could literally eat a horse.” Because you can’t do that in one sitting, I don’t care how big your stomach is.
“That play was so funny I laughed my head off,” illustrates the play was amusing. You don’t need to say you literally laughed your head off, because then your head would be on the ground and you wouldn’t be able to speak, much less laugh.
“I drove so fast my car was flying,” we get your point: you were speeding. But your car is never going fast enough to fly, so don’t say your car was literally flying.
Insecurities? Maybe no one believed a story you told as a child, and you felt the need to prove that it actually happened. No really, mom, I literally climbed the tree. In efforts to prove truth, you used literally to describe something real, however outlandish it seemed. Whatever the reason, now your overuse of literally has become a habit.
Hard Habit to Break? Abusing literally isn’t as bad a smoking, but it’s still an unhealthy habit (I mean that figuratively). Help is required in order to break it.
This is my version of an intervention for literally abusers. I’m not sure how else to do it other than in writing. I know this makes me sound like a know-it-all, and I accept that. But there’s no excuse other than blatant ignorance to misuse the word “literally.” So just stop it.
Don’t say “Courtney, this post is so snobbish it literally burned up my computer.” Because nothing is that snobbish that it causes computers to combust. Or: “Courtney, your head is so big it literally cannot get through the door.” Because it can, unless it’s one of those tiny doors from Alice in Wonderland and I need to eat a mushroom to make my whole body smaller.
No One’s Perfect And I’m not saying I am. I’m trying to restore meaning to a word that’s lost meaning. I’m standing up for literally. It’s a good word when used correctly. People are butchering it and destroying it every day (figuratively speaking) and the massacre needs to stop. Just as there’s a coalition of people against the use of certain fonts (like Comic Sans and Papyrus ), so should there be a coalition of people against the abuse of literally.
Saying it to Irritate? Do you misuse the word “literally” just to annoy your know-it-all or grammar police friends/acquaintances/total strangers? If so, why? Doing so would be like me going outside when it’s freezing, wearing nothing but a pair of shorts and t-shirt in hopes of making you cold by just looking at me. Who suffers more?
Graphical Representation Matthew Inman of “The Oatmeal” wrote a comic about literally. Abusers and defenders alike should check it out . It’s clear this whole craze about literally is driving a lot of us nuts. You literally abusers are killing off pieces of our souls. You must be stopped, or the world will be lost to meaninglessness forever. Figuratively speaking.
\ No newline at end of file
diff --git a/test/test-pages/medium-3/expected.html b/test/test-pages/medium-3/expected.html
index f1c311e7..5974356f 100644
--- a/test/test-pages/medium-3/expected.html
+++ b/test/test-pages/medium-3/expected.html
@@ -1,7 +1,7 @@
-
+
How to get shanked doing what people say they want
don’t preach to me Mr. integrity
(EDIT: removed the link to Samantha’s post, because the arments and the grubers and the rest of The Deck Clique got what they wanted: a non-proper person driven off the internet lightly capped with a dusting of transphobia along the way, all totally okay because the ends justify the means, and it’s okay when “good” people do it.)
@@ -143,8 +143,8 @@
(Note: testflight_app is a parody account. Please do not mess with the actual testflight folks. They are still cool.)
Or this…conversation:
-
-
+
+
Good job guys. Good job. Defend the tribe. Attack the other. Frederico attempts to recover from his stunning display of demeaning douchery: @viticci : @s_bielefeld I don’t know if it’s an Italian thing, but counting other people’s money is especially weird for me. IMO, bad move in the post.
Samantha is clearly sick of his crap: @s_bielefeld : @viticci That’s what I’m referring to, the mistake of ever having mentioned it. So, now, Marco can ignore the bigger issue and go on living.
@@ -174,8 +174,8 @@
I think she’s earned her anger at this point.
Don’t worry, Marco knows what the real problem is: most devs just suck —
-
-
+
+
I have a saying that applies in this case: don’t place your head so far up your nethers that you go full Klein Bottle. Marco has gone full Klein Bottle. (To be correct, he went FKB some years ago.)
There are some bright spots. My favorite is when Building Twenty points out the real elephant in the room:
@@ -191,8 +191,8 @@
No Chris, you don’t have this right. But hey, who has time to find out the real issue and read an article. I’m sure your friends told you everything you need to know.
Noted Feminist Glenn Fleishman gets a piece of the action too:
-
-
+
+
I’m not actually surprised here. I watched Fleishman berate a friend of mine who has been an engineer for…heck, waaaaay too long on major software products in the most condescending way because she tried to point out that as a very technical woman, “The Magazine” literally had nothing to say to her and maybe he should fix that. “Impertinent” was I believe what he called her, but I may have the specific word wrong. Not the attitude mind you. Great Feminists like Glenn do not like uppity women criticizing Great Feminists who are their Great Allies.
Great Feminists are often tools.
diff --git a/test/test-pages/medium-3/source.html b/test/test-pages/medium-3/source.html
index 6e3d0856..37c24641 100644
--- a/test/test-pages/medium-3/source.html
+++ b/test/test-pages/medium-3/source.html
@@ -2216,10 +2216,10 @@
Samantha and The Great Big Lie – Medium
-
+
-
+
diff --git a/test/test-pages/missing-paragraphs/expected.html b/test/test-pages/missing-paragraphs/expected.html
index 39e027e4..98487198 100644
--- a/test/test-pages/missing-paragraphs/expected.html
+++ b/test/test-pages/missing-paragraphs/expected.html
@@ -1,5 +1,5 @@
-
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
@@ -15,7 +15,7 @@
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
sit amet.
-
+
Secondary header
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
@@ -31,7 +31,7 @@
Secondary header
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
sit amet.
-
+
Secondary header
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
diff --git a/test/test-pages/mozilla-1/expected.html b/test/test-pages/mozilla-1/expected.html
index 495b2307..088dd1e6 100644
--- a/test/test-pages/mozilla-1/expected.html
+++ b/test/test-pages/mozilla-1/expected.html
@@ -1,11 +1,11 @@
-
+
It’s easier than ever to personalize Firefox and make it work the way
you do.
No other browser gives you so much choice and flexibility.
-
+
@@ -16,9 +16,9 @@
Designed to be redesigned
Open the “Customize” panel to add, move or remove any button you want.
Keep your favorite features — add-ons, private browsing, Sync and more
— one quick click away.
-
+
-
+
@@ -29,48 +29,39 @@ Themes
Make Firefox match your style. Choose from thousands of themes and dress
up your browser with a single click.
- Try it now
+ Try it now
Learn more
-
Next
-
-
-
+
Next
Add-ons
-
Next
-
-
Add-ons are like apps that you install to add features to Firefox. They
+
Next
Add-ons are like apps that you install to add features to Firefox. They
let you compare prices, check the weather, listen to music, send a tweet
and more.
Read the latest news & blogs
Manage your downloads
Watch videos & view photos
- Here are a few of our favorites
+
Here are a few of our favorites
Learn more
-
-
-
-
+
+
+
Awesome Bar
-
Next
-
-
The Awesome Bar learns as you browse to make your version of Firefox unique.
+
Next
The Awesome Bar learns as you browse to make your version of Firefox unique.
Find and return to your favorite sites without having to remember a URL.
-
See what it can do for you
-
-
-
+
See what it can do for you
+
+
-
+
\ No newline at end of file
diff --git a/test/test-pages/mozilla-2/expected.html b/test/test-pages/mozilla-2/expected.html
index 8b858948..6a8ebabb 100644
--- a/test/test-pages/mozilla-2/expected.html
+++ b/test/test-pages/mozilla-2/expected.html
@@ -6,7 +6,7 @@
WebIDE
Develop, deploy and debug Firefox OS apps directly in your browser, or on a Firefox OS device, with this tool that replaces App Manager.
Learn more about WebIDE
-
+
@@ -14,7 +14,7 @@ WebIDE
Valence
Develop and debug your apps across multiple browsers and devices with this powerful extension that comes pre-installed with Firefox Developer Edition.
Learn more about Valence
-
+
Important: Sync your new profile
@@ -31,7 +31,7 @@
Important: Sync your new profile
Page Inspector
Examine the HTML and CSS of any Web page and easily modify the structure and layout of a page.
Learn more about Page Inspector
-
+
@@ -39,7 +39,7 @@ Page Inspector
Web Console
See logged information associated with a Web page and use Web Console to interact with Web pages using JavaScript.
Learn more about Web Console
-
+
@@ -47,7 +47,7 @@ Web Console
JavaScript Debugger
Step through JavaScript code and examine or modify its state to help track down bugs.
Learn more about JavaScript Debugger
-
+
@@ -55,7 +55,7 @@ JavaScript Debugger
Network Monitor
See all the network requests your browser makes, how long each request takes and details of each request.
Learn more about Network Monitor
-
+
@@ -63,7 +63,7 @@ Network Monitor
Web Audio Editor
Inspect and interact with Web Audio API in real time to ensure that all audio nodes are connected in the way you expect.
Learn more about Web Audio Editor
-
+
@@ -71,7 +71,7 @@ Web Audio Editor
Style Editor
View and edit CSS styles associated with a Web page, create new ones and apply existing CSS stylesheets to any page.
Learn more about Style Editor
-
+
\ No newline at end of file
diff --git a/test/test-pages/msn/expected.html b/test/test-pages/msn/expected.html
index 3ed4d696..d2f30abf 100644
--- a/test/test-pages/msn/expected.html
+++ b/test/test-pages/msn/expected.html
@@ -14,5 +14,5 @@
$10 might seem like a bit much compared to the $0 people pay for most mobile games, but it's possible the game has $10 worth of levels to play in it. It's also not iPhone exclusive, but the Android version will launch at a later, currently unknown date.
To see "Super Mario Run" in action, check out the footage below:
VIDEO
-
+
\ No newline at end of file
diff --git a/test/test-pages/nytimes-1/expected.html b/test/test-pages/nytimes-1/expected.html
index 13933733..efd7b90d 100644
--- a/test/test-pages/nytimes-1/expected.html
+++ b/test/test-pages/nytimes-1/expected.html
@@ -2,7 +2,7 @@
Photo
-
+
United Nations peacekeepers at a refugee camp in Sudan on Monday. In exchange for the lifting of United States trade sanctions, Sudan has said it will improve access for aid groups, stop supporting rebels in neighboring South Sudan and cooperate with American intelligence agents.
@@ -12,7 +12,7 @@
On Friday, the Obama administration will announce a new Sudan strategy. For the first time since the 1990s, the nation will be able to trade extensively with the United States, allowing it to buy goods like tractors and spare parts and attract much-needed investment in its collapsing economy.
In return, Sudan will improve access for aid groups, stop supporting rebels in neighboring South Sudan , cease the bombing of insurgent territory and cooperate with American intelligence agents.
American officials said Sudan had already shown important progress on a number of these fronts. But to make sure the progress continues, the executive order that President Obama plans to sign on Friday, days before leaving office, will have a six-month review period. If Sudan fails to live up to its commitments, the embargo can be reinstated.
-
+
Analysts said good relations with Sudan could strengthen moderate voices within the country and give the Sudanese government incentives to refrain from the brutal tactics that have defined it for decades.
In 1997, President Bill Clinton imposed a comprehensive trade embargo against Sudan and blocked the assets of the Sudanese government , which was suspected of sponsoring international terrorism. In the mid-1990s, Osama bin Laden lived in Khartoum, the capital, as a guest of Sudan’s government.
In 1998, Bin Laden’s agents blew up the United States Embassies in Kenya and Tanzania, killing more than 200 people. In retaliation, Mr. Clinton ordered a cruise missile strike against a pharmaceutical factory in Khartoum.
@@ -21,7 +21,7 @@
Sales of military equipment will still be prohibited, and some Sudanese militia and rebel leaders will still face sanctions.
But the Obama administration is clearly trying to open a door to Sudan. There is intense discontent across the country, and its economy is imploding. American officials have argued for years that it was time to help Sudan dig itself out of the hole it had created.
Officials divulged Thursday that the Sudanese government had allowed two visits by American operatives to a restricted border area near Libya, which they cited as evidence of a new spirit of cooperation on counterterrorism efforts.
-
+
In addition to continuing violence in Darfur, several other serious conflicts are raging in southern and central Sudan, along with a civil war in newly independent South Sudan, which Sudan has been suspected of inflaming with covert arms shipments.
Eric Reeves , one of the leading American academic voices on Sudan, said he was “appalled” that the American government was lifting sanctions.
He said that Sudan’s military-dominated government continued to commit grave human rights abuses and atrocities, and he noted that just last week Sudanese security services killed more than 10 civilians in Darfur .
@@ -29,9 +29,9 @@
Obama administration officials said that they had briefed President-elect Donald J. Trump’s transition team, but that they did not know if Mr. Trump would stick with a policy of warmer relations with Sudan.
They said that Sudan had a long way to go in terms of respecting human rights, but that better relations could help increase American leverage.
Mr. Reeves said he thought that the American government was being manipulated and that the Obama administration had made a “deal with the devil.”
- Continue reading the main story
-
-
-
-
+
Continue reading the main story
+
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/nytimes-2/expected.html b/test/test-pages/nytimes-2/expected.html
index e6d2662e..0bd50d94 100644
--- a/test/test-pages/nytimes-2/expected.html
+++ b/test/test-pages/nytimes-2/expected.html
@@ -2,22 +2,22 @@
Photo
-
+
Credit Harry Campbell
Yahoo ’s $4.8 billion sale to Verizon is a complicated beast, showing how different acquisition structures can affect how shareholders are treated.
First, let’s say what the Yahoo sale is not. It is not a sale of the publicly traded company. Instead, it is a sale of the Yahoo subsidiary and some related assets to Verizon.
The sale is being done in two steps. The first step will be the transfer of any assets related to Yahoo business to a singular subsidiary. This includes the stock in the business subsidiaries that make up Yahoo that are not already in the single subsidiary, as well as the odd assets like benefit plan rights. This is what is being sold to Verizon. A license of Yahoo’s oldest patents is being held back in the so-called Excalibur portfolio. This will stay with Yahoo, as will Yahoo’s stakes in Alibaba Group and Yahoo Japan.
-
It is hard to overestimate how complex an asset sale like this is. Some of the assets are self-contained, but they must be gathered up and transferred. Employees need to be shuffled around and compensation arrangements redone. Many contracts, like the now-infamous one struck with the search engine Mozilla, which may result in a payment of up to a $1 billion , will contain change-of-control provisions that will be set off and have to be addressed. Tax issues always loom large.
Continue reading the main story
-
-
-
-
+
It is hard to overestimate how complex an asset sale like this is. Some of the assets are self-contained, but they must be gathered up and transferred. Employees need to be shuffled around and compensation arrangements redone. Many contracts, like the now-infamous one struck with the search engine Mozilla, which may result in a payment of up to a $1 billion , will contain change-of-control provisions that will be set off and have to be addressed. Tax issues always loom large.
Continue reading the main story
+
+
+
+
In the second step, at the closing, Yahoo will sell the stock in the single subsidiary to Verizon. At that point, Yahoo will change its name to something without “Yahoo” in it. My favorite is simply Remain Co., the name Yahoo executives are using. Remain Co. will become a holding company for the Alibaba and Yahoo Japan stock. Included will also be $10 billion in cash, plus the Excalibur patent portfolio and a number of minority investments including Snapchat. Ahh, if only Yahoo had bought Snapchat instead of Tumblr (indeed, if only Yahoo had bought Google or Facebook when it had the chance).
-
+
Because it is a sale of a subsidiary, the $4.8 billion will be paid to Yahoo. Its shareholders will not receive any money unless Yahoo pays it out in a dividend (after paying taxes). Instead, Yahoo shareholders will be left holding shares in the renamed company.
Verizon’s Yahoo will then be run under the same umbrella as AOL . It is unclear whether there will be a further merger of the two businesses after the acquisition. Plans for Yahoo are still a bit in flux in part because of the abnormal sale process.
As for Remain Co., it will become a so-called investment company. This is a special designation for a company that holds securities for investment but does not operate a working business. Investment companies are subject to special regulation under the Investment Company Act of 1940. Remain Co. will probably just sit there, returning cash to shareholders and waiting for Alibaba to buy it in a tax-free transaction. (Alibaba says it has no plans to do this, but most people do not believe this).
@@ -26,16 +26,16 @@
In either case, shareholders get a say. They either vote on the merger or decide whether to tender into the offer.
In both cases, there would be appraisal rights if the buyer pays cash. This means that shareholders can object to the deal by not voting for it or not tendering into the offer and instead asking a court to value their shares – this is what happened in Dell’s buyout in 2013 .
The Yahoo deal, however, is not a sale of the public company. It is an asset sale, in which there is only a shareholder vote if there is a sale of “all” or “substantially all” of the assets of the company. Yahoo is not all of the assets or even “substantially all” – the Alibaba shares being left behind in Remain Co. are worth about $28 billion, or six times the value of the cash Verizon is paying for the Yahoo assets it is buying.
-
+
The courts have held that the definition of “substantially all” includes a change of business in a company because of an asset sale where the assets are “qualitatively vital.” And that certainly applies here. So there will be a vote – indeed, Yahoo has no problem with a vote – and shareholders are desperate to sell at this point.
There will be no appraisal rights, however. Again, in an asset sale, there are no appraisal rights. So anyone who votes against the deal and thinks this is a bum price is out of luck.
The different standards for voting and appraisal rights apply because the structure of the deal is a quirk of the law in Delaware, where Yahoo is incorporated, that allows lawyers to sometimes work around these issues simply by changing the way a deal is done.
In Yahoo’s case, this is not deliberate, though. It is simply the most expedient way to get rid of the assets.
Whether this is the most tax-efficient way is unclear to me as a nontax lawyer (email me if you know). Yahoo is likely to have a tax bill on the sale, possibly a substantial one. And I presume there were legal reasons for not using a Morris Trust structure , in which Yahoo would have been spun off and immediately sold to Verizon so that only Yahoo’s shareholders paid tax on the deal. In truth, the Yahoo assets being sold are only about 10 percent of the value of the company, so the time and logistics for such a sale when Yahoo is a melting ice cube may not have been worth it.
Finally, if another bidder still wants to acquire Yahoo, it has time. The agreement with Verizon allows Yahoo to terminate the deal and accept a superior offer by paying a $144 million breakup fee to Verizon. And if Yahoo shareholders change their minds and want to stick with Yahoo’s chief executive, Marissa Mayer , and vote down the deal, there is a so-called naked no-vote termination fee of $15 million payable to Verizon to reimburse expenses.
-
All in all, this was as hairy a deal as they come. There was the procedural and logistical complications of selling a company when the chief executive wanted to stay. Then there was the fact that this was an asset sale, including all of the challenges that go with it. Throw in all of the tax issues and the fact that this is a public company, and it is likely that the lawyers involved will have nightmares for years to come.
Continue reading the main story
-
-
-
-
+
All in all, this was as hairy a deal as they come. There was the procedural and logistical complications of selling a company when the chief executive wanted to stay. Then there was the fact that this was an asset sale, including all of the challenges that go with it. Throw in all of the tax issues and the fact that this is a public company, and it is likely that the lawyers involved will have nightmares for years to come.
Continue reading the main story
+
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/pixnet/expected.html b/test/test-pages/pixnet/expected.html
index ffa81c79..6f6189e8 100644
--- a/test/test-pages/pixnet/expected.html
+++ b/test/test-pages/pixnet/expected.html
@@ -13,7 +13,7 @@
營區內 除了露營、民宿、餐飲、 賞楓項目多了許多原木飾品更有畫龍點睛加乘效果
-
+
廣受歡迎的美樹營地有個很大特色就是楓紅時期楓香樹由綠轉黃、轉紅到楓紅層層
@@ -27,67 +27,67 @@
、貓頭鷹裝飾品勾勒出美樹的風格
-
-
+
+
每年12月向來是攝影班外拍的絕佳場所之一 楓紅期間入園費$50元
園區給愛攝一族淨空場景而不是散搭帳蓬之下反 而影響拍照畫面與構圖取景
露營的話則須待中午過後再進場搭帳的彈性做法個人也相當支持這樣的權宜之計
-
-
+
+
來到現場已是落葉飄飄堆疊滿地 不時隨著風吹雨襲而葉落垂地
-
-
+
+
不忍踩過剛剛掉落的樹葉 沿著前人足跡踏痕輕踩而行
雖然只是一廂情願的想法 終究還是不可避免地將會化為塵土
-
-
+
+
葉落繽紛顯得幾分蕭瑟氣息 空氣中可以嗅得出來依然 瀰漫著濕寒水氣
偶而還會飄下來一些霧氣水滴 不時張望尋找最佳楓葉主題
-
-
+
+
外拍的攝影班學員一堆早已不時穿梭其間
各自努力地找尋自認為最好的拍攝角度
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
"水槽"上面的這幾隻彩繪版貓頭鷹也太可愛了
同樣的造型加上不同色彩宛如賦予不同的生命力一般 cool!
-
-
+
+
雨水洗塵後的枝頭固然掉落些葉片是否也洗去塵勞憂傷
-
-
+
+
-
-
+
+
喜歡拍照的不論是平面掃描、天空搜尋、 地上地毯式搜索
有如小說偵探一般 不放過蛛絲馬跡地用力尋尋覓覓找尋最美角度
-
-
+
+
-
-
+
+
原本這周是由小朱團長早在一年前就跟"簍信"預定下來的場子
早上從台北出門之際還是小雨不斷細雨紛飛來到此地雖雨已停
@@ -96,32 +96,32 @@
-
-
+
+
午後從"秀巒"回到美樹之際已經全數撤退只剩下我們三車留下來
唯有"離開地球表面"睡車上的才可以不受到地上泥濘而影響
-
-
+
+
-
-
+
+
午後山嵐興起雲氣遊蕩盤旋在對岸山頭 人潮來來去去似乎也沒有減少
-
-
+
+
美樹民宿有開設餐廳 室內簡單佈置提供伙食餐飲
-
-
+
+
這兩間是民宿房間 跟著民宿主人"簍信"聊起來還提到日後將改變成兩層木屋
一樓則是咖啡飲料/賣店提供訪客來賓有個落腳席座之地 二樓才會是民宿房間
心中有了計畫想法才會有日後的夢想藍圖 相信將會改變得更好的民宿露營環境
-
+
@@ -129,27 +129,27 @@
前面這一區約可搭上十二帳/車/廳 後面那區也大約4~5帳/車/廳
正前方小木屋即是衛浴區 男女分別以左右兩側 分開(燒材鍋爐)
-
-
+
+
營區水電方便 水槽也很有特色
-
-
+
+
這次選擇左側地勢高些以防午夜下雨泥濘
-
-
+
+
"野馬"特地帶來了冬至應景食材ㄜ---湯圓
這家還是最近被評比第一名氣的湯圓專賣店
-
-
+
+
向來對於湯圓是敬謝不敏 沒想到是出乎意料之外的好吃 沒話說!
-
-
+
+
喜歡原住民朋友的坦率、真誠 要將民宿營地經營的有聲有色並非容易之事
午茶時間與"簍信"閒聊分享著他的觀點理念之時很支持對於環境應有生態保護
@@ -157,47 +157,47 @@
環保維護是人人有責 勿以善小而不為不計涓滴之水才可匯集成河
-
-
+
+
-
-
+
+
入夜前雨絲終於漸漸緩和下來 雖然氣溫很低卻沒感受到寒冷的跡象
是山谷中少了寒氣還是美樹營區裡的人熱情洋溢暖化了不少寒意
-
+
聖誕前夕裝點些聖誕飾品 感受一下節慶的氛圍
-
-
+
+
晚餐準備了砂鍋魚頭
-
-
+
+
"蒯嫂"還特地準備著羊肩排、鹹豬肉、柳葉魚...哇!這哩澎湃哩...
"永老爺"早已備妥了好酒為遠自台南來的蒯兄嫂敬一杯囉
感謝蒯嫂精心準備的好料理 食指大動好菜色感恩ㄟ!
-
-
+
+
吃得快精光之際...才想到忘了拍合照...(哇哩咧 ^&*()
-
+
-
-
+
+
隔日睡到很晚才起床 不用拍日出晨光的營地對我來說都是個幸福的睡眠
哪怕是葉落飄零落滿地還是睡夢周公召見而去 起床的事~差點都忘記了
-
-
+
+
昨天細雨紛飛依然打落了不少落葉中間這株整個都快變成枯枝了
昨天依稀凋零稀疏的楓葉殘留今兒個完全不復存在(上周是最美的代名詞)
-
-
+
+
上回來得太早沒能見到楓葉泛紅 這次晚了一周已陸續落葉也 無從比對楓葉差異性
@@ -205,52 +205,52 @@
只要心中自認為是最美最浪漫的一刻 都是美的表徵也是最美的時分
-
-
+
+
早起的"蒯嫂"已經備好熱騰騰中式稀飯、包子、蔬果 頓時~有幸福的感覺
-
-
+
+
星期天早上趁著攝影團還沒入場先來人物場景特寫
野馬家兩張新"座椅"就當作是試坐囉!拍謝哩
-
-
+
+
-
-
+
+
難得有此無人美景在楓樹下的聖誕氛圍也一定要來一張才行
-
-
+
+
三家合照(Hero也一定要入鏡的)
-
-
+
+
接著攝影團入場帶隊老師請求借個時間也來讓學員練習楓樹下的聖誕飾品
此時剛好也遇到早在FB社團相互回應卻頭一次謀面的Mr."大雄"真是幸會了
-
-
+
+
接近中午時分陽光漸露 藍天帷幕再次嶄露頭角 ~ 久違了!
期盼下的天空終於放晴 沒有缺席的藍天還是準時赴約如期出席
-
-
+
+
這兩天肉肉(Hero)天雨濕滑無法自由奔跑都快悶壞了
天晴後"蒯嫂"帶著散步遊園也好解解悶
-
-
+
+
收拾好裝備準備離開營地 亮麗的 天空鮮明對比下的楓樹林又讓人覺得有點捨不得離開
道別了"美樹營地"準備前往而行 "石磊國小"一個很生疏的小學座落在這深山部落裡
北橫"石磊部落" 一個從未踏入的陌生之地因為露營之故否則畢生大概也不會路過
三位大叔同行準備走著這段遙遠的路段 下次找機會再來重溫舊夢了.......
-
+
美樹營地
資訊
@@ -264,17 +264,17 @@
楓紅期間須過中午才可搭帳 水電便利
GPS: N24 39 16.4 E121 18 19.5
-
-
+
+
如果您喜歡 "史蒂文的家"圖文分享 邀請您到 FB 粉絲團
按個"讚"!
內文有不定期的更新旅遊、露營圖文訊息 謝謝!
-
-
-
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/qq/expected-metadata.json b/test/test-pages/qq/expected-metadata.json
new file mode 100644
index 00000000..64fe95ec
--- /dev/null
+++ b/test/test-pages/qq/expected-metadata.json
@@ -0,0 +1,5 @@
+{
+ "Title": "DeepMind新电脑已可利用记忆自学 人工智能迈上新台阶_科技_腾讯网",
+ "Author": null,
+ "Excerpt": "DeepMind新电脑已可利用记忆自学 人工智能迈上新台阶"
+}
diff --git a/test/test-pages/qq/expected.html b/test/test-pages/qq/expected.html
new file mode 100644
index 00000000..d8de9336
--- /dev/null
+++ b/test/test-pages/qq/expected.html
@@ -0,0 +1,35 @@
+
+
+
+
+
转播到腾讯微博
+
+
+
TNW中文站 10月14日报道
+
谷歌 (微博 ) 在2014年收购的人工智能公司DeepMind开发出一款能够用自己的记忆学习新知识并利用这些知识来回答问题的计算机。
+
这款产品具有极其重要的意义,因为这意味着未来的人工智能技术可能不需要人类来教它就能回答人类提出的问题。
+
DeepMind表示,这款名为DNC(可微神经计算机)的AI模型可以接受家谱和伦敦地铁网络地图这样的信息,还可以回答与那些数据结构中的不同项目之间的关系有关的复杂问题。
+
例如,它可以回答“从邦德街开始,沿着中央线坐一站,环线坐四站,然后转朱比利线坐两站,你会到达哪个站?”这样的问题。
+
DeepMind称,DNC还可以帮你规划从沼泽门到皮卡迪利广场的最佳路线。
+
同样,它还可以理解和回答某个大家族中的成员之间的关系这样的复杂问题,比如“张三的大舅是谁?”。
+
DNC建立在神经网络的概念之上,神经网络可以模拟人类思想活动的方式。这种AI技术很适合与机器习得配套使用。
+
DeepMind的AlphaGo AI能够打败围棋冠军也跟这些神经网络有很大关系。但是AlphaGo必须进行训练才行,开发人员向AlphaGo提供了历史对弈中的大约3000万记录。让人工智能技术具备通过记忆学习的能力,就可以让它独自完成更复杂的任务。
+
DeepMind希望DNC可以推动计算行业实现更多突破。DeepMind已将其研究结果发表在科学 刊物《自然》(Nature)上。(编译/林靖东)
+
精彩视频推荐
+
+
+
+
+
+
+
转播到腾讯微博
+
+
+
+
+
+
+
【美国The Next Web作品的中文相关权益归腾讯公司独家所有。未经授权,不得转载、摘编等。】
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/qq/source.html b/test/test-pages/qq/source.html
new file mode 100644
index 00000000..6676348f
--- /dev/null
+++ b/test/test-pages/qq/source.html
@@ -0,0 +1,7280 @@
+
+
+
+
+
+ DeepMind新电脑已可利用记忆自学 人工智能迈上新台阶_科技_腾讯网
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无障碍说明
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
浏览器更新提醒 电脑登录微信无需扫码,浏览QQ空间提速 5 倍 立即更新 ×
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
DeepMind新电脑已可利用记忆自学 人工智能迈上新台阶
+
+
+
TNW中文站 2016年10月14日07:17
+
+
+
+
+
+
+
+
+
+
+
转播到腾讯微博
+
TNW中文站 10月14日报道
+
+ 谷歌 (微博 )
+ 在2014年收购的人工智能公司DeepMind开发出一款能够用自己的记忆学习新知识并利用这些知识来回答问题的计算机。
+
这款产品具有极其重要的意义,因为这意味着未来的人工智能技术可能不需要人类来教它就能回答人类提出的问题。
+
DeepMind表示,这款名为DNC(可微神经计算机)的AI模型可以接受家谱和伦敦地铁网络地图这样的信息,还可以回答与那些数据结构中的不同项目之间的关系有关的复杂问题。
+
例如,它可以回答“从邦德街开始,沿着中央线坐一站,环线坐四站,然后转朱比利线坐两站,你会到达哪个站?”这样的问题。
+
DeepMind称,DNC还可以帮你规划从沼泽门到皮卡迪利广场的最佳路线。
+
同样,它还可以理解和回答某个大家族中的成员之间的关系这样的复杂问题,比如“张三的大舅是谁?”。
+
DNC建立在神经网络的概念之上,神经网络可以模拟人类思想活动的方式。这种AI技术很适合与机器习得配套使用。
+
DeepMind的AlphaGo AI能够打败围棋冠军也跟这些神经网络有很大关系。但是AlphaGo必须进行训练才行,开发人员向AlphaGo提供了历史对弈中的大约3000万记录。让人工智能技术具备通过记忆学习的能力,就可以让它独自完成更复杂的任务。
+
DeepMind希望DNC可以推动计算行业实现更多突破。DeepMind已将其研究结果发表在科学 刊物《自然》(Nature)上。(编译/林靖东)
+
精彩视频推荐
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
转播到腾讯微博
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
【美国The Next Web作品的中文相关权益归腾讯公司独家所有。未经授权,不得转载、摘编等。】
+
+
+
+
+
[责任编辑:alonliu]
+
+
+
+
+
+
您认为这篇文章与"新一网(08008.HK) "相关度高吗?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Copyright © 1998 - 2016 Tencent. All Rights Reserved
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 登录
+
+
+
+
+
+
+
+ 评论成功!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/test-pages/remove-extra-brs/expected.html b/test/test-pages/remove-extra-brs/expected.html
index f8f8a6c1..f731d752 100644
--- a/test/test-pages/remove-extra-brs/expected.html
+++ b/test/test-pages/remove-extra-brs/expected.html
@@ -1,16 +1,11 @@
-
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua.
-
Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
- proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
-
Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat.
-
Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
- proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
\ No newline at end of file
+
+
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
+
Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
\ No newline at end of file
diff --git a/test/test-pages/remove-extra-paragraphs/expected.html b/test/test-pages/remove-extra-paragraphs/expected.html
index a7c63180..ba618692 100644
--- a/test/test-pages/remove-extra-paragraphs/expected.html
+++ b/test/test-pages/remove-extra-paragraphs/expected.html
@@ -1,23 +1,23 @@
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
-
+
Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
-
-
+
+
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
+
Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
-
+
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
+
\ No newline at end of file
diff --git a/test/test-pages/remove-script-tags/expected.html b/test/test-pages/remove-script-tags/expected.html
index 769cc062..2bc8824a 100644
--- a/test/test-pages/remove-script-tags/expected.html
+++ b/test/test-pages/remove-script-tags/expected.html
@@ -13,7 +13,7 @@
consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur.
-
+
Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\ No newline at end of file
diff --git a/test/test-pages/replace-brs/expected.html b/test/test-pages/replace-brs/expected.html
index ba2d4fd9..56e36a4b 100644
--- a/test/test-pages/replace-brs/expected.html
+++ b/test/test-pages/replace-brs/expected.html
@@ -1,14 +1,14 @@
- Lorem ipsum
dolor sit
amet, consectetur adipisicing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ Lorem ipsum dolor sit
amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- Tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ Tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\ No newline at end of file
diff --git a/test/test-pages/replace-brs/source.html b/test/test-pages/replace-brs/source.html
index e1d2e78f..2283d654 100644
--- a/test/test-pages/replace-brs/source.html
+++ b/test/test-pages/replace-brs/source.html
@@ -8,19 +8,19 @@
Lorem
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Foo
- Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
diff --git a/test/test-pages/replace-font-tags/expected.html b/test/test-pages/replace-font-tags/expected.html
index 9d6025c0..a36b1a25 100644
--- a/test/test-pages/replace-font-tags/expected.html
+++ b/test/test-pages/replace-font-tags/expected.html
@@ -1,6 +1,5 @@
-
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
diff --git a/test/test-pages/rtl-1/source.html b/test/test-pages/rtl-1/source.html
index 597c427a..f92ede1c 100644
--- a/test/test-pages/rtl-1/source.html
+++ b/test/test-pages/rtl-1/source.html
@@ -10,7 +10,7 @@
Lorem
-
+
f
Lorem ipsum dolor sit amet.
diff --git a/test/test-pages/simplyfound-1/expected.html b/test/test-pages/simplyfound-1/expected.html
index 55b74a98..838d7a62 100644
--- a/test/test-pages/simplyfound-1/expected.html
+++ b/test/test-pages/simplyfound-1/expected.html
@@ -1,18 +1,18 @@
The Raspberry Pi Foundation started by a handful of volunteers in 2012 when they released the original Raspberry Pi 256MB Model B without knowing what to expect. In a short four-year period they have grown to over sixty full-time employees and have shipped over eight million units to-date. Raspberry Pi has achieved new heights by being shipped to the International Space Station for research and by being an affordable computing platforms used by teachers throughout the world. "It has become the all-time best-selling computer in the UK".
-
-
+
+
Raspberry Pi 3 - A credit card sized PC that only costs $35 - Image: Raspberry Pi Foundation
-
+
Raspberry Pi Foundation is charity organization that pushes for a digital revolution with a mission to inspire kids to learn by creating computer-powered objects. The foundation also helps teachers learn computing skills through free training and readily available tutorials & example code for creating cool things such as music.
-
-
+
+
Raspberry Pi in educations - Image: Raspberry Pi Foundation
-
+
In celebration of their 4th year anniversary, the foundation has released Raspberry Pi 3 with the same price tag of $35 USD. The 3rd revision features a 1.2GHz 64-bit quad-core ARM CPU with integrated Bluetooth 4.1 and 802.11n wireless LAN chipsets. The ARM Cortex-A53 CPU along with other architectural enhancements making it the fastest Raspberry Pi to-date. The 3rd revision is reportedly about 50-60% times faster than its predecessor Raspberry Pi 2 and about 10 times faster then the original Raspberry PI.
-
-
+
+
Raspberry Pi - Various Usage
-
+
Raspberry Pi 3 is now available via many online resellers. At this time, you should use a recent 32-bit NOOBS or Raspbian image from their downloads page with a promise of a switch to a 64-bit version only if further investigation proves that there is indeed some value in moving to 64-bit mode.
\ No newline at end of file
diff --git a/test/test-pages/social-buttons/expected.html b/test/test-pages/social-buttons/expected.html
index 6d135be2..84b1d414 100644
--- a/test/test-pages/social-buttons/expected.html
+++ b/test/test-pages/social-buttons/expected.html
@@ -11,7 +11,7 @@
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
diff --git a/test/test-pages/table-style-attributes/expected.html b/test/test-pages/table-style-attributes/expected.html
index c1f0a1a1..48d18518 100644
--- a/test/test-pages/table-style-attributes/expected.html
+++ b/test/test-pages/table-style-attributes/expected.html
@@ -1,55 +1,44 @@
-
-
- linux usability
- ...or, why do I bother. © 2002, 2003
- Jamie Zawinski
-
-
+
+
linux usability
+ ...or, why do I bother.
+ © 2002, 2003 Jamie Zawinski
-
+
+
+
+
In December 2002, I tried to install some software on my computer. The experience was, shall we say, less than pleasant. On many levels. I wrote about my experience, as I so often do.
Then in January, the jackasses over at Slashdot posted a link to it, calling it a "review" of Linux video software. I guess you could consider it a review, if you were to squint at it just right. But really what it is is a rant about how I had an evening stolen from me by crap software design. It is a flame about the pathetic state of Linux usability in general, and the handful of video players I tried out in particular. It makes no attempt to be balanced or objective or exhaustive. It is a description of my experience. Perhaps your experience was different. Good for you.
So of course that day I got hundreds of emails about it. Every Linux apologist in the world wanted to make sure I was fully informed of their opinion. The replies were roughly in the following groups:
-
- "Right on! I had exactly the same experience! Thank you for putting it into words." (This was about 1/3 of the replies.)
-
-
- "You're clearly an idiot, Linux is too sophisticated for you, you clearly are incapable of understanding anything, you should go back to kindergarten and/or use a Mac." (Oddly, all of these messages used the word `clearly' repeatedly.)
-
-
- "If you don't like it, fix it yourself."
-
-
- "Netscape sucks! XEmacs sucks! You suck! I never liked you anyway! And you swear too much!"
-
-
- "How dare you criticize someone else's work! You got it for free! You should be on your knees thanking them for wasting your time!"
-
-
- "While you have some valid complaints, I'm going to focus on this one inconsequential error you made in your characterization of one of the many roadblocks you encountered. You suck!"
-
-
- "It's your fault for using Red Hat! You should be using Debian/ Mandrake/ Gentoo instead!"
-
-
+
+ "Right on! I had exactly the same experience! Thank you for putting it into words." (This was about 1/3 of the replies.)
+ "You're clearly an idiot, Linux is too sophisticated for you, you clearly are incapable of understanding anything, you should go back to kindergarten and/or use a Mac." (Oddly, all of these messages used the word `clearly' repeatedly.)
+ "If you don't like it, fix it yourself."
+ "Netscape sucks! XEmacs sucks! You suck! I never liked you anyway! And you swear too much!"
+ "How dare you criticize someone else's work! You got it for free! You should be on your knees thanking them for wasting your time!"
+ "While you have some valid complaints, I'm going to focus on this one inconsequential error you made in your characterization of one of the many roadblocks you encountered. You suck!"
+ "It's your fault for using Red Hat! You should be using Debian/ Mandrake/ Gentoo instead!"
"Red Hat 7.2 is totally obsolete! It's almost 14 months old! What were you expecting!"
- While I am flattered that so many logorrheic Linux fanboys are sufficiently interested in my opinions and experiences to share their deeply heartfelt views with me, you can all rest assured that:
-
- I've heard it before; and
+
+
+
+ While I am flattered that so many logorrheic Linux fanboys are sufficiently interested in my opinions and experiences to share their deeply heartfelt views with me, you can all rest assured that:
+
+
+ I've heard it before; and
I didn't care the first time.
- So please. Don't bother sending me any more mail about this. It's a near certainty that I will just delete it unread, so you might as well not waste your time. Feel free to call me names on your own web page if you feel the need to get it out of your system. But kindly stay out of my inbox.
-
-
-
+
+
+ So please. Don't bother sending me any more mail about this. It's a near certainty that I will just delete it unread, so you might as well not waste your time. Feel free to call me names on your own web page if you feel the need to get it out of your system. But kindly stay out of my inbox.
-
-
-
- that said...
-
+
+
+
+
+
that said...
I understand that one can play videos on one's computer. I understand these videos come in many different formats. Every now and then I try to figure out what the Done Thing is, as far as playing movies on one's Linux machine.
-
-
(Really my eventual goal is to be able to create video on Linux, but I figured I'd start small, and see if I could just get playback working before trying something that is undoubtedly ten thousand times harder.) I finally found RPMs of mplayer that would consent to install themselves on a Red Hat 7.2 machine, and actually got it to play some videos. Amazing. But it's a total pain in the ass to use due to rampant "themeing." Why do people do this? They map this stupid shaped window with no titlebar (oh, sorry, your choice of a dozen stupidly-shaped windows without titlebars) all of which use fonts that are way too small to read. But, here's the best part, there's no way to raise the window to the top. So if another window ever gets on top of it, well, sorry, you're out of luck. And half of the themes always map the window at the very bottom of the
+
(Really my eventual goal is to be able to create video on Linux, but I figured I'd start small, and see if I could just get playback working before trying something that is undoubtedly ten thousand times harder.)
+
I finally found RPMs of mplayer that would consent to install themselves on a Red Hat 7.2 machine, and actually got it to play some videos. Amazing. But it's a total pain in the ass to use due to rampant "themeing." Why do people do this? They map this stupid shaped window with no titlebar (oh, sorry, your choice of a dozen stupidly-shaped windows without titlebars) all of which use fonts that are way too small to read. But, here's the best part, there's no way to raise the window to the top. So if another window ever gets on top of it, well, sorry, you're out of luck. And half of the themes always map the window at the very bottom of the
screen -- conveniently under my panel where I can't reach it.
Resizing the window changes the aspect ratio of the video! Yeah, I'm sure someone has ever wanted that.
It moves the mouse to the upper left corner of every dialog box it creates! Which is great, because that means that when it gets into this cute little state of popping up a blank dialog that says "Error" five times a second, you can't even move the mouse over to another window to kill the program, you have to log in from another machine.
@@ -62,39 +51,39 @@
Then I checked out Ogle again, and it hasn't been updated since the last time I tried, six months ago. It's a pretty decent DVD player, if you have the physical DVD. It does on-screen menus, and you can click on them with the mouse. But I don't need a DVD player (I have a hardware DVD player that works just fine.) It can't, as far as I can tell, play anything but actual discs.
Oh, and even though I have libdvdcss installed (as evidenced by the fact that Ogle actually works) Xine won't play the same disc that Ogle will play. It seems to be claiming that the CSS stuff isn't installed, which it clearly is.
An idiocy that all of these programs have in common is that, in addition to opening a window for the movie, and a window for the control panel, they also spray a constant spatter of curses crud on the terminal they were started from. I imagine at some point, there was some user who said, ``this program is pretty nice, but you know what it's missing? It's missing a lot of pointless chatter about what plugins and fonts have been loaded!''
-
-
And here's the Random Commentary section:
-
+
And here's the Random Commentary section:
Makali wrote:
Whenever a programmer thinks, "Hey, skins, what a cool idea", their
computer's speakers should create some sort of cock-shaped soundwave
and plunge it repeatedly through their skulls.
- I am fully in support of this proposed audio-cock technology.
+
+ I am fully in support of this proposed audio-cock technology.
Various people wrote:
You shouldn't even bother compiling the GUI into mplayer!
- So I should solve the problem of ``crappy GUI'' by replacing it with ``no GUI at all?'' I should use the program only from the command line, or by memorizing magic keystrokes? Awesome idea.
+
+ So I should solve the problem of ``crappy GUI'' by replacing it with ``no GUI at all?'' I should use the program only from the command line, or by memorizing magic keystrokes? Awesome idea.
Various other people wrote:
True, I hadn't. Now I have. It has an overly-complicated UI, (the Preferences panel is a festival of overkill) but at least it uses standard menus and buttons, so it doesn't make you want to claw your eyes out immediately. But, it can only play a miniscule number of video formats, so it's mostly useless. *plonk*
+
+ True, I hadn't. Now I have. It has an overly-complicated UI, (the Preferences panel is a festival of overkill) but at least it uses standard menus and buttons, so it doesn't make you want to claw your eyes out immediately. But, it can only play a miniscule number of video formats, so it's mostly useless. *plonk*
Someone else wrote:
Have you considered changing distributions?
- Yes, every single time I try something like this, I very seriously consider getting a Mac .
+
+ Yes, every single time I try something like this, I very seriously consider getting a Mac .
Really the only thing that's stopping me is that I fear the Emacs situation .
(By which I mean, ``Lack of a usable version thereof.'' No, running RMSmacs inside a terminal window doesn't qualify. Nor does running an X server on the Mac: if I were going to switch, why in the world would I continue inflicting the X Windows Disaster on myself? Wouldn't getting away from that be the whole
point? )
-
-
+ By the way, the suggestion to switch Linux distrubutions in order to get a single app to work might sound absurd at first. And that's because it is . But I've been saturated with Unix-peanut-gallery effluvia for so long that it no longer even surprises me when every
question -- no matter how
simple -- results in someone suggesting that you either A) patch your kernel or B) change distros. It's inevitable and inescapable, like Hitler.
-
-
-
+
+
\ No newline at end of file
diff --git a/test/test-pages/table-style-attributes/source.html b/test/test-pages/table-style-attributes/source.html
index 4b7196bb..0e20275b 100644
--- a/test/test-pages/table-style-attributes/source.html
+++ b/test/test-pages/table-style-attributes/source.html
@@ -66,6 +66,8 @@
"Red Hat 7.2 is totally obsolete! It's almost 14 months old! What were you expecting!"
+
+
While I am flattered that so many logorrheic Linux fanboys are sufficiently interested in my opinions and experiences to share their deeply heartfelt views with me, you can all rest assured that:
diff --git a/test/test-pages/tmz-1/expected.html b/test/test-pages/tmz-1/expected.html
index 2c237889..48f65bdc 100644
--- a/test/test-pages/tmz-1/expected.html
+++ b/test/test-pages/tmz-1/expected.html
@@ -1,36 +1,18 @@
-
-
-
Lupita Nyong'o
-
-
$150K Pearl Oscar Dress ... STOLEN!!!!
-
-
-
- 2/26/2015 7:11 AM PST BY TMZ STAFF
-
-
-
-
EXCLUSIVE
-
-
- Lupita Nyong 'o 's now-famous Oscar dress
- -- adorned in pearls -- was stolen right out of her hotel room ... TMZ
- has learned.
-
Law enforcement sources tell TMZ ... the dress was taken out of Lupita's
- room at The London West Hollywood. The dress is made of pearls ... 6,000
- white Akoya pearls. It's valued at $150,000.
-
Our sources say Lupita told cops it was taken from her room sometime between
- 8 AM and 9 PM Wednesday ... while she was gone.
-
We're told there is security footage that cops are looking at that could
- catch the culprit right in the act.
-
- 12:00 PM PT -- Sheriff's deputies were at The London Thursday
- morning. We know they were in the manager's office and we're told
- they have looked at security footage to determine if they can ID the culprit.
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
Lupita Nyong'o
+
$150K Pearl Oscar Dress ... STOLEN!!!!
+
+
2/26/2015 7:11 AM PST BY TMZ STAFF
+
+
EXCLUSIVE
+
Lupita Nyong 'o 's now-famous Oscar dress -- adorned in pearls -- was stolen right out of her hotel room ... TMZ has learned.
+
Law enforcement sources tell TMZ ... the dress was taken out of Lupita's room at The London West Hollywood. The dress is made of pearls ... 6,000 white Akoya pearls. It's valued at $150,000.
+
Our sources say Lupita told cops it was taken from her room sometime between 8 AM and 9 PM Wednesday ... while she was gone.
+
We're told there is security footage that cops are looking at that could catch the culprit right in the act.
+
12:00 PM PT -- Sheriff's deputies were at The London Thursday morning. We know they were in the manager's office and we're told they have looked at security footage to determine if they can ID the culprit.
+
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/tumblr/expected.html b/test/test-pages/tumblr/expected.html
index ad7a7d88..ab9d11bd 100644
--- a/test/test-pages/tumblr/expected.html
+++ b/test/test-pages/tumblr/expected.html
@@ -1,11 +1,11 @@
-
-
+
+
Minecraft 1.8 - The Bountiful Update
-
+ Added Granite, Andesite, and Diorite stone blocks, with smooth versions + Added Slime Block + Added Iron Trapdoor + Added Prismarine and Sea Lantern blocks + Added the Ocean Monument + Added Red Sandstone + Added Banners + Added Armor Stands + Added Coarse Dirt (dirt where grass won’t grow) + Added Guardian mobs, with item drops + Added Endermite mob + Added Rabbits, with item drops + Added Mutton and Cooked Mutton + Villagers will harvest crops and plant new ones + Mossy Cobblestone and Mossy Stone Bricks are now craftable + Chiseled Stone Bricks are now craftable + Doors and fences now come in all wood type variants + Sponge block has regained its water-absorbing ability and becomes wet + Added a spectator game mode (game mode 3) + Added one new achievement + Added “Customized” world type + Added hidden “Debug Mode” world type + Worlds can now have a world barrier + Added @e target selector for Command Blocks + Added /blockdata command + Added /clone command + Added /execute command + Added /fill command + Added /particle command + Added /testforblocks command + Added /title command + Added /trigger command + Added /worldborder command + Added /stats command + Containers can be locked in custom maps by using the “Lock” data tag + Added logAdminCommands, showDeathMessages, reducedDebugInfo, sendCommandFeedback, and randomTickSpeed game rules + Added three new statistics + Player skins can now have double layers across the whole model, and left/right arms/legs can be edited independently + Added a new player model with smaller arms, and a new player skin called Alex? + Added options for configuring what pieces of the skin that are visible + Blocks can now have custom visual variations in the resource packs + Minecraft Realms now has an activity chart, so you can see who has been online + Minecraft Realms now lets you upload your maps * Difficulty setting is saved per world, and can be locked if wanted * Enchanting has been redone, now costs lapis lazuli in addition to enchantment levels * Villager trading has been rebalanced * Anvil repairing has been rebalanced * Considerable faster client-side performance * Max render distance has been increased to 32 chunks (512 blocks) * Adventure mode now prevents you from destroying blocks, unless your items have the CanDestroy data tag * Resource packs can now also define the shape of blocks and items, and not just their textures * Scoreboards have been given a lot of new features * Tweaked the F3 debug screen * Block ID numbers (such as 1 for stone), are being replaced by ID names (such as minecraft:stone) * Server list has been improved * A few minor changes to village and temple generation * Mob heads for players now show both skin layers * Buttons can now be placed on the ceiling * Lots and lots of other changes * LOTS AND LOTS of other changes - Removed Herobrine
+
+ Added Granite, Andesite, and Diorite stone blocks, with smooth versions + Added Slime Block + Added Iron Trapdoor + Added Prismarine and Sea Lantern blocks + Added the Ocean Monument + Added Red Sandstone + Added Banners + Added Armor Stands + Added Coarse Dirt (dirt where grass won’t grow) + Added Guardian mobs, with item drops + Added Endermite mob + Added Rabbits, with item drops + Added Mutton and Cooked Mutton + Villagers will harvest crops and plant new ones + Mossy Cobblestone and Mossy Stone Bricks are now craftable + Chiseled Stone Bricks are now craftable + Doors and fences now come in all wood type variants + Sponge block has regained its water-absorbing ability and becomes wet + Added a spectator game mode (game mode 3) + Added one new achievement + Added “Customized” world type + Added hidden “Debug Mode” world type + Worlds can now have a world barrier + Added @e target selector for Command Blocks + Added /blockdata command + Added /clone command + Added /execute command + Added /fill command + Added /particle command + Added /testforblocks command + Added /title command + Added /trigger command + Added /worldborder command + Added /stats command + Containers can be locked in custom maps by using the “Lock” data tag + Added logAdminCommands, showDeathMessages, reducedDebugInfo, sendCommandFeedback, and randomTickSpeed game rules + Added three new statistics + Player skins can now have double layers across the whole model, and left/right arms/legs can be edited independently + Added a new player model with smaller arms, and a new player skin called Alex? + Added options for configuring what pieces of the skin that are visible + Blocks can now have custom visual variations in the resource packs + Minecraft Realms now has an activity chart, so you can see who has been online + Minecraft Realms now lets you upload your maps * Difficulty setting is saved per world, and can be locked if wanted * Enchanting has been redone, now costs lapis lazuli in addition to enchantment levels * Villager trading has been rebalanced * Anvil repairing has been rebalanced * Considerable faster client-side performance * Max render distance has been increased to 32 chunks (512 blocks) * Adventure mode now prevents you from destroying blocks, unless your items have the CanDestroy data tag * Resource packs can now also define the shape of blocks and items, and not just their textures * Scoreboards have been given a lot of new features * Tweaked the F3 debug screen * Block ID numbers (such as 1 for stone), are being replaced by ID names (such as minecraft:stone) * Server list has been improved * A few minor changes to village and temple generation * Mob heads for players now show both skin layers * Buttons can now be placed on the ceiling * Lots and lots of other changes * LOTS AND LOTS of other changes - Removed Herobrine
-
+
\ No newline at end of file
diff --git a/test/test-pages/wapo-1/expected.html b/test/test-pages/wapo-1/expected.html
index 1853a354..7df295bc 100644
--- a/test/test-pages/wapo-1/expected.html
+++ b/test/test-pages/wapo-1/expected.html
@@ -18,7 +18,7 @@
to local news reports.
“Our nation is in danger,” Essid declared in a televised address Wednesday
evening. He vowed that the country would be “merciless” in defending itself.
- [Read: Why Tunisia, Arab Spring’s sole success story, suffers from Islamist violence]
+
[Read: Why Tunisia, Arab Spring’s sole success story, suffers from Islamist violence]
Tunisia, a mostly Muslim nation of about 11 million people, was governed
for decades by autocrats who imposed secularism. Its sun-drenched Mediterranean
@@ -47,8 +47,8 @@
said the U.S. government was willing to assist Tunisian authorities in
the investigation.
-
-
Gunmen in military uniforms stormed Tunisia's national museum, killing at least 19 people, most of them foreign tourists. (Reuters)
+
+
Gunmen in military uniforms stormed Tunisia's national museum, killing at least 19 people, most of them foreign tourists. (Reuters)
“This attack today is meant to threaten authorities, to frighten tourists
@@ -59,7 +59,7 @@
Council, an industry body. The Bardo museum hosts one of the world’s most
outstanding collections of Roman mosaics and is popular with tourists and
Tunisians alike.
- [Bardo museum houses amazing Roman treasures ]
+
[Bardo museum houses amazing Roman treasures ]
The attack is “also aimed at the country’s security and stability during
the transition period,” Azzouz said. “And it could have political repercussions
@@ -69,8 +69,8 @@
be pressured to stage a wider crackdown on Islamists of all stripes. Lawmakers
are drafting an anti-terrorism bill to give security forces additional
tools to fight militants.
-
- [Read: Tunisia sends most foreign fighters to Islamic State in Syria]
+
+
[Read: Tunisia sends most foreign fighters to Islamic State in Syria]
“We must pay attention to what is written” in that law, Azzouz said. “There
is worry the government will use the attack to justify some draconian measures.”
@@ -85,8 +85,8 @@
fire for what many Tunisians saw as a failure to crack down on Islamist
extremists.
- Map: Flow of foreign fighters to Syria
-
+ Map: Flow of foreign fighters to Syria
+
After the collapse of the authoritarian system in 2011, hard-line Muslims
known as Salafists attacked bars and art galleries. Then, in 2012, hundreds
of Islamists assaulted the U.S. Embassy in
@@ -112,8 +112,7 @@
In January, Libyan militants loyal to the Islamic State beheaded 21 Christians —
20 of them Egyptian Copts — along the country’s coast. They later seized
the Libyan city of Sirte.
-
-
+
Officials are worried about the number of Tunisian militants who may have
joined the jihadists in Libya — with the goal of returning home to fight
the Tunis government.
@@ -128,18 +127,18 @@
The last major attack on a civilian target in Tunisia was in 2002, when
al-Qaeda militants killed more than 20 people in a car bombing outside
a synagogue in the city of Djerba.
-
+
Heba Habib contributed to this report.
-
-
-
- Read more:
+
+
+
+
Read more:
- Tunisia’s Islamists get a sobering lesson in governing
+
Tunisia’s Islamists get a sobering lesson in governing
- Tunisia sends most foreign fighters to Islamic State in Syria
+
Tunisia sends most foreign fighters to Islamic State in Syria
- Tunisia’s Bardo museum is home to amazing Roman treasures
+
Tunisia’s Bardo museum is home to amazing Roman treasures
-
+
\ No newline at end of file
diff --git a/test/test-pages/wapo-2/expected.html b/test/test-pages/wapo-2/expected.html
index 2f540e2d..e267459f 100644
--- a/test/test-pages/wapo-2/expected.html
+++ b/test/test-pages/wapo-2/expected.html
@@ -1,4 +1,6 @@
-President Obama told the U.N. General Assembly 18 months ago that he would
+
+
Israeli Prime Minister Benjamin Netanyahu reacts as he visits the Western Wall in Jerusalem on March 18 following his party's victory in Israel's general election. (Thomas Coex/AFP/Getty Images)
+
President Obama told the U.N. General Assembly 18 months ago that he would
seek “real breakthroughs on these two issues — Iran’s nuclear program and
Israeli-Palestinian peace.”
But Benjamin Netanyahu’s triumph in Tuesday’s
@@ -17,8 +19,8 @@
Aside from Russian President Vladimir Putin, few foreign leaders so brazenly
stand up to Obama and even fewer among longtime allies.
-
-
Israeli Prime Minister Benjamin Netanyahu pledged to form a new governing coalition quickly after an upset election victory that was built on a shift to the right. (Reuters)
+
+
Israeli Prime Minister Benjamin Netanyahu pledged to form a new governing coalition quickly after an upset election victory that was built on a shift to the right. (Reuters)
In the past, Israeli leaders who risked damaging the country’s most important
@@ -46,7 +48,7 @@
Earnest added that Netanyahu’s election-eve disavowal of a two-state
solution for Israelis and Palestinians would force the administration to
reconsider its approach to peace in the region.
-
+
Over the longer term, a number of analysts say that Obama and Netanyahu
will seek to play down the friction between them and point to areas of
continuing cooperation on military and economic issues.
@@ -92,9 +94,8 @@
because it can’t pay wages anymore.
“That could be an issue forced onto the agenda about the same time as
a potential nuclear deal.”
-
-
-
Steven Mufson covers the White House. Since joining The Post, he has covered
+
+
Steven Mufson covers the White House. Since joining The Post, he has covered
economics, China, foreign policy and energy.
-
+
\ No newline at end of file
diff --git a/test/test-pages/webmd-1/expected.html b/test/test-pages/webmd-1/expected.html
index 6f773fe3..9fb196d8 100644
--- a/test/test-pages/webmd-1/expected.html
+++ b/test/test-pages/webmd-1/expected.html
@@ -1,13 +1,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Feb. 23, 2015 -- Life-threatening peanut allergies have mysteriously been
on the rise in the past decade, with little hope for a cure.
But a groundbreaking new study may offer a way to stem that rise, while
@@ -39,8 +39,6 @@
another study presented at the same meeting held out hope of a treatment.
A new skin patch called Viaskin allowed people with peanut allergies to
eat tiny amounts of peanuts after they wore it for a year.
-
-
A Change in Guidelines?
Allergies to peanuts and other foods are on the rise. In the U.S., more
diff --git a/test/test-pages/webmd-2/expected.html b/test/test-pages/webmd-2/expected.html
index ca22ee7f..ea48c7a1 100644
--- a/test/test-pages/webmd-2/expected.html
+++ b/test/test-pages/webmd-2/expected.html
@@ -1,18 +1,17 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
April 17, 2015 -- Imagine being sick in the hospital with a bacterial infection and doctors can't stop it from spreading. This so-called "superbug" scenario is not science fiction. It's an urgent, worldwide worry that is prompting swift action.
Every year, about 2 million people get sick from a superbug, according to the CDC. About 23,000 die. Earlier this year, an outbreak of CRE (carbapenem-resistant enterobacteriaceae) linked to contaminated medical tools sickened 11 people at two Los-Angeles area hospitals. Two people died, and more than 200 others may have been exposed.
The White House recently released a comprehensive plan outlining steps to combat drug-resistant bacteria. The plan identifies three "urgent" and several "serious" threats. We asked infectious disease experts to explain what some of them are and when to worry.
-
-
-
-
+
+
+
But First: What's a Superbug?
It's a term coined by the media to describe bacteria that cannot be killed using multiple antibiotics . "It resonates because it's scary," says Stephen Calderwood, MD, president of the Infectious Diseases Society of America. "But in fairness, there is no real definition."
Instead, doctors often use phrases like "multidrug-resistant bacteria." That's because a superbug isn't necessarily resistant to all antibiotics. It refers to bacteria that can't be treated using two or more, says Brian K. Coombes, PhD, of McMaster University in Ontario.
diff --git a/test/test-pages/wikipedia/expected.html b/test/test-pages/wikipedia/expected.html
index 3ae3f69a..16d2b558 100644
--- a/test/test-pages/wikipedia/expected.html
+++ b/test/test-pages/wikipedia/expected.html
@@ -1,10 +1,10 @@
-
+
Mozilla is a free-software community, created in 1998 by members of Netscape . The Mozilla community uses, develops, spreads and supports Mozilla products, thereby promoting exclusively free software and open standards, with only minor exceptions.[1] The community is supported institutionally by the Mozilla Foundation and its tax-paying subsidiary, the Mozilla Corporation .[2]
Mozilla produces many products such as the Firefox web browser, Thunderbird e-mail client, Firefox Mobile web browser, Firefox OS mobile operating system, Bugzilla bug tracking system and other projects.
-
-
-
+
+
+
History [ edit ]
On January 23, 1998, Netscape made two announcements: first, that Netscape Communicator will be free; second, that the source code will also be free.[3] One day later, Jamie Zawinski from Netscape registered mozilla.org .[4] The project was named Mozilla after the original code name of the Netscape Navigator browser which is a blending of "Mosaic and Godzilla "[5] and used to co-ordinate the development of the Mozilla Application Suite , the open source version of Netscape's internet software, Netscape Communicator .[6] [7] Jamie Zawinski says he came up with the name "Mozilla" at a Netscape staff meeting.[8] [9] A small group of Netscape employees were tasked with coordination of the new community.
@@ -38,51 +38,48 @@
Software [
-
+
Firefox [ edit ]
-
+
Firefox is a web browser , and is Mozilla's flagship software product. It is available in both desktop and mobile versions. Firefox uses the Gecko layout engine to render web pages, which implements current and anticipated web standards .[42] As of late 2015[update] , Firefox has approximately 10-11% of worldwide usage share of web browsers , making it the 4th most-used web browser.[43] [44] [45]
Firefox began as an experimental branch of the Mozilla codebase by Dave Hyatt , Joe Hewitt and Blake Ross . They believed the commercial requirements of Netscape's sponsorship and developer-driven feature creep compromised the utility of the Mozilla browser.[46] To combat what they saw as the Mozilla Suite's software bloat , they created a stand-alone browser, with which they intended to replace the Mozilla Suite.
Firefox was originally named Phoenix but the name was changed so as to avoid trademark conflicts with Phoenix Technologies . The initially-announced replacement, Firebird , provoked objections from the Firebird project community.[47] [48] The current name, Firefox, was chosen on February 9, 2004.[49]
Firefox Mobile [ edit ]
-
+
Firefox Mobile (codenamed Fennec ) is the build of the Mozilla Firefox web browser for devices such as smartphones and tablet computers .
Firefox Mobile uses the same Gecko layout engine as Mozilla Firefox . For example, version 1.0 used the same engine as Firefox 3.6, and the following release, 4.0, shared core code with Firefox 4.0. Its features include HTML5 support, Firefox Sync , add-ons support and tabbed browsing .[50]
Firefox Mobile is currently available for Android 2.2 and above devices with an ARMv7 or ARMv6 CPU.[51] The x86 architecture is not officially supported.[52] Tristan Nitot , president of Mozilla Europe , has said that it's unlikely that an iPhone or a BlackBerry version will be released, citing Apple's iTunes Store application approval policies (which forbid applications competing with Apple's own, and forbid engines which run downloaded code) and BlackBerry's limited operating system as the reasons.[53]
Firefox OS [ edit ]
-
+
Firefox OS (project name: Boot to Gecko also known as B2G ) is an open source operating system in development by Mozilla that aims to support HTML5 apps written using "open Web " technologies rather than platform-specific native APIs . The concept behind Firefox OS is that all user-accessible software will be HTML5 applications, that use Open Web APIs to access the phone's hardware directly via JavaScript .[54]
Some devices using this OS include[55] Alcatel One Touch Fire, ZTE Open, LG Fireweb.
Thunderbird [ edit ]
-
+
Thunderbird is a free, open source, cross-platform email and news client developed by the volunteers of the Mozilla Community.
On July 16, 2012, Mitchell Baker announced that Mozilla's leadership had come to the conclusion that on-going stability was the most important thing for Thunderbird and that innovation in Thunderbird was no longer a priority for Mozilla. In that update Baker also suggested that Mozilla had provided a pathway for community to innovate around Thunderbird if the community chooses.[56]
SeaMonkey [ edit ]
-
+
-
-
+
SeaMonkey (formerly the Mozilla Application Suite) is a free and open source cross platform suite of Internet software components including a web browser component, a client for sending and receiving email and USENET newsgroup messages, an HTML editor (Mozilla Composer ) and the ChatZilla IRC client.
On March 10, 2005, the Mozilla Foundation announced that it would not release any official versions of Mozilla Application Suite beyond 1.7.x, since it had now focused on the standalone applications Firefox and Thunderbird .[57] SeaMonkey is now maintained by the SeaMonkey Council, which has trademarked the SeaMonkey name with help from the Mozilla Foundation.[58] The Mozilla Foundation provides project hosting for the SeaMonkey developers.
-
+
Bugzilla [ edit ]
-
+
-
-
+
Bugzilla is a web -based general-purpose bug tracking system , which was released as open source software by Netscape Communications in 1998 along with the rest of the Mozilla codebase, and is currently stewarded by Mozilla. It has been adopted by a variety of organizations for use as a bug tracking system for both free and open source software and proprietary projects and products, including the Mozilla Foundation , the Linux kernel , GNOME , KDE , Red Hat , Novell , Eclipse and LibreOffice .[59]
@@ -90,39 +87,39 @@
Components [ NSS [ edit ]
-
+
Network Security Services (NSS) comprises a set of libraries designed to support cross-platform development of security-enabled client and server applications. NSS provides a complete open-source implementation of crypto libraries supporting SSL and S/MIME . NSS was previously tri-licensed under the Mozilla Public License 1.1, the GNU General Public License , and the GNU Lesser General Public License , but upgraded to GPL-compatible MPL 2.0.
AOL , Red Hat , Sun Microsystems /Oracle Corporation , Google and other companies and individual contributors have co-developed NSS and it is used in a wide range of non-Mozilla products including Evolution , Pidgin , and Apache OpenOffice .
SpiderMonkey [ edit ]
-
+
SpiderMonkey is the original JavaScript engine developed by Brendan Eich when he invented JavaScript in 1995 as a developer at Netscape . It became part of the Mozilla product family when Mozilla inherited Netscape's code-base in 1998. In 2011, Eich transferred the nominal ownership of the SpiderMonkey code and project to Dave Mandelin.[60]
SpiderMonkey is a cross-platform engine written in C++ which implements ECMAScript , a standard developed from JavaScript.[60] [61] It comprises an interpreter , several just-in-time compilers , a decompiler and a garbage collector . Products which embed SpiderMonkey include Firefox , Thunderbird , SeaMonkey , and many non-Mozilla applications.[62]
Rhino [ edit ]
-
+
Rhino is an open source JavaScript engine managed by the Mozilla Foundation . It is developed entirely in Java . Rhino converts JavaScript scripts into Java classes . Rhino works in both compiled and interpreted mode.[63]
Gecko [ edit ]
-
+
Gecko is a layout engine that supports web pages written using HTML , SVG , and MathML . Gecko is written in C++ and uses NSPR for platform independence . Its source code is licensed under the Mozilla Public License .
Firefox uses Gecko both for rendering web pages and for rendering its user interface . Gecko is also used by Thunderbird, SeaMonkey, and many non-Mozilla applications.
Rust [ edit ]
-
+
Rust is a compiled programming language being developed by Mozilla Research. It is designed for safety, concurrency, and performance. Rust is intended for creating large and complex software which needs to be both safe against exploits and fast.
Rust is being used in an experimental layout engine, Servo , which is developed by Mozilla and Samsung. Servo is not used in any consumer-oriented browsers yet. However, the Servo project developers plan for parts of the Servo source code to be merged into Gecko, and Firefox, incrementally.[64] [65]
XULRunner [ edit ]
-
+
XULRunner is a software platform and technology experiment by Mozilla, that allows applications built with the same technologies used by Firefox extensions (XPCOM, Javascript, HTML, CSS, XUL) to be run natively as desktop applications, without requiring Firefox to be installed on the user's machine. XULRunner binaries are available for the Windows, GNU/Linux and OS X operating systems, allowing such applications to be effectively cross platform.
pdf.js [ edit ]
-
+
Pdf.js is a library developed by Mozilla that allows in-browser rendering of pdf documents using the HTML5 Canvas and Javascript. It is included by default in recent versions of Firefox, allowing the browser to render pdf documents without requiring an external plugin; and it is available separately as an extension named "PDF Viewer" for Firefox for Android, SeaMonkey, and the Firefox versions which don't include it built-in. It can also be included as part of a website's scripts, to allow pdf rendering for any browser that implements the required HTML5 features and can run Javascript.
Shumway [ edit ]
-
+
Shumway is an open source replacement for the Adobe Flash Player, developed by Mozilla since 2012, using open web technologies as a replacement for Flash technologies. It uses Javascript and HTML5 Canvas elements to render Flash and execute Actionscript. It is included by default in Firefox Nightly and can be installed as an extension for any recent version of Firefox. The current implementation is limited in its capabilities to render Flash content outside simple projects.
Other activities [ edit ]
@@ -131,18 +128,18 @@
Mozilla VR [ Virtual reality tools, specifications, and standards to the open Web.[66] Mozilla VR maintains A-Frame (VR) , a web framework for building VR experiences, and works on advancing WebVR support within web browsers.
Mozilla Persona [ edit ]
-
+
Mozilla Persona is a secure, cross-browser website authentication mechanism which allows a user to use a single username and password (or other authentication method) to log in to multiple sites.[67] Mozilla Persona will be shutting down on November 30, 2016.[68]
Mozilla Location Service [ edit ]
-
+
This open source crowdsourced geolocation service was started by Mozilla in 2013 and offers a free API .
Webmaker [ edit ]
Mozilla Webmaker is Mozilla's educational initiative, Webmaker's goal is to "help millions of people move from using the web to making the web." As part of Mozilla’s non-profit mission, Webmaker aims "to help the world increase their understanding of the web, take greater control of their online lives, and create a more web literate planet."[69] [70] [70]
Mozilla Developer Network [ edit ]
-
+
Mozilla maintains a comprehensive developer documentation website called the Mozilla Developer Network which contains information about web technologies including HTML , CSS , SVG , JavaScript , as well Mozilla-specific information. In addition, Mozilla publishes a large number of videos about web technologies and the development of Mozilla projects on the Air Mozilla website.[71] [72]
[ edit ]
@@ -151,8 +148,7 @@ Local communities [
-
-
+
There are a number of sub-communities that exist based on their geographical locations, where contributors near each other work together on particular activities, such as localization, marketing, PR and user support.
@@ -160,8 +156,7 @@ Mozilla Reps [
-
+
The Mozilla Reps program aims to empower and support volunteer Mozillians who want to become official representatives of Mozilla in their region/locale.
@@ -179,10 +174,9 @@ Mozilla Festival [
-
-
+
- Speakers from the
Knight Foundation discuss the future of news at the 2011 Mozilla Festival in London.
+ Speakers from the
Knight Foundation discuss the future of news at the 2011 Mozilla Festival in London.
The Mozilla Festival is an annual event where hundreds of passionate people explore the Web, learn together and make things that can change the world. With the emphasis on making —the mantra of the Festival is "less yack, more hack." Journalists, coders, filmmakers, designers, educators, gamers, makers, youth and anyone else, from all over the world, are encouraged to attend, with attendees from more than 40 countries, working together at the intersection between freedom, the Web, and that years theme.
@@ -195,7 +189,7 @@ Mozilla Summit [ See also [ edit ]
-
+
-
-
+
+
\ No newline at end of file
diff --git a/test/test-pages/wordpress/expected.html b/test/test-pages/wordpress/expected.html
index 1f47d8fe..ada49f8a 100644
--- a/test/test-pages/wordpress/expected.html
+++ b/test/test-pages/wordpress/expected.html
@@ -19,11 +19,11 @@
It would be interesting to know what is meant by tagging “WordPress” as a skill – whether it is the general ability to work within the WordPress ecosystem of tools or if it refers to specific skills like PHP. Browsing a few jobs on Stack Overflow, WordPress positions vary in the skills they require, such as React.js, Angular, PHP, HTML, CSS, and other technologies. This is a reflection of the diversity of technology that can be leveraged in creating WordPress-powered sites and applications, and several of these skills are listed independently of WordPress in the data.
Regardless of how much credibility you give Stack Overflow’s analysis of hiring trends, the report’s recommendation for those working in technologies oversaturated with developers is a good one: “Consider brushing up on some technologies that offer higher employer demand and less competition.” WordPress’ code base is currently 59% PHP and 27% JavaScript . The percentage of PHP has grown over time, but newer features and improvements to core are also being built in JavaScript. These are both highly portable skills that are in demand on the web.
-
-
-
-
+
+
+
+
-
+
\ No newline at end of file
diff --git a/test/test-pages/yahoo-1/expected.html b/test/test-pages/yahoo-1/expected.html
index 1736b046..86f3f4e4 100644
--- a/test/test-pages/yahoo-1/expected.html
+++ b/test/test-pages/yahoo-1/expected.html
@@ -1,6 +1,6 @@
+
\ No newline at end of file
diff --git a/test/test-pages/yahoo-2/expected.html b/test/test-pages/yahoo-2/expected.html
index f603205e..b9d2d2bd 100644
--- a/test/test-pages/yahoo-2/expected.html
+++ b/test/test-pages/yahoo-2/expected.html
@@ -1,16 +1,16 @@
-
+
1 / 5
-
+
In this photo dated Tuesday, Nov, 29, 2016 the Soyuz-FG rocket booster with the Progress MS-04 cargo ship is installed on a launch pad in Baikonur, Kazakhstan. The unmanned Russian cargo space ship Progress MS-04 broke up in the atmosphere over Siberia on Thursday Dec. 1, 2016, just minutes after the launch en route to the International Space Station due to an unspecified malfunction, the Russian space agency said.(Oleg Urusov/ Roscosmos Space Agency Press Service photo via AP)
-
+
@@ -28,7 +28,7 @@
This version corrects the spelling of the region to Tuva, not Tyva.
__
Aerospace Writer Marcia Dunn in Cape Canaveral, Florida, and Vladimir Isachenkov in Moscow contributed to this report.
-
+
-
+
\ No newline at end of file
diff --git a/test/test-pages/yahoo-3/expected.html b/test/test-pages/yahoo-3/expected.html
index f3113b6b..5a16f04b 100644
--- a/test/test-pages/yahoo-3/expected.html
+++ b/test/test-pages/yahoo-3/expected.html
@@ -1,15 +1,15 @@
-
'GMA' Cookie Search:
-
+
-
-
+
+
-
+
A photographer and Navy veteran is fighting back after a photo she posted to Facebook started an online backlash.
Vanessa Hicks said she had no idea her photo would be considered controversial. The photo, from a military family’s newborn photo shoot, showed a newborn infant wrapped in an American flag held by his father, who was in his military uniform.
Hicks, a Navy veteran herself and the wife of an active-duty Navy member, said her intention was to honor the flag as well as her clients, who wanted to incorporate their military service in the photo shoot.
@@ -18,12 +18,11 @@
Antarctica 'Penguin Post Office' Attracts Record Number of Applicants
“This is what he was fighting for, his son wrapped in an American flag,” Hicks told ABC News. However, when she posted the image on her page, she started to get comments accusing her of desecrating the flag.
On one Facebook page an unidentified poster put up her picture writing and wrote they found it was “disrespectful, rude, tacky, disgusting, and against the U.S. Flag Code.”
-
-
Vanessa Hicks
+
+
Vanessa Hicks
-
The Federal Flag Code has guidelines for the proper treatment of the U.S. Flag but there are no rules for punishment related to violations. In the past, the
Supreme Court has found that people are protected from punishment under the First Amendment for manipulating or even burning the flag.
+
The Federal Flag Code has guidelines for the proper treatment of the U.S. Flag but there are no rules for punishment related to violations. In the past, the Supreme Court has found that people are protected from punishment under the First Amendment for manipulating or even burning the flag.
Hicks said she was surprised when messages suddenly started to pop up on her Facebook page and even her own website criticizing her photos.
She said she stayed up until 4 a.m. recently to take down comments from her business and company page, even on shoots that had nothing to do with the flag.
@@ -37,9 +36,9 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/yahoo-4/expected.html b/test/test-pages/yahoo-4/expected.html
index 4a50c77c..83b58632 100644
--- a/test/test-pages/yahoo-4/expected.html
+++ b/test/test-pages/yahoo-4/expected.html
@@ -1,7 +1,15 @@
-
- トレンドマイクロは3月9日、Wi-Fi利用時の通信を暗号化し保護するスマホ・タブレット向けのセキュリティアプリ「フリーWi-Fiプロテクション」(iOS/Android)の発売を開始すると発表した。1年版ライセンスは2900円(税込)で、2年版ライセンスは5000円(税込)。
フリーWi-Fiプロテクションは、App Storeおよび、Google Playにて販売され、既に提供しているスマホ・タブレット向け総合セキュリティ対策アプリ「ウイルスバスター モバイル」と併用することで、不正アプリや危険なウェブサイトからの保護に加え、通信の盗み見を防ぐことができる。
2020年の東京オリンピック・パラリンピックの開催などを見据え、フリーWi-Fi(公衆無線LAN)の設置が促進され、フリーWi-Fiの利用者も増加している。
-
一方で、脆弱な設定のフリーWi-Fiや攻撃者が設置した偽のフリーWi-Fiへの接続などによる情報漏えい、通信の盗み見などのセキュリティリスクが危惧されているという。
-
正規事業者が提供する安全性の高いフリーWi-Fiのほかにも、通信を暗号化していない安全性の低いフリーWi-Fi、さらにはサイバー犯罪者が設置したフリーWi-Fiなどさまざまなものが混在している。また、利用者は、接続する前にひとつひとつ安全性を確認するのは難しい状況だとしている。
-
トレンドマイクロがスマートフォン保持者でフリーWi-Fiの利用経験がある人に実施した調査では、回答者の約85%が安全なフリーWi-Fiと危険なフリーWi-Fiは「見分けられない」と回答。さらに、約65%がフリーWi-Fiの利用に不安を感じていると回答している。
-
こうした環境の変化やユーザの状況を鑑み、フリーWi-Fiプロテクションの提供を開始する。同アプリをインストールすることで利用者は、万が一安全性の低いフリーWi-Fiのアクセスポイントに接続してしまった場合でも、その通信を暗号化でき、通信の盗み見やそれによる情報漏えいのリスクを低減できるようになる。
-
具体的には、フリーWi-Fi利用時に、スマートフォンがフリーWi-Fiプロテクションインフラに接続することにより、フリーWi-Fiのアクセスポイントを介した通信がVPN(Virtual Private Network)で暗号化される。これにより利用者は、第三者から通信を傍受されることやデータの情報漏えいを防ぐことが可能。さらに、かんたん自動接続の機能により、通信を暗号化していない安全性が低いフリーWi-Fi接続時や利用者が指定したWi-Fiへ接続する際に、自動的に通信を暗号化し、利用者の通信を保護する。
また、フリーWi-Fiプロテクションインフラと、莫大なセキュリティ情報のビッグデータを保有するクラウド型セキュリティ技術基盤「Trend Micro Smart Protection Network」(SPN)が連携することで、フリーWi-Fiプロテクションインフラを経由してインターネットを利用する際に、利用者がフィッシング詐欺サイトや偽サイトなどへの不正サイトへアクセスすることをブロックできるという。
\ No newline at end of file
+
+
+
+
トレンドマイクロは3月9日、Wi-Fi利用時の通信を暗号化し保護するスマホ・タブレット向けのセキュリティアプリ「フリーWi-Fiプロテクション」(iOS/Android)の発売を開始すると発表した。1年版ライセンスは2900円(税込)で、2年版ライセンスは5000円(税込)。
+
フリーWi-Fiプロテクションは、App Storeおよび、Google Playにて販売され、既に提供しているスマホ・タブレット向け総合セキュリティ対策アプリ「ウイルスバスター モバイル」と併用することで、不正アプリや危険なウェブサイトからの保護に加え、通信の盗み見を防ぐことができる。
+
2020年の東京オリンピック・パラリンピックの開催などを見据え、フリーWi-Fi(公衆無線LAN)の設置が促進され、フリーWi-Fiの利用者も増加している。
+
一方で、脆弱な設定のフリーWi-Fiや攻撃者が設置した偽のフリーWi-Fiへの接続などによる情報漏えい、通信の盗み見などのセキュリティリスクが危惧されているという。
+
正規事業者が提供する安全性の高いフリーWi-Fiのほかにも、通信を暗号化していない安全性の低いフリーWi-Fi、さらにはサイバー犯罪者が設置したフリーWi-Fiなどさまざまなものが混在している。また、利用者は、接続する前にひとつひとつ安全性を確認するのは難しい状況だとしている。
+
トレンドマイクロがスマートフォン保持者でフリーWi-Fiの利用経験がある人に実施した調査では、回答者の約85%が安全なフリーWi-Fiと危険なフリーWi-Fiは「見分けられない」と回答。さらに、約65%がフリーWi-Fiの利用に不安を感じていると回答している。
+
こうした環境の変化やユーザの状況を鑑み、フリーWi-Fiプロテクションの提供を開始する。同アプリをインストールすることで利用者は、万が一安全性の低いフリーWi-Fiのアクセスポイントに接続してしまった場合でも、その通信を暗号化でき、通信の盗み見やそれによる情報漏えいのリスクを低減できるようになる。
+
具体的には、フリーWi-Fi利用時に、スマートフォンがフリーWi-Fiプロテクションインフラに接続することにより、フリーWi-Fiのアクセスポイントを介した通信がVPN(Virtual Private Network)で暗号化される。これにより利用者は、第三者から通信を傍受されることやデータの情報漏えいを防ぐことが可能。さらに、かんたん自動接続の機能により、通信を暗号化していない安全性が低いフリーWi-Fi接続時や利用者が指定したWi-Fiへ接続する際に、自動的に通信を暗号化し、利用者の通信を保護する。
+
また、フリーWi-Fiプロテクションインフラと、莫大なセキュリティ情報のビッグデータを保有するクラウド型セキュリティ技術基盤「Trend Micro Smart Protection Network」(SPN)が連携することで、フリーWi-Fiプロテクションインフラを経由してインターネットを利用する際に、利用者がフィッシング詐欺サイトや偽サイトなどへの不正サイトへアクセスすることをブロックできるという。
+
+
+
\ No newline at end of file
From bbba8b0dd40fbc3d4947a0155d4551417e2bedeb Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Mon, 29 Oct 2018 21:39:54 +0000
Subject: [PATCH 35/92] Update test expectations + import new tests
---
.../expected-metadata.json | 5 +
.../003-metadata-preferred/expected.html | 18 +
.../003-metadata-preferred/source.html | 45 +
.../expected-metadata.json | 5 +
.../expected.html | 18 +
.../source.html | 35 +
test/test-pages/aclu/expected-metadata.json | 5 +
test/test-pages/aclu/expected.html | 124 ++
test/test-pages/aclu/source.html | 1264 +++++++++++++++++
.../expected.html | 55 +-
.../base-url-base-element/expected.html | 55 +-
.../basic-tags-cleaning/expected.html | 2 +-
test/test-pages/breitbart/expected.html | 28 +-
.../hidden-nodes/expected-metadata.json | 2 +-
14 files changed, 1601 insertions(+), 60 deletions(-)
create mode 100644 test/test-pages/003-metadata-preferred/expected-metadata.json
create mode 100644 test/test-pages/003-metadata-preferred/expected.html
create mode 100644 test/test-pages/003-metadata-preferred/source.html
create mode 100644 test/test-pages/004-metadata-space-separated-properties/expected-metadata.json
create mode 100644 test/test-pages/004-metadata-space-separated-properties/expected.html
create mode 100644 test/test-pages/004-metadata-space-separated-properties/source.html
create mode 100644 test/test-pages/aclu/expected-metadata.json
create mode 100644 test/test-pages/aclu/expected.html
create mode 100644 test/test-pages/aclu/source.html
diff --git a/test/test-pages/003-metadata-preferred/expected-metadata.json b/test/test-pages/003-metadata-preferred/expected-metadata.json
new file mode 100644
index 00000000..a702e4a0
--- /dev/null
+++ b/test/test-pages/003-metadata-preferred/expected-metadata.json
@@ -0,0 +1,5 @@
+{
+ "Title": "Dublin Core property title",
+ "Author": "Dublin Core property author",
+ "Excerpt": "Dublin Core property description"
+}
diff --git a/test/test-pages/003-metadata-preferred/expected.html b/test/test-pages/003-metadata-preferred/expected.html
new file mode 100644
index 00000000..6b03dd38
--- /dev/null
+++ b/test/test-pages/003-metadata-preferred/expected.html
@@ -0,0 +1,18 @@
+
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
\ No newline at end of file
diff --git a/test/test-pages/003-metadata-preferred/source.html b/test/test-pages/003-metadata-preferred/source.html
new file mode 100644
index 00000000..c7275b3b
--- /dev/null
+++ b/test/test-pages/003-metadata-preferred/source.html
@@ -0,0 +1,45 @@
+
+
+
+
+ Title Element
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Test document title
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/004-metadata-space-separated-properties/expected-metadata.json b/test/test-pages/004-metadata-space-separated-properties/expected-metadata.json
new file mode 100644
index 00000000..a41ac6b0
--- /dev/null
+++ b/test/test-pages/004-metadata-space-separated-properties/expected-metadata.json
@@ -0,0 +1,5 @@
+{
+ "Title": "Preferred title",
+ "Author": "Creator Name",
+ "Excerpt": "Preferred description"
+}
diff --git a/test/test-pages/004-metadata-space-separated-properties/expected.html b/test/test-pages/004-metadata-space-separated-properties/expected.html
new file mode 100644
index 00000000..6b03dd38
--- /dev/null
+++ b/test/test-pages/004-metadata-space-separated-properties/expected.html
@@ -0,0 +1,18 @@
+
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
\ No newline at end of file
diff --git a/test/test-pages/004-metadata-space-separated-properties/source.html b/test/test-pages/004-metadata-space-separated-properties/source.html
new file mode 100644
index 00000000..9b951008
--- /dev/null
+++ b/test/test-pages/004-metadata-space-separated-properties/source.html
@@ -0,0 +1,35 @@
+
+
+
+
+ Title Element
+
+
+
+
+
+
+
+
+
+
+ Test document title
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/aclu/expected-metadata.json b/test/test-pages/aclu/expected-metadata.json
new file mode 100644
index 00000000..f954b98d
--- /dev/null
+++ b/test/test-pages/aclu/expected-metadata.json
@@ -0,0 +1,5 @@
+{
+ "Title": "Facebook Is Tracking Me Even Though I’m Not on Facebook",
+ "Author": "By Daniel Kahn Gillmor, Senior Staff Technologist, ACLU Speech, Privacy, and Technology Project",
+ "Excerpt": "I don't use Facebook. I'm not technophobic — I'm a geek. I've been using email since the early 1990s, I have accounts on hundreds of services around the net, and I do software development and internet protocol design both for work and for fun. I believe that a globe-spanning communications network like the internet can be a positive social force, and I publish much of my own work on the open web."
+}
diff --git a/test/test-pages/aclu/expected.html b/test/test-pages/aclu/expected.html
new file mode 100644
index 00000000..15801438
--- /dev/null
+++ b/test/test-pages/aclu/expected.html
@@ -0,0 +1,124 @@
+
+
+ I don't use Facebook. I'm not technophobic — I'm a geek. I've been using email since the early 1990s, I have accounts on hundreds of services around the net, and I do software development and internet protocol design both for work and for fun. I believe that a globe-spanning communications network like the internet can be a positive social force, and I publish much of my own work on the open web.
+
+
+ But Facebook and other massive web companies represent a strong push toward unaccountable centralized social control, which I think makes our society more unequal and more unjust. The Cambridge Analytica scandal is one instance of this long-running problem with what I call the "surveillance economy." I don't want to submit to these power structures, and I don’t want my presence on such platforms to serve as bait that lures other people into the digital panopticon.
+
+
+ But while I've never "opted in" to Facebook or any of the other big social networks, Facebook still has a detailed profile that can be used to target me. I've never consented to having Facebook collect my data, which can be used to draw very detailed inferences about my life, my habits, and my relationships. As we aim to take Facebook to task for its breach of user trust, we need to think about what its capabilities imply for society overall. After all, if you do #deleteFacebook, you'll find yourself in my shoes: non-consenting, but still subject to Facebook’s globe-spanning surveillance and targeting network.
+
+
+ There are at least two major categories of information available to Facebook about non-participants like me: information from other Facebook users, and information from sites on the open web.
+
+
+ Information from other Facebook users
+
+
+ When you sign up for Facebook, it encourages you to upload your list of contacts so that the site can "find your friends." Facebook uses this contact information to learn about people, even if those people don't agree to participate. It also links people together based on who they know, even if the shared contact hasn't agreed to this use.
+
+
+ For example, I received an email from Facebook that lists the people who have all invited me to join Facebook: my aunt, an old co-worker, a friend from elementary school, etc. This email includes names and email addresses — including my own name — and at least one web bug designed to identify me to Facebook’s web servers when I open the email. Facebook records this group of people as my contacts, even though I've never agreed to this kind of data collection.
+
+
+ Similarly, I'm sure that I'm in some photographs that someone has uploaded to Facebook — and I'm probably tagged in some of them. I've never agreed to this, but Facebook could still be keeping track.
+
+
+ So even if you decide you need to join Facebook, remember that you might be giving the company information about someone else who didn't agree to be part of its surveillance platform.
+
+
+ Information from sites on the open Web
+
+
+ Nearly every website that you visit that has a "Like" button is actually encouraging your browser to tell Facebook about your browsing habits. Even if you don't click on the "Like" button, displaying it requires your browser to send a request to Facebook's servers for the "Like" button itself. That request includes information mentioning the name of the page you are visiting and any Facebook-specific cookies your browser might have collected. (See Facebook's own description of this process .) This is called a "third-party request."
+
+
+ This makes it possible for Facebook to create a detailed picture of your browsing history — even if you've never even visited Facebook directly, let alone signed up for a Facebook account.
+
+
+ Think about most of the web pages you've visited — how many of them don't have a "Like" button? If you administer a website and you include a "Like" button on every page, you're helping Facebook to build profiles of your visitors, even those who have opted out of the social network. Facebook’s “Share” buttons on other sites — along with other tools — work a bit differently from the “Like” button, but do effectively the same thing.
+
+
+ The profiles that Facebook builds on non-users don't necessarily include so-called "personally identifiable information" (PII) like names or email addresses. But they do include fairly unique patterns. Using Chromium's NetLog dumping , I performed a simple five-minute browsing test last week that included visits to various sites — but not Facebook. In that test, the PII-free data that was sent to Facebook included information about which news articles I was reading, my dietary preferences, and my hobbies.
+
+
+ Given the precision of this kind of mapping and targeting, "PII" isn’t necessary to reveal my identity. How many vegans examine specifications for computer hardware from the ACLU's offices while reading about Cambridge Analytica? Anyway, if Facebook combined that information with the "web bug" from the email mentioned above — which is clearly linked to my name and e-mail address — no guesswork would be required.
+
+
+ I'd be shocked if Facebook were not connecting those dots given the goals they claim for data collection :
+
+
+
+ We use the information we have to improve our advertising and measurement systems so we can show you relevant ads on and off our Services and measure the effectiveness and reach of ads and services.
+
+
+
+ This is, in essence, exactly what Cambridge Analytica did.
+
+
+ Consent
+
+
+ Facebook and other tech companies often deflect accusations against excessive data collection by arguing "consent" — that they harvest and use data with the consent of the users involved.
+
+
+ But even if we accept that clicking through a "Terms of Service" that no one reads can actually constitute true consent, even if we ignore the fact that these terms are overwhelmingly one-sided and non-negotiable, and even if we accept that it's meaningful for people to give consent when sharing data about other people who may have also opted in — what is the recourse for someone who has not opted into these systems at all?
+
+
+ Are those of us who have explicitly avoided agreeing to the Facebook terms of service simply fair game for an industry-wide surveillance and targeting network?
+
+
+ Privilege
+
+
+ I don’t mean to critique people who have created a Facebook profile or suggest they deserve whatever they get.
+
+
+ My ability to avoid Facebook comes from privilege — I have existing social contacts with whom I know how to stay in touch without using Facebook's network. My job does not require that I use Facebook. I can afford the time and expense to communicate with my electoral representatives and political allies via other channels.
+
+
+ Many people do not have these privileges and are compelled to "opt in" on Facebook's non-negotiable terms.
+
+
+ Many journalists, organizers, schools, politicians, and others who have good reasons to oppose Facebook's centralized social control feel compelled by Facebook's reach and scale to participate in their practices, even those we know to be harmful. That includes the ACLU.
+
+
+ Privacy should not be a luxury good, and while I'm happy to encourage people to opt out of these subtle and socially fraught arrangements, I do not argue that anyone who has signed up has somehow relinquished concerns about their privacy. We need to evaluate privacy concerns in their full social contexts. These are not problems that can be resolved on an individual level, because of the interpersonal nature of much of this data and the complexities of the tradeoffs involved.
+
+
+ Technical countermeasures
+
+
+ While they may not solve the problem, there are some technical steps people can take to limit the scope of these surveillance practices. For example, some web browsers do not send "third-party cookies" by default, or they scope cookies so that centralized surveillance doesn't get a single view of one user. The most privacy-preserving modern browser is the Tor Browser , which everyone should have installed and available, even if it's not the browser they choose to use every day. It limits the surveillance ability of systems that you have not signed up for to track you as you move around the web.
+
+
+ You can also modify some browsers — for example, with plug-ins for Firefox and Chrome — so that they do not send third-party requests at all . Firefox is also exploring even more privacy-preserving techniques .
+
+
+ It can’t be denied, though, that these tools are harder to use than the web browsers most people are accustomed to, and they create barriers to some online activities. (For example, logging in to some sites and accessing some web applications is impossible without third-party cookies.)
+
+
+ Some website operators take their visitors' privacy more seriously than others, by reducing the amount of third-party requests. For example, it's possible to display "share on Facebook" or "Like" buttons without sending user requests to Facebook in the first place. The ACLU's own website does this because we believe that the right to read with privacy is a fundamental protection for civic discourse.
+
+
+ If you are responsible for running a website, try browsing it with a third-party-blocking extension turned on. Think about how much information you're requiring your users to send to third parties as a condition for using your site. If you care about being a good steward of your visitors' data, you can re-design your website to reduce this kind of leakage.
+
+
+ Opting out?
+
+
+ Some advertisers claim that you can "opt out" of their targeted advertising, and even offer a centralized place meant to help you do so . However, my experience with these tools isn't a positive one. They don't appear to work all of the time. (In a recent experiment I conducted, two advertisers’ opt-out mechanisms failed to take effect.) And while advertisers claim to allow the user to opt out of "interest-based ads," it's not clear that the opt-outs govern data collection itself, rather than just the use of the collected data for displaying ads. Moreover, opting out on their terms requires the use of third-party cookies, thereby enabling another mechanism that other advertisers can then exploit.
+
+
+ It's also not clear how they function over time: How frequently do I need to take these steps? Do they expire? How often should I check back to make sure I’m still opted out? I'd much prefer an approach requiring me to opt in to surveillance and targeting.
+
+
+ Fix the surveillance economy, not just Facebook
+
+
+ These are just a few of the mechanisms that enable online tracking. Facebook is just one culprit in this online "surveillance economy," albeit a massive one — the company owns Instagram , Atlas , WhatsApp , and dozens of other internet and technology companies and services. But it’s not the only player in this space. Google’s business model also relies on this kind of surveillance, and there are dozens of smaller players as well.
+
+
+ As we work to address the fallout from the current storm around Facebook and Cambridge Analytica, we can't afford to lose sight of these larger mechanisms at play. Cambridge Analytica's failures and mistakes are inherent to Facebook's business model. We need to seriously challenge the social structures that encourage people to opt in to this kind of surveillance. At the same time, we also need to protect those of us who manage to opt out.
+
+
\ No newline at end of file
diff --git a/test/test-pages/aclu/source.html b/test/test-pages/aclu/source.html
new file mode 100644
index 00000000..d8e99bbb
--- /dev/null
+++ b/test/test-pages/aclu/source.html
@@ -0,0 +1,1264 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Facebook Is Tracking Me Even Though I’m Not on Facebook | American Civil Liberties Union
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Jump to navigation Skip navigation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/test-pages/base-url-base-element-relative/expected.html b/test/test-pages/base-url-base-element-relative/expected.html
index 29e7ac5a..14d23f67 100644
--- a/test/test-pages/base-url-base-element-relative/expected.html
+++ b/test/test-pages/base-url-base-element-relative/expected.html
@@ -1,22 +1,33 @@
-
-
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- Links
- link
- link
- link
- link
- link
- link
- link
- link
- Images
-
-
-
-
-
- Foo
- Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
-
+
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+ Links
+ link
+ link
+ link
+ link
+ link
+ link
+ link
+ link
+ Images
+
+
+
+
+
+ Foo
+
+ Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
\ No newline at end of file
diff --git a/test/test-pages/base-url-base-element/expected.html b/test/test-pages/base-url-base-element/expected.html
index 7a52ff89..5037eb26 100644
--- a/test/test-pages/base-url-base-element/expected.html
+++ b/test/test-pages/base-url-base-element/expected.html
@@ -1,22 +1,33 @@
-
-
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- Links
- link
- link
- link
- link
- link
- link
- link
- link
- Images
-
-
-
-
-
- Foo
- Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
-
+
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+ Links
+ link
+ link
+ link
+ link
+ link
+ link
+ link
+ link
+ Images
+
+
+
+
+
+ Foo
+
+ Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
\ No newline at end of file
diff --git a/test/test-pages/basic-tags-cleaning/expected.html b/test/test-pages/basic-tags-cleaning/expected.html
index 9da6a53d..c66b95c7 100644
--- a/test/test-pages/basic-tags-cleaning/expected.html
+++ b/test/test-pages/basic-tags-cleaning/expected.html
@@ -4,7 +4,7 @@
Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
-
+
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
diff --git a/test/test-pages/breitbart/expected.html b/test/test-pages/breitbart/expected.html
index 887c74d3..e2f04c74 100644
--- a/test/test-pages/breitbart/expected.html
+++ b/test/test-pages/breitbart/expected.html
@@ -1,41 +1,41 @@
-
-
+
+
JIM WATSON/AFP/Getty Images
22 Dec, 2016 22 Dec, 2016
-
+
SIGN UP FOR OUR NEWSLETTER
-
+
Snopes fact checker and staff writer David Emery posted to Twitter asking if there were “any un-angry Trump supporters?”
Emery, a writer for partisan “fact-checking” website Snopes.com which soon will be in charge of labelling “fake news” alongside ABC News and Politifact, retweeted an article by Vulture magazine relating to the protests of the Hamilton musical following the decision by the cast of the show to make a public announcement to Vice-president elect Mike Pence while he watched the performance with his family.
SIGN UP FOR OUR NEWSLETTER
-
+
The tweet from Vulture magazine reads, “ #Hamilton Chicago show interrupted by angry Trump supporter.” Emery retweeted the story, saying, “Are there un-angry Trump supporters?”
+
+
-
-
-
+
This isn’t the first time the Snopes.com writer has expressed anti-Trump sentiment on his Twitter page. In another tweet in which Emery links to an article that falsely attributes a quote to President-elect Trump, Emery states, “Incredibly, some people actually think they have to put words in Trump’s mouth to make him look bad.”
-
-
+
+
Emery also retweeted an article by New York magazine that claimed President-elect Trump relied on lies to win during his campaign and that we now lived in a “post-truth” society. “Before long we’ll all have forgotten what it was like to live in the same universe; or maybe we already have,” Emery tweeted.
+
-
-
-
+
+
Facebook believe that Emery, along with other Snopes writers, ABC News, and Politifact are impartial enough to label and silence what they believe to be “fake news” on social media.
Lucas Nolan is a reporter for Breitbart Tech covering issues of free speech and online censorship. Follow him on Twitter @LucasNolan_ or email him at lnolan@breitbart.com
-
+
\ No newline at end of file
diff --git a/test/test-pages/hidden-nodes/expected-metadata.json b/test/test-pages/hidden-nodes/expected-metadata.json
index 6b1e7971..37bab58f 100644
--- a/test/test-pages/hidden-nodes/expected-metadata.json
+++ b/test/test-pages/hidden-nodes/expected-metadata.json
@@ -1,4 +1,4 @@
{
"Title": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt",
- "Excerpt": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
+ "Excerpt": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
}
From 194c3917d5f7780823df2286bfc605ec5900c67a Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Mon, 29 Oct 2018 23:54:41 +0000
Subject: [PATCH 36/92] Update more tests
---
.../expected-images.json | 1 +
.../expected-images.json | 1 +
test/test-pages/aclu/expected-images.json | 1 +
test/test-pages/bug-1255978/expected.html | 48 ++---
test/test-pages/buzzfeed-1/expected.html | 4 +-
.../test-pages/cnet-svg-classes/expected.html | 8 +-
test/test-pages/cnet/expected.html | 8 +-
.../test-pages/daringfireball-1/expected.html | 18 +-
test/test-pages/ehow-1/expected.html | 20 +-
test/test-pages/ehow-2/expected.html | 28 +--
test/test-pages/heise/expected.html | 10 +-
test/test-pages/herald-sun-1/expected.html | 10 +-
.../hidden-nodes/expected-images.json | 1 +
test/test-pages/la-nacion/expected.html | 2 +-
test/test-pages/liberation-1/expected.html | 2 +-
test/test-pages/lwn-1/expected.html | 28 +--
test/test-pages/medium-1/expected.html | 30 +--
test/test-pages/medium-3/expected.html | 14 +-
.../missing-paragraphs/expected.html | 6 +-
test/test-pages/mozilla-1/expected.html | 6 +-
test/test-pages/mozilla-2/expected.html | 16 +-
test/test-pages/msn/expected.html | 2 +-
test/test-pages/nytimes-1/expected.html | 10 +-
test/test-pages/nytimes-2/expected.html | 16 +-
test/test-pages/pixnet/expected.html | 184 +++++++++---------
.../remove-extra-paragraphs/expected.html | 12 +-
.../remove-script-tags/expected.html | 2 +-
test/test-pages/rtl-1/source.html | 2 +-
.../test-pages/salon-1/expected-metadata.json | 2 +-
test/test-pages/simplyfound-1/expected.html | 18 +-
test/test-pages/social-buttons/expected.html | 2 +-
test/test-pages/tumblr/expected.html | 6 +-
test/test-pages/wapo-1/expected.html | 32 +--
test/test-pages/wapo-2/expected.html | 14 +-
test/test-pages/webmd-1/expected.html | 14 +-
test/test-pages/webmd-2/expected.html | 20 +-
test/test-pages/wikipedia/expected.html | 50 ++---
test/test-pages/wordpress/expected.html | 10 +-
test/test-pages/yahoo-1/expected.html | 2 +-
test/test-pages/yahoo-2/expected.html | 8 +-
test/test-pages/yahoo-3/expected.html | 16 +-
41 files changed, 344 insertions(+), 340 deletions(-)
create mode 100644 test/test-pages/003-metadata-preferred/expected-images.json
create mode 100644 test/test-pages/004-metadata-space-separated-properties/expected-images.json
create mode 100644 test/test-pages/aclu/expected-images.json
create mode 100644 test/test-pages/hidden-nodes/expected-images.json
diff --git a/test/test-pages/003-metadata-preferred/expected-images.json b/test/test-pages/003-metadata-preferred/expected-images.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/test-pages/003-metadata-preferred/expected-images.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/test-pages/004-metadata-space-separated-properties/expected-images.json b/test/test-pages/004-metadata-space-separated-properties/expected-images.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/test-pages/004-metadata-space-separated-properties/expected-images.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/test-pages/aclu/expected-images.json b/test/test-pages/aclu/expected-images.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/test-pages/aclu/expected-images.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/test-pages/bug-1255978/expected.html b/test/test-pages/bug-1255978/expected.html
index 70f30fc4..c281eef9 100644
--- a/test/test-pages/bug-1255978/expected.html
+++ b/test/test-pages/bug-1255978/expected.html
@@ -9,13 +9,13 @@
Here are some of the secrets that the receptionist will never tell you when you check in, according to answers posted on Quora .
-
+
-
+
-
+
Even posh hotels might not wash a blanket in between stays
@@ -28,17 +28,17 @@
Forrest Jones said that anything that comes into contact with any of the previous guest’s skin should be taken out and washed every time the room is made, but that even the fanciest hotels don’t always do so. "Hotels are getting away from comforters. Blankets are here to stay, however. But some hotels are still hesitant about washing them every day if they think they can get out of it," he said.
-
+
Video shows bed bug infestation at New York hotel
-
+
-
+
-
+
Forrest Jones advised stuffing the peep hole with a strip of rolled up notepaper when not in use.
@@ -50,28 +50,28 @@
This is not common, but can happen, Forrest Jones said. He advised stuffing the peep hole with a strip of rolled up notepaper when not in use. When someone knocks on the door, the paper can be removed to check who is there. If no one is visible, he recommends calling the front desk immediately. “I look forward to the day when I can tell you to choose only hotels where every employee who has access to guestroom keys is subjected to a complete public records background check, prior to hire, and every year or two thereafter. But for now, I can't,” he said.
-
+
-
+
-
+
-
+
3. Don’t use a wooden luggage rack
Bedbugs love wood. Even though a wooden luggage rack might look nicer and more expensive than a metal one, it’s a breeding ground for bugs. Forrest Jones says guests should put the items they plan to take from bags on other pieces of furniture and leave the bag on the floor.
-
+
-
+
-
+
The old rule of thumb is that for every 00 invested in a room, the hotel should charge in average daily rate
@@ -83,25 +83,25 @@
Zeev Sharon said that the old rule of thumb is that for every $1000 invested in a room, the hotel should charge $1 in average daily rate. So a room that cost $300,000 to build, should sell on average for $300/night.
-
+
5. Beware the wall-mounted hairdryer
It contains the most germs of anything in the room. Other studies have said the TV remote and bedside lamp switches are the most unhygienic. “Perhaps because it's something that's easy for the housekeepers to forget to check or to squirt down with disinfectant,” Forrest Jones said.
-
+
-
+
-
+
Business news in pictures
-
+
-
-
+
+
@@ -109,13 +109,13 @@
6. Mini bars almost always lose money
Despite the snacks in the minibar seeming like the most overpriced food you have ever seen, hotel owners are still struggling to make a profit from those snacks. "Minibars almost always lose money, even when they charge $10 for a Diet Coke,” Sharon said.
-
+
-
+
-
+
Towels should always be cleaned between stays
diff --git a/test/test-pages/buzzfeed-1/expected.html b/test/test-pages/buzzfeed-1/expected.html
index aef43a1a..46a3f321 100644
--- a/test/test-pages/buzzfeed-1/expected.html
+++ b/test/test-pages/buzzfeed-1/expected.html
@@ -1,7 +1,7 @@
The mother of a woman who took suspected diet pills bought online has described how her daughter was “literally burning up from within” moments before her death.
-
+
West Merica Police
@@ -25,7 +25,7 @@
The mother of a woman who took suspected diet pills bought online has descri
Facebook
-
+
diff --git a/test/test-pages/cnet-svg-classes/expected.html b/test/test-pages/cnet-svg-classes/expected.html
index c8f00f80..1b635124 100644
--- a/test/test-pages/cnet-svg-classes/expected.html
+++ b/test/test-pages/cnet-svg-classes/expected.html
@@ -5,10 +5,10 @@
Twitter ha dado a conocer que Twitter Lite llegará a un total de 24 nuevos países a partir de hoy, 11 de ellos de América Latina.
Según explicó en un comunicado Twitter Lite ahora estará disponible en Bolivia, Brasil, Chile, Colombia, Costa Rica, Ecuador, México, Panamá, Perú, El Salvador y Venezuela.
Twitter Lite es la versión ligera de la aplicación de la red social para Android, disponible en la Google Play Store. Con este app los usuarios que experimentan fallos de red o que viven en países con redes con poca velocidad de conexión como Venezuela podrán descargar los tuits de forma más rápida.
-
+
Entre sus novedades, Twitter Lite permite la carga rápida de tuits en redes 2G y 3G, y ofrece ayuda offline en caso de que pierdas tu conexión; a eso debemos sumar que minimiza el uso de datos y ofrece un modo de ahorro, en el que únicamente se descargan las fotos o videos de los tuits que quieres ver.
-
-
+
+
Además, el app ocupa menos espacio en tu teléfono móvil, al reducir a 3MB su peso.
Twitter dio a conocer Twitter Lite en abril en India, y desde entonces ha estado trabajando para llevarlo a más países. La empresa en los últimos meses también se ha involucrado de forma definitiva en la eliminación de los abusos en la red social , tomando medidas incluso en la verificación de cuentas.
-
+
\ No newline at end of file
diff --git a/test/test-pages/cnet/expected.html b/test/test-pages/cnet/expected.html
index 69402b0c..4f401dad 100644
--- a/test/test-pages/cnet/expected.html
+++ b/test/test-pages/cnet/expected.html
@@ -6,7 +6,7 @@
Facebook CEO Mark Zuckerberg, the man with the acquisition plan.
Photo by James Martin/CNET
Anyone who has ever been involved in closing a billion-dollar acquisition deal will tell you that you don't go in without a clear, well thought out plan.
-
+
Facebook CEO Mark Zuckerberg knows a thing or two about how to seal the deal on blockbuster buys. After all, he's the man behind his company's $19 billion acquisition of WhatsApp, he personally brokered its $1 billion buyout of Instagram and closed the $3 billion deal to buy Oculus VR.
Zuckerberg offered a primer on the strategies he and his company employ when they see an attractive target during testimony Tuesday in a lawsuit with ZeniMax Media , which accuses Oculus and Facebook of "misappropriating" trade secrets and copyright infringement. At the heart of the lawsuit is technology that helped create liftoff for virtual reality, one of the hottest gadget trends today.
A key Facebook approach is building a long-term relationship with your target, Zuckerberg said at the trial. These deals don't just pop up over night, he said according to a transcript reviewed by Business Insider . They take time to cultivate.
@@ -20,7 +20,7 @@
-
+
When that doesn't work, Zuckerberg said scare tactics is an effective, if undesirable, way of persuading small startups that they face a better chance of survival if they have Facebook to guide their way rather than going it alone.
That's less my thing, but I think if you are trying to help convince people that they want to join you, helping them understand all the pain that they would have to go through to build it out independently is a valuable tactic.
It also pays to be weary of competing suitors for your startup, Zuckerberg said, and be willing to move fast to stave off rivals and get the deal done.
@@ -31,13 +31,13 @@
-
+
Tech Enabled: CNET chronicles tech's role in providing new kinds of accessibility. Check it out here .
Technically Literate: Original works of short fiction with unique perspectives on tech, exclusively on CNET. Here .
-
+
\ No newline at end of file
diff --git a/test/test-pages/daringfireball-1/expected.html b/test/test-pages/daringfireball-1/expected.html
index fd7ecb23..6c3f1544 100644
--- a/test/test-pages/daringfireball-1/expected.html
+++ b/test/test-pages/daringfireball-1/expected.html
@@ -1,10 +1,10 @@
-
-
-
+
+
+
-
+
Daring Fireball is written and produced by John Gruber.
@@ -29,10 +29,10 @@
Web Standards
Web standards are important, and Daring Fireball adheres to them. Specifically, Daring Fireball’s HTML markup should validate as either HTML 5 or XHTML 4.01 Transitional, its layout is constructed using valid CSS , and its syndicated feed is valid Atom .
If Daring Fireball looks goofy in your browser, you’re likely using a shitty browser that doesn’t support web standards. Internet Explorer, I’m looking in your direction. If you complain about this, I will laugh at you, because I do not care. If, however, you are using a modern, standards-compliant browser and have trouble viewing or reading Daring Fireball, please do let me know.
-
-
-
-
+
+
+
+
-
+
\ No newline at end of file
diff --git a/test/test-pages/ehow-1/expected.html b/test/test-pages/ehow-1/expected.html
index 0e5d3b0f..397322e2 100644
--- a/test/test-pages/ehow-1/expected.html
+++ b/test/test-pages/ehow-1/expected.html
@@ -1,13 +1,13 @@
Glass cloche terrariums are not only appealing to the eye, but they also preserve a bit of nature in your home and serve as a simple, yet beautiful, piece of art. Closed terrariums are easy to care for, as they retain much of their own moisture and provide a warm environment with a consistent level of humidity. You won’t have to water the terrariums unless you see that the walls are not misting up. Small growing plants that don’t require a lot of light work best such as succulents, ferns, moss, even orchids.
Glass cloche terrariums (Lucy Akins)
-
+
Dig a hole in the oasis. (Lucy Akins)
-
-
+
+
Step 2
Insert your plant into the hole.
@@ -85,10 +85,10 @@
Cloche terrarium (Lucy Akins)
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/ehow-2/expected.html b/test/test-pages/ehow-2/expected.html
index 78b990fa..e3d4256e 100644
--- a/test/test-pages/ehow-2/expected.html
+++ b/test/test-pages/ehow-2/expected.html
@@ -1,5 +1,5 @@
-
+
@@ -27,8 +27,8 @@
(Mike Watson Images/Moodboard/Getty)
-
-
+
+
@@ -58,7 +58,7 @@
evgenyb/iStock/Getty Images
-
+
@@ -100,8 +100,8 @@
Mark Stout/iStock/Getty Images
-
-
+
+
@@ -114,15 +114,15 @@
-
-
+
+
Related Searches
-
-
+
+
Promoted By Zergnet
-
-
+
+
\ No newline at end of file
diff --git a/test/test-pages/heise/expected.html b/test/test-pages/heise/expected.html
index 8ba7bd2f..95ab304b 100644
--- a/test/test-pages/heise/expected.html
+++ b/test/test-pages/heise/expected.html
@@ -1,11 +1,11 @@
-
-
+
+
1Password scannt auch QR-Codes.
-
-
+
+
(Bild: Hersteller)
-
+
Das in der iOS-Version bereits enthaltene TOTP-Feature ist nun auch für OS X 10.10 verfügbar. Zudem gibt es neue Zusatzfelder in der Datenbank und weitere Verbesserungen.
AgileBits hat Version 5.3 seines bekannten Passwortmanagers 1Password für OS X freigegeben. Mit dem Update wird eine praktische Funktion nachgereicht, die die iOS-Version der Anwendung bereits seit längerem beherrscht : Das direkte Erstellen von Einmal-Passwörtern. Unterstützt wird dabei der TOTP-Standard (Time-Based One-Time Passwords), den unter anderem Firmen wie Evernote, Dropbox oder Google einsetzen, um ihre Zugänge besser abzusichern. Neben Account und regulärem Passwort wird dabei dann ein Zusatzcode verlangt, der nur kurze Zeit gilt.
Zur TOTP-Nutzung muss zunächst ein Startwert an 1Password übergeben werden. Das geht unter anderem per QR-Code, den die App über ein neues Scanfenster selbst einlesen kann – etwa aus dem Webbrowser. Eine Einführung in die Technik gibt ein kurzes Video . Die TOTP-Unterstützung in 1Password erlaubt es, auf ein zusätzliches Gerät (z.B. ein iPhone) neben dem Mac zu verzichten, das den Code liefert – was allerdings auch die Sicherheit verringert, weil es keinen "echten" zweiten Faktor mehr gibt.
diff --git a/test/test-pages/herald-sun-1/expected.html b/test/test-pages/herald-sun-1/expected.html
index 5489371f..6896eeda 100644
--- a/test/test-pages/herald-sun-1/expected.html
+++ b/test/test-pages/herald-sun-1/expected.html
@@ -13,12 +13,12 @@
A HIGH-powered federal government team has been doing the rounds of media organisations in the past few days in an attempt to allay concerns about the impact of new surveillance legislation on press freedom. It failed.
The roadshow featured the Prime Minister’s national security adviser, Andrew Shearer, Justin Bassi, who advises Attorney-General George Brandis on crime and security matters, and Australian Federal Police Commissioner Andrew Colvin. Staffers from the office of Communications Minister Malcolm Turnbull also took part.
They held meetings with executives from News Corporation and Fairfax, representatives of the TV networks, the ABC top brass and a group from the media union and the Walkley journalism foundation. I was involved as a member of the Walkley board.
The initiative, from Tony Abbott’s office, is evidence that the Government has been alarmed by the strength of criticism from media of the Data Retention Bill it wants passed before Parliament rises in a fortnight. Bosses, journalists, even the Press Council, are up in arms, not only over this measure, but also over aspects of two earlier pieces of national security legislation that interfere with the ability of the media to hold government to account.
-
-
-
+
+
+
-
-
+
+
The Bill would require telecommunications service providers to store so-called “metadata” — the who, where, when and how of a communication, but not its content — for two years so security and law enforcement agencies can access it without warrant. Few would argue against the use of such material to catch criminals or terrorists. But, as Parliament’s Joint Committee on Intelligence and Security has pointed out, it would also be used “for the purpose of determining the identity of a journalist’s sources”.
And that should ring warning bells for anyone genuinely concerned with the health of our democracy. Without the ability to protect the identity of sources, journalists would be greatly handicapped in exposing corruption, dishonesty, waste, incompetence and misbehaviour by public officials.
The Press Council is concerned the laws would crush investigative journalism.
“These legitimate concerns cannot be addressed effectively short of exempting journalists and media organisations,” says president David Weisbrot.
The media union is adamant journalists’ metadata must be exempted from the law. That’s what media bosses want, too, though they have a fallback position based on new safeguards being implemented in Britain.
That would prevent access to the metadata of journalists or media organisations without a judicial warrant. There would be a code including — according to the explanatory notes of the British Bill — “provision to protect the public interest in the confidentiality of journalistic sources”.
In their meetings this week, the government team boasted of concessions in the new Data Retention Bill. The number of agencies able to access metadata will be reduced by excluding such organisations as the RSPCA and local councils. And whenever an authorisation is issued for access to information about a journalist’s sources, the Ombudsman (or, where ASIO is involved, the Inspector-General of Intelligence and Security) will receive a copy.
That does nothing to solve the problem. The Government has effectively admitted as much by agreeing that the parliamentary committee should conduct a separate review of how to deal with the issue of journalists’ sources.
But another inquiry would be a waste of time — the committee has already received and considered dozens of submissions on the subject. The bottom line is that the Government does not deny that the legislation is flawed, but is demanding it be passed anyway with the possibility left open of a repair job down the track. That is a ridiculous approach.
Claims that immediate action is imperative do not stand up. These are measures that won’t come into full effect for two years. Anyway, amending the Bill to either exempt journalists or adopt the UK model could be done quickly, without any risk to national security.
AS Opposition Leader Bill Shorten said in a letter to Abbott last month: “Press freedom concerns about mandatory data retention would ideally be addressed in this Bill to avoid the need for future additional amendments or procedures to be put in place in the future.”
The Data Retention Bill will be debated in the House of Representatives this week. Then, on Friday, CEOs from leading media organisations will front the parliamentary committee to air their concerns before the legislation goes to the Senate.
Those CEOs should make it clear they are just as angry about this as they were about Stephen Conroy’s attempt to impinge on press freedom through media regulation under the previous Labor government.
Memories of the grief Conroy brought down on his head would undoubtedly make Abbott sit up and take notice.
LAURIE OAKES IS THE NINE NETWORK POLITICAL EDITOR
diff --git a/test/test-pages/hidden-nodes/expected-images.json b/test/test-pages/hidden-nodes/expected-images.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/test-pages/hidden-nodes/expected-images.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/test-pages/la-nacion/expected.html b/test/test-pages/la-nacion/expected.html
index 1b4271ac..5640699c 100644
--- a/test/test-pages/la-nacion/expected.html
+++ b/test/test-pages/la-nacion/expected.html
@@ -3,7 +3,7 @@
incumplidos, por eso es más eficiente canalizar la protesta que reprimirla
-
+
Abdullah Ocalan, el líder independentista kurdo, desembarcó en Italia en noviembre de
1998 y pidió asilo político. Arrastraba un pedido de captura de Turquía, donde era acusado por
terrorismo. El ex comunista Massimo D'Alema, recién asumido, dudaba. Acoger a Ocalan implicaba comprarse
diff --git a/test/test-pages/liberation-1/expected.html b/test/test-pages/liberation-1/expected.html
index 45cbccde..889c2b92 100644
--- a/test/test-pages/liberation-1/expected.html
+++ b/test/test-pages/liberation-1/expected.html
@@ -8,6 +8,6 @@
-
+
\ No newline at end of file
diff --git a/test/test-pages/lwn-1/expected.html b/test/test-pages/lwn-1/expected.html
index e16c0cda..76e5db37 100644
--- a/test/test-pages/lwn-1/expected.html
+++ b/test/test-pages/lwn-1/expected.html
@@ -1,8 +1,8 @@
\ No newline at end of file
diff --git a/test/test-pages/medium-1/expected.html b/test/test-pages/medium-1/expected.html
index 0f8551f3..679d8b75 100644
--- a/test/test-pages/medium-1/expected.html
+++ b/test/test-pages/medium-1/expected.html
@@ -1,10 +1,10 @@
Open Journalism Project:
-
+
Better Student Journalism
-
-
-
+
+
+
We pushed out the first version of the Open Journalism site in January. Our goal is for the
site to be a place to teach students what they should know about journalism
on the web. It should be fun too.
@@ -26,7 +26,7 @@
Circa 2011
like Flickr to see how others could frame the world in ways I hadn’t previously
considered.
-
+
topleftpixel.com I started discovering beautiful things the web could do with images :
things not possible with print. Just as every generation revolts against
@@ -45,7 +45,7 @@
Circa 2011
the shoes we were handed down from previous generations of editors. It
was, we were told, all part of “becoming a journalist.”
-
+
We don’t know what we don’t know
We spent much of the rest of the school year asking “what should we be
@@ -89,7 +89,7 @@
Common problems in student newsrooms (2011)
words on computers, for print.
Not enough discussion between the business side and web efforts
-
+
From our 2011 research Common problems in student newsrooms (2013)
Two years later, we went back and looked at what had changed. We talked
@@ -130,14 +130,14 @@
Common problems in student newsrooms (2011)
change with it will be critical.
We are building a shoe machine, not a shoe.
-
+
A train or light at the end of the tunnel: are student newsrooms changing for the better?
-
+
In our 2013 research we found that almost 50% of student newsrooms had
created roles specifically for the web. This sounds great, but is still problematic in its current state.
-
+
We designed many of these slides to help explain to ourselves what we were doing
When a newsroom decides to create a position for the web, it’s often with
@@ -179,7 +179,7 @@
A train or light at the end of the tunnel: are student
steps towards having all their editors involved in the stories for the
web.
-
+
The current Open Journalism site was a few years in the making. This was
an original launch page we use in 2012 What we know
@@ -250,7 +250,7 @@ A note to professional news orgs
writing about it, and sharing code. We need to start building a bridge
between student journalism and professional newsrooms.
-
+
2012 This is a start
We going to continue slowly growing the content on Open Journalism . We still consider this the beta version,
@@ -268,7 +268,7 @@
A note to professional news orgs
smell a bit different, we feel lacing up a new pair of kicks can change
a lot.
-
+
Let’s talk. Let’s listen.
@@ -277,8 +277,8 @@
A note to professional news orgs
pippin@pippinlee.com
-
-
+
+
This isn’t supposed to be a
manifesto™©
we just think it’s pretty cool to share what we’ve learned so far, and hope you’ll do the same. We’re all in this together.
diff --git a/test/test-pages/medium-3/expected.html b/test/test-pages/medium-3/expected.html
index 5974356f..f1c311e7 100644
--- a/test/test-pages/medium-3/expected.html
+++ b/test/test-pages/medium-3/expected.html
@@ -1,7 +1,7 @@
-
+
How to get shanked doing what people say they want
don’t preach to me Mr. integrity
(EDIT: removed the link to Samantha’s post, because the arments and the grubers and the rest of The Deck Clique got what they wanted: a non-proper person driven off the internet lightly capped with a dusting of transphobia along the way, all totally okay because the ends justify the means, and it’s okay when “good” people do it.)
@@ -143,8 +143,8 @@
(Note: testflight_app is a parody account. Please do not mess with the actual testflight folks. They are still cool.)
Or this…conversation:
-
-
+
+
Good job guys. Good job. Defend the tribe. Attack the other. Frederico attempts to recover from his stunning display of demeaning douchery: @viticci : @s_bielefeld I don’t know if it’s an Italian thing, but counting other people’s money is especially weird for me. IMO, bad move in the post.
Samantha is clearly sick of his crap: @s_bielefeld : @viticci That’s what I’m referring to, the mistake of ever having mentioned it. So, now, Marco can ignore the bigger issue and go on living.
@@ -174,8 +174,8 @@
I think she’s earned her anger at this point.
Don’t worry, Marco knows what the real problem is: most devs just suck —
-
-
+
+
I have a saying that applies in this case: don’t place your head so far up your nethers that you go full Klein Bottle. Marco has gone full Klein Bottle. (To be correct, he went FKB some years ago.)
There are some bright spots. My favorite is when Building Twenty points out the real elephant in the room:
@@ -191,8 +191,8 @@
No Chris, you don’t have this right. But hey, who has time to find out the real issue and read an article. I’m sure your friends told you everything you need to know.
Noted Feminist Glenn Fleishman gets a piece of the action too:
-
-
+
+
I’m not actually surprised here. I watched Fleishman berate a friend of mine who has been an engineer for…heck, waaaaay too long on major software products in the most condescending way because she tried to point out that as a very technical woman, “The Magazine” literally had nothing to say to her and maybe he should fix that. “Impertinent” was I believe what he called her, but I may have the specific word wrong. Not the attitude mind you. Great Feminists like Glenn do not like uppity women criticizing Great Feminists who are their Great Allies.
Great Feminists are often tools.
diff --git a/test/test-pages/missing-paragraphs/expected.html b/test/test-pages/missing-paragraphs/expected.html
index 98487198..39e027e4 100644
--- a/test/test-pages/missing-paragraphs/expected.html
+++ b/test/test-pages/missing-paragraphs/expected.html
@@ -1,5 +1,5 @@
-
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
@@ -15,7 +15,7 @@
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
sit amet.
-
+
Secondary header
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
@@ -31,7 +31,7 @@
Secondary header
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
sit amet.
-
+
Secondary header
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
diff --git a/test/test-pages/mozilla-1/expected.html b/test/test-pages/mozilla-1/expected.html
index 088dd1e6..194bb1e7 100644
--- a/test/test-pages/mozilla-1/expected.html
+++ b/test/test-pages/mozilla-1/expected.html
@@ -1,5 +1,5 @@
-
+
It’s easier than ever to personalize Firefox and make it work the way
you do.
@@ -49,7 +49,7 @@
Add-ons
Learn more
-
+
@@ -62,6 +62,6 @@
Awesome Bar
-
+
\ No newline at end of file
diff --git a/test/test-pages/mozilla-2/expected.html b/test/test-pages/mozilla-2/expected.html
index 6a8ebabb..8b858948 100644
--- a/test/test-pages/mozilla-2/expected.html
+++ b/test/test-pages/mozilla-2/expected.html
@@ -6,7 +6,7 @@
WebIDE
Develop, deploy and debug Firefox OS apps directly in your browser, or on a Firefox OS device, with this tool that replaces App Manager.
Learn more about WebIDE
-
+
@@ -14,7 +14,7 @@ WebIDE
Valence
Develop and debug your apps across multiple browsers and devices with this powerful extension that comes pre-installed with Firefox Developer Edition.
Learn more about Valence
-
+
Important: Sync your new profile
@@ -31,7 +31,7 @@
Important: Sync your new profile
Page Inspector
Examine the HTML and CSS of any Web page and easily modify the structure and layout of a page.
Learn more about Page Inspector
-
+
@@ -39,7 +39,7 @@ Page Inspector
Web Console
See logged information associated with a Web page and use Web Console to interact with Web pages using JavaScript.
Learn more about Web Console
-
+
@@ -47,7 +47,7 @@ Web Console
JavaScript Debugger
Step through JavaScript code and examine or modify its state to help track down bugs.
Learn more about JavaScript Debugger
-
+
@@ -55,7 +55,7 @@ JavaScript Debugger
Network Monitor
See all the network requests your browser makes, how long each request takes and details of each request.
Learn more about Network Monitor
-
+
@@ -63,7 +63,7 @@ Network Monitor
Web Audio Editor
Inspect and interact with Web Audio API in real time to ensure that all audio nodes are connected in the way you expect.
Learn more about Web Audio Editor
-
+
@@ -71,7 +71,7 @@ Web Audio Editor
Style Editor
View and edit CSS styles associated with a Web page, create new ones and apply existing CSS stylesheets to any page.
Learn more about Style Editor
-
+
\ No newline at end of file
diff --git a/test/test-pages/msn/expected.html b/test/test-pages/msn/expected.html
index d2f30abf..3ed4d696 100644
--- a/test/test-pages/msn/expected.html
+++ b/test/test-pages/msn/expected.html
@@ -14,5 +14,5 @@
$10 might seem like a bit much compared to the $0 people pay for most mobile games, but it's possible the game has $10 worth of levels to play in it. It's also not iPhone exclusive, but the Android version will launch at a later, currently unknown date.
To see "Super Mario Run" in action, check out the footage below:
VIDEO
-
+
\ No newline at end of file
diff --git a/test/test-pages/nytimes-1/expected.html b/test/test-pages/nytimes-1/expected.html
index efd7b90d..60f7148b 100644
--- a/test/test-pages/nytimes-1/expected.html
+++ b/test/test-pages/nytimes-1/expected.html
@@ -12,7 +12,7 @@
On Friday, the Obama administration will announce a new Sudan strategy. For the first time since the 1990s, the nation will be able to trade extensively with the United States, allowing it to buy goods like tractors and spare parts and attract much-needed investment in its collapsing economy.
In return, Sudan will improve access for aid groups, stop supporting rebels in neighboring South Sudan , cease the bombing of insurgent territory and cooperate with American intelligence agents.
American officials said Sudan had already shown important progress on a number of these fronts. But to make sure the progress continues, the executive order that President Obama plans to sign on Friday, days before leaving office, will have a six-month review period. If Sudan fails to live up to its commitments, the embargo can be reinstated.
-
+
Analysts said good relations with Sudan could strengthen moderate voices within the country and give the Sudanese government incentives to refrain from the brutal tactics that have defined it for decades.
In 1997, President Bill Clinton imposed a comprehensive trade embargo against Sudan and blocked the assets of the Sudanese government , which was suspected of sponsoring international terrorism. In the mid-1990s, Osama bin Laden lived in Khartoum, the capital, as a guest of Sudan’s government.
In 1998, Bin Laden’s agents blew up the United States Embassies in Kenya and Tanzania, killing more than 200 people. In retaliation, Mr. Clinton ordered a cruise missile strike against a pharmaceutical factory in Khartoum.
@@ -21,7 +21,7 @@
Sales of military equipment will still be prohibited, and some Sudanese militia and rebel leaders will still face sanctions.
But the Obama administration is clearly trying to open a door to Sudan. There is intense discontent across the country, and its economy is imploding. American officials have argued for years that it was time to help Sudan dig itself out of the hole it had created.
Officials divulged Thursday that the Sudanese government had allowed two visits by American operatives to a restricted border area near Libya, which they cited as evidence of a new spirit of cooperation on counterterrorism efforts.
-
+
In addition to continuing violence in Darfur, several other serious conflicts are raging in southern and central Sudan, along with a civil war in newly independent South Sudan, which Sudan has been suspected of inflaming with covert arms shipments.
Eric Reeves , one of the leading American academic voices on Sudan, said he was “appalled” that the American government was lifting sanctions.
He said that Sudan’s military-dominated government continued to commit grave human rights abuses and atrocities, and he noted that just last week Sudanese security services killed more than 10 civilians in Darfur .
@@ -31,7 +31,7 @@
Mr. Reeves said he thought that the American government was being manipulated and that the Obama administration had made a “deal with the devil.”
Continue reading the main story
-
-
-
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/nytimes-2/expected.html b/test/test-pages/nytimes-2/expected.html
index 0bd50d94..1584ca43 100644
--- a/test/test-pages/nytimes-2/expected.html
+++ b/test/test-pages/nytimes-2/expected.html
@@ -11,13 +11,13 @@
The sale is being done in two steps. The first step will be the transfer of any assets related to Yahoo business to a singular subsidiary. This includes the stock in the business subsidiaries that make up Yahoo that are not already in the single subsidiary, as well as the odd assets like benefit plan rights. This is what is being sold to Verizon. A license of Yahoo’s oldest patents is being held back in the so-called Excalibur portfolio. This will stay with Yahoo, as will Yahoo’s stakes in Alibaba Group and Yahoo Japan.
It is hard to overestimate how complex an asset sale like this is. Some of the assets are self-contained, but they must be gathered up and transferred. Employees need to be shuffled around and compensation arrangements redone. Many contracts, like the now-infamous one struck with the search engine Mozilla, which may result in a payment of up to a $1 billion , will contain change-of-control provisions that will be set off and have to be addressed. Tax issues always loom large.
Continue reading the main story
-
-
-
+
+
+
In the second step, at the closing, Yahoo will sell the stock in the single subsidiary to Verizon. At that point, Yahoo will change its name to something without “Yahoo” in it. My favorite is simply Remain Co., the name Yahoo executives are using. Remain Co. will become a holding company for the Alibaba and Yahoo Japan stock. Included will also be $10 billion in cash, plus the Excalibur patent portfolio and a number of minority investments including Snapchat. Ahh, if only Yahoo had bought Snapchat instead of Tumblr (indeed, if only Yahoo had bought Google or Facebook when it had the chance).
-
+
Because it is a sale of a subsidiary, the $4.8 billion will be paid to Yahoo. Its shareholders will not receive any money unless Yahoo pays it out in a dividend (after paying taxes). Instead, Yahoo shareholders will be left holding shares in the renamed company.
Verizon’s Yahoo will then be run under the same umbrella as AOL . It is unclear whether there will be a further merger of the two businesses after the acquisition. Plans for Yahoo are still a bit in flux in part because of the abnormal sale process.
As for Remain Co., it will become a so-called investment company. This is a special designation for a company that holds securities for investment but does not operate a working business. Investment companies are subject to special regulation under the Investment Company Act of 1940. Remain Co. will probably just sit there, returning cash to shareholders and waiting for Alibaba to buy it in a tax-free transaction. (Alibaba says it has no plans to do this, but most people do not believe this).
@@ -26,7 +26,7 @@
In either case, shareholders get a say. They either vote on the merger or decide whether to tender into the offer.
In both cases, there would be appraisal rights if the buyer pays cash. This means that shareholders can object to the deal by not voting for it or not tendering into the offer and instead asking a court to value their shares – this is what happened in Dell’s buyout in 2013 .
The Yahoo deal, however, is not a sale of the public company. It is an asset sale, in which there is only a shareholder vote if there is a sale of “all” or “substantially all” of the assets of the company. Yahoo is not all of the assets or even “substantially all” – the Alibaba shares being left behind in Remain Co. are worth about $28 billion, or six times the value of the cash Verizon is paying for the Yahoo assets it is buying.
-
+
The courts have held that the definition of “substantially all” includes a change of business in a company because of an asset sale where the assets are “qualitatively vital.” And that certainly applies here. So there will be a vote – indeed, Yahoo has no problem with a vote – and shareholders are desperate to sell at this point.
There will be no appraisal rights, however. Again, in an asset sale, there are no appraisal rights. So anyone who votes against the deal and thinks this is a bum price is out of luck.
The different standards for voting and appraisal rights apply because the structure of the deal is a quirk of the law in Delaware, where Yahoo is incorporated, that allows lawyers to sometimes work around these issues simply by changing the way a deal is done.
@@ -35,7 +35,7 @@
Finally, if another bidder still wants to acquire Yahoo, it has time. The agreement with Verizon allows Yahoo to terminate the deal and accept a superior offer by paying a $144 million breakup fee to Verizon. And if Yahoo shareholders change their minds and want to stick with Yahoo’s chief executive, Marissa Mayer , and vote down the deal, there is a so-called naked no-vote termination fee of $15 million payable to Verizon to reimburse expenses.
All in all, this was as hairy a deal as they come. There was the procedural and logistical complications of selling a company when the chief executive wanted to stay. Then there was the fact that this was an asset sale, including all of the challenges that go with it. Throw in all of the tax issues and the fact that this is a public company, and it is likely that the lawyers involved will have nightmares for years to come.
Continue reading the main story
-
-
-
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/pixnet/expected.html b/test/test-pages/pixnet/expected.html
index 6f6189e8..ffa81c79 100644
--- a/test/test-pages/pixnet/expected.html
+++ b/test/test-pages/pixnet/expected.html
@@ -13,7 +13,7 @@
營區內 除了露營、民宿、餐飲、 賞楓項目多了許多原木飾品更有畫龍點睛加乘效果
-
+
廣受歡迎的美樹營地有個很大特色就是楓紅時期楓香樹由綠轉黃、轉紅到楓紅層層
@@ -27,67 +27,67 @@
、貓頭鷹裝飾品勾勒出美樹的風格
-
-
+
+
每年12月向來是攝影班外拍的絕佳場所之一 楓紅期間入園費$50元
園區給愛攝一族淨空場景而不是散搭帳蓬之下反 而影響拍照畫面與構圖取景
露營的話則須待中午過後再進場搭帳的彈性做法個人也相當支持這樣的權宜之計
-
-
+
+
來到現場已是落葉飄飄堆疊滿地 不時隨著風吹雨襲而葉落垂地
-
-
+
+
不忍踩過剛剛掉落的樹葉 沿著前人足跡踏痕輕踩而行
雖然只是一廂情願的想法 終究還是不可避免地將會化為塵土
-
-
+
+
葉落繽紛顯得幾分蕭瑟氣息 空氣中可以嗅得出來依然 瀰漫著濕寒水氣
偶而還會飄下來一些霧氣水滴 不時張望尋找最佳楓葉主題
-
-
+
+
外拍的攝影班學員一堆早已不時穿梭其間
各自努力地找尋自認為最好的拍攝角度
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
"水槽"上面的這幾隻彩繪版貓頭鷹也太可愛了
同樣的造型加上不同色彩宛如賦予不同的生命力一般 cool!
-
-
+
+
雨水洗塵後的枝頭固然掉落些葉片是否也洗去塵勞憂傷
-
-
+
+
-
-
+
+
喜歡拍照的不論是平面掃描、天空搜尋、 地上地毯式搜索
有如小說偵探一般 不放過蛛絲馬跡地用力尋尋覓覓找尋最美角度
-
-
+
+
-
-
+
+
原本這周是由小朱團長早在一年前就跟"簍信"預定下來的場子
早上從台北出門之際還是小雨不斷細雨紛飛來到此地雖雨已停
@@ -96,32 +96,32 @@
-
-
+
+
午後從"秀巒"回到美樹之際已經全數撤退只剩下我們三車留下來
唯有"離開地球表面"睡車上的才可以不受到地上泥濘而影響
-
-
+
+
-
-
+
+
午後山嵐興起雲氣遊蕩盤旋在對岸山頭 人潮來來去去似乎也沒有減少
-
-
+
+
美樹民宿有開設餐廳 室內簡單佈置提供伙食餐飲
-
-
+
+
這兩間是民宿房間 跟著民宿主人"簍信"聊起來還提到日後將改變成兩層木屋
一樓則是咖啡飲料/賣店提供訪客來賓有個落腳席座之地 二樓才會是民宿房間
心中有了計畫想法才會有日後的夢想藍圖 相信將會改變得更好的民宿露營環境
-
+
@@ -129,27 +129,27 @@
前面這一區約可搭上十二帳/車/廳 後面那區也大約4~5帳/車/廳
正前方小木屋即是衛浴區 男女分別以左右兩側 分開(燒材鍋爐)
-
-
+
+
營區水電方便 水槽也很有特色
-
-
+
+
這次選擇左側地勢高些以防午夜下雨泥濘
-
-
+
+
"野馬"特地帶來了冬至應景食材ㄜ---湯圓
這家還是最近被評比第一名氣的湯圓專賣店
-
-
+
+
向來對於湯圓是敬謝不敏 沒想到是出乎意料之外的好吃 沒話說!
-
-
+
+
喜歡原住民朋友的坦率、真誠 要將民宿營地經營的有聲有色並非容易之事
午茶時間與"簍信"閒聊分享著他的觀點理念之時很支持對於環境應有生態保護
@@ -157,47 +157,47 @@
環保維護是人人有責 勿以善小而不為不計涓滴之水才可匯集成河
-
-
+
+
-
-
+
+
入夜前雨絲終於漸漸緩和下來 雖然氣溫很低卻沒感受到寒冷的跡象
是山谷中少了寒氣還是美樹營區裡的人熱情洋溢暖化了不少寒意
-
+
聖誕前夕裝點些聖誕飾品 感受一下節慶的氛圍
-
-
+
+
晚餐準備了砂鍋魚頭
-
-
+
+
"蒯嫂"還特地準備著羊肩排、鹹豬肉、柳葉魚...哇!這哩澎湃哩...
"永老爺"早已備妥了好酒為遠自台南來的蒯兄嫂敬一杯囉
感謝蒯嫂精心準備的好料理 食指大動好菜色感恩ㄟ!
-
-
+
+
吃得快精光之際...才想到忘了拍合照...(哇哩咧 ^&*()
-
+
-
-
+
+
隔日睡到很晚才起床 不用拍日出晨光的營地對我來說都是個幸福的睡眠
哪怕是葉落飄零落滿地還是睡夢周公召見而去 起床的事~差點都忘記了
-
-
+
+
昨天細雨紛飛依然打落了不少落葉中間這株整個都快變成枯枝了
昨天依稀凋零稀疏的楓葉殘留今兒個完全不復存在(上周是最美的代名詞)
-
-
+
+
上回來得太早沒能見到楓葉泛紅 這次晚了一周已陸續落葉也 無從比對楓葉差異性
@@ -205,52 +205,52 @@
只要心中自認為是最美最浪漫的一刻 都是美的表徵也是最美的時分
-
-
+
+
早起的"蒯嫂"已經備好熱騰騰中式稀飯、包子、蔬果 頓時~有幸福的感覺
-
-
+
+
星期天早上趁著攝影團還沒入場先來人物場景特寫
野馬家兩張新"座椅"就當作是試坐囉!拍謝哩
-
-
+
+
-
-
+
+
難得有此無人美景在楓樹下的聖誕氛圍也一定要來一張才行
-
-
+
+
三家合照(Hero也一定要入鏡的)
-
-
+
+
接著攝影團入場帶隊老師請求借個時間也來讓學員練習楓樹下的聖誕飾品
此時剛好也遇到早在FB社團相互回應卻頭一次謀面的Mr."大雄"真是幸會了
-
-
+
+
接近中午時分陽光漸露 藍天帷幕再次嶄露頭角 ~ 久違了!
期盼下的天空終於放晴 沒有缺席的藍天還是準時赴約如期出席
-
-
+
+
這兩天肉肉(Hero)天雨濕滑無法自由奔跑都快悶壞了
天晴後"蒯嫂"帶著散步遊園也好解解悶
-
-
+
+
收拾好裝備準備離開營地 亮麗的 天空鮮明對比下的楓樹林又讓人覺得有點捨不得離開
道別了"美樹營地"準備前往而行 "石磊國小"一個很生疏的小學座落在這深山部落裡
北橫"石磊部落" 一個從未踏入的陌生之地因為露營之故否則畢生大概也不會路過
三位大叔同行準備走著這段遙遠的路段 下次找機會再來重溫舊夢了.......
-
+
美樹營地
資訊
@@ -264,17 +264,17 @@
楓紅期間須過中午才可搭帳 水電便利
GPS: N24 39 16.4 E121 18 19.5
-
-
+
+
如果您喜歡 "史蒂文的家"圖文分享 邀請您到 FB 粉絲團
按個"讚"!
內文有不定期的更新旅遊、露營圖文訊息 謝謝!
+
+
-
-
-
+
\ No newline at end of file
diff --git a/test/test-pages/remove-extra-paragraphs/expected.html b/test/test-pages/remove-extra-paragraphs/expected.html
index ba618692..a7c63180 100644
--- a/test/test-pages/remove-extra-paragraphs/expected.html
+++ b/test/test-pages/remove-extra-paragraphs/expected.html
@@ -1,23 +1,23 @@
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
-
+
Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
-
-
+
+
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
+
Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
-
+
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
+
\ No newline at end of file
diff --git a/test/test-pages/remove-script-tags/expected.html b/test/test-pages/remove-script-tags/expected.html
index 2bc8824a..769cc062 100644
--- a/test/test-pages/remove-script-tags/expected.html
+++ b/test/test-pages/remove-script-tags/expected.html
@@ -13,7 +13,7 @@
consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur.
-
+
Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\ No newline at end of file
diff --git a/test/test-pages/rtl-1/source.html b/test/test-pages/rtl-1/source.html
index f92ede1c..597c427a 100644
--- a/test/test-pages/rtl-1/source.html
+++ b/test/test-pages/rtl-1/source.html
@@ -10,7 +10,7 @@
Lorem
- f
+
Lorem ipsum dolor sit amet.
diff --git a/test/test-pages/salon-1/expected-metadata.json b/test/test-pages/salon-1/expected-metadata.json
index 9c39de6c..71fc109d 100644
--- a/test/test-pages/salon-1/expected-metadata.json
+++ b/test/test-pages/salon-1/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "The sharing economy is a lie: Uber, Ayn Rand and the truth about tech\n and libertarians",
+ "Title": "The sharing economy is a lie: Uber, Ayn Rand and the truth about tech and libertarians",
"Author": "Joanna Rothkopf",
"Excerpt": "Disruptive companies talk a good game about sharing. Uber's really just an under-regulated company making riches"
}
diff --git a/test/test-pages/simplyfound-1/expected.html b/test/test-pages/simplyfound-1/expected.html
index 838d7a62..55b74a98 100644
--- a/test/test-pages/simplyfound-1/expected.html
+++ b/test/test-pages/simplyfound-1/expected.html
@@ -1,18 +1,18 @@
The Raspberry Pi Foundation started by a handful of volunteers in 2012 when they released the original Raspberry Pi 256MB Model B without knowing what to expect. In a short four-year period they have grown to over sixty full-time employees and have shipped over eight million units to-date. Raspberry Pi has achieved new heights by being shipped to the International Space Station for research and by being an affordable computing platforms used by teachers throughout the world. "It has become the all-time best-selling computer in the UK".
-
-
+
+
Raspberry Pi 3 - A credit card sized PC that only costs $35 - Image: Raspberry Pi Foundation
-
+
Raspberry Pi Foundation is charity organization that pushes for a digital revolution with a mission to inspire kids to learn by creating computer-powered objects. The foundation also helps teachers learn computing skills through free training and readily available tutorials & example code for creating cool things such as music.
-
-
+
+
Raspberry Pi in educations - Image: Raspberry Pi Foundation
-
+
In celebration of their 4th year anniversary, the foundation has released Raspberry Pi 3 with the same price tag of $35 USD. The 3rd revision features a 1.2GHz 64-bit quad-core ARM CPU with integrated Bluetooth 4.1 and 802.11n wireless LAN chipsets. The ARM Cortex-A53 CPU along with other architectural enhancements making it the fastest Raspberry Pi to-date. The 3rd revision is reportedly about 50-60% times faster than its predecessor Raspberry Pi 2 and about 10 times faster then the original Raspberry PI.
-
-
+
+
Raspberry Pi - Various Usage
-
+
Raspberry Pi 3 is now available via many online resellers. At this time, you should use a recent 32-bit NOOBS or Raspbian image from their downloads page with a promise of a switch to a 64-bit version only if further investigation proves that there is indeed some value in moving to 64-bit mode.
\ No newline at end of file
diff --git a/test/test-pages/social-buttons/expected.html b/test/test-pages/social-buttons/expected.html
index 84b1d414..6d135be2 100644
--- a/test/test-pages/social-buttons/expected.html
+++ b/test/test-pages/social-buttons/expected.html
@@ -11,7 +11,7 @@
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
diff --git a/test/test-pages/tumblr/expected.html b/test/test-pages/tumblr/expected.html
index ab9d11bd..56df5965 100644
--- a/test/test-pages/tumblr/expected.html
+++ b/test/test-pages/tumblr/expected.html
@@ -1,11 +1,11 @@
-
-
+
+
Minecraft 1.8 - The Bountiful Update
+ Added Granite, Andesite, and Diorite stone blocks, with smooth versions + Added Slime Block + Added Iron Trapdoor + Added Prismarine and Sea Lantern blocks + Added the Ocean Monument + Added Red Sandstone + Added Banners + Added Armor Stands + Added Coarse Dirt (dirt where grass won’t grow) + Added Guardian mobs, with item drops + Added Endermite mob + Added Rabbits, with item drops + Added Mutton and Cooked Mutton + Villagers will harvest crops and plant new ones + Mossy Cobblestone and Mossy Stone Bricks are now craftable + Chiseled Stone Bricks are now craftable + Doors and fences now come in all wood type variants + Sponge block has regained its water-absorbing ability and becomes wet + Added a spectator game mode (game mode 3) + Added one new achievement + Added “Customized” world type + Added hidden “Debug Mode” world type + Worlds can now have a world barrier + Added @e target selector for Command Blocks + Added /blockdata command + Added /clone command + Added /execute command + Added /fill command + Added /particle command + Added /testforblocks command + Added /title command + Added /trigger command + Added /worldborder command + Added /stats command + Containers can be locked in custom maps by using the “Lock” data tag + Added logAdminCommands, showDeathMessages, reducedDebugInfo, sendCommandFeedback, and randomTickSpeed game rules + Added three new statistics + Player skins can now have double layers across the whole model, and left/right arms/legs can be edited independently + Added a new player model with smaller arms, and a new player skin called Alex? + Added options for configuring what pieces of the skin that are visible + Blocks can now have custom visual variations in the resource packs + Minecraft Realms now has an activity chart, so you can see who has been online + Minecraft Realms now lets you upload your maps * Difficulty setting is saved per world, and can be locked if wanted * Enchanting has been redone, now costs lapis lazuli in addition to enchantment levels * Villager trading has been rebalanced * Anvil repairing has been rebalanced * Considerable faster client-side performance * Max render distance has been increased to 32 chunks (512 blocks) * Adventure mode now prevents you from destroying blocks, unless your items have the CanDestroy data tag * Resource packs can now also define the shape of blocks and items, and not just their textures * Scoreboards have been given a lot of new features * Tweaked the F3 debug screen * Block ID numbers (such as 1 for stone), are being replaced by ID names (such as minecraft:stone) * Server list has been improved * A few minor changes to village and temple generation * Mob heads for players now show both skin layers * Buttons can now be placed on the ceiling * Lots and lots of other changes * LOTS AND LOTS of other changes - Removed Herobrine
-
+
\ No newline at end of file
diff --git a/test/test-pages/wapo-1/expected.html b/test/test-pages/wapo-1/expected.html
index 7df295bc..ed051e88 100644
--- a/test/test-pages/wapo-1/expected.html
+++ b/test/test-pages/wapo-1/expected.html
@@ -18,7 +18,7 @@
to local news reports.
“Our nation is in danger,” Essid declared in a televised address Wednesday
evening. He vowed that the country would be “merciless” in defending itself.
- [Read: Why Tunisia, Arab Spring’s sole success story, suffers from Islamist violence]
+
[Read: Why Tunisia, Arab Spring’s sole success story, suffers from Islamist violence]
Tunisia, a mostly Muslim nation of about 11 million people, was governed
for decades by autocrats who imposed secularism. Its sun-drenched Mediterranean
@@ -47,8 +47,8 @@
said the U.S. government was willing to assist Tunisian authorities in
the investigation.
-
-
Gunmen in military uniforms stormed Tunisia's national museum, killing at least 19 people, most of them foreign tourists. (Reuters)
+
+
Gunmen in military uniforms stormed Tunisia's national museum, killing at least 19 people, most of them foreign tourists. (Reuters)
“This attack today is meant to threaten authorities, to frighten tourists
@@ -59,7 +59,7 @@
Council, an industry body. The Bardo museum hosts one of the world’s most
outstanding collections of Roman mosaics and is popular with tourists and
Tunisians alike.
- [Bardo museum houses amazing Roman treasures ]
+
[Bardo museum houses amazing Roman treasures ]
The attack is “also aimed at the country’s security and stability during
the transition period,” Azzouz said. “And it could have political repercussions
@@ -69,8 +69,8 @@
be pressured to stage a wider crackdown on Islamists of all stripes. Lawmakers
are drafting an anti-terrorism bill to give security forces additional
tools to fight militants.
-
- [Read: Tunisia sends most foreign fighters to Islamic State in Syria]
+
+
[Read: Tunisia sends most foreign fighters to Islamic State in Syria]
“We must pay attention to what is written” in that law, Azzouz said. “There
is worry the government will use the attack to justify some draconian measures.”
@@ -85,7 +85,7 @@
fire for what many Tunisians saw as a failure to crack down on Islamist
extremists.
-
Map: Flow of foreign fighters to Syria
+
Map: Flow of foreign fighters to Syria
After the collapse of the authoritarian system in 2011, hard-line Muslims
known as Salafists attacked bars and art galleries. Then, in 2012, hundreds
@@ -127,18 +127,18 @@
The last major attack on a civilian target in Tunisia was in 2002, when
al-Qaeda militants killed more than 20 people in a car bombing outside
a synagogue in the city of Djerba.
-
+
Heba Habib contributed to this report.
-
-
-
- Read more:
+
+
+
+
Read more:
- Tunisia’s Islamists get a sobering lesson in governing
+
Tunisia’s Islamists get a sobering lesson in governing
- Tunisia sends most foreign fighters to Islamic State in Syria
+
Tunisia sends most foreign fighters to Islamic State in Syria
- Tunisia’s Bardo museum is home to amazing Roman treasures
+
Tunisia’s Bardo museum is home to amazing Roman treasures
-
+
\ No newline at end of file
diff --git a/test/test-pages/wapo-2/expected.html b/test/test-pages/wapo-2/expected.html
index e267459f..78239aca 100644
--- a/test/test-pages/wapo-2/expected.html
+++ b/test/test-pages/wapo-2/expected.html
@@ -1,5 +1,5 @@
-
-
Israeli Prime Minister Benjamin Netanyahu reacts as he visits the Western Wall in Jerusalem on March 18 following his party's victory in Israel's general election. (Thomas Coex/AFP/Getty Images)
+
+
Israeli Prime Minister Benjamin Netanyahu reacts as he visits the Western Wall in Jerusalem on March 18 following his party's victory in Israel's general election. (Thomas Coex/AFP/Getty Images)
President Obama told the U.N. General Assembly 18 months ago that he would
seek “real breakthroughs on these two issues — Iran’s nuclear program and
Israeli-Palestinian peace.”
@@ -19,8 +19,8 @@
Aside from Russian President Vladimir Putin, few foreign leaders so brazenly
stand up to Obama and even fewer among longtime allies.
-
-
Israeli Prime Minister Benjamin Netanyahu pledged to form a new governing coalition quickly after an upset election victory that was built on a shift to the right. (Reuters)
+
+
Israeli Prime Minister Benjamin Netanyahu pledged to form a new governing coalition quickly after an upset election victory that was built on a shift to the right. (Reuters)
In the past, Israeli leaders who risked damaging the country’s most important
@@ -48,7 +48,7 @@
Earnest added that Netanyahu’s election-eve disavowal of a two-state
solution for Israelis and Palestinians would force the administration to
reconsider its approach to peace in the region.
-
+
Over the longer term, a number of analysts say that Obama and Netanyahu
will seek to play down the friction between them and point to areas of
continuing cooperation on military and economic issues.
@@ -94,8 +94,8 @@
because it can’t pay wages anymore.
“That could be an issue forced onto the agenda about the same time as
a potential nuclear deal.”
-
+
Steven Mufson covers the White House. Since joining The Post, he has covered
economics, China, foreign policy and energy.
-
+
\ No newline at end of file
diff --git a/test/test-pages/webmd-1/expected.html b/test/test-pages/webmd-1/expected.html
index 9fb196d8..ddbe3d84 100644
--- a/test/test-pages/webmd-1/expected.html
+++ b/test/test-pages/webmd-1/expected.html
@@ -1,13 +1,13 @@
+
+
+
+
+
+
-
-
-
-
-
-
-
+
Feb. 23, 2015 -- Life-threatening peanut allergies have mysteriously been
on the rise in the past decade, with little hope for a cure.
But a groundbreaking new study may offer a way to stem that rise, while
diff --git a/test/test-pages/webmd-2/expected.html b/test/test-pages/webmd-2/expected.html
index ea48c7a1..d9e18169 100644
--- a/test/test-pages/webmd-2/expected.html
+++ b/test/test-pages/webmd-2/expected.html
@@ -1,17 +1,17 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
April 17, 2015 -- Imagine being sick in the hospital with a bacterial infection and doctors can't stop it from spreading. This so-called "superbug" scenario is not science fiction. It's an urgent, worldwide worry that is prompting swift action.
Every year, about 2 million people get sick from a superbug, according to the CDC. About 23,000 die. Earlier this year, an outbreak of CRE (carbapenem-resistant enterobacteriaceae) linked to contaminated medical tools sickened 11 people at two Los-Angeles area hospitals. Two people died, and more than 200 others may have been exposed.
The White House recently released a comprehensive plan outlining steps to combat drug-resistant bacteria. The plan identifies three "urgent" and several "serious" threats. We asked infectious disease experts to explain what some of them are and when to worry.
-
-
-
+
+
+
But First: What's a Superbug?
It's a term coined by the media to describe bacteria that cannot be killed using multiple antibiotics . "It resonates because it's scary," says Stephen Calderwood, MD, president of the Infectious Diseases Society of America. "But in fairness, there is no real definition."
Instead, doctors often use phrases like "multidrug-resistant bacteria." That's because a superbug isn't necessarily resistant to all antibiotics. It refers to bacteria that can't be treated using two or more, says Brian K. Coombes, PhD, of McMaster University in Ontario.
diff --git a/test/test-pages/wikipedia/expected.html b/test/test-pages/wikipedia/expected.html
index 16d2b558..8e5f9c97 100644
--- a/test/test-pages/wikipedia/expected.html
+++ b/test/test-pages/wikipedia/expected.html
@@ -1,10 +1,10 @@
-
+
Mozilla is a free-software community, created in 1998 by members of Netscape . The Mozilla community uses, develops, spreads and supports Mozilla products, thereby promoting exclusively free software and open standards, with only minor exceptions.[1] The community is supported institutionally by the Mozilla Foundation and its tax-paying subsidiary, the Mozilla Corporation .[2]
Mozilla produces many products such as the Firefox web browser, Thunderbird e-mail client, Firefox Mobile web browser, Firefox OS mobile operating system, Bugzilla bug tracking system and other projects.
-
-
-
+
+
+
History [ edit ]
On January 23, 1998, Netscape made two announcements: first, that Netscape Communicator will be free; second, that the source code will also be free.[3] One day later, Jamie Zawinski from Netscape registered mozilla.org .[4] The project was named Mozilla after the original code name of the Netscape Navigator browser which is a blending of "Mosaic and Godzilla "[5] and used to co-ordinate the development of the Mozilla Application Suite , the open source version of Netscape's internet software, Netscape Communicator .[6] [7] Jamie Zawinski says he came up with the name "Mozilla" at a Netscape staff meeting.[8] [9] A small group of Netscape employees were tasked with coordination of the new community.
@@ -43,29 +43,29 @@
Software [ Firefox [ edit ]
-
+
Firefox is a web browser , and is Mozilla's flagship software product. It is available in both desktop and mobile versions. Firefox uses the Gecko layout engine to render web pages, which implements current and anticipated web standards .[42] As of late 2015[update] , Firefox has approximately 10-11% of worldwide usage share of web browsers , making it the 4th most-used web browser.[43] [44] [45]
Firefox began as an experimental branch of the Mozilla codebase by Dave Hyatt , Joe Hewitt and Blake Ross . They believed the commercial requirements of Netscape's sponsorship and developer-driven feature creep compromised the utility of the Mozilla browser.[46] To combat what they saw as the Mozilla Suite's software bloat , they created a stand-alone browser, with which they intended to replace the Mozilla Suite.
Firefox was originally named Phoenix but the name was changed so as to avoid trademark conflicts with Phoenix Technologies . The initially-announced replacement, Firebird , provoked objections from the Firebird project community.[47] [48] The current name, Firefox, was chosen on February 9, 2004.[49]
Firefox Mobile [ edit ]
-
+
Firefox Mobile (codenamed Fennec ) is the build of the Mozilla Firefox web browser for devices such as smartphones and tablet computers .
Firefox Mobile uses the same Gecko layout engine as Mozilla Firefox . For example, version 1.0 used the same engine as Firefox 3.6, and the following release, 4.0, shared core code with Firefox 4.0. Its features include HTML5 support, Firefox Sync , add-ons support and tabbed browsing .[50]
Firefox Mobile is currently available for Android 2.2 and above devices with an ARMv7 or ARMv6 CPU.[51] The x86 architecture is not officially supported.[52] Tristan Nitot , president of Mozilla Europe , has said that it's unlikely that an iPhone or a BlackBerry version will be released, citing Apple's iTunes Store application approval policies (which forbid applications competing with Apple's own, and forbid engines which run downloaded code) and BlackBerry's limited operating system as the reasons.[53]
Firefox OS [ edit ]
-
+
Firefox OS (project name: Boot to Gecko also known as B2G ) is an open source operating system in development by Mozilla that aims to support HTML5 apps written using "open Web " technologies rather than platform-specific native APIs . The concept behind Firefox OS is that all user-accessible software will be HTML5 applications, that use Open Web APIs to access the phone's hardware directly via JavaScript .[54]
Some devices using this OS include[55] Alcatel One Touch Fire, ZTE Open, LG Fireweb.
Thunderbird [ edit ]
-
+
Thunderbird is a free, open source, cross-platform email and news client developed by the volunteers of the Mozilla Community.
On July 16, 2012, Mitchell Baker announced that Mozilla's leadership had come to the conclusion that on-going stability was the most important thing for Thunderbird and that innovation in Thunderbird was no longer a priority for Mozilla. In that update Baker also suggested that Mozilla had provided a pathway for community to innovate around Thunderbird if the community chooses.[56]
SeaMonkey [ edit ]
-
+
@@ -73,10 +73,10 @@
SeaMonkey [ SeaMonkey (formerly the Mozilla Application Suite) is a free and open source cross platform suite of Internet software components including a web browser component, a client for sending and receiving email and USENET newsgroup messages, an HTML editor (Mozilla Composer ) and the ChatZilla IRC client.
On March 10, 2005, the Mozilla Foundation announced that it would not release any official versions of Mozilla Application Suite beyond 1.7.x, since it had now focused on the standalone applications Firefox and Thunderbird .[57] SeaMonkey is now maintained by the SeaMonkey Council, which has trademarked the SeaMonkey name with help from the Mozilla Foundation.[58] The Mozilla Foundation provides project hosting for the SeaMonkey developers.
-
+
Bugzilla [ edit ]
-
+
@@ -87,39 +87,39 @@
Components [ NSS [ edit ]
-
+
Network Security Services (NSS) comprises a set of libraries designed to support cross-platform development of security-enabled client and server applications. NSS provides a complete open-source implementation of crypto libraries supporting SSL and S/MIME . NSS was previously tri-licensed under the Mozilla Public License 1.1, the GNU General Public License , and the GNU Lesser General Public License , but upgraded to GPL-compatible MPL 2.0.
AOL , Red Hat , Sun Microsystems /Oracle Corporation , Google and other companies and individual contributors have co-developed NSS and it is used in a wide range of non-Mozilla products including Evolution , Pidgin , and Apache OpenOffice .
SpiderMonkey [ edit ]
-
+
SpiderMonkey is the original JavaScript engine developed by Brendan Eich when he invented JavaScript in 1995 as a developer at Netscape . It became part of the Mozilla product family when Mozilla inherited Netscape's code-base in 1998. In 2011, Eich transferred the nominal ownership of the SpiderMonkey code and project to Dave Mandelin.[60]
SpiderMonkey is a cross-platform engine written in C++ which implements ECMAScript , a standard developed from JavaScript.[60] [61] It comprises an interpreter , several just-in-time compilers , a decompiler and a garbage collector . Products which embed SpiderMonkey include Firefox , Thunderbird , SeaMonkey , and many non-Mozilla applications.[62]
Rhino [ edit ]
-
+
Rhino is an open source JavaScript engine managed by the Mozilla Foundation . It is developed entirely in Java . Rhino converts JavaScript scripts into Java classes . Rhino works in both compiled and interpreted mode.[63]
Gecko [ edit ]
-
+
Gecko is a layout engine that supports web pages written using HTML , SVG , and MathML . Gecko is written in C++ and uses NSPR for platform independence . Its source code is licensed under the Mozilla Public License .
Firefox uses Gecko both for rendering web pages and for rendering its user interface . Gecko is also used by Thunderbird, SeaMonkey, and many non-Mozilla applications.
Rust [ edit ]
-
+
Rust is a compiled programming language being developed by Mozilla Research. It is designed for safety, concurrency, and performance. Rust is intended for creating large and complex software which needs to be both safe against exploits and fast.
Rust is being used in an experimental layout engine, Servo , which is developed by Mozilla and Samsung. Servo is not used in any consumer-oriented browsers yet. However, the Servo project developers plan for parts of the Servo source code to be merged into Gecko, and Firefox, incrementally.[64] [65]
XULRunner [ edit ]
-
+
XULRunner is a software platform and technology experiment by Mozilla, that allows applications built with the same technologies used by Firefox extensions (XPCOM, Javascript, HTML, CSS, XUL) to be run natively as desktop applications, without requiring Firefox to be installed on the user's machine. XULRunner binaries are available for the Windows, GNU/Linux and OS X operating systems, allowing such applications to be effectively cross platform.
pdf.js [ edit ]
-
+
Pdf.js is a library developed by Mozilla that allows in-browser rendering of pdf documents using the HTML5 Canvas and Javascript. It is included by default in recent versions of Firefox, allowing the browser to render pdf documents without requiring an external plugin; and it is available separately as an extension named "PDF Viewer" for Firefox for Android, SeaMonkey, and the Firefox versions which don't include it built-in. It can also be included as part of a website's scripts, to allow pdf rendering for any browser that implements the required HTML5 features and can run Javascript.
Shumway [ edit ]
-
+
Shumway is an open source replacement for the Adobe Flash Player, developed by Mozilla since 2012, using open web technologies as a replacement for Flash technologies. It uses Javascript and HTML5 Canvas elements to render Flash and execute Actionscript. It is included by default in Firefox Nightly and can be installed as an extension for any recent version of Firefox. The current implementation is limited in its capabilities to render Flash content outside simple projects.
Other activities [ edit ]
@@ -128,18 +128,18 @@
Mozilla VR [ Virtual reality tools, specifications, and standards to the open Web.[66] Mozilla VR maintains A-Frame (VR) , a web framework for building VR experiences, and works on advancing WebVR support within web browsers.
Mozilla Persona [ edit ]
-
+
Mozilla Persona is a secure, cross-browser website authentication mechanism which allows a user to use a single username and password (or other authentication method) to log in to multiple sites.[67] Mozilla Persona will be shutting down on November 30, 2016.[68]
Mozilla Location Service [ edit ]
-
+
This open source crowdsourced geolocation service was started by Mozilla in 2013 and offers a free API .
Webmaker [ edit ]
Mozilla Webmaker is Mozilla's educational initiative, Webmaker's goal is to "help millions of people move from using the web to making the web." As part of Mozilla’s non-profit mission, Webmaker aims "to help the world increase their understanding of the web, take greater control of their online lives, and create a more web literate planet."[69] [70] [70]
Mozilla Developer Network [ edit ]
-
+
Mozilla maintains a comprehensive developer documentation website called the Mozilla Developer Network which contains information about web technologies including HTML , CSS , SVG , JavaScript , as well Mozilla-specific information. In addition, Mozilla publishes a large number of videos about web technologies and the development of Mozilla projects on the Air Mozilla website.[71] [72]
[ edit ]
@@ -189,7 +189,7 @@ Mozilla Summit [ See also [ edit ]
-
+
+
-
-
+
\ No newline at end of file
diff --git a/test/test-pages/wordpress/expected.html b/test/test-pages/wordpress/expected.html
index ada49f8a..1f47d8fe 100644
--- a/test/test-pages/wordpress/expected.html
+++ b/test/test-pages/wordpress/expected.html
@@ -19,11 +19,11 @@
It would be interesting to know what is meant by tagging “WordPress” as a skill – whether it is the general ability to work within the WordPress ecosystem of tools or if it refers to specific skills like PHP. Browsing a few jobs on Stack Overflow, WordPress positions vary in the skills they require, such as React.js, Angular, PHP, HTML, CSS, and other technologies. This is a reflection of the diversity of technology that can be leveraged in creating WordPress-powered sites and applications, and several of these skills are listed independently of WordPress in the data.
Regardless of how much credibility you give Stack Overflow’s analysis of hiring trends, the report’s recommendation for those working in technologies oversaturated with developers is a good one: “Consider brushing up on some technologies that offer higher employer demand and less competition.” WordPress’ code base is currently 59% PHP and 27% JavaScript . The percentage of PHP has grown over time, but newer features and improvements to core are also being built in JavaScript. These are both highly portable skills that are in demand on the web.
-
-
-
-
+
+
+
+
-
+
\ No newline at end of file
diff --git a/test/test-pages/yahoo-1/expected.html b/test/test-pages/yahoo-1/expected.html
index 86f3f4e4..6cc0ec4b 100644
--- a/test/test-pages/yahoo-1/expected.html
+++ b/test/test-pages/yahoo-1/expected.html
@@ -39,7 +39,7 @@ Review: ‘Madden NFL 17’ runs hard, plays it safe
Ben Silverman is on Twitter at
ben_silverman .
-
+
\ No newline at end of file
diff --git a/test/test-pages/yahoo-2/expected.html b/test/test-pages/yahoo-2/expected.html
index b9d2d2bd..9bc5f6f5 100644
--- a/test/test-pages/yahoo-2/expected.html
+++ b/test/test-pages/yahoo-2/expected.html
@@ -1,16 +1,16 @@
-
+
1 / 5
-
+
In this photo dated Tuesday, Nov, 29, 2016 the Soyuz-FG rocket booster with the Progress MS-04 cargo ship is installed on a launch pad in Baikonur, Kazakhstan. The unmanned Russian cargo space ship Progress MS-04 broke up in the atmosphere over Siberia on Thursday Dec. 1, 2016, just minutes after the launch en route to the International Space Station due to an unspecified malfunction, the Russian space agency said.(Oleg Urusov/ Roscosmos Space Agency Press Service photo via AP)
-
+
@@ -28,7 +28,7 @@
This version corrects the spelling of the region to Tuva, not Tyva.
__
Aerospace Writer Marcia Dunn in Cape Canaveral, Florida, and Vladimir Isachenkov in Moscow contributed to this report.
-
+
\ No newline at end of file
diff --git a/test/test-pages/yahoo-3/expected.html b/test/test-pages/yahoo-3/expected.html
index 5a16f04b..c5d7e33d 100644
--- a/test/test-pages/yahoo-3/expected.html
+++ b/test/test-pages/yahoo-3/expected.html
@@ -1,15 +1,15 @@
+
-
-
+
-
+
A photographer and Navy veteran is fighting back after a photo she posted to Facebook started an online backlash.
Vanessa Hicks said she had no idea her photo would be considered controversial. The photo, from a military family’s newborn photo shoot, showed a newborn infant wrapped in an American flag held by his father, who was in his military uniform.
Hicks, a Navy veteran herself and the wife of an active-duty Navy member, said her intention was to honor the flag as well as her clients, who wanted to incorporate their military service in the photo shoot.
@@ -18,7 +18,7 @@
Antarctica 'Penguin Post Office' Attracts Record Number of Applicants
“This is what he was fighting for, his son wrapped in an American flag,” Hicks told ABC News. However, when she posted the image on her page, she started to get comments accusing her of desecrating the flag.
On one Facebook page an unidentified poster put up her picture writing and wrote they found it was “disrespectful, rude, tacky, disgusting, and against the U.S. Flag Code.”
-
+
Vanessa Hicks
@@ -36,9 +36,9 @@
+
-
-
-
+
+
\ No newline at end of file
From 4b7c108a76d26b0ebe0dd557805700a2f89109b7 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Wed, 31 Oct 2018 23:33:14 +0000
Subject: [PATCH 37/92] Look for classes names when checking visibility
---
src/Nodes/NodeTrait.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index e811c125..08aa7945 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -485,12 +485,12 @@ public function isProbablyVisible()
{
/*
* In the original JS project they check if the node has the style display=none, which unfortunately
- * in our case we have no way of knowing that. So we just check for the attribute hidden.
+ * in our case we have no way of knowing that. So we just check for the attribute hidden or "display: none".
*
* Might be a good idea to check for classes or other attributes like 'aria-hidden'
*/
- return !$this->hasAttribute('hidden');
+ return !preg_match('/display:( )?none/', $this->getAttribute('style')) && !$this->hasAttribute('hidden');
}
public function isWhitespace()
From 7388e1c88541556b8b813495a083947ae3653092 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Wed, 31 Oct 2018 23:33:20 +0000
Subject: [PATCH 38/92] Update test expectations
---
test/test-pages/bug-1255978/expected-metadata.json | 2 +-
test/test-pages/ehow-1/expected-metadata.json | 2 +-
test/test-pages/heise/expected-metadata.json | 2 +-
test/test-pages/herald-sun-1/expected-metadata.json | 2 +-
test/test-pages/la-nacion/expected-metadata.json | 4 ++--
test/test-pages/medium-1/expected-metadata.json | 2 +-
test/test-pages/medium-2/expected-metadata.json | 2 +-
test/test-pages/medium-3/expected-metadata.json | 4 ++--
test/test-pages/mozilla-1/expected-metadata.json | 2 +-
test/test-pages/replace-brs/expected-metadata.json | 2 +-
test/test-pages/tumblr/expected-metadata.json | 2 +-
test/test-pages/wordpress/expected-metadata.json | 2 +-
test/test-pages/yahoo-2/expected-metadata.json | 2 +-
test/test-pages/yahoo-3/expected-metadata.json | 3 ++-
14 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/test/test-pages/bug-1255978/expected-metadata.json b/test/test-pages/bug-1255978/expected-metadata.json
index 0acbbdf0..db7c6524 100644
--- a/test/test-pages/bug-1255978/expected-metadata.json
+++ b/test/test-pages/bug-1255978/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "The seven secrets that hotel owners don't want you to know",
+ "Title": "Seven secrets that hotel owners don't want you to know",
"Author": "Hazel Sheffield",
"Direction": null,
"Excerpt": "Most people go to hotels for the pleasure of sleeping in a giant bed with clean white sheets and waking up to fresh towels in the morning. But those towels and sheets might not be as clean as they look, according to the hotel bosses that responded to an online thread about the things hotel owners don’t want you to know."
diff --git a/test/test-pages/ehow-1/expected-metadata.json b/test/test-pages/ehow-1/expected-metadata.json
index 6cfa7b0d..0565e058 100644
--- a/test/test-pages/ehow-1/expected-metadata.json
+++ b/test/test-pages/ehow-1/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "How to Build a Terrarium (with Pictures)",
+ "Title": "How to Build a Terrarium | eHow",
"Author": "Lucy Akins",
"Excerpt": "How to Build a Terrarium. Glass cloche terrariums are not only appealing to the eye, but they also preserve a bit of nature in your home and serve as a simple, yet beautiful, piece of art. Closed terrariums are easy to care for, as they retain much of their own moisture and provide a warm environment with a consistent level of humidity. You..."
}
diff --git a/test/test-pages/heise/expected-metadata.json b/test/test-pages/heise/expected-metadata.json
index c723ccd0..ae180bf9 100644
--- a/test/test-pages/heise/expected-metadata.json
+++ b/test/test-pages/heise/expected-metadata.json
@@ -1,5 +1,5 @@
{
"Title": "1Password für Mac generiert Einmal-Passwörter",
- "Author": null,
+ "Author": "Mac & i",
"Excerpt": "Das in der iOS-Version bereits enthaltene TOTP-Feature ist nun auch für OS X 10.10 verfügbar. Zudem gibt es neue Zusatzfelder in der Datenbank und weitere Verbesserungen."
}
diff --git a/test/test-pages/herald-sun-1/expected-metadata.json b/test/test-pages/herald-sun-1/expected-metadata.json
index 42194645..b8ad6c26 100644
--- a/test/test-pages/herald-sun-1/expected-metadata.json
+++ b/test/test-pages/herald-sun-1/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "Angry media won’t buckle over new surveillance laws\n\t\t\t\t\t\t| Herald Sun",
+ "Title": "Angry media won’t buckle over new surveillance laws",
"Author": "JOE HILDEBRAND",
"Excerpt": "A HIGH-powered federal government team has been doing the rounds of media organisations in the past few days in an attempt to allay concerns about the impact of new surveillance legislation on press freedom. It failed."
}
diff --git a/test/test-pages/la-nacion/expected-metadata.json b/test/test-pages/la-nacion/expected-metadata.json
index 512e3e0d..ddba3d8f 100644
--- a/test/test-pages/la-nacion/expected-metadata.json
+++ b/test/test-pages/la-nacion/expected-metadata.json
@@ -1,4 +1,4 @@
{
- "Title": "Una solución no violenta para la cuestión mapuche - 07.12.2017",
- "Excerpt": "Una solución no violenta para la cuestión mapuche | Los pueblos indígenas reclaman por derechos que permanecen incumplidos, por eso es más eficiente canalizar la protesta que reprimirla - LA NACION"
+ "Title": "Una solución no violenta para la cuestión mapuche",
+ "Excerpt": "Los pueblos indígenas reclaman por derechos que permanecen incumplidos, por eso es más eficiente canalizar la protesta que reprimirla"
}
diff --git a/test/test-pages/medium-1/expected-metadata.json b/test/test-pages/medium-1/expected-metadata.json
index b27963a4..e3e098c1 100644
--- a/test/test-pages/medium-1/expected-metadata.json
+++ b/test/test-pages/medium-1/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "Better Student Journalism — Medium",
+ "Title": "The Open Journalism Project: Better Student Journalism",
"Author": "Pippin Lee",
"Excerpt": "We pushed out the first version of the Open Journalism site in January. Here’s what we’ve learned about student journali…"
}
diff --git a/test/test-pages/medium-2/expected-metadata.json b/test/test-pages/medium-2/expected-metadata.json
index d451476a..395fb031 100644
--- a/test/test-pages/medium-2/expected-metadata.json
+++ b/test/test-pages/medium-2/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "On Behalf of “Literally” — Medium",
+ "Title": "On Behalf of “Literally”",
"Author": "Courtney Kirchoff",
"Excerpt": "In defense of the word “literally” and why you or someone you know should stop misusing the word, lest they drive us fig…"
}
diff --git a/test/test-pages/medium-3/expected-metadata.json b/test/test-pages/medium-3/expected-metadata.json
index c4eaa563..b2e66b9f 100644
--- a/test/test-pages/medium-3/expected-metadata.json
+++ b/test/test-pages/medium-3/expected-metadata.json
@@ -1,6 +1,6 @@
{
- "Title": "Samantha and The Great Big Lie – John C. Welch – Medium",
+ "Title": "Samantha and The Great Big Lie",
"Author": "John C. Welch",
"Direction": null,
- "Excerpt": "(EDIT: removed the link to Samantha’s post, because the arments and the grubers and the rest of The Deck Clique got what they wanted: a non-proper person driven off the internet lightly capped with a…"
+ "Excerpt": "How to get shanked doing what people say they want"
}
diff --git a/test/test-pages/mozilla-1/expected-metadata.json b/test/test-pages/mozilla-1/expected-metadata.json
index b6bac46a..3a93f8f0 100644
--- a/test/test-pages/mozilla-1/expected-metadata.json
+++ b/test/test-pages/mozilla-1/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "Firefox — Customize and make it your own — The most flexible browser on\n the Web — Mozilla",
+ "Title": "Firefox — Customize and make it your own — The most flexible browser on the Web",
"Author": null,
"Direction": "ltr",
"Excerpt": "It’s easier than ever to personalize Firefox and make it work the way\n you do.\n No other browser gives you so much choice and flexibility."
diff --git a/test/test-pages/replace-brs/expected-metadata.json b/test/test-pages/replace-brs/expected-metadata.json
index ae183f15..c73456dd 100644
--- a/test/test-pages/replace-brs/expected-metadata.json
+++ b/test/test-pages/replace-brs/expected-metadata.json
@@ -1,5 +1,5 @@
{
"Title": "Replace brs test",
"Author": null,
- "Excerpt": "Lorem ipsum"
+ "Excerpt": "Lorem ipsumdolor sit"
}
diff --git a/test/test-pages/tumblr/expected-metadata.json b/test/test-pages/tumblr/expected-metadata.json
index 09c83ac8..4589af02 100644
--- a/test/test-pages/tumblr/expected-metadata.json
+++ b/test/test-pages/tumblr/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "Minecraft 1.8 - The Bountiful Update - Minecraft 1.8 - The Bountiful Update",
+ "Title": "Minecraft 1.8 - The Bountiful Update",
"Author": null,
"Direction": null,
"Excerpt": "+ Added Granite, Andesite, and Diorite stone blocks, with smooth versions\n+ Added Slime Block\n+ Added Iron Trapdoor\n+ Added Prismarine and Sea Lantern blocks\n+ Added the Ocean Monument\n+ Added Red..."
diff --git a/test/test-pages/wordpress/expected-metadata.json b/test/test-pages/wordpress/expected-metadata.json
index 3d860dcc..c9d6abdf 100644
--- a/test/test-pages/wordpress/expected-metadata.json
+++ b/test/test-pages/wordpress/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "Stack Overflow Jobs Data Shows ReactJS Skills in High Demand, WordPress Market Oversaturated with Developers – WordPress Tavern",
+ "Title": "Stack Overflow Jobs Data Shows ReactJS Skills in High Demand, WordPress Market Oversaturated with Developers",
"Author": null,
"Direction": null,
"Excerpt": "Stack Overflow published its analysis of 2017 hiring trends based on the targeting options employers selected when posting to Stack Overflow Jobs. The report, which compares data from 200 companies…"
diff --git a/test/test-pages/yahoo-2/expected-metadata.json b/test/test-pages/yahoo-2/expected-metadata.json
index 562a72b1..fe406c35 100644
--- a/test/test-pages/yahoo-2/expected-metadata.json
+++ b/test/test-pages/yahoo-2/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "Russia: Space ship malfunctions, breaks up over Siberia",
+ "Title": "Yahoo News - Latest News & Headlines",
"Author": "NATALIYA VASILYEVA",
"Excerpt": "The latest news and headlines from Yahoo! News. Get breaking news stories and in-depth coverage with videos and photos."
}
diff --git a/test/test-pages/yahoo-3/expected-metadata.json b/test/test-pages/yahoo-3/expected-metadata.json
index 75d461da..1ffa6e7a 100644
--- a/test/test-pages/yahoo-3/expected-metadata.json
+++ b/test/test-pages/yahoo-3/expected-metadata.json
@@ -1,4 +1,5 @@
{
"Title": "Veteran Wraps Baby in American Flag, Photo Sparks Controversy",
- "Excerpt": "From Yahoo: A photographer and Navy veteran is fighting back after a photo she posted to Facebook started an online backlash. Vanessa Hicks said she had no idea her photo would be considered controversial. The photo, from a military family’s newborn photo shoot, showed a newborn infant wrapped in an American flag held by his father, who was in his military uniform. Hicks, a Navy veteran herself and the wife of an active-duty Navy member, said her intention was to honor the flag as well as her clients, who wanted to incorporate their military service in the photo shoot."
+ "Excerpt": "A photographer and Navy veteran is fighting back after a photo she posted to Facebook started an online backlash. Vanessa Hicks said she had no idea her photo would be considered controversial. The photo, from a military family’s newborn photo shoot, showed a newborn infant wrapped in an American flag held by his father, who was in his military uniform. Hicks, a Navy veteran herself and the wife of an active-duty Navy member, said her intention was to honor the flag as well as her clients, who wanted to incorporate their military service in the photo shoot.",
+ "Author": "By GILLIAN MOHNEY\n March 11, 2015 3:46 PM"
}
From 1a383195c8fe44ee4d934c06cd441a5a7fbc7bc8 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Thu, 1 Nov 2018 21:16:56 +0000
Subject: [PATCH 39/92] Fix metadata extraction bug
---
src/Readability.php | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/src/Readability.php b/src/Readability.php
index 2f8b22ff..5d6c78e3 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -325,7 +325,16 @@ private function getMetadata()
}
// get title
- $this->setTitle(current(array_intersect_key($values, array_flip([
+ /*
+ * This is a very convoluted way of extracting the first matching key of the $values array
+ * against a set of options. First you define the target keys, flip it, intersect them (discarding the
+ * target keys without a match), then reversing it (because array_intersect_key reverses the original array) and
+ * finally get the item.
+ *
+ * This could be easily replaced with an ugly set of isset($values['key']) or a bunch of ??s.
+ * Will probably replace it with ??s after dropping support of PHP5.6
+ */
+ $this->setTitle(current(array_reverse(array_intersect_key($values, array_flip([
'dc:title',
'dcterm:title',
'og:title',
@@ -333,21 +342,21 @@ private function getMetadata()
'weibo:webpage:title',
'title',
'twitter:title'
- ]))));
+ ])))));
if (!$this->getTitle()) {
$this->setTitle($this->getArticleTitle());
}
// get author
- $this->setAuthor(current(array_intersect_key($values, array_flip([
+ $this->setAuthor(current(array_reverse(array_intersect_key($values, array_flip([
'dc:creator',
'dcterm:creator',
'author'
- ]))));
+ ])))));
// get description
- $this->setExcerpt(current(array_intersect_key($values, array_flip([
+ $this->setExcerpt(current(array_reverse(array_intersect_key($values, array_flip([
'dc:description',
'dcterm:description',
'og:description',
@@ -355,13 +364,13 @@ private function getMetadata()
'weibo:webpage:description',
'description',
'twitter:description'
- ]))));
+ ])))));
// get main image
- $this->setImage(current(array_intersect_key($values, array_flip([
+ $this->setImage(current(array_reverse(array_intersect_key($values, array_flip([
'og:image',
'twitter:image'
- ]))));
+ ])))));
}
/**
From 3a6a923391f540638ec8bae8ed62e75cea2dbea4 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Thu, 1 Nov 2018 23:11:23 +0000
Subject: [PATCH 40/92] Improve metadata searching function
---
src/Readability.php | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/src/Readability.php b/src/Readability.php
index 5d6c78e3..506a4789 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -327,14 +327,13 @@ private function getMetadata()
// get title
/*
* This is a very convoluted way of extracting the first matching key of the $values array
- * against a set of options. First you define the target keys, flip it, intersect them (discarding the
- * target keys without a match), then reversing it (because array_intersect_key reverses the original array) and
- * finally get the item.
+ * against a set of options.
*
* This could be easily replaced with an ugly set of isset($values['key']) or a bunch of ??s.
* Will probably replace it with ??s after dropping support of PHP5.6
*/
- $this->setTitle(current(array_reverse(array_intersect_key($values, array_flip([
+
+ $key = current(array_intersect_key([
'dc:title',
'dcterm:title',
'og:title',
@@ -342,21 +341,25 @@ private function getMetadata()
'weibo:webpage:title',
'title',
'twitter:title'
- ])))));
+ ], array_keys($values)));
+
+ $this->setTitle(isset($values[$key]) ? $values[$key] : null);
if (!$this->getTitle()) {
$this->setTitle($this->getArticleTitle());
}
// get author
- $this->setAuthor(current(array_reverse(array_intersect_key($values, array_flip([
+ $key = current(array_intersect_key([
'dc:creator',
'dcterm:creator',
'author'
- ])))));
+ ], array_keys($values)));
+
+ $this->setAuthor(isset($values[$key]) ? $values[$key] : null);
// get description
- $this->setExcerpt(current(array_reverse(array_intersect_key($values, array_flip([
+ $key = current(array_intersect_key([
'dc:description',
'dcterm:description',
'og:description',
@@ -364,13 +367,17 @@ private function getMetadata()
'weibo:webpage:description',
'description',
'twitter:description'
- ])))));
+ ], array_keys($values)));
+
+ $this->setExcerpt(isset($values[$key]) ? $values[$key] : null);
// get main image
- $this->setImage(current(array_reverse(array_intersect_key($values, array_flip([
+ $key = current(array_intersect_key([
'og:image',
'twitter:image'
- ])))));
+ ], array_keys($values)));
+
+ $this->setImage(isset($values[$key]) ? $values[$key] : null);
}
/**
From 8e144af7cade71f4b5d72a102c9919e9fc0e6e8f Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Thu, 1 Nov 2018 23:21:27 +0000
Subject: [PATCH 41/92] Switch to array_intersect
---
src/Readability.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Readability.php b/src/Readability.php
index 506a4789..7caf8386 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -333,7 +333,7 @@ private function getMetadata()
* Will probably replace it with ??s after dropping support of PHP5.6
*/
- $key = current(array_intersect_key([
+ $key = current(array_intersect([
'dc:title',
'dcterm:title',
'og:title',
@@ -350,7 +350,7 @@ private function getMetadata()
}
// get author
- $key = current(array_intersect_key([
+ $key = current(array_intersect([
'dc:creator',
'dcterm:creator',
'author'
@@ -359,7 +359,7 @@ private function getMetadata()
$this->setAuthor(isset($values[$key]) ? $values[$key] : null);
// get description
- $key = current(array_intersect_key([
+ $key = current(array_intersect([
'dc:description',
'dcterm:description',
'og:description',
@@ -372,7 +372,7 @@ private function getMetadata()
$this->setExcerpt(isset($values[$key]) ? $values[$key] : null);
// get main image
- $key = current(array_intersect_key([
+ $key = current(array_intersect([
'og:image',
'twitter:image'
], array_keys($values)));
From a309b0a688d26e48e362448734f318ac5a0c6490 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Thu, 1 Nov 2018 23:31:44 +0000
Subject: [PATCH 42/92] Update tests
---
test/test-pages/breitbart/expected-metadata.json | 2 +-
test/test-pages/ehow-1/expected-metadata.json | 2 +-
test/test-pages/simplyfound-1/expected-metadata.json | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/test-pages/breitbart/expected-metadata.json b/test/test-pages/breitbart/expected-metadata.json
index 2b968e75..8bbbd411 100644
--- a/test/test-pages/breitbart/expected-metadata.json
+++ b/test/test-pages/breitbart/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "'Neutral' Snopes Fact-Checker David Emery: 'Are There Any Un-Angry Trump Supporters?'",
+ "Title": "'Neutral' Snopes Fact-Checker David Emery: 'Are There Any Un-Angry Trump Supporters?' - Breitbart",
"Author": "by Lucas Nolan22 Dec 2016651",
"Direction": null,
"Excerpt": "Snopes fact checker and staff writer David Emery posted to Twitter asking if there were “any un-angry Trump supporters?”"
diff --git a/test/test-pages/ehow-1/expected-metadata.json b/test/test-pages/ehow-1/expected-metadata.json
index 0565e058..9e2782b5 100644
--- a/test/test-pages/ehow-1/expected-metadata.json
+++ b/test/test-pages/ehow-1/expected-metadata.json
@@ -1,5 +1,5 @@
{
"Title": "How to Build a Terrarium | eHow",
"Author": "Lucy Akins",
- "Excerpt": "How to Build a Terrarium. Glass cloche terrariums are not only appealing to the eye, but they also preserve a bit of nature in your home and serve as a simple, yet beautiful, piece of art. Closed terrariums are easy to care for, as they retain much of their own moisture and provide a warm environment with a consistent level of humidity. You..."
+ "Excerpt": "Glass cloche terrariums are not only appealing to the eye, but they also preserve a bit of nature in your home and serve as a simple, yet beautiful, piece of art. Closed terrariums are easy to care for, as they retain much of their own moisture and provide a warm environment with a consistent level of humidity. You won’t have to water the..."
}
diff --git a/test/test-pages/simplyfound-1/expected-metadata.json b/test/test-pages/simplyfound-1/expected-metadata.json
index 9d1a0bad..3772bbd9 100644
--- a/test/test-pages/simplyfound-1/expected-metadata.json
+++ b/test/test-pages/simplyfound-1/expected-metadata.json
@@ -1,5 +1,5 @@
{
"Title": "Raspberry Pi 3 - The credit card sized PC that cost only $35 - All-time bestselling computer in UK",
"Author": null,
- "Excerpt": "The Raspberry Pi Foundation started by a handful of volunteers in 2012 when they released the original Raspberry Pi 256MB Model B without knowing what to expect. In a short four-year period they have grown to over sixty full-time employees and ha..."
+ "Excerpt": "The Raspberry Pi Foundation started by a handful of volunteers in 2012 when they released the original Raspberry Pi 256MB Model B without knowing what to expect. In a short four-year period they have grown to over sixty full-time employees and ha..."
}
From de4334b8189b6697497194551f69ae26299a7a6c Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sat, 3 Nov 2018 12:21:34 +0000
Subject: [PATCH 43/92] Fix wrong variable name when checking length of byline
---
src/Readability.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Readability.php b/src/Readability.php
index 7caf8386..ff07c11e 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -785,7 +785,7 @@ private function isValidByline($text)
if (gettype($text) == 'string') {
$byline = trim($text);
- return (mb_strlen($byline) > 0) && (mb_strlen($text) < 100);
+ return (mb_strlen($byline) > 0) && (mb_strlen($byline) < 100);
}
return false;
From 9e7ed7f7ade49317910076f041982a13eabab209 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sat, 3 Nov 2018 16:35:02 +0000
Subject: [PATCH 44/92] Update test expectations
---
test/test-pages/002/expected.html | 2 +-
test/test-pages/aclu/config.json | 3 +
test/test-pages/blogger/expected.html | 168 ++---
.../buzzfeed-1/expected-metadata.json | 3 +-
test/test-pages/clean-links/expected.html | 2 +-
test/test-pages/cnn/expected.html | 89 +--
test/test-pages/ehow-2/expected-metadata.json | 4 +-
test/test-pages/ehow-2/expected.html | 6 +-
test/test-pages/engadget/expected.html | 2 +-
test/test-pages/gmw/expected.html | 103 ++--
test/test-pages/hidden-nodes/expected.html | 2 +-
test/test-pages/hukumusume/expected.html | 2 +-
test/test-pages/ietf-1/expected-metadata.json | 4 +-
test/test-pages/ietf-1/expected.html | 193 +++---
test/test-pages/keep-images/expected.html | 575 ++++++++++++------
test/test-pages/links-in-tables/expected.html | 2 +-
test/test-pages/msn/expected-metadata.json | 2 +-
test/test-pages/qq/expected.html | 2 +-
.../test-pages/remove-extra-brs/expected.html | 2 +-
.../table-style-attributes/expected.html | 103 ++--
.../telegraph/expected-metadata.json | 2 +-
test/test-pages/tmz-1/expected.html | 2 +-
test/test-pages/yahoo-4/expected.html | 2 +-
23 files changed, 713 insertions(+), 562 deletions(-)
create mode 100644 test/test-pages/aclu/config.json
diff --git a/test/test-pages/002/expected.html b/test/test-pages/002/expected.html
index e1290846..88701802 100644
--- a/test/test-pages/002/expected.html
+++ b/test/test-pages/002/expected.html
@@ -1,4 +1,4 @@
-
+
For more than a decade the Web has used XMLHttpRequest (XHR) to achieve asynchronous requests in JavaScript. While very useful, XHR is not a very nice API. It suffers from lack of separation of concerns. The input, output and state are all managed by interacting with one object, and state is tracked using events. Also, the event-based model doesn’t play well with JavaScript’s recent focus on Promise- and generator-based asynchronous programming.
diff --git a/test/test-pages/aclu/config.json b/test/test-pages/aclu/config.json
new file mode 100644
index 00000000..0ac6816e
--- /dev/null
+++ b/test/test-pages/aclu/config.json
@@ -0,0 +1,3 @@
+{
+ "ArticleByLine": true
+}
\ No newline at end of file
diff --git a/test/test-pages/blogger/expected.html b/test/test-pages/blogger/expected.html
index 52c1ab56..35e484ae 100644
--- a/test/test-pages/blogger/expected.html
+++ b/test/test-pages/blogger/expected.html
@@ -1,111 +1,57 @@
-
-
-
I've written a couple of posts in the past few months but they were all for the blog at work so I figured I'm long overdue for one on Silicon Exposed.
-
So what's a GreenPak?
-
Silego Technology is a fabless semiconductor company located in the SF Bay area, which makes (among other things) a line of programmable logic devices known as GreenPak. Their 5th generation parts were just announced, but I started this project before that happened so I'm still targeting the 4th generation .
-
GreenPak devices are kind of like itty bitty PSoCs - they have a mixed signal fabric with an ADC, DACs, comparators, voltage references, plus a digital LUT/FF fabric and some typical digital MCU peripherals like counters and oscillators (but no CPU).
-
It's actually an interesting architecture - FPGAs (including some devices marketed as CPLDs) are a 2D array of LUTs connected via wires to adjacent cells, and true (product term) CPLDs are a star topology of AND-OR arrays connected by a crossbar. GreenPak, on the other hand, is a star topology of LUTs, flipflops, and analog/digital hard IP connected to a crossbar.
-
Without further ado, here's a block diagram showing all the cool stuff you get in the SLG46620V:
-
-
-
-
-
-
- SLG46620V block diagram (from device datasheet)
-
-
-
-
They're also tiny (the SLG46620V is a 20-pin 0.4mm pitch STQFN measuring 2x3 mm, and the lower gate count SLG46140V is a mere 1.6x2 mm) and probably the cheapest programmable logic device on the market - $0.50 in low volume and less than $0.40 in larger quantities.
-
The Vdd range of GreenPak4 is huge, more like what you'd expect from an MCU than an FPGA! It can run on anything from 1.8 to 5V, although performance is only specified at 1.8, 3.3, and 5V nominal voltages. There's also a dual-rail version that trades one of the GPIO pins for a second power supply pin, allowing you to interface to logic at two different voltage levels.
-
To support low-cost/space-constrained applications, they even have the configuration memory on die. It's one-time programmable and needs external Vpp to program (presumably Silego didn't want to waste die area on charge pumps that would only be used once) but has a SRAM programming mode for prototyping.
-
The best part is that the development software (GreenPak Designer) is free of charge and provided for all major operating systems including Linux! Unfortunately, the only supported design entry method is schematic entry and there's no way to write your design in a HDL.
-
While schematics may be fine for quick tinkering on really simple designs, they quickly get unwieldy. The nightmare of a circuit shown below is just a bunch of counters hooked up to LEDs that blink at various rates.
-
-
-
-
-
-
- Schematic from hell!
-
-
-
-
As if this wasn't enough of a problem, the largest GreenPak4 device (the SLG46620V) is split into two halves with limited routing between them, and the GUI doesn't help the user manage this complexity at all - you have to draw your schematic in two halves and add "cross connections" between them.
-
The icing on the cake is that schematics are a pain to diff and collaborate on. Although GreenPak schematics are XML based, which is a touch better than binary, who wants to read a giant XML diff and try to figure out what's going on in the circuit?
-
This isn't going to be a post on the quirks of Silego's software, though - that would be boring. As it turns out, there's one more exciting feature of these chips that I didn't mention earlier: the configuration bitstream is 100% documented in the device datasheet! This is unheard of in the programmable logic world. As Nick of Arachnid Labs says , the chip is "just dying for someone to write a VHDL or Verilog compiler for it". As you can probably guess by from the title of this post, I've been busy doing exactly that.
-
Great! How does it work?
-
Rather than wasting time writing a synthesizer, I decided to write a GreenPak technology library for Clifford Wolf's excellent open source synthesis tool, Yosys , and then make a place-and-route tool to turn that into a final netlist. The post-PAR netlist can then be loaded into GreenPak Designer in order to program the device.
-
The first step of the process is to run the "synth_greenpak4" Yosys flow on the Verilog source. This runs a generic RTL synthesis pass, then some coarse-grained extraction passes to infer shift register and counter cells from behavioral logic, and finally maps the remaining logic to LUT/FF cells and outputs a JSON-formatted netlist.
-
Once the design has been synthesized, my tool (named, surprisingly, gp4par) is then launched on the netlist. It begins by parsing the JSON and constructing a directed graph of cell objects in memory. A second graph, containing all of the primitives in the device and the legal connections between them, is then created based on the device specified on the command line. (As of now only the SLG46620V is supported; the SLG46621V can be added fairly easily but the SLG46140V has a slightly different microarchitecture which will require a bit more work to support.)
-
After the graphs are generated, each node in the netlist graph is assigned a numeric label identifying the type of cell and each node in the device graph is assigned a list of legal labels: for example, an I/O buffer site is legal for an input buffer, output buffer, or bidirectional buffer.
-
-
-
-
-
-
- Example labeling for a subset of the netlist and device graphs
-
-
-
-
The labeled nodes now need to be placed. The initial placement uses a simple greedy algorithm to create a valid (although not necessarily optimal or even routable) placement:
-
- Loop over the cells in the netlist. If any cell has a LOC constraint, which locks the cell to a specific physical site, attempt to assign the node to the specified site. If the specified node is the wrong type, doesn't exist, or is already used by another constrained node, the constraint is invalid so fail with an error.
- Loop over all of the unconstrained cells in the netlist and assign them to the first unused site with the right label. If none are available, the design is too big for the device so fail with an error.
-
-
Once the design is placed, the placement optimizer then loops over the design and attempts to improve it. A simulated annealing algorithm is used, where changes to the design are accepted unconditionally if they make the placement better, and with a random, gradually decreasing probability if they make it worse. The optimizer terminates when the design receives a perfect score (indicating an optimal placement) or if it stops making progress for several iterations. Each iteration does the following:
-
- Compute a score for the current design based on the number of unroutable nets, the amount of routing congestion (number of nets crossing between halves of the device), and static timing analysis (not yet implemented, always zero).
- Make a list of nodes that contributed to this score in some way (having some attached nets unroutable, crossing to the other half of the device, or failing timing).
- Remove nodes from the list that are LOC'd to a specific location since we're not allowed to move them.
- Remove nodes from the list that have only one legal placement in the device (for example, oscillator hard IP) since there's nowhere else for them to go.
- Pick a node from the remainder of the list at random. Call this our pivot.
- Find a list of candidate placements for the pivot:
-
- Consider all routable placements in the other half of the device.
- If none were found, consider all routable placements anywhere in the device.
- If none were found, consider all placements anywhere in the device even if they're not routable.
-
- Pick one of the candidates at random and move the pivot to that location. If another cell in the netlist is already there, put it in the vacant site left by the pivot.
- Re-compute the score for the design. If it's better, accept this change and start the next iteration.
- If the score is worse, accept it with a random probability which decreases as the iteration number goes up. If the change is not accepted, restore the previous placement.
-
-
After optimization, the design is checked for routability. If any edges in the netlist graph don't correspond to edges in the device graph, the user probably asked for something impossible (for example, trying to hook a flipflop's output to a comparator's reference voltage input) so fail with an error.
-
The design is then routed. This is quite simple due to the crossbar structure of the device. For each edge in the netlist:
-
- If dedicated (non-fabric) routing is used for this path, configure the destination's input mux appropriately and stop.
- If the source and destination are in the same half of the device, configure the destination's input mux appropriately and stop.
- A cross-connection must be used. Check if we already used one to bring the source signal to the other half of the device. If found, configure the destination to route from that cross-connection and stop.
- Check if we have any cross-connections left going in this direction. If they're all used, the design is unroutable due to congestion so fail with an error.
- Pick the next unused cross-connection and configure it to route from the source. Configure the destination to route from the cross-connection and stop.
-
-
Once routing is finished, run a series of post-PAR design rule checks. These currently include the following:
-
- If any node has no loads, generate a warning
- If an I/O buffer is connected to analog hard IP, fail with an error if it's not configured in analog mode.
- Some signals (such as comparator inputs and oscillator power-down controls) are generated by a shared mux and fed to many loads. If different loads require conflicting settings for the shared mux, fail with an error.
-
-
If DRC passes with no errors, configure all of the individual cells in the netlist based on the HDL parameters. Fail with an error if an invalid configuration was requested.
-
Finally, generate the bitstream from all of the per-cell configuration and write it to a file.
-
Great, let's get started!
-
If you don't already have one, you'll need to buy a GreenPak4 development kit . The kit includes samples of the SLG46620V (among other devices) and a programmer/emulation board. While you're waiting for it to arrive, install GreenPak Designer .
-
Download and install Yosys. Although Clifford is pretty good at merging my pull requests, only my fork on Github is guaranteed to have the most up-to-date support for GreenPak devices so don't be surprised if you can't use a bleeding-edge feature with mainline Yosys.
-
Download and install gp4par. You can get it from the Github repository .
-
Write your HDL, compile with Yosys, P&R with gp4par, and import the bitstream into GreenPak Designer to program the target device. The most current gp4par manual is included in LaTeX source form in the source tree and is automatically built as part of the compile process. If you're just browsing, there's a relatively recent PDF version on my web server.
-
If you'd like to see the Verilog that produced the nightmare of a schematic I showed above, here it is .
-
Be advised that this project is still very much a work in progress and there are still a number of SLG46620V features I don't support (see the manual for exact details).
-
I love it / it segfaulted / there's a problem in the manual!
-
Hop in our IRC channel (##openfpga on Freenode) and let me know. Feedback is great, pull requests are even better,
-
You're competing with Silego's IDE. Have they found out and sued you yet?
-
Nope. They're fully aware of what I'm doing and are rolling out the red carpet for me. They love the idea of a HDL flow as an alternative to schematic entry and are pretty amazed at how fast it's coming together.
-
After I reported a few bugs in their datasheets they decided to skip the middleman and give me direct access to the engineer who writes their documentation so that I can get faster responses. The last time I found a problem (two different parts of the datasheet contradicted each other) an updated datasheet was in my inbox and on their website by the next day. I only wish Xilinx gave me that kind of treatment!
-
They've even offered me free hardware to help me add support for their latest product family, although I plan to get GreenPak4 support to a more stable state before taking them up on the offer.
-
So what's next?
-
Better testing, for starters. I have to verify functionality by hand with a DMM and oscilloscope, which is time consuming.
-
My contact at Silego says they're going to be giving me documentation on the SRAM emulation interface soon, so I'm going to make a hardware-in-loop test platform that connects to my desktop and the Silego ZIF socket, and lets me load new bitstreams via a scriptable interface. It'll have FPGA-based digital I/O as well as an ADC and DAC on every device pin, plus an adjustable voltage regulator for power, so I can feed in arbitrary mixed-signal test waveforms and write PC-based unit tests to verify correct behavior.
-
Other than that, I want to finish support for the SLG46620V in the next month or two. The SLG46621V will be an easy addition since only one pin and the relevant configuration bits have changed from the 46620 (I suspect they're the same die, just bonded out differently).
-
Once that's done I'll have to do some more extensive work to add the SLG46140V since the architecture is a bit different (a lot of the combinatorial logic is merged into multi-function blocks). Luckily, the 46140 has a lot in common architecturally with the GreenPak5 family, so once that's done GreenPak5 will probably be a lot easier to add support for.
-
My thanks go out to Clifford Wolf, whitequark, the IRC users in ##openfpga, and everyone at Silego I've worked with to help make this possible. I hope that one day this project will become mature enough that Silego will ship it as an officially supported extension to GreenPak Designer, making history by becoming the first modern programmable logic vendor to ship a fully open source synthesis and P&R suite.
-
-
\ No newline at end of file
+
+ I've written a couple of posts in the past few months but they were all for the blog at work so I figured I'm long overdue for one on Silicon Exposed.
+ So what's a GreenPak?
+
Silego Technology is a fabless semiconductor company located in the SF Bay area, which makes (among other things) a line of programmable logic devices known as GreenPak. Their 5th generation parts were just announced, but I started this project before that happened so I'm still targeting the 4th generation .
GreenPak devices are kind of like itty bitty PSoCs - they have a mixed signal fabric with an ADC, DACs, comparators, voltage references, plus a digital LUT/FF fabric and some typical digital MCU peripherals like counters and oscillators (but no CPU).
It's actually an interesting architecture - FPGAs (including some devices marketed as CPLDs) are a 2D array of LUTs connected via wires to adjacent cells, and true (product term) CPLDs are a star topology of AND-OR arrays connected by a crossbar. GreenPak, on the other hand, is a star topology of LUTs, flipflops, and analog/digital hard IP connected to a crossbar.
Without further ado, here's a block diagram showing all the cool stuff you get in the SLG46620V:
+
+
+ SLG46620V block diagram (from device datasheet)
+
+ They're also tiny (the SLG46620V is a 20-pin 0.4mm pitch STQFN measuring 2x3 mm, and the lower gate count SLG46140V is a mere 1.6x2 mm) and probably the cheapest programmable logic device on the market - $0.50 in low volume and less than $0.40 in larger quantities.
The Vdd range of GreenPak4 is huge, more like what you'd expect from an MCU than an FPGA! It can run on anything from 1.8 to 5V, although performance is only specified at 1.8, 3.3, and 5V nominal voltages. There's also a dual-rail version that trades one of the GPIO pins for a second power supply pin, allowing you to interface to logic at two different voltage levels.
To support low-cost/space-constrained applications, they even have the configuration memory on die. It's one-time programmable and needs external Vpp to program (presumably Silego didn't want to waste die area on charge pumps that would only be used once) but has a SRAM programming mode for prototyping.
The best part is that the development software (GreenPak Designer) is free of charge and provided for all major operating systems including Linux! Unfortunately, the only supported design entry method is schematic entry and there's no way to write your design in a HDL.
While schematics may be fine for quick tinkering on really simple designs, they quickly get unwieldy. The nightmare of a circuit shown below is just a bunch of counters hooked up to LEDs that blink at various rates.
+
+
+ Schematic from hell!
+
+ As if this wasn't enough of a problem, the largest GreenPak4 device (the SLG46620V) is split into two halves with limited routing between them, and the GUI doesn't help the user manage this complexity at all - you have to draw your schematic in two halves and add "cross connections" between them.
The icing on the cake is that schematics are a pain to diff and collaborate on. Although GreenPak schematics are XML based, which is a touch better than binary, who wants to read a giant XML diff and try to figure out what's going on in the circuit?
This isn't going to be a post on the quirks of Silego's software, though - that would be boring. As it turns out, there's one more exciting feature of these chips that I didn't mention earlier: the configuration bitstream is 100% documented in the device datasheet! This is unheard of in the programmable logic world. As Nick of Arachnid Labs says , the chip is "just dying for someone to write a VHDL or Verilog compiler for it". As you can probably guess by from the title of this post, I've been busy doing exactly that.
+ Great! How does it work?
+
Rather than wasting time writing a synthesizer, I decided to write a GreenPak technology library for Clifford Wolf's excellent open source synthesis tool, Yosys , and then make a place-and-route tool to turn that into a final netlist. The post-PAR netlist can then be loaded into GreenPak Designer in order to program the device.
The first step of the process is to run the "synth_greenpak4" Yosys flow on the Verilog source. This runs a generic RTL synthesis pass, then some coarse-grained extraction passes to infer shift register and counter cells from behavioral logic, and finally maps the remaining logic to LUT/FF cells and outputs a JSON-formatted netlist.
Once the design has been synthesized, my tool (named, surprisingly, gp4par) is then launched on the netlist. It begins by parsing the JSON and constructing a directed graph of cell objects in memory. A second graph, containing all of the primitives in the device and the legal connections between them, is then created based on the device specified on the command line. (As of now only the SLG46620V is supported; the SLG46621V can be added fairly easily but the SLG46140V has a slightly different microarchitecture which will require a bit more work to support.)
After the graphs are generated, each node in the netlist graph is assigned a numeric label identifying the type of cell and each node in the device graph is assigned a list of legal labels: for example, an I/O buffer site is legal for an input buffer, output buffer, or bidirectional buffer.
+
+
+ Example labeling for a subset of the netlist and device graphs
+
+ The labeled nodes now need to be placed. The initial placement uses a simple greedy algorithm to create a valid (although not necessarily optimal or even routable) placement:
Loop over the cells in the netlist. If any cell has a LOC constraint, which locks the cell to a specific physical site, attempt to assign the node to the specified site. If the specified node is the wrong type, doesn't exist, or is already used by another constrained node, the constraint is invalid so fail with an error.
+ Loop over all of the unconstrained cells in the netlist and assign them to the first unused site with the right label. If none are available, the design is too big for the device so fail with an error.
+
+ Once the design is placed, the placement optimizer then loops over the design and attempts to improve it. A simulated annealing algorithm is used, where changes to the design are accepted unconditionally if they make the placement better, and with a random, gradually decreasing probability if they make it worse. The optimizer terminates when the design receives a perfect score (indicating an optimal placement) or if it stops making progress for several iterations. Each iteration does the following:
Compute a score for the current design based on the number of unroutable nets, the amount of routing congestion (number of nets crossing between halves of the device), and static timing analysis (not yet implemented, always zero).
+ Make a list of nodes that contributed to this score in some way (having some attached nets unroutable, crossing to the other half of the device, or failing timing).
+ Remove nodes from the list that are LOC'd to a specific location since we're not allowed to move them.
+ Remove nodes from the list that have only one legal placement in the device (for example, oscillator hard IP) since there's nowhere else for them to go.
+ Pick a node from the remainder of the list at random. Call this our pivot.
+ Find a list of candidate placements for the pivot:
+ Consider all routable placements in the other half of the device.
+ If none were found, consider all routable placements anywhere in the device.
+ If none were found, consider all placements anywhere in the device even if they're not routable.
+ Pick one of the candidates at random and move the pivot to that location. If another cell in the netlist is already there, put it in the vacant site left by the pivot.
+ Re-compute the score for the design. If it's better, accept this change and start the next iteration.
+ If the score is worse, accept it with a random probability which decreases as the iteration number goes up. If the change is not accepted, restore the previous placement.
+
+ After optimization, the design is checked for routability. If any edges in the netlist graph don't correspond to edges in the device graph, the user probably asked for something impossible (for example, trying to hook a flipflop's output to a comparator's reference voltage input) so fail with an error.
The design is then routed. This is quite simple due to the crossbar structure of the device. For each edge in the netlist:
If dedicated (non-fabric) routing is used for this path, configure the destination's input mux appropriately and stop.
+ If the source and destination are in the same half of the device, configure the destination's input mux appropriately and stop.
+ A cross-connection must be used. Check if we already used one to bring the source signal to the other half of the device. If found, configure the destination to route from that cross-connection and stop.
+ Check if we have any cross-connections left going in this direction. If they're all used, the design is unroutable due to congestion so fail with an error.
+ Pick the next unused cross-connection and configure it to route from the source. Configure the destination to route from the cross-connection and stop.
+
+ Once routing is finished, run a series of post-PAR design rule checks. These currently include the following:
If any node has no loads, generate a warning
+ If an I/O buffer is connected to analog hard IP, fail with an error if it's not configured in analog mode.
+ Some signals (such as comparator inputs and oscillator power-down controls) are generated by a shared mux and fed to many loads. If different loads require conflicting settings for the shared mux, fail with an error.
+
+ If DRC passes with no errors, configure all of the individual cells in the netlist based on the HDL parameters. Fail with an error if an invalid configuration was requested.
Finally, generate the bitstream from all of the per-cell configuration and write it to a file.
+ Great, let's get started!
+ If you don't already have one, you'll need to buy a GreenPak4 development kit . The kit includes samples of the SLG46620V (among other devices) and a programmer/emulation board. While you're waiting for it to arrive, install GreenPak Designer .
Download and install Yosys. Although Clifford is pretty good at merging my pull requests, only my fork on Github is guaranteed to have the most up-to-date support for GreenPak devices so don't be surprised if you can't use a bleeding-edge feature with mainline Yosys.
Download and install gp4par. You can get it from the Github repository .
Write your HDL, compile with Yosys, P&R with gp4par, and import the bitstream into GreenPak Designer to program the target device. The most current gp4par manual is included in LaTeX source form in the source tree and is automatically built as part of the compile process. If you're just browsing, there's a relatively recent PDF version on my web server.
If you'd like to see the Verilog that produced the nightmare of a schematic I showed above, here it is .
Be advised that this project is still very much a work in progress and there are still a number of SLG46620V features I don't support (see the manual for exact details).
+ I love it / it segfaulted / there's a problem in the manual!
+ Hop in our IRC channel (##openfpga on Freenode) and let me know. Feedback is great, pull requests are even better,
+ You're competing with Silego's IDE. Have they found out and sued you yet?
+ Nope. They're fully aware of what I'm doing and are rolling out the red carpet for me. They love the idea of a HDL flow as an alternative to schematic entry and are pretty amazed at how fast it's coming together.
After I reported a few bugs in their datasheets they decided to skip the middleman and give me direct access to the engineer who writes their documentation so that I can get faster responses. The last time I found a problem (two different parts of the datasheet contradicted each other) an updated datasheet was in my inbox and on their website by the next day. I only wish Xilinx gave me that kind of treatment!
They've even offered me free hardware to help me add support for their latest product family, although I plan to get GreenPak4 support to a more stable state before taking them up on the offer.
+ So what's next?
+
Better testing, for starters. I have to verify functionality by hand with a DMM and oscilloscope, which is time consuming.
My contact at Silego says they're going to be giving me documentation on the SRAM emulation interface soon, so I'm going to make a hardware-in-loop test platform that connects to my desktop and the Silego ZIF socket, and lets me load new bitstreams via a scriptable interface. It'll have FPGA-based digital I/O as well as an ADC and DAC on every device pin, plus an adjustable voltage regulator for power, so I can feed in arbitrary mixed-signal test waveforms and write PC-based unit tests to verify correct behavior.
Other than that, I want to finish support for the SLG46620V in the next month or two. The SLG46621V will be an easy addition since only one pin and the relevant configuration bits have changed from the 46620 (I suspect they're the same die, just bonded out differently).
Once that's done I'll have to do some more extensive work to add the SLG46140V since the architecture is a bit different (a lot of the combinatorial logic is merged into multi-function blocks). Luckily, the 46140 has a lot in common architecturally with the GreenPak5 family, so once that's done GreenPak5 will probably be a lot easier to add support for.
My thanks go out to Clifford Wolf, whitequark, the IRC users in ##openfpga, and everyone at Silego I've worked with to help make this possible. I hope that one day this project will become mature enough that Silego will ship it as an officially supported extension to GreenPak Designer, making history by becoming the first modern programmable logic vendor to ship a fully open source synthesis and P&R suite.
+
+
\ No newline at end of file
diff --git a/test/test-pages/buzzfeed-1/expected-metadata.json b/test/test-pages/buzzfeed-1/expected-metadata.json
index d5eca27e..5b04b831 100644
--- a/test/test-pages/buzzfeed-1/expected-metadata.json
+++ b/test/test-pages/buzzfeed-1/expected-metadata.json
@@ -1,5 +1,4 @@
{
"Title": "Student Dies After Diet Pills She Bought Online \"Burned Her Up From Within\"",
- "Author": "Mark Di Stefano",
- "Excerpt": "An inquest into Eloise Parry's death has been adjourned until July..."
+ "Excerpt": "An inquest into Eloise Parry's death has been adjourned until July."
}
diff --git a/test/test-pages/clean-links/expected.html b/test/test-pages/clean-links/expected.html
index 15d43471..eb620776 100644
--- a/test/test-pages/clean-links/expected.html
+++ b/test/test-pages/clean-links/expected.html
@@ -1,4 +1,4 @@
-
+
Study Webtext
diff --git a/test/test-pages/cnn/expected.html b/test/test-pages/cnn/expected.html
index 0aafe570..552455fe 100644
--- a/test/test-pages/cnn/expected.html
+++ b/test/test-pages/cnn/expected.html
@@ -1,38 +1,51 @@
-
-
-
The U.S. has long been heralded as a land of opportunity -- a place where anyone can succeed regardless of the economic class they were born into.
-
But a new report released on Monday by Stanford University's Center on Poverty and Inequality calls that into question.
-
The report assessed poverty levels, income and wealth inequality, economic mobility and unemployment levels among 10 wealthy countries with social welfare programs.
-
-
-
-
-
-
Powered by SmartAsset.com
-
-
-
-
-
-
Among its key findings: the class you're born into matters much more in the U.S. than many of the other countries.
-
As the report states : "[T]he birth lottery matters more in the U.S. than in most well-off countries."
-
But this wasn't the only finding that suggests the U.S. isn't quite living up to its reputation as a country where everyone has an equal chance to get ahead through sheer will and hard work.
-
Related: Rich are paying more in taxes but not as much as they used to
-
The report also suggested the U.S. might not be the "jobs machine" it thinks it is, when compared to other countries.
-
It ranked near the bottom of the pack based on the levels of unemployment among men and women of prime working age. The study determined this by taking the ratio of employed men and women between the ages of 25 and 54 compared to the total population of each country.
-
The overall rankings of the countries were as follows: 1. Finland 2. Norway 3. Australia 4. Canada 5. Germany 6. France 7. United Kingdom 8. Italy 9. Spain 10. United States
-
-
-
-
-
-
-
-
-
-
The low ranking the U.S. received was due to its extreme levels of wealth and income inequality and the ineffectiveness of its "safety net" -- social programs aimed at reducing poverty.
-
Related: Chicago is America's most segregated city
-
The report concluded that the American safety net was ineffective because it provides only half the financial help people need. Additionally, the levels of assistance in the U.S. are generally lower than in other countries.
-
CNNMoney (New York) First published February 1, 2016: 1:28 AM ET
-
-
\ No newline at end of file
+
+
+
+
The U.S. has long been heralded as a land of opportunity -- a place where anyone can succeed regardless of the economic class they were born into.
+
But a new report released on Monday by Stanford University's Center on Poverty and Inequality calls that into question.
+
+
The report assessed poverty levels, income and wealth inequality, economic mobility and unemployment levels among 10 wealthy countries with social welfare programs.
+
+
+
+
+
+
+ Powered by SmartAsset.com
+
+
+
+
+
+
+
+
+
+
+
+
+
Among its key findings: the class you're born into matters much more in the U.S. than many of the other countries.
+
As the report states : "[T]he birth lottery matters more in the U.S. than in most well-off countries."
+
+
But this wasn't the only finding that suggests the U.S. isn't quite living up to its reputation as a country where everyone has an equal chance to get ahead through sheer will and hard work.
+
Related: Rich are paying more in taxes but not as much as they used to
+
+
The report also suggested the U.S. might not be the "jobs machine" it thinks it is, when compared to other countries.
+
It ranked near the bottom of the pack based on the levels of unemployment among men and women of prime working age. The study determined this by taking the ratio of employed men and women between the ages of 25 and 54 compared to the total population of each country.
+
The overall rankings of the countries were as follows: 1. Finland 2. Norway 3. Australia 4. Canada 5. Germany 6. France 7. United Kingdom 8. Italy 9. Spain 10. United States
+
+
+
+
+
+
+
+
+
+
The low ranking the U.S. received was due to its extreme levels of wealth and income inequality and the ineffectiveness of its "safety net" -- social programs aimed at reducing poverty.
+
Related: Chicago is America's most segregated city
+
The report concluded that the American safety net was ineffective because it provides only half the financial help people need. Additionally, the levels of assistance in the U.S. are generally lower than in other countries.
+
+
+
CNNMoney (New York) First published February 1, 2016: 1:28 AM ET
+
\ No newline at end of file
diff --git a/test/test-pages/ehow-2/expected-metadata.json b/test/test-pages/ehow-2/expected-metadata.json
index 653912ee..2967b612 100644
--- a/test/test-pages/ehow-2/expected-metadata.json
+++ b/test/test-pages/ehow-2/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "How to Throw a Graduation Party on a Budget (with Pictures)",
+ "Title": "How to Throw a Graduation Party on a Budget | eHow",
"Author": "Gina Roberts-Grey",
- "Excerpt": "How to Throw a Graduation Party on a Budget. Graduation parties are a great way to commemorate the years of hard work teens and college co-eds devote to education. They’re also costly for mom and dad.The average cost of a graduation party in 2013 was a whopping $1,200, according to Graduationparty.com; $700 of that was allocated for food...."
+ "Excerpt": "Graduation parties are a great way to commemorate the years of hard work teens and college co-eds devote to education. They’re also costly for mom and dad.The average cost of a graduation party in 2013 was a whopping $1,200, according to Graduationparty.com; $700 of that was allocated for food. However that budget was based on Midwestern..."
}
diff --git a/test/test-pages/ehow-2/expected.html b/test/test-pages/ehow-2/expected.html
index e3d4256e..ea7d138e 100644
--- a/test/test-pages/ehow-2/expected.html
+++ b/test/test-pages/ehow-2/expected.html
@@ -6,11 +6,7 @@
-
-
-
-
Follow
-
+
Last updated September 14, 2016
diff --git a/test/test-pages/engadget/expected.html b/test/test-pages/engadget/expected.html
index f80f9a47..29d4c038 100644
--- a/test/test-pages/engadget/expected.html
+++ b/test/test-pages/engadget/expected.html
@@ -1,4 +1,4 @@
-
+
diff --git a/test/test-pages/gmw/expected.html b/test/test-pages/gmw/expected.html
index 95354944..13ed0146 100644
--- a/test/test-pages/gmw/expected.html
+++ b/test/test-pages/gmw/expected.html
@@ -1,45 +1,58 @@
-
-
-
翱翔于距地球数千公里的太空中,进入广袤漆黑的未知领域,是一项艰苦卓绝的工作。这让人感到巨大压力和极度恐慌。那么,为什么不能让宇航员来一杯“地球末日”鸡尾酒来放松一下?
-
不幸的是,对于希望能喝上一杯的太空探险者,那些将他们送上太空的政府机构普遍禁止他们染指包括酒在内的含酒精饮料。
-
但是,很快普通人都会有机会向人类“最终的边疆”出发——以平民化旅行的形式,去探索和殖民火星。确实,火星之旅将是一次令人感到痛苦的旅行,可能一去不复返并要几年时间才能完成,但是否应该允许参与者在旅程中痛饮一番?或至少携带能在火星上发酵自制酒精饮料的设备?
-
-
图注:巴兹?奥尔德林(Buzz Aldrin)可能是第二个在月球上行走的人,但他是第一个在月球上喝酒的人
-
事实是,历史上酒与太空探险有一种复杂的关系。让我们来看看喝了酒的航天员究竟会发生什么—— 如果我们开始给予进入太空的人类更大的自由度,又可能会发生什么。
-
人们普遍认为,当一个人所处的海拔越高,喝醉后会越容易感到头昏。因此,人们自然地想到,当人身处地球轨道上时,饮酒会对人体有更强烈的致眩作用。但这种说法可能不是正确的。
-
事实上,有证据表明,早在上世纪八十年代就澄清了这一传言。1985年,美国联邦航空管理局(UFAA)开展了一项研究,以验证人在不同的海拔高度饮酒,是否会影响执行复杂任务时的表现和酒精测定仪的读数。
-
在这项研究中,17名男子被要求在地面和一间模拟海拔3.7公里的房间内喝下一些伏特加。然后,他们被要求完成各种任务,包括心算口算问题、用操纵杆在示波器上跟踪灯光以及各种其它测试。研究人员发现,“酒精和海拔高度对酒精测定仪读数或完成任务的表现情况没有交互作用”。
-
所以,人乘坐飞机时醉得更快是个传说?纽约州立大学(State University of New York,SUNY)社会学荣誉教授戴夫·汉森(Dave Hanson)研究酒精和饮酒超过40年,他认为确实如此。他说:“我不认为它(在太空中饮酒)会有任何不同。”
-
他认为高原反应可能类似于宿醉,但它也可能类似于中毒。他说:“如果人们没有感受到充分的大气压力,他们也会觉得喝醉了一样。”
-
相反,那些声称在飞机上比在地面上醉得更快的人,可能只是经历了“自认喝醉(think-drink)”效应,这种效应多年来已被广泛研究。它表明,如果人们认为自己喝醉了,那他们的一举一动会真的像喝醉了一样—— 而不是实际上他们真的醉了。
-
汉森指出:“如果人们脑子里一直认为在飞机上酒精会对他们产生与平常不同的作用,那么他们乘坐飞机时真的会觉得酒精对他们产生了不同的作用。”
-
所以,如果酒精对人体的物理效应与海拔高度无关,那么在国际空间站上睡前小饮一杯不应该是一个大问题,对吧?错了。
-
美国宇航局约翰逊航天中心发言人丹尼尔·霍特(Daniel Huot)表示:“国际空间站上的宇航员不允许喝酒。在国际空间站上,酒精和其它挥发性化合物的使用受到控制,因为它们的挥发物可能对该站的水回收系统产生影响。”
-
为此,国际空间站上的宇航员甚至没有被提供含有酒精的产品,例如漱口水、香水或须后水。如果在国际空间站上饮酒狂欢,溢出的啤酒也可能存在损坏设备的风险。
-
-
图注:测试表明,有关人在高空中喝酒更容易醉的传言是不正确的
-
然后是责任的问题。我们不允许汽车司机或飞机飞行员喝醉后驾驶,所以并不奇怪同样的规则适用于国际空间站上的宇航员。毕竟国际空间站的造价高达1500亿美元,而且在接近真空的太空中其运行速度达到了每小时27680公里。
-
然而,2007年,美国宇航局(NASA)成立了一个负责调查宇航员健康状况的独立小组,称历史上该机构至少有两名宇航员在即将飞行前喝了大量的酒,但仍然被允许飞行。Nasa安全负责人随后的审查发现并没有证据支持这一指控。宇航员在飞行前12小时是严禁饮酒的,因为他们需要充分的思维能力和清醒的意识。
-
出台这一规则的原因很清楚。在1985年UFAA开展的关于酒精在不同海拔高度影响的研究中,研究人员得出结论,酒精的影响与海拔高度无关。无论参与测试的人员在什么海拔高度喝酒,其酒精测量仪的读数都是一样的。他们的行为表现受到的影响也相同,但如果提供给测试人员的是安慰剂,则身处高空比身处海平面的行为表现要更差一些。这表明,无论是否摄入酒精,海拔高度可能对心理表现有轻微的影响。
-
国际空间站禁止享用啤酒等有大量泡沫的饮料,可能有另一个原因:没有重力的帮助,液体和气体会在宇航员的胃里不停地翻滚,导致他们不断地打嗝。
-
然而,尽管有严格的规则,这并不意味着太空中的人类不会接触发酵液体。在国际空间站上进行了大量有关酒精的实验—— 但没有发生让众人去饮酒的情况,所以没有人真正了解太空中人体对酒精具体有怎样的反应。
-
NASA发言人斯蒂芬妮?席尔霍尔茨(Stephanie Schierhol)表示:“我们研究了太空中宇航员身体的各种变化,包括微生物层面的。我们有一个营养计划,以确保他们的身体获得保持健康所需要的营养。显然,在实施‘天空实验室(skylab)’项目时,他们曾将雪利酒与宇航员一起送到太空中,但宇航员在零重力飞行时使用雪利酒的测试结果不太好。”天空实验室是美国第一座空间站。
-
席尔霍尔茨补充说,在测试中使用雪利酒“引发呕吐反射,公众也反对”。
-
也许最令人惊讶的是,人类在月球表面上喝的第一种液体是葡萄酒。前NASA宇航员巴兹·奥尔德林(Buzz Aldrin)在采访和他撰写的书中表示,1969年,在和尼尔·阿姆斯特朗(Neil Armstrong)走出登月舱之前的圣餐仪式上,他喝了少量葡萄酒。举行这一仪式时与地面的通信出现了暂停,因此这一过程从来没有播出。
-
虽然Nasa对太空中酒精的使用有严格的规定,但在这方面俄罗斯过去似乎更为宽松。在其“和平号”空间站上,宇航员允许喝点干邑和伏特加。当他们发现国际空间站将严格禁止饮酒时,显然有不少怨言。
-
然而,奇怪的是,酒仍然能通过各种方式出现在国际空间站上。2015年,日本酿酒商三得利(Suntory)的全球创新中心将该公司一些获奖的威士忌运送到国际空间站,参与一项旨在验证“能否通过利用微重力环境增强酒精饮料醇厚性”的实验。换句话说,在微重力下酒的陈酿过程可能不同,导致它的陈酿进程更快、味道更好。对此,地球上的每家酿酒商都想进一步地了解。
-
几年前,即2011年9月至2014年9月,Nasa赞助了一个试验,研究微重力环境对威士忌中未发酵麦芽与烧焦橡木颗粒的影响,这两种物质能对威士忌的陈酿起帮助作用。在太空中逗留将近1000天后,用于测试的威士忌的单宁成分保持不变——但是太空中橡木颗粒产生了更高浓度的木质素分解产物,这种物质能赋予威士忌特别的风味。
-
Nasa表示:“这种试验不仅对麦芽威士忌行业有影响,而且对整个食品和饮料行业也有影响。送上太空的威士忌与对照样品之间的风味差异是如此显著,需要进一步分析以破解不同口味产生的原因。”
-
因此,即使宇航员自己被禁止在地球轨道上饮酒,但他们正在做的工作可以提高在地上消费的酒的质量。
-
相比之下,执行登陆火星任务的人将远离家乡几年,而不是几个月,因此可能会有人提出有关禁止饮酒的规定可以放松一些。
-
然而,像戴夫?汉森这样的专家认为,继续禁止饮酒并没有什么害处。除了实际的安全问题,饮酒还可能有其它挑战。汉森认为,地球人存在许多社会文化方面的差异,而且人连续几年时间呆在一个狭小的空间里,很容易突然发怒,这些因素都使饮酒问题变得很棘手。
-
-
图注:奥尔德林的圣餐杯回到了地球上
-
他说:“这是一个政治问题,也是一个文化方面的问题,但不是一个科学上的问题。这将是未来一个可能产生冲突领域,因为人们具有不同的文化背景,他们对饮酒的态度不同。”他进一步指出,如果你与穆斯林、摩门教徒或禁酒主义者分配在同一间宿舍怎么办?面对未来人们可能在一个没有期限的时间内呆在一个有限的空间里,需要“尽早解决”如何协调不同文化观点的问题。
-
所以,当宇航员在地球轨道上时,将还不得不满足于通过欣赏外面的景色来振作精神,而不要指望沉溺于烈酒中。我们留在地球上的人,则可以准备好适量的香槟酒,以迎接他们的归来。
-
原标题:他晚于阿姆斯特朗登月 却是首个敢在月球喝酒的人
-
出品︱网易科学人栏目组 胖胖
-
作者︱春春
-
[责任编辑:肖春芳]
-
-
\ No newline at end of file
+
+
2017-03-10 09:58 来源:网易科学人
+
+
+
+
翱翔于距地球数千公里的太空中,进入广袤漆黑的未知领域,是一项艰苦卓绝的工作。这让人感到巨大压力和极度恐慌。那么,为什么不能让宇航员来一杯“地球末日”鸡尾酒来放松一下?
+
不幸的是,对于希望能喝上一杯的太空探险者,那些将他们送上太空的政府机构普遍禁止他们染指包括酒在内的含酒精饮料。
+
但是,很快普通人都会有机会向人类“最终的边疆”出发——以平民化旅行的形式,去探索和殖民火星。确实,火星之旅将是一次令人感到痛苦的旅行,可能一去不复返并要几年时间才能完成,但是否应该允许参与者在旅程中痛饮一番?或至少携带能在火星上发酵自制酒精饮料的设备?
+
+
+ 图注:巴兹?奥尔德林(Buzz Aldrin)可能是第二个在月球上行走的人,但他是第一个在月球上喝酒的人
+
+
事实是,历史上酒与太空探险有一种复杂的关系。让我们来看看喝了酒的航天员究竟会发生什么—— 如果我们开始给予进入太空的人类更大的自由度,又可能会发生什么。
+
人们普遍认为,当一个人所处的海拔越高,喝醉后会越容易感到头昏。因此,人们自然地想到,当人身处地球轨道上时,饮酒会对人体有更强烈的致眩作用。但这种说法可能不是正确的。
+
事实上,有证据表明,早在上世纪八十年代就澄清了这一传言。1985年,美国联邦航空管理局(UFAA)开展了一项研究,以验证人在不同的海拔高度饮酒,是否会影响执行复杂任务时的表现和酒精测定仪的读数。
+
在这项研究中,17名男子被要求在地面和一间模拟海拔3.7公里的房间内喝下一些伏特加。然后,他们被要求完成各种任务,包括心算口算问题、用操纵杆在示波器上跟踪灯光以及各种其它测试。研究人员发现,“酒精和海拔高度对酒精测定仪读数或完成任务的表现情况没有交互作用”。
+
所以,人乘坐飞机时醉得更快是个传说?纽约州立大学(State University of New York,SUNY)社会学荣誉教授戴夫·汉森(Dave Hanson)研究酒精和饮酒超过40年,他认为确实如此。他说:“我不认为它(在太空中饮酒)会有任何不同。”
+
他认为高原反应可能类似于宿醉,但它也可能类似于中毒。他说:“如果人们没有感受到充分的大气压力,他们也会觉得喝醉了一样。”
+
相反,那些声称在飞机上比在地面上醉得更快的人,可能只是经历了“自认喝醉(think-drink)”效应,这种效应多年来已被广泛研究。它表明,如果人们认为自己喝醉了,那他们的一举一动会真的像喝醉了一样—— 而不是实际上他们真的醉了。
+
汉森指出:“如果人们脑子里一直认为在飞机上酒精会对他们产生与平常不同的作用,那么他们乘坐飞机时真的会觉得酒精对他们产生了不同的作用。”
+
所以,如果酒精对人体的物理效应与海拔高度无关,那么在国际空间站上睡前小饮一杯不应该是一个大问题,对吧?错了。
+
美国宇航局约翰逊航天中心发言人丹尼尔·霍特(Daniel Huot)表示:“国际空间站上的宇航员不允许喝酒。在国际空间站上,酒精和其它挥发性化合物的使用受到控制,因为它们的挥发物可能对该站的水回收系统产生影响。”
+
为此,国际空间站上的宇航员甚至没有被提供含有酒精的产品,例如漱口水、香水或须后水。如果在国际空间站上饮酒狂欢,溢出的啤酒也可能存在损坏设备的风险。
+
+
+ 图注:测试表明,有关人在高空中喝酒更容易醉的传言是不正确的
+
+
然后是责任的问题。我们不允许汽车司机或飞机飞行员喝醉后驾驶,所以并不奇怪同样的规则适用于国际空间站上的宇航员。毕竟国际空间站的造价高达1500亿美元,而且在接近真空的太空中其运行速度达到了每小时27680公里。
+
然而,2007年,美国宇航局(NASA)成立了一个负责调查宇航员健康状况的独立小组,称历史上该机构至少有两名宇航员在即将飞行前喝了大量的酒,但仍然被允许飞行。Nasa安全负责人随后的审查发现并没有证据支持这一指控。宇航员在飞行前12小时是严禁饮酒的,因为他们需要充分的思维能力和清醒的意识。
+
出台这一规则的原因很清楚。在1985年UFAA开展的关于酒精在不同海拔高度影响的研究中,研究人员得出结论,酒精的影响与海拔高度无关。无论参与测试的人员在什么海拔高度喝酒,其酒精测量仪的读数都是一样的。他们的行为表现受到的影响也相同,但如果提供给测试人员的是安慰剂,则身处高空比身处海平面的行为表现要更差一些。这表明,无论是否摄入酒精,海拔高度可能对心理表现有轻微的影响。
+
国际空间站禁止享用啤酒等有大量泡沫的饮料,可能有另一个原因:没有重力的帮助,液体和气体会在宇航员的胃里不停地翻滚,导致他们不断地打嗝。
+
然而,尽管有严格的规则,这并不意味着太空中的人类不会接触发酵液体。在国际空间站上进行了大量有关酒精的实验—— 但没有发生让众人去饮酒的情况,所以没有人真正了解太空中人体对酒精具体有怎样的反应。
+
NASA发言人斯蒂芬妮?席尔霍尔茨(Stephanie Schierhol)表示:“我们研究了太空中宇航员身体的各种变化,包括微生物层面的。我们有一个营养计划,以确保他们的身体获得保持健康所需要的营养。显然,在实施‘天空实验室(skylab)’项目时,他们曾将雪利酒与宇航员一起送到太空中,但宇航员在零重力飞行时使用雪利酒的测试结果不太好。”天空实验室是美国第一座空间站。
+
席尔霍尔茨补充说,在测试中使用雪利酒“引发呕吐反射,公众也反对”。
+
也许最令人惊讶的是,人类在月球表面上喝的第一种液体是葡萄酒。前NASA宇航员巴兹·奥尔德林(Buzz Aldrin)在采访和他撰写的书中表示,1969年,在和尼尔·阿姆斯特朗(Neil Armstrong)走出登月舱之前的圣餐仪式上,他喝了少量葡萄酒。举行这一仪式时与地面的通信出现了暂停,因此这一过程从来没有播出。
+
虽然Nasa对太空中酒精的使用有严格的规定,但在这方面俄罗斯过去似乎更为宽松。在其“和平号”空间站上,宇航员允许喝点干邑和伏特加。当他们发现国际空间站将严格禁止饮酒时,显然有不少怨言。
+
然而,奇怪的是,酒仍然能通过各种方式出现在国际空间站上。2015年,日本酿酒商三得利(Suntory)的全球创新中心将该公司一些获奖的威士忌运送到国际空间站,参与一项旨在验证“能否通过利用微重力环境增强酒精饮料醇厚性”的实验。换句话说,在微重力下酒的陈酿过程可能不同,导致它的陈酿进程更快、味道更好。对此,地球上的每家酿酒商都想进一步地了解。
+
几年前,即2011年9月至2014年9月,Nasa赞助了一个试验,研究微重力环境对威士忌中未发酵麦芽与烧焦橡木颗粒的影响,这两种物质能对威士忌的陈酿起帮助作用。在太空中逗留将近1000天后,用于测试的威士忌的单宁成分保持不变——但是太空中橡木颗粒产生了更高浓度的木质素分解产物,这种物质能赋予威士忌特别的风味。
+
Nasa表示:“这种试验不仅对麦芽威士忌行业有影响,而且对整个食品和饮料行业也有影响。送上太空的威士忌与对照样品之间的风味差异是如此显著,需要进一步分析以破解不同口味产生的原因。”
+
因此,即使宇航员自己被禁止在地球轨道上饮酒,但他们正在做的工作可以提高在地上消费的酒的质量。
+
相比之下,执行登陆火星任务的人将远离家乡几年,而不是几个月,因此可能会有人提出有关禁止饮酒的规定可以放松一些。
+
然而,像戴夫?汉森这样的专家认为,继续禁止饮酒并没有什么害处。除了实际的安全问题,饮酒还可能有其它挑战。汉森认为,地球人存在许多社会文化方面的差异,而且人连续几年时间呆在一个狭小的空间里,很容易突然发怒,这些因素都使饮酒问题变得很棘手。
+
+
+ 图注:奥尔德林的圣餐杯回到了地球上
+
+
他说:“这是一个政治问题,也是一个文化方面的问题,但不是一个科学上的问题。这将是未来一个可能产生冲突领域,因为人们具有不同的文化背景,他们对饮酒的态度不同。”他进一步指出,如果你与穆斯林、摩门教徒或禁酒主义者分配在同一间宿舍怎么办?面对未来人们可能在一个没有期限的时间内呆在一个有限的空间里,需要“尽早解决”如何协调不同文化观点的问题。
+
所以,当宇航员在地球轨道上时,将还不得不满足于通过欣赏外面的景色来振作精神,而不要指望沉溺于烈酒中。我们留在地球上的人,则可以准备好适量的香槟酒,以迎接他们的归来。
+
原标题:他晚于阿姆斯特朗登月 却是首个敢在月球喝酒的人
+
出品︱网易科学人栏目组 胖胖
+
作者︱春春
+
+
+
+
[责任编辑:肖春芳]
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/hidden-nodes/expected.html b/test/test-pages/hidden-nodes/expected.html
index bb0e0689..af27a063 100644
--- a/test/test-pages/hidden-nodes/expected.html
+++ b/test/test-pages/hidden-nodes/expected.html
@@ -1,4 +1,4 @@
-
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Secondary header
\ No newline at end of file
diff --git a/test/test-pages/hukumusume/expected.html b/test/test-pages/hukumusume/expected.html
index 9871087c..59133951 100644
--- a/test/test-pages/hukumusume/expected.html
+++ b/test/test-pages/hukumusume/expected.html
@@ -1,4 +1,4 @@
-
+
福娘童話集 > きょうのイソップ童話 > 1月のイソップ童話 > 欲張りなイヌ
diff --git a/test/test-pages/ietf-1/expected-metadata.json b/test/test-pages/ietf-1/expected-metadata.json
index 1431f276..f783f671 100644
--- a/test/test-pages/ietf-1/expected-metadata.json
+++ b/test/test-pages/ietf-1/expected-metadata.json
@@ -1,4 +1,4 @@
{
- "Title": "draft-dejong-remotestorage-04 - remoteStorage",
- "Author": "AUTHORING"
+ "Title": "remoteStorage",
+ "Author": "Jong, Michiel de"
}
diff --git a/test/test-pages/ietf-1/expected.html b/test/test-pages/ietf-1/expected.html
index 0202963f..ff46f7a1 100644
--- a/test/test-pages/ietf-1/expected.html
+++ b/test/test-pages/ietf-1/expected.html
@@ -1,5 +1,6 @@
-
[Docs ] [txt |pdf ] [Tracker ] [Email ] [Diff1 ] [Diff2 ] [Nits ] Versions: 00 01 02 03 04
-
INTERNET DRAFT Michiel B. de Jong
+
+
+
[Docs ] [txt |pdf ] [Tracker ] [Email ] [Diff1 ] [Diff2 ] [Nits ] Versions: 00 01 02 03 04 INTERNET DRAFT Michiel B. de Jong
Document: draft-dejong-remotestorage-04 IndieHosters
F. Kooman
Intended Status: Proposed Standard (independent)
@@ -52,8 +53,7 @@
de Jong [Page 1]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -89,7 +89,7 @@
18 . Authors' addresses............................................22
-1 . Introduction
+1 . Introduction
Many services for data storage are available over the internet. This
specification describes a vendor-independent interface for such
@@ -103,8 +103,7 @@
de Jong [Page 2]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -123,7 +122,7 @@
The exact details of these four actions are described in this
specification.
-2 . Terminology
+2 . Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
@@ -136,7 +135,7 @@
implement the general requirement when such failure would result in
interoperability failure.
-3 . Storage model
+3 . Storage model
The server stores data in nodes that form a tree structure.
Internal nodes are called 'folders' and leaf nodes are called
@@ -154,8 +153,7 @@
de Jong [Page 3]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -165,7 +163,7 @@
* content length
* content
-4 . Requests
+4 . Requests
Client-to-server requests SHOULD be made over https [HTTPS ], and
servers MUST comply with HTTP/1.1 [HTTP ]. Specifically, they
@@ -205,8 +203,7 @@
de Jong [Page 4]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -256,8 +253,7 @@
de Jong [Page 5]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -307,12 +303,11 @@
de Jong [Page 6]
-
-
+
Internet-Draft remoteStorage December 2014
-5 . Response codes
+5 . Response codes
Response codes SHOULD be given as defined by [HTTP, section 6 ] and
[BEARER, section 3.1 ]. The following is a non-normative checklist
@@ -345,7 +340,7 @@
Clients SHOULD also handle the case where a response takes too long
to arrive, or where no response is received at all.
-6 . Versioning
+6 . Versioning
All successful requests MUST return an 'ETag' header [HTTP ] with, in
the case of GET, the current version, in the case of PUT, the new
@@ -358,8 +353,7 @@
de Jong [Page 7]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -376,14 +370,14 @@
A provider MAY offer version rollback functionality to its users,
but this specification does not define the user interface for that.
-7 . CORS headers
+7 . CORS headers
All responses MUST carry CORS headers [CORS ]. The server MUST also
reply to OPTIONS requests as per CORS. For GET requests, a wildcard
origin MAY be returned, but for PUT and DELETE requests, the
response MUST echo back the Origin header sent by the client.
-8 . Session description
+8 . Session description
The information that a client needs to receive in order to be able
to connect to a server SHOULD reach the client as described in the
@@ -409,8 +403,7 @@
de Jong [Page 8]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -425,7 +418,7 @@
* https://storage.example.com/bob/public/documents/
* https://storage.example.com/bob/public/documents/draft.txt
-9 . Bearer tokens and access control
+9 . Bearer tokens and access control
A bearer token represents one or more access scopes. These access
scopes are represented as strings of the form <module> <level>,
@@ -460,13 +453,12 @@
de Jong [Page 9]
-
-
+
Internet-Draft remoteStorage December 2014
-10 . Application-first bearer token issuance
+10 . Application-first bearer token issuance
To make a remoteStorage server available as 'the remoteStorage of
<account> at <host>', exactly one link of the following format
@@ -511,8 +503,7 @@
de Jong [Page 10]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -542,7 +533,7 @@
client_id parameter in favor of relying on the redirect_uri
parameter for client identification.
-11 . Storage-first bearer token issuance
+11 . Storage-first bearer token issuance
The provider MAY also present a dashboard to the user, where they
have some way to add open web app manifests [MANIFEST ]. Adding a
@@ -562,8 +553,7 @@
de Jong [Page 11]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -601,20 +591,19 @@
debug tool, thus bypassing the need for an OAuth dance. Clients
SHOULD NOT rely on this in production.
-12 . Example wire transcripts
+12 . Example wire transcripts
The following examples are not normative ("\" indicates a line was
wrapped).
-12.1 . WebFinger
+12.1 . WebFinger
In application-first, an in-browser application might issue the
following request, using XMLHttpRequest and CORS:
de Jong [Page 12]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -654,7 +643,7 @@
}]
}
-12.2 . OAuth dialog form
+12.2 . OAuth dialog form
Once the in-browser application has discovered the server's OAuth
end-point, it will typically redirect the user to this URL, in
@@ -664,8 +653,7 @@
de Jong [Page 13]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -685,16 +673,16 @@
<title>Allow access?</title>
...
-12.3 . OAuth dialog form submission
+12.3 . OAuth dialog form submission
When the user submits the form, the request would look something
like this:
POST /oauth HTTP/1.1
Host: 3pp.io:4439
- Origin: https://3pp.io:4439
+ Origin: https://3pp.io:4439
Content-Type: application/x-www-form-urlencoded
- Referer: https://3pp .io:4439/oauth/michiel?redirect_uri=https%3\
+ Referer: https://3pp .io:4439/oauth/michiel?redirect_uri=https%3\
A%2F%2Fdrinks-unhosted.5apps.com%2F&scope=myfavoritedrinks%3Arw&client_\
id=https%3A%2F%2Fdrinks-unhosted.5apps.com&response_type=token
@@ -710,13 +698,12 @@
Location:https://drinks-unhosted.5apps.com/#access_token=j2YnGt\
XjzzzHNjkd1CJxoQubA1o%3D&token_type=bearer&state=
-12.4 . OPTIONS preflight
+12.4 . OPTIONS preflight
de Jong [Page 14]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -727,47 +714,46 @@
OPTIONS /storage/michiel/myfavoritedrinks/ HTTP/1.1
Host: 3pp.io:4439
Access-Control-Request-Method: GET
- Origin: https://drinks-unhosted.5apps.com
+ Origin: https://drinks-unhosted.5apps.com
Access-Control-Request-Headers: Authorization
Referer: https://drinks-unhosted.5apps.com/
To which the server can for instance respond:
HTTP/1.1 200 OK
- Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
+ Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
Access-Control-Allow-Methods: GET, PUT, DELETE
Access-Control-Allow-Headers: Authorization, Content-Length, Co\
ntent-Type, Origin, X-Requested-With, If-Match, If-None-Match
-12.5 . Initial PUT
+12.5 . Initial PUT
An initial PUT may contain an 'If-None-Match: *' header, like this:
PUT /storage/michiel/myfavoritedrinks/test HTTP/1.1
Host: 3pp.io:4439
Content-Length: 91
- Origin: https://drinks-unhosted.5apps.com
+ Origin: https://drinks-unhosted.5apps.com
Authorization: Bearer j2YnGtXjzzzHNjkd1CJxoQubA1o=
Content-Type: application/json; charset=UTF-8
Referer: https://drinks-unhosted.5apps.com/?
If-None-Match: *
- {"name":"test","@context":"http://remotestorage .io/spec/modules\
+ {"name":"test","@context":"http://remotestorage .io/spec/modules\
/myfavoritedrinks/drink"}
And the server may respond with either a 201 Created or a 200 OK
status:
HTTP/1.1 201 Created
- Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
+ Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
ETag: "1382694045000"
-12.6 . Subsequent PUT
+12.6 . Subsequent PUT
de Jong [Page 15]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -778,7 +764,7 @@
PUT /storage/michiel/myfavoritedrinks/test HTTP/1.1
Host: 3pp.io:4439
Content-Length: 91
- Origin: https://drinks-unhosted.5apps.com
+ Origin: https://drinks-unhosted.5apps.com
Authorization: Bearer j2YnGtXjzzzHNjkd1CJxoQubA1o=
Content-Type: application/json; charset=UTF-8
Referer: https://drinks-unhosted.5apps.com/?
@@ -790,17 +776,17 @@
And the server may respond with a 412 Conflict or a 200 OK status:
HTTP/1.1 200 OK
- Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
+ Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
ETag: "1382694048000"
-12.7 . GET
+12.7 . GET
A GET request would also include the bearer token, and optionally
an If-None-Match header:
GET /storage/michiel/myfavoritedrinks/test HTTP/1.1
Host: 3pp.io:4439
- Origin: https://drinks-unhosted.5apps.com
+ Origin: https://drinks-unhosted.5apps.com
Authorization: Bearer j2YnGtXjzzzHNjkd1CJxoQubA1o=
Referer: https://drinks-unhosted.5apps.com/?
If-None-Match: "1382694045000", "1382694048000"
@@ -808,7 +794,7 @@
And the server may respond with a 304 Not Modified status:
HTTP/1.1 304 Not Modified
- Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
+ Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
ETag: "1382694048000"
Or a 200 OK status, plus a response body:
@@ -817,12 +803,11 @@
de Jong [Page 16]
-
-
+
Internet-Draft remoteStorage December 2014
- Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
+ Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
Content-Type: application/json; charset=UTF-8
Content-Length: 106
ETag: "1382694048000"
@@ -836,7 +821,7 @@
body:
HTTP/1.1 200 OK
- Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
+ Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
Content-Type: application/ld+json
Content-Length: 171
ETag: "1382694048000"
@@ -851,15 +836,15 @@
Not Found status, and no ETag header:
HTTP/1.1 404 Not Found
- Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
+ Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
-12.8 . DELETE
+12.8 . DELETE
A DELETE request may look like this:
DELETE /storage/michiel/myfavoritedrinks/test HTTP/1.1
Host: 3pp.io:4439
- Origin: https://drinks-unhosted.5apps.com
+ Origin: https://drinks-unhosted.5apps.com
Authorization: Bearer j2YnGtXjzzzHNjkd1CJxoQubA1o=
Content-Type: application/json; charset=UTF-8
Referer: https://drinks-unhosted.5apps.com/?
@@ -868,18 +853,17 @@
de Jong [Page 17]
-
-
+
Internet-Draft remoteStorage December 2014
And the server may respond with a 412 Conflict or a 200 OK status:
HTTP/1.1 412 Conflict
- Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
+ Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
ETag: "1382694048000"
-13 . Distributed versioning
+13 . Distributed versioning
This section is non-normative, and is intended to explain some of
the design choices concerning ETags and folder listings. At the
@@ -919,8 +903,7 @@
de Jong [Page 18]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -942,7 +925,7 @@
but it is up to whichever client discovers a given version
conflict, to resolve it.
-14 . Security Considerations
+14 . Security Considerations
To prevent man-in-the-middle attacks, the use of https instead of
http is important for both the interface itself and all end-points
@@ -970,8 +953,7 @@
de Jong [Page 19]
-
-
+
Internet-Draft remoteStorage December 2014
@@ -988,7 +970,7 @@
The server SHOULD also detect and stop denial-of-service attacks
that aim to overwhelm its interface with too much traffic.
-15 . IANA Considerations
+15 . IANA Considerations
This document registers the 'remotestorage' link relation, as well
as the following WebFinger properties:
@@ -998,7 +980,7 @@
* "http://tools.ietf.org/html/rfc7233 "
* "http://remotestorage.io/spec/web-authoring "
-16 . Acknowledgements
+16 . Acknowledgements
The authors would like to thank everybody who contributed to the
development of this protocol, including Kenny Bentley, Javier Diaz,
@@ -1011,97 +993,95 @@
Rick van Rein, Mark Nottingham, Julian Reschke, and Markus
Lanthaler, among many others.
-17 . References
+17 . References
-17.1 . Normative References
+17.1 . Normative References
- [WORDS ]
+ [WORDS ]
Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14 , RFC 2119 , March 1997.
de Jong [Page 20]
-
-
+
Internet-Draft remoteStorage December 2014
- [IRI ]
+ [IRI ]
Duerst, M., "Internationalized Resource Identifiers (IRIs)",
RFC 3987 , January 2005.
- [WEBFINGER ]
+ [WEBFINGER ]
Jones, P., Salguerio, G., Jones, M, and Smarr, J.,
"WebFinger", RFC7033 , September 2013.
- [OAUTH ]
+ [OAUTH ]
"Section 4.2 : Implicit Grant", in: Hardt, D. (ed), "The OAuth
2.0 Authorization Framework", RFC6749 , October 2012.
-17.2 . Informative References
+17.2 . Informative References
- [HTTPS ]
+ [HTTPS ]
Rescorla, E., "HTTP Over TLS", RFC2818 , May 2000.
- [HTTP ]
+ [HTTP ]
Fielding et al., "Hypertext Transfer Protocol (HTTP/1.1):
Semantics and Content", RFC7231 , June 2014.
- [COND ]
+ [COND ]
Fielding et al., "Hypertext Transfer Protocol (HTTP/1.1):
Conditional Requests", RFC7232 , June 2014.
- [RANGE ]
+ [RANGE ]
Fielding et al., "Hypertext Transfer Protocol (HTTP/1.1):
Conditional Requests", RFC7233 , June 2014.
- [SPDY ]
+ [SPDY ]
Mark Belshe, Roberto Peon, "SPDY Protocol - Draft 3.1", http://
www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3-1 ,
September 2013.
- [JSON-LD ]
+ [JSON-LD ]
M. Sporny, G. Kellogg, M. Lanthaler, "JSON-LD 1.0", W3C
Proposed Recommendation,
http://www.w3.org/TR/2014/REC-json-ld-20140116/ , January 2014.
- [CORS ]
+ [CORS ]
van Kesteren, Anne (ed), "Cross-Origin Resource Sharing --
W3C Candidate Recommendation 29 January 2013",
de Jong [Page 21]
-
-
+
Internet-Draft remoteStorage December 2014
http://www.w3.org/TR/cors/ , January 2013.
- [MANIFEST ]
+ [MANIFEST ]
Mozilla Developer Network (ed), "App manifest -- Revision
330541", https://developer.mozilla.org/en-
US/Apps/Build/Manifest$revision/566677, April 2014.
- [DATASTORE ]
+ [DATASTORE ]
"WebAPI/DataStore", MozillaWiki, retrieved May 2014.
https://wiki.mozilla.org/WebAPI/DataStore#Manifest
- [KERBEROS ]
+ [KERBEROS ]
C. Neuman et al., "The Kerberos Network Authentication Service
(V5)", RFC4120 , July 2005.
- [BEARER ]
+ [BEARER ]
M. Jones, D. Hardt, "The OAuth 2.0 Authorization Framework:
Bearer Token Usage", RFC6750 , October 2012.
- []
+ [AUTHORING ]
"Using remoteStorage for web authoring", reSite wiki, retrieved
September 2014. https://github.com/michielbdejong/resite/wiki
/Using-remoteStorage-for-web-authoring
-18 . Authors' addresses
+18 . Authors' addresses
Michiel B. de Jong
IndieHosters
@@ -1124,6 +1104,7 @@
de Jong [Page 22]
- Html markup produced by rfcmarkup 1.111, available from
+Html markup produced by rfcmarkup 1.111, available from
https://tools.ietf.org/tools/rfcmarkup/
-
+
+
\ No newline at end of file
diff --git a/test/test-pages/keep-images/expected.html b/test/test-pages/keep-images/expected.html
index db2d56b1..30597dea 100644
--- a/test/test-pages/keep-images/expected.html
+++ b/test/test-pages/keep-images/expected.html
@@ -1,194 +1,381 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Welcome to DoctorX’s Barcelona lab, where the drugs you bought online are tested for safety and purity. No questions asked.
-
-
-
-
-
-
Standing at a table in a chemistry lab in Barcelona, Cristina Gil Lladanosa tears open a silver, smell-proof protective envelope. She slides out a transparent bag full of crystals. Around her, machines whir and hum, and other researchers mill around in long, white coats.
-
She is holding the lab’s latest delivery of a drug bought from the “deep web,” the clandestine corner of the internet that isn’t reachable by normal search engines, and is home to some sites that require special software to access. Labeled as MDMA (the street term is ecstasy), this sample has been shipped from Canada. Lladanosa and her colleague Iván Fornís Espinosa have also received drugs, anonymously, from people in China, Australia, Europe and the United States.
-
“Here we have speed, MDMA, cocaine, pills,” Lladanosa says, pointing to vials full of red, green, blue and clear solutions sitting in labeled boxes.
-
-
-
-
-
-
- Cristina Gil Lladanosa, at the Barcelona testing lab | photo by Joan Bardeletti
-
-
-
-
Since 2011, with the launch of Silk Road , anybody has been able to safely buy illegal drugs from the deep web and have them delivered to their door. Though the FBI shut down that black market in October 2013, other outlets have emerged to fill its role. For the last 10 months the lab at which Lladanosa and Espinosa work has offered a paid testing service of those drugs. By sending in samples for analysis, users can know exactly what it is they are buying, and make a more informed decision about whether to ingest the substance. The group, called Energy Control , which has being running “harm reduction” programs since 1999, is the first to run a testing service explicitly geared towards verifying those purchases from the deep web.
-
Before joining Energy Control, Lladanosa briefly worked at a pharmacy, whereas Espinosa spent 14 years doing drug analysis. Working at Energy Control is “more gratifying,” and “rewarding” than her previous jobs, Lladanosa told me. They also receive help from a group of volunteers, made up of a mixture of “squatters,” as Espinosa put it, and medical students, who prepare the samples for testing.
-
After weighing out the crystals, aggressively mixing it with methanol until dissolved, and delicately pouring the liquid into a tiny brown bottle, Lladanosa, a petite woman who is nearly engulfed by her lab coat, is now ready to test the sample. She loads a series of three trays on top of a large white appliance sitting on a table, called a gas chromatograph (GC). A jungle of thick pipes hang from the lab’s ceiling behind it.
-
-
-
-
-
-
- Photo by Joan Bardeletti
-
-
-
-
“Chromatography separates all the substances,” Lladanosa says as she loads the machine with an array of drugs sent from the deep web and local Spanish users. It can tell whether a sample is pure or contaminated, and if the latter, with what.
-
Rushes of hot air blow across the desk as the gas chromatograph blasts the sample at 280 degrees Celsius. Thirty minutes later the machine’s robotic arm automatically moves over to grip another bottle. The machine will continue cranking through the 150 samples in the trays for most of the work week.
-
-
-
-
-
-
- Photo by Joan Bardeletti
-
-
-
-
To get the drugs to Barcelona, a user mails at least 10 milligrams of a substance to the offices of the Asociación Bienestar y Desarrollo, the non-government organization that oversees Energy Control. The sample then gets delivered to the testing service’s laboratory, at the Barcelona Biomedical Research Park, a futuristic, seven story building sitting metres away from the beach. Energy Control borrows its lab space from a biomedical research group for free.
-
The tests cost 50 Euro per sample. Users pay, not surprisingly, with Bitcoin. In the post announcing Energy Control’s service on the deep web, the group promised that “All profits of this service are set aside of maintenance of this project.”
-
About a week after testing, those results are sent in a PDF to an email address provided by the anonymous client.
-
“The process is quite boring, because you are in a routine,” Lladanosa says. But one part of the process is consistently surprising: that moment when the results pop up on the screen. “Every time it’s something different.” For instance, one cocaine sample she had tested also contained phenacetin, a painkiller added to increase the product’s weight; lidocaine, an anesthetic that numbs the gums, giving the impression that the user is taking higher quality cocaine; and common caffeine.
-
-
-
-
-
-
The deep web drug lab is the brainchild of Fernando Caudevilla, a Spanish physician who is better known as “DoctorX” on the deep web, a nickname given to him by his Energy Control co-workers because of his earlier writing about the history, risks and recreational culture of MDMA. In the physical world, Caudevilla has worked for over a decade with Energy Control on various harm reduction focused projects, most of which have involved giving Spanish illegal drug users medical guidance, and often writing leaflets about the harms of certain substances.
-
-
-
-
-
-
- Fernando Caudevilla, AKA DoctorX. Photo: Joseph Cox
-
-
-
-
Caudevilla first ventured into Silk Road forums in April 2013. “I would like to contribute to this forum offering professional advice in topics related to drug use and health,” he wrote in an introductory post , using his DoctorX alias. Caudevilla offered to provide answers to questions that a typical doctor is not prepared, or willing, to respond to, at least not without a lecture or a judgment. “This advice cannot replace a complete face-to-face medical evaluation,” he wrote, “but I know how difficult it can be to talk frankly about these things.”
-
The requests flooded in. A diabetic asked what effect MDMA has on blood sugar; another what the risks of frequent psychedelic use were for a young person. Someone wanted to know whether amphetamine use should be avoided during lactation. In all, Fernando’s thread received over 50,000 visits and 300 questions before the FBI shut down Silk Road.
-
“He’s amazing. A gift to this community,” one user wrote on the Silk Road 2.0 forum, a site that sprang up after the original. “His knowledge is invaluable, and never comes with any judgment.” Up until recently, Caudevilla answered questions on the marketplace “Evolution.” Last week, however, the administrators of that site pulled a scam , shutting the market down and escaping with an estimated $12 million worth of Bitcoin.
-
Caudevilla’s transition from dispensing advice to starting up a no-questions-asked drug testing service came as a consequence of his experience on the deep web. He’d wondered whether he could help bring more harm reduction services to a marketplace without controls. The Energy Control project, as part of its mandate of educating drug users and preventing harm, had already been carrying out drug testing for local Spanish users since 2001, at music festivals, night clubs, or through a drop-in service at a lab in Madrid.
-
“I thought, we are doing this in Spain, why don’t we do an international drug testing service?” Caudevilla told me when I visited the other Energy Control lab, in Madrid. Caudevilla, a stocky character with ear piercings and short, shaved hair, has eyes that light up whenever he discusses the world of the deep web. Later, via email, he elaborated that it was not a hard sell. “It was not too hard to convince them,” he wrote me. Clearly, Energy Control believed that the reputation he had earned as an unbiased medical professional on the deep web might carry over to the drug analysis service, where one needs to establish “credibility, trustworthiness, [and] transparency,” Caudevilla said. “We could not make mistakes,” he added.
-
-
-
-
-
-
- Photo: Joseph Cox
-
-
-
-
-
-
-
-
-
While the Energy Control lab in Madrid lab only tests Spanish drugs from various sources, it is the Barcelona location which vets the substances bought in the shadowy recesses of of the deep web. Caudevilla no longer runs it, having handed it over to his colleague Ana Muñoz. She maintains a presence on the deep web forums, answers questions from potential users, and sends back reports when they are ready.
-
The testing program exists in a legal grey area. The people who own the Barcelona lab are accredited to experiment with and handle drugs, but Energy Control doesn’t have this permission itself, at least not in writing.
-
“We have a verbal agreement with the police and other authorities. They already know what we are doing,” Lladanosa tells me. It is a pact of mutual benefit. Energy Control provides the police with information on batches of drugs in Spain, whether they’re from the deep web or not, Espinosa says. They also contribute to the European Monitoring Centre for Drugs and Drug Addiction’s early warning system, a collaboration that attempts to spread information about dangerous drugs as quickly as possible.
-
By the time of my visit in February, Energy Control had received over 150 samples from the deep web and have been receiving more at a rate of between 4 and 8 a week. Traditional drugs, such as cocaine and MDMA, make up about 70 percent of the samples tested, but the Barcelona lab has also received samples of the prescription pill codeine, research chemicals and synthetic cannabinoids, and even pills of Viagra.
-
-
-
-
-
-
- Photo by Joan Bardeletti
-
-
-
-
So it’s fair to make a tentative judgement on what people are paying for on the deep web. The verdict thus far? Overall, drugs on the deep web appear to be of much higher quality than those found on the street.
-
“In general, the cocaine is amazing,” says Caudevilla, saying that the samples they’ve seen have purities climbing towards 80 or 90 percent, and some even higher. To get an idea of how unusual this is, take a look at the United Nations Office on Drugs and Crime World Drug Report 2014 , which reports that the average quality of street cocaine in Spain is just over 40 percent, while in the United Kingdom it is closer to 30 percent.“We have found 100 percent [pure] cocaine,” he adds. “That’s really, really strange. That means that, technically, this cocaine has been purified, with clandestine methods.”
-
Naturally, identifying vendors who sell this top-of-the-range stuff is one of the reasons that people have sent samples to Energy Control. Caudevilla was keen to stress that, officially, Energy Control’s service “is not intended to be a control of drug quality,” meaning a vetting process for identifying the best sellers, but that is exactly how some people have been using it.
-
As one buyer on the Evolution market, elmo666, wrote to me over the site’s messaging system, “My initial motivations were selfish. My primary motivation was to ensure that I was receiving and continue to receive a high quality product, essentially to keep the vendor honest as far as my interactions with them went.”
-
Vendors on deep web markets advertise their product just like any other outlet does, using flash sales, gimmicky giveaways and promises of drugs that are superior to those of their competitors. The claims, however, can turn out to be empty: despite the test results that show that deep web cocaine vendors typically sell product that is of a better quality than that found on the street, in plenty of cases, the drugs are nowhere near as pure as advertised.
-
“You won’t be getting anything CLOSE to what you paid for,” one user complained about the cocaine from ‘Mirkov’, a vendor on Evolution. “He sells 65% not 95%.”
-
-
-
-
-
-
- Photo by Joan Bardeletti
-
-
-
-
-
-
-
-
-
Despite the prevalence of people using the service to gauge the quality of what goes up their nose, many users send samples to Energy Control in the spirit of its original mission: keeping themselves alive and healthy. The worst case scenario from drugs purchased on the deep web is, well the worst case. That was the outcome when Patrick McMullen, a 17-year-old Scottish student, ingested half a gram of MDMA and three tabs of LSD, reportedly purchased from the Silk Road. While talking to his friends on Skype, his words became slurred and he passed out. Paramedics could not revive him. The coroner for that case, Sherrif Payne, who deemed the cause of death ecstasy toxicity, told The Independent “You never know the purity of what you are taking and you can easily come unstuck.”
-
ScreamMyName, a deep web user who has been active since the original Silk Road, wants to alert users to the dangerous chemicals that are often mixed with drugs, and is using Energy Control as a means to do so.
-
“We’re at a time where some vendors are outright sending people poison. Some do it unknowingly,” ScreamMyName told me in an encrypted message. “Cocaine production in South America is often tainted with either levamisole or phenacetine. Both poison to humans and both with severe side effects.”
-
In the case of Levamisole, those prescribing it are often not doctors but veterinarians, as Levamisole is commonly used on animals, primarily for the treatment of worms. If ingested by humans it can lead to cases of extreme eruptions of the skin, as documented in a study from researchers at the University of California, San Francisco. But Lladanosa has found Levamisole in cocaine samples; dealers use it to increase the product weight, allowing them to stretch their batch further for greater profit — and also, she says, because Levamisole has a strong stimulant effect.
-
“It got me sick as fuck,” Dr. Feel, an Evolution user, wrote on the site’s forums after consuming cocaine that had been cut with 23 percent Levamisole, and later tested by Energy Control. “I was laid up in bed for several days because of that shit. The first night I did it, I thought I was going to die. I nearly drove myself to the ER.”
-
“More people die because of tainted drugs than the drugs themselves,” Dr. Feel added. “It’s the cuts and adulterants that are making people sick and killing them.”
-
-
-
-
-
-
- Photo by Joan Bardeletti
-
-
-
-
The particular case of cocaine cut with Levamisole is one of the reasons that ScreamMyName has been pushing for more drug testing on the deep web markets. “I recognize that drug use isn’t exactly healthy, but why exacerbate the problem?” he told me when I contacted him after his post. “[Energy Control] provides a way for users to test the drugs they’ll use and for these very users to know what it is they’re putting in their bodies. Such services are in very short supply.”
-
After sending a number of Energy Control tests himself, ScreamMyName started a de facto crowd-sourcing campaign to get more drugs sent to the lab, and then shared the results, after throwing in some cash to get the ball rolling. He set up a Bitcoin wallet , with the hope that users might chip in to fund further tests. At the time of writing, the wallet has received a total of 1.81 bitcoins; around $430 at today’s exchange rates.
-
In posts to the Evolution community, ScreamMyName pitched this project as something that will benefit users and keep drug dealer honest. “When the funds build up to a point where we can purchase an [Energy Control] test fee, we’ll do a US thread poll for a few days and try to cohesively decide on what vendor to test,” he continued.
-
-
-
-
-
-
- Photo by Joan Bardeletti
-
-
-
-
Other members of the community have been helping out, too. PlutoPete, a vendor from the original Silk Road who sold cannabis seeds and other legal items, has provided ScreamMyName with packaging to safely send the samples to Barcelona. “A box of baggies, and a load of different moisture barrier bags,” PlutoPete told me over the phone. “That’s what all the vendors use.”
-
It’s a modest program so far. ScreamMyName told me that so far he had gotten enough public funding to purchase five different Energy Control tests, in addition to the ten or so he’s sent himself so far. “The program created is still in its infancy and it is growing and changing as we go along but I have a lot of faith in what we’re doing,” he says.
-
But the spirit is contagious: elmo666, the other deep web user testing cocaine, originally kept the results of the drug tests to himself, but he, too, saw a benefit to distributing the data. “It is clear that it is a useful service to other users, keeping vendors honest and drugs (and their users) safe,” he told me. He started to report his findings to others on the forums, and then created a thread with summaries of the test results, as well as comments from the vendors if they provided it. Other users were soon basing their decisions on what to buy on elmo666‘s tests.
-
“I’m defo trying the cola based on the incredibly helpful elmo and his energy control results and recommendations,” wrote user jayk1984. On top of this, elmo666 plans to launch an independent site on the deep web that will collate all of these results, which should act as a resource for users of all the marketplaces.
-
As word of elmo666's efforts spread, he began getting requests from drug dealers who wanted him to use their wares for testing. Clearly, they figured that a positive result from Energy Control would be a fantastic marketing tool to draw more customers. They even offered elmo666 free samples. (He passed.)
-
Meanwhile, some in the purchasing community are arguing that those running markets on the deep web should be providing quality control themselves. PlutoPete told me over the phone that he had been in discussions about this with Dread Pirate Roberts, the pseudonymous owner of the original Silk Road site. “We [had been] talking about that on a more organized basis on Silk Road 1, doing lots of anonymous buys to police each category. But of course they took the thing [Silk Road] down before we got it properly off the ground,” he lamented.
-
But perhaps it is best that the users, those who are actually consuming the drugs, remain in charge of shaming dealers and warning each other. “It’s our responsibility to police the market based on reviews and feedback,” elmo666 wrote in an Evolution forum post. It seems that in the lawless space of the deep web, where everything from child porn to weapons are sold openly, users have cooperated in an organic display of self-regulation to stamp out those particular batches of drugs that are more likely to harm users.
-
“That’s always been the case with the deep web,” PlutoPete told me. Indeed, ever since Silk Road, a stable of the drug markets has been the review system, where buyers can leave a rating and feedback for vendors, letting others know about the reliability of the seller. But DoctorX’s lab, rigorously testing the products with scientific instruments, takes it a step further.
-
-
-
-
-
-
- Photo by Joan Bardeletti
-
-
-
-
“In the white market, they have quality control. In the dark market, it should be the same,” Cristina Gil Lladanosa says to me before I leave the Barcelona lab.
-
A week after I visit the lab, the results of the MDMA arrive in my inbox: it is 85 percent pure, with no indications of other active ingredients. Whoever ordered that sample from the digital shelves of the deep web, and had it shipped to their doorstep in Canada, got hold of some seriously good, and relatively safe drugs. And now they know it.
-
-
-
-
-
-
Top photo by Joan Bardeletti
-
Follow Backchannel: Twitter | Facebook
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
Welcome to DoctorX’s Barcelona lab, where the drugs you bought online are tested for safety and purity. No questions asked.
+
+
+
+
+ Standing at a table in a chemistry lab in Barcelona, Cristina Gil Lladanosa
+ tears open a silver, smell-proof protective envelope. She slides out a
+ transparent bag full of crystals. Around her, machines whir and hum, and
+ other researchers mill around in long, white coats.
+
She is holding the lab’s latest delivery of a drug bought from the “deep
+ web,” the clandestine corner of the internet that isn’t reachable by normal
+ search engines, and is home to some sites that require special software
+ to access. Labeled as MDMA (the street
+ term is ecstasy), this sample has been shipped from Canada. Lladanosa and
+ her colleague Iván Fornís Espinosa have also received drugs, anonymously,
+ from people in China, Australia, Europe and the United States.
+
“Here we have speed, MDMA, cocaine, pills,” Lladanosa says, pointing to
+ vials full of red, green, blue and clear solutions sitting in labeled boxes.
+
+
+
+
+
+ Cristina Gil Lladanosa, at the Barcelona testing lab | photo by Joan Bardeletti
+
+
Since 2011, with the launch of Silk Road , anybody has been able to safely buy illegal
+ drugs from the deep web and have them delivered to their door. Though the
+ FBI shut down that black market in October 2013, other outlets have emerged
+ to fill its role. For the last 10 months the lab at which Lladanosa and
+ Espinosa work has offered a paid testing service of those drugs. By sending
+ in samples for analysis, users can know exactly what it is they are buying,
+ and make a more informed decision about whether to ingest the substance.
+ The group, called Energy Control ,
+ which has being running “harm reduction” programs since 1999, is the first
+ to run a testing service explicitly geared towards verifying those purchases
+ from the deep web.
+
Before joining Energy Control, Lladanosa briefly worked at a pharmacy,
+ whereas Espinosa spent 14 years doing drug analysis. Working at Energy
+ Control is “more gratifying,” and “rewarding” than her previous jobs, Lladanosa
+ told me. They also receive help from a group of volunteers, made up of
+ a mixture of “squatters,” as Espinosa put it, and medical students, who
+ prepare the samples for testing.
+
After weighing out the crystals, aggressively mixing it with methanol
+ until dissolved, and delicately pouring the liquid into a tiny brown bottle,
+ Lladanosa, a petite woman who is nearly engulfed by her lab coat, is now
+ ready to test the sample. She loads a series of three trays on top of a
+ large white appliance sitting on a table, called a gas chromatograph (GC).
+ A jungle of thick pipes hang from the lab’s ceiling behind it.
+
+
+
+
+
+ Photo by Joan Bardeletti
+
+
“Chromatography separates all the substances,” Lladanosa says as she loads
+ the machine with an array of drugs sent from the deep web and local Spanish
+ users. It can tell whether a sample is pure or contaminated, and if the
+ latter, with what.
+
Rushes of hot air blow across the desk as the gas chromatograph blasts
+ the sample at 280 degrees Celsius. Thirty minutes later the machine’s robotic
+ arm automatically moves over to grip another bottle. The machine will continue
+ cranking through the 150 samples in the trays for most of the work week.
+
+
+
+
+
+ Photo by Joan Bardeletti
+
+
To get the drugs to Barcelona, a user mails at least 10 milligrams of
+ a substance to the offices of the Asociación Bienestar y Desarrollo, the
+ non-government organization that oversees Energy Control. The sample then
+ gets delivered to the testing service’s laboratory, at the Barcelona Biomedical
+ Research Park, a futuristic, seven story building sitting metres away from
+ the beach. Energy Control borrows its lab space from a biomedical research
+ group for free.
+
The tests cost 50 Euro per sample. Users pay, not surprisingly, with Bitcoin.
+ In the post announcing Energy Control’s service on the deep web, the group
+ promised that “All profits of this service are set aside of maintenance
+ of this project.”
+
About a week after testing, those results are sent in a PDF to an email
+ address provided by the anonymous client.
+
“The process is quite boring, because you are in a routine,” Lladanosa
+ says. But one part of the process is consistently surprising: that moment
+ when the results pop up on the screen. “Every time it’s something different.”
+ For instance, one cocaine sample she had tested also contained phenacetin,
+ a painkiller added to increase the product’s weight; lidocaine, an anesthetic
+ that numbs the gums, giving the impression that the user is taking higher
+ quality cocaine; and common caffeine.
+
+
+
+ The deep web drug lab is the brainchild of Fernando Caudevilla, a Spanish
+ physician who is better known as “DoctorX” on the deep web, a nickname
+ given to him by his Energy Control co-workers because of his earlier writing
+ about the history, risks and recreational culture of MDMA. In the physical
+ world, Caudevilla has worked for over a decade with Energy Control on various
+ harm reduction focused projects, most of which have involved giving Spanish
+ illegal drug users medical guidance, and often writing leaflets about the
+ harms of certain substances.
+
+
+
+
+
+ Fernando Caudevilla, AKA DoctorX. Photo: Joseph Cox
+
+
Caudevilla first ventured into Silk Road forums in April 2013. “I would
+ like to contribute to this forum offering professional advice in topics
+ related to drug use and health,” he wrote in an introductory post ,
+ using his DoctorX alias. Caudevilla offered to provide answers to questions
+ that a typical doctor is not prepared, or willing, to respond to, at least
+ not without a lecture or a judgment. “This advice cannot replace a complete
+ face-to-face medical evaluation,” he wrote, “but I know how difficult it
+ can be to talk frankly about these things.”
+
The requests flooded in. A diabetic asked what effect MDMA has on blood
+ sugar; another what the risks of frequent psychedelic use were for a young
+ person. Someone wanted to know whether amphetamine use should be avoided
+ during lactation. In all, Fernando’s thread received over 50,000 visits
+ and 300 questions before the FBI shut down Silk Road.
+
“He’s amazing. A gift to this community,” one user wrote on the Silk Road
+ 2.0 forum, a site that sprang up after the original. “His knowledge is
+ invaluable, and never comes with any judgment.” Up until recently, Caudevilla
+ answered questions on the marketplace “Evolution.” Last week, however,
+ the administrators of that site pulled a scam ,
+ shutting the market down and escaping with an estimated $12 million worth
+ of Bitcoin.
+
Caudevilla’s transition from dispensing advice to starting up a no-questions-asked
+ drug testing service came as a consequence of his experience on the deep
+ web. He’d wondered whether he could help bring more harm reduction services
+ to a marketplace without controls. The Energy Control project, as part
+ of its mandate of educating drug users and preventing harm, had already
+ been carrying out drug testing for local Spanish users since 2001, at music
+ festivals, night clubs, or through a drop-in service at a lab in Madrid.
+
“I thought, we are doing this in Spain, why don’t we do an international
+ drug testing service?” Caudevilla told me when I visited the other Energy
+ Control lab, in Madrid. Caudevilla, a stocky character with ear piercings
+ and short, shaved hair, has eyes that light up whenever he discusses the
+ world of the deep web. Later, via email, he elaborated that it was not
+ a hard sell. “It was not too hard to convince them,” he wrote me. Clearly,
+ Energy Control believed that the reputation he had earned as an unbiased
+ medical professional on the deep web might carry over to the drug analysis
+ service, where one needs to establish “credibility, trustworthiness, [and]
+ transparency,” Caudevilla said. “We could not make mistakes,” he added.
+
+
+
+
+
+ Photo: Joseph Cox
+
+
+
+
+ While the Energy Control lab in Madrid lab only tests Spanish drugs from
+ various sources, it is the Barcelona location which vets the substances
+ bought in the shadowy recesses of of the deep web. Caudevilla no longer
+ runs it, having handed it over to his colleague Ana Muñoz. She maintains
+ a presence on the deep web forums, answers questions from potential users,
+ and sends back reports when they are ready.
+
The testing program exists in a legal grey area. The people who own the
+ Barcelona lab are accredited to experiment with and handle drugs, but Energy
+ Control doesn’t have this permission itself, at least not in writing.
+
“We have a verbal agreement with the police and other authorities. They
+ already know what we are doing,” Lladanosa tells me. It is a pact of mutual
+ benefit. Energy Control provides the police with information on batches
+ of drugs in Spain, whether they’re from the deep web or not, Espinosa says.
+ They also contribute to the European Monitoring Centre for Drugs and Drug
+ Addiction’s early warning system, a collaboration that attempts to spread
+ information about dangerous drugs as quickly as possible.
+
By the time of my visit in February, Energy Control had received over
+ 150 samples from the deep web and have been receiving more at a rate of
+ between 4 and 8 a week. Traditional drugs, such as cocaine and MDMA, make
+ up about 70 percent of the samples tested, but the Barcelona lab has also
+ received samples of the prescription pill codeine, research chemicals and
+ synthetic cannabinoids, and even pills of Viagra.
+
+
+
+
+
+ Photo by Joan Bardeletti
+
+
So it’s fair to make a tentative judgement on what people are paying for
+ on the deep web. The verdict thus far? Overall, drugs on the deep web appear
+ to be of much higher quality than those found on the street.
+
“In general, the cocaine is amazing,” says Caudevilla, saying that the
+ samples they’ve seen have purities climbing towards 80 or 90 percent, and
+ some even higher. To get an idea of how unusual this is, take a look at
+ the United Nations Office on Drugs and Crime World Drug Report 2014 ,
+ which reports that the average quality of street cocaine in Spain is just
+ over 40 percent, while in the United Kingdom it is closer to 30 percent.“We
+ have found 100 percent [pure] cocaine,” he adds. “That’s really, really
+ strange. That means that, technically, this cocaine has been purified,
+ with clandestine methods.”
+
Naturally, identifying vendors who sell this top-of-the-range stuff is
+ one of the reasons that people have sent samples to Energy Control. Caudevilla
+ was keen to stress that, officially, Energy Control’s service “is not intended
+ to be a control of drug quality,” meaning a vetting process for identifying
+ the best sellers, but that is exactly how some people have been using it.
+
As one buyer on the Evolution market, elmo666, wrote to me over the site’s
+ messaging system, “My initial motivations were selfish. My primary motivation
+ was to ensure that I was receiving and continue to receive a high quality
+ product, essentially to keep the vendor honest as far as my interactions
+ with them went.”
+
Vendors on deep web markets advertise their product just like any other
+ outlet does, using flash sales, gimmicky giveaways and promises of drugs
+ that are superior to those of their competitors. The claims, however, can
+ turn out to be empty: despite the test results that show that deep web
+ cocaine vendors typically sell product that is of a better quality than
+ that found on the street, in plenty of cases, the drugs are nowhere near
+ as pure as advertised.
+
“You won’t be getting anything CLOSE to what you paid for,” one user complained
+ about the cocaine from ‘Mirkov’, a vendor on Evolution. “He sells 65% not
+ 95%.”
+
+
+
+
+
+ Photo by Joan Bardeletti
+
+
+
+
+ Despite the prevalence of people using the service to gauge the quality
+ of what goes up their nose, many users send samples to Energy Control in
+ the spirit of its original mission: keeping themselves alive and healthy.
+ The worst case scenario from drugs purchased on the deep web is, well the
+ worst case. That was the outcome when Patrick McMullen, a
+ 17-year-old Scottish student, ingested half a gram of MDMA and three tabs
+ of LSD, reportedly purchased from the Silk Road. While talking to his friends
+ on Skype, his words became slurred and he passed out. Paramedics could
+ not revive him. The coroner for that case, Sherrif Payne, who deemed the
+ cause of death ecstasy toxicity, told The Independent “You
+ never know the purity of what you are taking and you can easily come unstuck.”
+
ScreamMyName, a deep web user who has been active since the original Silk
+ Road, wants to alert users to the dangerous chemicals that are often mixed
+ with drugs, and is using Energy Control as a means to do so.
+
“We’re at a time where some vendors are outright sending people poison.
+ Some do it unknowingly,” ScreamMyName told me in an encrypted message.
+ “Cocaine production in South America is often tainted with either levamisole
+ or phenacetine. Both poison to humans and both with severe side effects.”
+
In the case of Levamisole, those prescribing it are often not doctors
+ but veterinarians, as Levamisole is commonly used on animals, primarily
+ for the treatment of worms. If ingested by humans it can lead to cases
+ of extreme eruptions of the skin, as documented in a study from researchers at the University
+ of California, San Francisco. But Lladanosa has found Levamisole in cocaine
+ samples; dealers use it to increase the product weight, allowing them to
+ stretch their batch further for greater profit — and also, she says, because
+ Levamisole has a strong stimulant effect.
+
“It got me sick as fuck,” Dr. Feel, an Evolution user, wrote on the site’s
+ forums after consuming cocaine that had been cut with 23 percent Levamisole,
+ and later tested by Energy Control. “I was laid up in bed for several days
+ because of that shit. The first night I did it, I thought I was going to
+ die. I nearly drove myself to the ER.”
+
“More people die because of tainted drugs than the drugs themselves,”
+ Dr. Feel added. “It’s the cuts and adulterants that are making people sick
+ and killing them.”
+
+
+
+
+
+ Photo by Joan Bardeletti
+
+
The particular case of cocaine cut with Levamisole is one of the reasons
+ that ScreamMyName has been pushing for more drug testing on the deep web
+ markets. “I recognize that drug use isn’t exactly healthy, but why exacerbate
+ the problem?” he told me when I contacted him after his post. “[Energy
+ Control] provides a way for users to test the drugs they’ll use and for
+ these very users to know what it is they’re putting in their bodies. Such
+ services are in very short supply.”
+
After sending a number of Energy Control tests himself, ScreamMyName started
+ a de facto crowd-sourcing campaign to get more drugs sent to the lab, and
+ then shared the results, after throwing in some cash to get the ball rolling.
+ He set up a Bitcoin wallet , with the hope that users might chip in
+ to fund further tests. At the time of writing, the wallet has received
+ a total of 1.81 bitcoins; around $430 at today’s exchange rates.
+
In posts to the Evolution community, ScreamMyName pitched this project
+ as something that will benefit users and keep drug dealer honest. “When
+ the funds build up to a point where we can purchase an [Energy Control]
+ test fee, we’ll do a US thread poll for a few days and try to cohesively
+ decide on what vendor to test,” he continued.
+
+
+
+
+
+ Photo by Joan Bardeletti
+
+
Other members of the community have been helping out, too. PlutoPete,
+ a vendor from the original Silk Road who sold cannabis seeds and other
+ legal items, has provided ScreamMyName with packaging to safely send the
+ samples to Barcelona. “A box of baggies, and a load of different moisture
+ barrier bags,” PlutoPete told me over the phone. “That’s what all the vendors
+ use.”
+
It’s a modest program so far. ScreamMyName told me that so far he had
+ gotten enough public funding to purchase five different Energy Control
+ tests, in addition to the ten or so he’s sent himself so far. “The program
+ created is still in its infancy and it is growing and changing as we go
+ along but I have a lot of faith in what we’re doing,” he says.
+
But the spirit is contagious: elmo666, the other deep web user testing
+ cocaine, originally kept the results of the drug tests to himself, but
+ he, too, saw a benefit to distributing the data. “It is clear that it is
+ a useful service to other users, keeping vendors honest and drugs (and
+ their users) safe,” he told me. He started to report his findings to others
+ on the forums, and then created a thread with summaries of the test results,
+ as well as comments from the vendors if they provided it. Other users were
+ soon basing their decisions on what to buy on elmo666‘s tests.
+
“I’m defo trying the cola based on the incredibly helpful elmo and his
+ energy control results and recommendations,” wrote user jayk1984. On top
+ of this, elmo666 plans to launch an independent site on the deep web that
+ will collate all of these results, which should act as a resource for users
+ of all the marketplaces.
+
As word of elmo666's efforts spread, he began getting requests from drug
+ dealers who wanted him to use their wares for testing. Clearly, they figured
+ that a positive result from Energy Control would be a fantastic marketing
+ tool to draw more customers. They even offered elmo666 free samples. (He
+ passed.)
+
Meanwhile, some in the purchasing community are arguing that those running
+ markets on the deep web should be providing quality control themselves.
+ PlutoPete told me over the phone that he had been in discussions about
+ this with Dread Pirate Roberts, the pseudonymous owner of the original
+ Silk Road site. “We [had been] talking about that on a more organized basis
+ on Silk Road 1, doing lots of anonymous buys to police each category. But
+ of course they took the thing [Silk Road] down before we got it properly
+ off the ground,” he lamented.
+
But perhaps it is best that the users, those who are actually consuming
+ the drugs, remain in charge of shaming dealers and warning each other.
+ “It’s our responsibility to police the market based on reviews and feedback,”
+ elmo666 wrote in an Evolution forum post. It seems that in the lawless
+ space of the deep web, where everything from child porn to weapons are
+ sold openly, users have cooperated in an organic display of self-regulation
+ to stamp out those particular batches of drugs that are more likely to
+ harm users.
+
“That’s always been the case with the deep web,” PlutoPete told me. Indeed,
+ ever since Silk Road, a stable of the drug markets has been the review
+ system, where buyers can leave a rating and feedback for vendors, letting
+ others know about the reliability of the seller. But DoctorX’s lab, rigorously
+ testing the products with scientific instruments, takes it a step further.
+
+
+
+
+
+ Photo by Joan Bardeletti
+
+
“In the white market, they have quality control. In the dark market, it
+ should be the same,” Cristina Gil Lladanosa says to me before I leave the
+ Barcelona lab.
+
A week after I visit the lab, the results of the MDMA arrive in my inbox:
+ it is 85 percent pure, with no indications of other active ingredients.
+ Whoever ordered that sample from the digital shelves of the deep web, and
+ had it shipped to their doorstep in Canada, got hold of some seriously
+ good, and relatively safe drugs. And now they know it.
+
+
+
+ Top photo by Joan Bardeletti
+
+
Follow Backchannel: Twitter
+ | Facebook
+
+
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/links-in-tables/expected.html b/test/test-pages/links-in-tables/expected.html
index 4fe422a2..12777fc3 100644
--- a/test/test-pages/links-in-tables/expected.html
+++ b/test/test-pages/links-in-tables/expected.html
@@ -1,4 +1,4 @@
-
+
Posted by Andrew Hayden, Software Engineer on Google Play
Android users are downloading tens of billions of apps and games on Google Play. We're also seeing developers update their apps frequently in order to provide users with great content, improve security, and enhance the overall user experience. It takes a lot of data to download these updates and we know users care about how much data their devices are using. Earlier this year, we announced that we started using the
diff --git a/test/test-pages/msn/expected-metadata.json b/test/test-pages/msn/expected-metadata.json
index e4fff275..4916e951 100644
--- a/test/test-pages/msn/expected-metadata.json
+++ b/test/test-pages/msn/expected-metadata.json
@@ -1,5 +1,5 @@
{
"Title": "Nintendo's first iPhone game will launch in December for $10",
- "Author": "Alex Perry",
+ "Author": "Alex Perry\n \n 1 day ago",
"Excerpt": "Nintendo and Apple shocked the world earlier this year by announcing \"Super Mario Run,\" the legendary gaming company's first foray into mobile gaming. "
}
diff --git a/test/test-pages/qq/expected.html b/test/test-pages/qq/expected.html
index d8de9336..557cc8a6 100644
--- a/test/test-pages/qq/expected.html
+++ b/test/test-pages/qq/expected.html
@@ -1,4 +1,4 @@
-
+
diff --git a/test/test-pages/remove-extra-brs/expected.html b/test/test-pages/remove-extra-brs/expected.html
index f731d752..71ff530b 100644
--- a/test/test-pages/remove-extra-brs/expected.html
+++ b/test/test-pages/remove-extra-brs/expected.html
@@ -1,4 +1,4 @@
-
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
diff --git a/test/test-pages/table-style-attributes/expected.html b/test/test-pages/table-style-attributes/expected.html
index 48d18518..75a5b352 100644
--- a/test/test-pages/table-style-attributes/expected.html
+++ b/test/test-pages/table-style-attributes/expected.html
@@ -1,44 +1,57 @@
-
-
linux usability
- ...or, why do I bother.
- © 2002, 2003 Jamie Zawinski
+
+
+ linux usability
+ ...or, why do I bother. © 2002, 2003
+ Jamie Zawinski
+
+
-
-
-
-
+
In December 2002, I tried to install some software on my computer. The experience was, shall we say, less than pleasant. On many levels. I wrote about my experience, as I so often do.
Then in January, the jackasses over at Slashdot posted a link to it, calling it a "review" of Linux video software. I guess you could consider it a review, if you were to squint at it just right. But really what it is is a rant about how I had an evening stolen from me by crap software design. It is a flame about the pathetic state of Linux usability in general, and the handful of video players I tried out in particular. It makes no attempt to be balanced or objective or exhaustive. It is a description of my experience. Perhaps your experience was different. Good for you.
So of course that day I got hundreds of emails about it. Every Linux apologist in the world wanted to make sure I was fully informed of their opinion. The replies were roughly in the following groups:
-
- "Right on! I had exactly the same experience! Thank you for putting it into words." (This was about 1/3 of the replies.)
- "You're clearly an idiot, Linux is too sophisticated for you, you clearly are incapable of understanding anything, you should go back to kindergarten and/or use a Mac." (Oddly, all of these messages used the word `clearly' repeatedly.)
- "If you don't like it, fix it yourself."
- "Netscape sucks! XEmacs sucks! You suck! I never liked you anyway! And you swear too much!"
- "How dare you criticize someone else's work! You got it for free! You should be on your knees thanking them for wasting your time!"
- "While you have some valid complaints, I'm going to focus on this one inconsequential error you made in your characterization of one of the many roadblocks you encountered. You suck!"
- "It's your fault for using Red Hat! You should be using Debian/ Mandrake/ Gentoo instead!"
+
+ "Right on! I had exactly the same experience! Thank you for putting it into words." (This was about 1/3 of the replies.)
+
+
+ "You're clearly an idiot, Linux is too sophisticated for you, you clearly are incapable of understanding anything, you should go back to kindergarten and/or use a Mac." (Oddly, all of these messages used the word `clearly' repeatedly.)
+
+
+ "If you don't like it, fix it yourself."
+
+
+ "Netscape sucks! XEmacs sucks! You suck! I never liked you anyway! And you swear too much!"
+
+
+ "How dare you criticize someone else's work! You got it for free! You should be on your knees thanking them for wasting your time!"
+
+
+ "While you have some valid complaints, I'm going to focus on this one inconsequential error you made in your characterization of one of the many roadblocks you encountered. You suck!"
+
+
+ "It's your fault for using Red Hat! You should be using Debian/ Mandrake/ Gentoo instead!"
+
+
"Red Hat 7.2 is totally obsolete! It's almost 14 months old! What were you expecting!"
-
-
+
While I am flattered that so many logorrheic Linux fanboys are sufficiently interested in my opinions and experiences to share their deeply heartfelt views with me, you can all rest assured that:
- So please. Don't bother sending me any more mail about this. It's a near certainty that I will just delete it unread, so you might as well not waste your time. Feel free to call me names on your own web page if you feel the need to get it out of your system. But kindly stay out of my inbox.
+
+
+
-
-
-
-
- that said...
+
+
+
+ that said...
+
I understand that one can play videos on one's computer. I understand these videos come in many different formats. Every now and then I try to figure out what the Done Thing is, as far as playing movies on one's Linux machine.
-
(Really my eventual goal is to be able to create video on Linux, but I figured I'd start small, and see if I could just get playback working before trying something that is undoubtedly ten thousand times harder.)
-
I finally found RPMs of mplayer that would consent to install themselves on a Red Hat 7.2 machine, and actually got it to play some videos. Amazing. But it's a total pain in the ass to use due to rampant "themeing." Why do people do this? They map this stupid shaped window with no titlebar (oh, sorry, your choice of a dozen stupidly-shaped windows without titlebars) all of which use fonts that are way too small to read. But, here's the best part, there's no way to raise the window to the top. So if another window ever gets on top of it, well, sorry, you're out of luck. And half of the themes always map the window at the very bottom of the
+
+
(Really my eventual goal is to be able to create video on Linux, but I figured I'd start small, and see if I could just get playback working before trying something that is undoubtedly ten thousand times harder.) I finally found RPMs of mplayer that would consent to install themselves on a Red Hat 7.2 machine, and actually got it to play some videos. Amazing. But it's a total pain in the ass to use due to rampant "themeing." Why do people do this? They map this stupid shaped window with no titlebar (oh, sorry, your choice of a dozen stupidly-shaped windows without titlebars) all of which use fonts that are way too small to read. But, here's the best part, there's no way to raise the window to the top. So if another window ever gets on top of it, well, sorry, you're out of luck. And half of the themes always map the window at the very bottom of the
screen -- conveniently under my panel where I can't reach it.
Resizing the window changes the aspect ratio of the video! Yeah, I'm sure someone has ever wanted that.
It moves the mouse to the upper left corner of every dialog box it creates! Which is great, because that means that when it gets into this cute little state of popping up a blank dialog that says "Error" five times a second, you can't even move the mouse over to another window to kill the program, you have to log in from another machine.
@@ -51,39 +64,39 @@
Then I checked out Ogle again, and it hasn't been updated since the last time I tried, six months ago. It's a pretty decent DVD player, if you have the physical DVD. It does on-screen menus, and you can click on them with the mouse. But I don't need a DVD player (I have a hardware DVD player that works just fine.) It can't, as far as I can tell, play anything but actual discs.
Oh, and even though I have libdvdcss installed (as evidenced by the fact that Ogle actually works) Xine won't play the same disc that Ogle will play. It seems to be claiming that the CSS stuff isn't installed, which it clearly is.
An idiocy that all of these programs have in common is that, in addition to opening a window for the movie, and a window for the control panel, they also spray a constant spatter of curses crud on the terminal they were started from. I imagine at some point, there was some user who said, ``this program is pretty nice, but you know what it's missing? It's missing a lot of pointless chatter about what plugins and fonts have been loaded!''
-
And here's the Random Commentary section:
+
+
And here's the Random Commentary section:
+
Makali wrote:
Whenever a programmer thinks, "Hey, skins, what a cool idea", their
computer's speakers should create some sort of cock-shaped soundwave
and plunge it repeatedly through their skulls.
-
- I am fully in support of this proposed audio-cock technology.
+ I am fully in support of this proposed audio-cock technology.
Various people wrote:
You shouldn't even bother compiling the GUI into mplayer!
-
- So I should solve the problem of ``crappy GUI'' by replacing it with ``no GUI at all?'' I should use the program only from the command line, or by memorizing magic keystrokes? Awesome idea.
+ So I should solve the problem of ``crappy GUI'' by replacing it with ``no GUI at all?'' I should use the program only from the command line, or by memorizing magic keystrokes? Awesome idea.
Various other people wrote:
- True, I hadn't. Now I have. It has an overly-complicated UI, (the Preferences panel is a festival of overkill) but at least it uses standard menus and buttons, so it doesn't make you want to claw your eyes out immediately. But, it can only play a miniscule number of video formats, so it's mostly useless. *plonk*
+ True, I hadn't. Now I have. It has an overly-complicated UI, (the Preferences panel is a festival of overkill) but at least it uses standard menus and buttons, so it doesn't make you want to claw your eyes out immediately. But, it can only play a miniscule number of video formats, so it's mostly useless. *plonk*
Someone else wrote:
Have you considered changing distributions?
-
- Yes, every single time I try something like this, I very seriously consider getting a Mac .
+ Yes, every single time I try something like this, I very seriously consider getting a Mac .
Really the only thing that's stopping me is that I fear the Emacs situation .
(By which I mean, ``Lack of a usable version thereof.'' No, running RMSmacs inside a terminal window doesn't qualify. Nor does running an X server on the Mac: if I were going to switch, why in the world would I continue inflicting the X Windows Disaster on myself? Wouldn't getting away from that be the whole
point? )
- By the way, the suggestion to switch Linux distrubutions in order to get a single app to work might sound absurd at first. And that's because it is . But I've been saturated with Unix-peanut-gallery effluvia for so long that it no longer even surprises me when every
question -- no matter how
simple -- results in someone suggesting that you either A) patch your kernel or B) change distros. It's inevitable and inescapable, like Hitler.
-
-
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/telegraph/expected-metadata.json b/test/test-pages/telegraph/expected-metadata.json
index 0664ae6f..468d79a2 100644
--- a/test/test-pages/telegraph/expected-metadata.json
+++ b/test/test-pages/telegraph/expected-metadata.json
@@ -1,6 +1,6 @@
{
"Title": "Zimbabwe coup: Robert Mugabe and wife Grace 'insisting he finishes his term', as priest steps in to mediate",
- "Author": null,
+ "Author": "",
"Direction": null,
"Excerpt": "Zimbabwe President Robert Mugabe, his wife Grace and two key figures from her G40 political faction are under house arrest at Mugabe's "Blue House" compound in Harare and are insisting the 93 year-old finishes his presidential term, a source said."
}
diff --git a/test/test-pages/tmz-1/expected.html b/test/test-pages/tmz-1/expected.html
index 48f65bdc..5429f9a0 100644
--- a/test/test-pages/tmz-1/expected.html
+++ b/test/test-pages/tmz-1/expected.html
@@ -1,4 +1,4 @@
-
+
Lupita Nyong'o
diff --git a/test/test-pages/yahoo-4/expected.html b/test/test-pages/yahoo-4/expected.html
index 83b58632..fde4c1e7 100644
--- a/test/test-pages/yahoo-4/expected.html
+++ b/test/test-pages/yahoo-4/expected.html
@@ -1,4 +1,4 @@
-
+
トレンドマイクロは3月9日、Wi-Fi利用時の通信を暗号化し保護するスマホ・タブレット向けのセキュリティアプリ「フリーWi-Fiプロテクション」(iOS/Android)の発売を開始すると発表した。1年版ライセンスは2900円(税込)で、2年版ライセンスは5000円(税込)。
From fefc47e42565518aaa981be97fd65373fbbbe73a Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Mon, 5 Nov 2018 22:38:11 +0000
Subject: [PATCH 45/92] Fix phrasing content checking mistake
---
src/Readability.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Readability.php b/src/Readability.php
index ff07c11e..a4eeecde 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -865,7 +865,7 @@ private function prepDocument(DOMDocument $dom)
}
}
- if ($next->isPhrasingContent()) {
+ if (!$next->isPhrasingContent()) {
break;
}
From 743dd1dba7a863ffbddffea9d8171cc0519871c9 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Mon, 5 Nov 2018 22:45:27 +0000
Subject: [PATCH 46/92] Update test expectations
---
test/test-pages/gmw/expected.html | 12 +++---
.../keep-images/expected-metadata.json | 2 +-
test/test-pages/keep-images/expected.html | 38 +++++++++----------
.../test-pages/remove-extra-brs/expected.html | 27 +++++++------
.../table-style-attributes/expected.html | 38 +++++++++----------
5 files changed, 61 insertions(+), 56 deletions(-)
diff --git a/test/test-pages/gmw/expected.html b/test/test-pages/gmw/expected.html
index 13ed0146..1b69754f 100644
--- a/test/test-pages/gmw/expected.html
+++ b/test/test-pages/gmw/expected.html
@@ -1,8 +1,8 @@
2017-03-10 09:58 来源:网易科学人
-
-
-
+
+
+
翱翔于距地球数千公里的太空中,进入广袤漆黑的未知领域,是一项艰苦卓绝的工作。这让人感到巨大压力和极度恐慌。那么,为什么不能让宇航员来一杯“地球末日”鸡尾酒来放松一下?
不幸的是,对于希望能喝上一杯的太空探险者,那些将他们送上太空的政府机构普遍禁止他们染指包括酒在内的含酒精饮料。
但是,很快普通人都会有机会向人类“最终的边疆”出发——以平民化旅行的形式,去探索和殖民火星。确实,火星之旅将是一次令人感到痛苦的旅行,可能一去不复返并要几年时间才能完成,但是否应该允许参与者在旅程中痛饮一番?或至少携带能在火星上发酵自制酒精饮料的设备?
@@ -51,8 +51,8 @@
作者︱春春
-
+
[责任编辑:肖春芳]
-
-
+
+
\ No newline at end of file
diff --git a/test/test-pages/keep-images/expected-metadata.json b/test/test-pages/keep-images/expected-metadata.json
index 3956602a..6c2c29aa 100644
--- a/test/test-pages/keep-images/expected-metadata.json
+++ b/test/test-pages/keep-images/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "Inside the Deep Web Drug Lab — Backchannel — Medium",
+ "Title": "Inside the Deep Web Drug Lab",
"Author": "Joseph Cox",
"Excerpt": "Welcome to DoctorX’s Barcelona lab, where the drugs you bought online are tested for safety and purity. No questions ask…"
}
diff --git a/test/test-pages/keep-images/expected.html b/test/test-pages/keep-images/expected.html
index 30597dea..d3696f7d 100644
--- a/test/test-pages/keep-images/expected.html
+++ b/test/test-pages/keep-images/expected.html
@@ -4,16 +4,16 @@
-
+
-
-
+
+
Welcome to DoctorX’s Barcelona lab, where the drugs you bought online are tested for safety and purity. No questions asked.
-
+
-
+
Standing at a table in a chemistry lab in Barcelona, Cristina Gil Lladanosa
tears open a silver, smell-proof protective envelope. She slides out a
@@ -31,7 +31,7 @@
Welcome to DoctorX’s Barcelona l
-
+
Cristina Gil Lladanosa, at the Barcelona testing lab | photo by Joan Bardeletti
@@ -61,7 +61,7 @@
Welcome to DoctorX’s Barcelona l
-
+
Photo by Joan Bardeletti
@@ -76,7 +76,7 @@
Welcome to DoctorX’s Barcelona l
-
+
Photo by Joan Bardeletti
@@ -101,7 +101,7 @@
Welcome to DoctorX’s Barcelona l
that numbs the gums, giving the impression that the user is taking higher
quality cocaine; and common caffeine.
-
+
The deep web drug lab is the brainchild of Fernando Caudevilla, a Spanish
physician who is better known as “DoctorX” on the deep web, a nickname
@@ -114,7 +114,7 @@
Welcome to DoctorX’s Barcelona l
-
+
Fernando Caudevilla, AKA DoctorX. Photo: Joseph Cox
@@ -158,12 +158,12 @@
Welcome to DoctorX’s Barcelona l
-
+
Photo: Joseph Cox
-
+
While the Energy Control lab in Madrid lab only tests Spanish drugs from
various sources, it is the Barcelona location which vets the substances
@@ -190,7 +190,7 @@
Welcome to DoctorX’s Barcelona l
-
+
Photo by Joan Bardeletti
@@ -229,12 +229,12 @@
Welcome to DoctorX’s Barcelona l
-
+
Photo by Joan Bardeletti
-
+
Despite the prevalence of people using the service to gauge the quality
of what goes up their nose, many users send samples to Energy Control in
@@ -273,7 +273,7 @@
Welcome to DoctorX’s Barcelona l
-
+
Photo by Joan Bardeletti
@@ -298,7 +298,7 @@
Welcome to DoctorX’s Barcelona l
-
+
Photo by Joan Bardeletti
@@ -355,7 +355,7 @@
Welcome to DoctorX’s Barcelona l
-
+
Photo by Joan Bardeletti
@@ -368,7 +368,7 @@
Welcome to DoctorX’s Barcelona l
had it shipped to their doorstep in Canada, got hold of some seriously
good, and relatively safe drugs. And now they know it.
-
+
Top photo by Joan Bardeletti
diff --git a/test/test-pages/remove-extra-brs/expected.html b/test/test-pages/remove-extra-brs/expected.html
index 71ff530b..e064a49e 100644
--- a/test/test-pages/remove-extra-brs/expected.html
+++ b/test/test-pages/remove-extra-brs/expected.html
@@ -1,11 +1,16 @@
-
-
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
-
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
-
-
Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
-
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
-
\ No newline at end of file
+
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua.
+
Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat.
+
Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
\ No newline at end of file
diff --git a/test/test-pages/table-style-attributes/expected.html b/test/test-pages/table-style-attributes/expected.html
index 75a5b352..4d2e894d 100644
--- a/test/test-pages/table-style-attributes/expected.html
+++ b/test/test-pages/table-style-attributes/expected.html
@@ -3,54 +3,54 @@
linux usability
...or, why do I bother. © 2002, 2003
Jamie Zawinski
-
-
+
+
In December 2002, I tried to install some software on my computer. The experience was, shall we say, less than pleasant. On many levels. I wrote about my experience, as I so often do.
Then in January, the jackasses over at Slashdot posted a link to it, calling it a "review" of Linux video software. I guess you could consider it a review, if you were to squint at it just right. But really what it is is a rant about how I had an evening stolen from me by crap software design. It is a flame about the pathetic state of Linux usability in general, and the handful of video players I tried out in particular. It makes no attempt to be balanced or objective or exhaustive. It is a description of my experience. Perhaps your experience was different. Good for you.
So of course that day I got hundreds of emails about it. Every Linux apologist in the world wanted to make sure I was fully informed of their opinion. The replies were roughly in the following groups:
-
+
"Right on! I had exactly the same experience! Thank you for putting it into words." (This was about 1/3 of the replies.)
-
+
"You're clearly an idiot, Linux is too sophisticated for you, you clearly are incapable of understanding anything, you should go back to kindergarten and/or use a Mac." (Oddly, all of these messages used the word `clearly' repeatedly.)
-
+
"If you don't like it, fix it yourself."
-
+
"Netscape sucks! XEmacs sucks! You suck! I never liked you anyway! And you swear too much!"
-
+
"How dare you criticize someone else's work! You got it for free! You should be on your knees thanking them for wasting your time!"
-
+
"While you have some valid complaints, I'm going to focus on this one inconsequential error you made in your characterization of one of the many roadblocks you encountered. You suck!"
-
+
"It's your fault for using Red Hat! You should be using Debian/ Mandrake/ Gentoo instead!"
-
+
"Red Hat 7.2 is totally obsolete! It's almost 14 months old! What were you expecting!"
While I am flattered that so many logorrheic Linux fanboys are sufficiently interested in my opinions and experiences to share their deeply heartfelt views with me, you can all rest assured that:
-
+
I've heard it before; and
I didn't care the first time.
So please. Don't bother sending me any more mail about this. It's a near certainty that I will just delete it unread, so you might as well not waste your time. Feel free to call me names on your own web page if you feel the need to get it out of your system. But kindly stay out of my inbox.
-
-
+
+
-
+
that said...
I understand that one can play videos on one's computer. I understand these videos come in many different formats. Every now and then I try to figure out what the Done Thing is, as far as playing movies on one's Linux machine.
-
+
(Really my eventual goal is to be able to create video on Linux, but I figured I'd start small, and see if I could just get playback working before trying something that is undoubtedly ten thousand times harder.) I finally found RPMs of mplayer that would consent to install themselves on a Red Hat 7.2 machine, and actually got it to play some videos. Amazing. But it's a total pain in the ass to use due to rampant "themeing." Why do people do this? They map this stupid shaped window with no titlebar (oh, sorry, your choice of a dozen stupidly-shaped windows without titlebars) all of which use fonts that are way too small to read. But, here's the best part, there's no way to raise the window to the top. So if another window ever gets on top of it, well, sorry, you're out of luck. And half of the themes always map the window at the very bottom of the
screen -- conveniently under my panel where I can't reach it.
Resizing the window changes the aspect ratio of the video! Yeah, I'm sure someone has ever wanted that.
@@ -64,9 +64,9 @@
Then I checked out Ogle again, and it hasn't been updated since the last time I tried, six months ago. It's a pretty decent DVD player, if you have the physical DVD. It does on-screen menus, and you can click on them with the mouse. But I don't need a DVD player (I have a hardware DVD player that works just fine.) It can't, as far as I can tell, play anything but actual discs.
Oh, and even though I have libdvdcss installed (as evidenced by the fact that Ogle actually works) Xine won't play the same disc that Ogle will play. It seems to be claiming that the CSS stuff isn't installed, which it clearly is.
An idiocy that all of these programs have in common is that, in addition to opening a window for the movie, and a window for the control panel, they also spray a constant spatter of curses crud on the terminal they were started from. I imagine at some point, there was some user who said, ``this program is pretty nice, but you know what it's missing? It's missing a lot of pointless chatter about what plugins and fonts have been loaded!''
-
+
And here's the Random Commentary section:
-
+
Makali wrote:
Whenever a programmer thinks, "Hey, skins, what a cool idea", their
@@ -88,7 +88,7 @@
Really the only thing that's stopping me is that I fear the Emacs situation .
(By which I mean, ``Lack of a usable version thereof.'' No, running RMSmacs inside a terminal window doesn't qualify. Nor does running an X server on the Mac: if I were going to switch, why in the world would I continue inflicting the X Windows Disaster on myself? Wouldn't getting away from that be the whole
point? )
-
+
(I understand there is an almost-functional Aqua version of
RMSmacs now. I'll probably check it out at some point, but the problem with me switching from XEmacs to RMSmacs is that it would probably result in another
Slashdork post, meaning I'd wake up to another 150+ poorly spelled flames in my inbox... I'm hoping for a Aquafied XEmacs, but I know that's not likely to happen any time soon.)
@@ -96,7 +96,7 @@
question -- no matter how
simple -- results in someone suggesting that you either A) patch your kernel or B) change distros. It's inevitable and inescapable, like Hitler.
-
+
\ No newline at end of file
From 2fbf4b1b485477af1c80a158f2c4921f37b77822 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Tue, 6 Nov 2018 18:46:36 +0000
Subject: [PATCH 47/92] Fix wrong reduction of array (must return true if ALL
the calls returned true)
---
src/Nodes/NodeTrait.php | 2 +-
src/Readability.php | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index 08aa7945..da09f264 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -476,7 +476,7 @@ public function isPhrasingContent()
(!is_null($this->childNodes) &&
($this->nodeName === 'a' || $this->nodeName === 'del' || $this->nodeName === 'ins') &&
array_reduce(iterator_to_array($this->childNodes), function ($carry, $node) {
- return $carry || $node->isPhrasingContent();
+ return $node->isPhrasingContent() && $carry;
})
);
}
diff --git a/src/Readability.php b/src/Readability.php
index a4eeecde..ab35ca45 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -1276,11 +1276,11 @@ public function prepArticle(DOMDocument $article)
/** @var DOMNode $table */
$tbody = $table->hasSingleTagInsideElement('tbody') ? $table->childNodes[0] : $table;
if ($tbody->hasSingleTagInsideElement('tr')) {
- $row = $tbody->childNodes[0];
+ $row = $tbody->firstChild;
if ($row->hasSingleTagInsideElement('td')) {
- $cell = $row->childNodes[0];
+ $cell = $row->firstChild;
$cell = NodeUtility::setNodeTag($cell, (array_reduce(iterator_to_array($cell->childNodes), function ($carry, $node) {
- return $carry || $node->isPhrasingContent();
+ return $node->isPhrasingContent() && $carry;
})) ? 'p' : 'div');
$table->parentNode->replaceChild($cell, $table);
}
From da2e712e3f7e4053c2b7202a701e6472c8409a28 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Tue, 6 Nov 2018 23:39:49 +0000
Subject: [PATCH 48/92] Set default value for $carry in array_reduce functions
---
src/Nodes/NodeTrait.php | 2 +-
src/Readability.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index da09f264..6aa54146 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -477,7 +477,7 @@ public function isPhrasingContent()
($this->nodeName === 'a' || $this->nodeName === 'del' || $this->nodeName === 'ins') &&
array_reduce(iterator_to_array($this->childNodes), function ($carry, $node) {
return $node->isPhrasingContent() && $carry;
- })
+ }, true)
);
}
diff --git a/src/Readability.php b/src/Readability.php
index ab35ca45..2fe6ba5a 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -1281,7 +1281,7 @@ public function prepArticle(DOMDocument $article)
$cell = $row->firstChild;
$cell = NodeUtility::setNodeTag($cell, (array_reduce(iterator_to_array($cell->childNodes), function ($carry, $node) {
return $node->isPhrasingContent() && $carry;
- })) ? 'p' : 'div');
+ }, true)) ? 'p' : 'div');
$table->parentNode->replaceChild($cell, $table);
}
}
From 0292ff115cfd28d472b378329a9932436e251fc7 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Wed, 7 Nov 2018 18:52:21 +0000
Subject: [PATCH 49/92] Remove node parameter from "hasAncestorTag" since it's
a trait and it works on itself
---
src/Nodes/NodeTrait.php | 4 +++-
src/Readability.php | 7 ++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index 6aa54146..c08b59f7 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -371,9 +371,11 @@ public function createNode($originalNode, $tagName)
*
* @return bool
*/
- public function hasAncestorTag($node, $tagName, $maxDepth = 3)
+ public function hasAncestorTag($tagName, $maxDepth = 3)
{
$depth = 0;
+ $node = $this;
+
while ($node->parentNode) {
if ($maxDepth > 0 && $depth > $maxDepth) {
return false;
diff --git a/src/Readability.php b/src/Readability.php
index 2fe6ba5a..f4f38aec 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -1435,6 +1435,7 @@ public function _cleanExtraParagraphs(DOMDocument $article)
/**
* @param DOMDocument $article
+ * @param string $tag Tag to clean conditionally
*
* @return void
*/
@@ -1459,7 +1460,7 @@ public function _cleanConditionally(DOMDocument $article, $tag)
$node = $DOMNodeList->item($length - 1 - $i);
// First check if we're in a data table, in which case don't remove us.
- if ($node->hasAncestorTag($node, 'table', -1) && $node->isReadabilityDataTable()) {
+ if ($node->hasAncestorTag('table', -1) && $node->isReadabilityDataTable()) {
continue;
}
@@ -1500,10 +1501,10 @@ public function _cleanConditionally(DOMDocument $article, $tag)
$contentLength = mb_strlen($node->getTextContent(true));
$haveToRemove =
- ($img > 1 && $p / $img < 0.5 && !$node->hasAncestorTag($node, 'figure')) ||
+ ($img > 1 && $p / $img < 0.5 && !$node->hasAncestorTag('figure')) ||
(!$isList && $li > $p) ||
($input > floor($p / 3)) ||
- (!$isList && $contentLength < 25 && ($img === 0 || $img > 2) && !$node->hasAncestorTag($node, 'figure')) ||
+ (!$isList && $contentLength < 25 && ($img === 0 || $img > 2) && !$node->hasAncestorTag('figure')) ||
(!$isList && $weight < 25 && $linkDensity > 0.2) ||
($weight >= 25 && $linkDensity > 0.5) ||
(($embedCount === 1 && $contentLength < 75) || $embedCount > 1);
From 1d86d0898c8d0d1c90735db541d3a0f17868737f Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Wed, 7 Nov 2018 19:11:50 +0000
Subject: [PATCH 50/92] Add third parameter of "hasAncestorTag" as a callable
optional function
---
src/Nodes/NodeTrait.php | 8 +++++---
src/Readability.php | 4 +++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index c08b59f7..f641b2d4 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -365,13 +365,13 @@ public function createNode($originalNode, $tagName)
* Check if a given node has one of its ancestor tag name matching the
* provided one.
*
- * @param DOMElement $node
* @param string $tagName
* @param int $maxDepth
+ * @param callable $filterFn
*
* @return bool
*/
- public function hasAncestorTag($tagName, $maxDepth = 3)
+ public function hasAncestorTag($tagName, $maxDepth = 3, callable $filterFn = null)
{
$depth = 0;
$node = $this;
@@ -380,9 +380,11 @@ public function hasAncestorTag($tagName, $maxDepth = 3)
if ($maxDepth > 0 && $depth > $maxDepth) {
return false;
}
- if ($node->parentNode->nodeName === $tagName) {
+
+ if ($node->parentNode->nodeName === $tagName && (!$filterFn || $filterFn($node->parentNode))) {
return true;
}
+
$node = $node->parentNode;
$depth++;
}
diff --git a/src/Readability.php b/src/Readability.php
index f4f38aec..eadd50d0 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -1460,7 +1460,9 @@ public function _cleanConditionally(DOMDocument $article, $tag)
$node = $DOMNodeList->item($length - 1 - $i);
// First check if we're in a data table, in which case don't remove us.
- if ($node->hasAncestorTag('table', -1) && $node->isReadabilityDataTable()) {
+ if ($node->hasAncestorTag('table', -1, function($node){
+ return $node->isReadabilityDataTable();
+ })) {
continue;
}
From 04796e99e2fe919199d57bf516c000181cbb0a31 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 11 Nov 2018 11:54:52 +0000
Subject: [PATCH 51/92] Fix issue when setting custom properties in nodes
---
src/Nodes/NodeTrait.php | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index f641b2d4..839fa856 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -80,7 +80,17 @@ public function isInitialized()
*/
public function isReadabilityDataTable()
{
- return $this->readabilityDataTable;
+ /*
+ * This is a workaround that I'd like to remove in the future.
+ * Seems that although we are extending the base DOMElement and adding custom properties (like this one,
+ * 'readabilityDataTable'), these properties get lost when you search for elements with getElementsByTagName.
+ * This means that even if we mark the tables in a previous step, when we want to retrieve that information,
+ * all the custom properties are in their default values. Somehow we need to find a way to make these properties
+ * permanent across the whole DOM.
+ */
+ return $this->hasAttribute('readabilityDataTable')
+ && $this->getAttribute('readabilityDataTable') === '1';
+// return $this->readabilityDataTable;
}
/**
@@ -88,7 +98,9 @@ public function isReadabilityDataTable()
*/
public function setReadabilityDataTable($param)
{
- $this->readabilityDataTable = $param;
+ // Can't be "true" because DOMDocument casts it to "1"
+ $this->setAttribute('readabilityDataTable', $param ? '1' : '0');
+// $this->readabilityDataTable = $param;
}
/**
From 926154629471836bccdb88390a16f242aff68e97 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 11 Nov 2018 11:54:58 +0000
Subject: [PATCH 52/92] Update test expectations
---
test/test-pages/002/expected-metadata.json | 2 +-
test/test-pages/002/expected.html | 477 +++--
test/test-pages/clean-links/expected.html | 1645 ++++++++++++++---
test/test-pages/links-in-tables/expected.html | 332 ++--
test/test-pages/wapo-2/expected.html | 6 +-
5 files changed, 1867 insertions(+), 595 deletions(-)
diff --git a/test/test-pages/002/expected-metadata.json b/test/test-pages/002/expected-metadata.json
index 210e5517..a351dd4f 100644
--- a/test/test-pages/002/expected-metadata.json
+++ b/test/test-pages/002/expected-metadata.json
@@ -1,5 +1,5 @@
{
- "Title": "This API is so Fetching! ✩ Mozilla Hacks – the Web developer blog",
+ "Title": "This API is so Fetching!",
"Author": "Nikhil Marathe",
"Excerpt": "For more than a decade the Web has used XMLHttpRequest (XHR) to achieve asynchronous requests in JavaScript. While very useful, XHR is not a very ..."
}
diff --git a/test/test-pages/002/expected.html b/test/test-pages/002/expected.html
index 88701802..46d7998f 100644
--- a/test/test-pages/002/expected.html
+++ b/test/test-pages/002/expected.html
@@ -1,21 +1,36 @@
+For more than a decade the Web has used XMLHttpRequest (XHR) to achieve
+ asynchronous requests in JavaScript. While very useful, XHR is not a very
+ nice API. It suffers from lack of separation of concerns. The input, output
+ and state are all managed by interacting with one object, and state is
+ tracked using events. Also, the event-based model doesn’t play well with
+ JavaScript’s recent focus on Promise- and generator-based asynchronous
+ programming.
+ The Fetch API intends
+ to fix most of these problems. It does this by introducing the same primitives
+ to JS that are used in the HTTP protocol. In addition, it introduces a
+ utility function fetch()
that succinctly captures the intention
+ of retrieving a resource from the network.
+ The Fetch specification , which
+ defines the API, nails down the semantics of a user agent fetching a resource.
+ This, combined with ServiceWorkers, is an attempt to:
+ Improve the offline experience.
+ Expose the building blocks of the Web to the platform as part of the
+ extensible web movement .
+ As of this writing, the Fetch API is available in Firefox 39 (currently
+ Nightly) and Chrome 42 (currently dev). Github has a Fetch polyfill .
+
+Feature detection
-
-
- For more than a decade the Web has used XMLHttpRequest (XHR) to achieve asynchronous requests in JavaScript. While very useful, XHR is not a very nice API. It suffers from lack of separation of concerns. The input, output and state are all managed by interacting with one object, and state is tracked using events. Also, the event-based model doesn’t play well with JavaScript’s recent focus on Promise- and generator-based asynchronous programming.
- The Fetch API intends to fix most of these problems. It does this by introducing the same primitives to JS that are used in the HTTP protocol. In addition, it introduces a utility function fetch()
that succinctly captures the intention of retrieving a resource from the network.
- The Fetch specification , which defines the API, nails down the semantics of a user agent fetching a resource. This, combined with ServiceWorkers, is an attempt to:
-
- Improve the offline experience.
- Expose the building blocks of the Web to the platform as part of the extensible web movement .
-
- As of this writing, the Fetch API is available in Firefox 39 (currently Nightly) and Chrome 42 (currently dev). Github has a Fetch polyfill .
- Feature detection
- Fetch API support can be detected by checking for Headers
,Request
, Response
or fetch
on the window
or worker
scope.
- Simple fetching
- The most useful, high-level part of the Fetch API is the fetch()
function. In its simplest form it takes a URL and returns a promise that resolves to the response. The response is captured as a Response
object.
-
-
-
fetch( "/data.json" ) .then ( function ( res) {
+ Fetch API support can be detected by checking for Headers
,Request
, Response
or fetch
on
+ the window
or worker
scope.
+
+Simple fetching
+
+ The most useful, high-level part of the Fetch API is the fetch()
function.
+ In its simplest form it takes a URL and returns a promise that resolves
+ to the response. The response is captured as a Response
object.
+
+
fetch( "/data.json" ) .then ( function ( res) {
// res instanceof Response == true.
if ( res.ok ) {
res.json ( ) .then ( function ( data) {
@@ -26,12 +41,11 @@ Simple fetching
}
} , function ( e) {
console.log ( "Fetch failed!" , e) ;
-} ) ;
-
+} ) ;
+
Submitting some parameters, it would look like this:
-
-
fetch( "http://www.example.org/submit.php" , {
+ fetch( "http://www.example.org/submit.php" , {
method: "POST" ,
headers: {
"Content-Type" : "application/x-www-form-urlencoded"
@@ -45,114 +59,163 @@ Simple fetching
}
} , function ( e) {
alert( "Error submitting form!" ) ;
-} ) ;
-
-
The fetch()
function’s arguments are the same as those passed to the Request()
constructor, so you may directly pass arbitrarily complex requests to fetch()
as discussed below.
-
Headers
-
Fetch introduces 3 interfaces. These are Headers
, Request
and Response
. They map directly to the underlying HTTP concepts, but have certain visibility filters in place for privacy and security reasons, such as supporting CORS rules and ensuring cookies aren’t readable by third parties.
-
The Headers interface is a simple multi-map of names to values:
+
} ) ;
+
+ The fetch()
function’s arguments are the same as those passed
+ to the
+ Request()
constructor, so you may directly pass arbitrarily
+ complex requests to fetch()
as discussed below.
+
+Headers
+
+ Fetch introduces 3 interfaces. These are Headers
, Request
and
+ Response
. They map directly to the underlying HTTP concepts,
+ but have
+ certain visibility filters in place for privacy and security reasons,
+ such as
+ supporting CORS rules and ensuring cookies aren’t readable by third parties.
+ The Headers interface is
+ a simple multi-map of names to values:
-
-
var content = "Hello World" ;
+ var content = "Hello World" ;
var reqHeaders = new Headers( ) ;
reqHeaders.append ( "Content-Type" , "text/plain"
reqHeaders.append ( "Content-Length" , content.length .toString ( ) ) ;
-reqHeaders.append ( "X-Custom-Header" , "ProcessThisImmediately" ) ;
-
-
The same can be achieved by passing an array of arrays or a JS object literal to the constructor:
+reqHeaders.
append ( "X-Custom-Header" , "ProcessThisImmediately" ) ;
+
+ The same can be achieved by passing an array of arrays or a JS object
+ literal
+ to the constructor:
-
-
reqHeaders = new Headers( {
+ reqHeaders = new Headers( {
"Content-Type" : "text/plain" ,
"Content-Length" : content.length .toString ( ) ,
"X-Custom-Header" : "ProcessThisImmediately" ,
-} ) ;
-
+
} ) ;
+
The contents can be queried and retrieved:
-
-
console.log ( reqHeaders.has ( "Content-Type" ) ) ; // true
+ console.log ( reqHeaders.has ( "Content-Type" ) ) ; // true
console.log ( reqHeaders.has ( "Set-Cookie" ) ) ; // false
reqHeaders.set ( "Content-Type" , "text/html" ) ;
reqHeaders.append ( "X-Custom-Header" , "AnotherValue" ) ;
-
+
console.log ( reqHeaders.get ( "Content-Length" ) ) ; // 11
console.log ( reqHeaders.getAll ( "X-Custom-Header" ) ) ; // ["ProcessThisImmediately", "AnotherValue"]
-
+
reqHeaders.delete ( "X-Custom-Header" ) ;
-console.log ( reqHeaders.getAll ( "X-Custom-Header" ) ) ; // []
-
-
Some of these operations are only useful in ServiceWorkers, but they provide a much nicer API to Headers.
-
Since Headers can be sent in requests, or received in responses, and have various limitations about what information can and should be mutable, Headers
objects have a guard property. This is not exposed to the Web, but it affects which mutation operations are allowed on the Headers object. Possible values are:
-
- “none”: default.
+console.log ( reqHeaders.getAll ( "X-Custom-Header" ) ) ; // []
+
+
Some of these operations are only useful in ServiceWorkers, but they provide
+ a much nicer API to Headers.
+
Since Headers can be sent in requests, or received in responses, and have
+ various limitations about what information can and should be mutable, Headers
objects
+ have a guard property. This is not exposed to the Web, but
+ it affects which mutation operations are allowed on the Headers object.
+ Possible values are:
+
“none”: default.
“request”: guard for a Headers object obtained from a Request (Request.headers
).
- “request-no-cors”: guard for a Headers object obtained from a Request created with mode “no-cors”.
+ “request-no-cors”: guard for a Headers object obtained from a Request
+ created
+ with mode “no-cors”.
“response”: naturally, for Headers obtained from Response (Response.headers
).
- “immutable”: Mostly used for ServiceWorkers, renders a Headers object read-only.
-
-
The details of how each guard affects the behaviors of the Headers object are in the specification . For example, you may not append or set a “request” guarded Headers’ “Content-Length” header. Similarly, inserting “Set-Cookie” into a Response header is not allowed so that ServiceWorkers may not set cookies via synthesized Responses.
-
All of the Headers methods throw TypeError if name
is not a valid HTTP Header name . The mutation operations will throw TypeError if there is an immutable guard. Otherwise they fail silently. For example:
+
“immutable”: Mostly used for ServiceWorkers, renders a Headers object
+ read-only.
+
The details of how each guard affects the behaviors of the Headers object
+ are
+ in the specification . For example,
+ you may not append or set a “request” guarded Headers’ “Content-Length”
+ header. Similarly, inserting “Set-Cookie” into a Response header is not
+ allowed so that ServiceWorkers may not set cookies via synthesized Responses.
+
All of the Headers methods throw TypeError if name
is not a
+ valid HTTP Header name . The mutation operations will throw TypeError
+ if there is an immutable guard. Otherwise they fail silently. For example:
-
-
var res = Response.error ( ) ;
+ var res = Response.error ( ) ;
try {
res.headers .set ( "Origin" , "http://mybank.com" ) ;
} catch ( e) {
console.log ( "Cannot pretend to be a bank!" ) ;
-}
-
-
Request
-
The Request interface defines a request to fetch a resource over HTTP. URL, method and headers are expected, but the Request also allows specifying a body, a request mode, credentials and cache hints.
-
The simplest Request is of course, just a URL, as you may do to GET a resource.
-
-
-
var req = new Request( "/index.html" ) ;
+}
+
+
+
Request
+
+
The Request interface defines a request to fetch a resource over HTTP.
+ URL, method and headers are expected, but the Request also allows specifying
+ a body, a request mode, credentials and cache hints.
+
The simplest Request is of course, just a URL, as you may do to GET a
+ resource.
+
+
var req = new Request( "/index.html" ) ;
console.log ( req.method ) ; // "GET"
-console.log ( req.url ) ; // "http://example.com/index.html"
-
-
You may also pass a Request to the Request()
constructor to create a copy. (This is not the same as calling the clone()
method, which is covered in the “Reading bodies” section.).
-
-
-
var copy = new Request( req) ;
+console.log ( req.url ) ; // "http://example.com/index.html"
+
+
You may also pass a Request to the Request()
constructor to
+ create a copy.
+ (This is not the same as calling the clone()
method, which
+ is covered in
+ the “Reading bodies” section.).
+
+
var copy = new Request( req) ;
console.log ( copy.method ) ; // "GET"
-console.log ( copy.url ) ; // "http://example.com/index.html"
-
-
Again, this form is probably only useful in ServiceWorkers.
-
The non-URL attributes of the Request
can only be set by passing initial values as a second argument to the constructor. This argument is a dictionary.
-
-
-
var uploadReq = new Request( "/uploadImage" , {
+console.log ( copy.url ) ; // "http://example.com/index.html"
+
+
Again, this form is probably only useful in ServiceWorkers.
+
The non-URL attributes of the Request
can only be set by passing
+ initial
+ values as a second argument to the constructor. This argument is a dictionary.
+
+
var uploadReq = new Request( "/uploadImage" , {
method: "POST" ,
headers: {
"Content-Type" : "image/png" ,
} ,
body: "image data"
-} ) ;
-
-
The Request’s mode is used to determine if cross-origin requests lead to valid responses, and which properties on the response are readable. Legal mode values are "same-origin"
, "no-cors"
(default) and "cors"
.
-
The "same-origin"
mode is simple, if a request is made to another origin with this mode set, the result is simply an error. You could use this to ensure that a request is always being made to your origin.
+
} ) ;
+
+
The Request’s mode is used to determine if cross-origin requests lead
+ to valid responses, and which properties on the response are readable.
+ Legal mode values are "same-origin"
, "no-cors"
(default)
+ and "cors"
.
+
The "same-origin"
mode is simple, if a request is made to another
+ origin with this mode set, the result is simply an error. You could use
+ this to ensure that
+ a request is always being made to your origin.
-
-
var arbitraryUrl = document.getElementById ( "url-input" ) .value ;
+ var arbitraryUrl = document.getElementById ( "url-input" ) .value ;
fetch( arbitraryUrl, { mode: "same-origin" } ) .then ( function ( res) {
console.log ( "Response succeeded?" , res.ok ) ;
} , function ( e) {
console.log ( "Please enter a same-origin URL!" ) ;
-} ) ;
-
-
The "no-cors"
mode captures what the web platform does by default for scripts you import from CDNs, images hosted on other domains, and so on. First, it prevents the method from being anything other than “HEAD”, “GET” or “POST”. Second, if any ServiceWorkers intercept these requests, they may not add or override any headers except for these . Third, JavaScript may not access any properties of the resulting Response. This ensures that ServiceWorkers do not affect the semantics of the Web and prevents security and privacy issues that could arise from leaking data across domains.
-
"cors"
mode is what you’ll usually use to make known cross-origin requests to access various APIs offered by other vendors. These are expected to adhere to the CORS protocol . Only a limited set of headers is exposed in the Response, but the body is readable. For example, you could get a list of Flickr’s most interesting photos today like this:
+
} ) ;
+
+
The "no-cors"
mode captures what the web platform does by default
+ for scripts you import from CDNs, images hosted on other domains, and so
+ on. First, it prevents the method from being anything other than “HEAD”,
+ “GET” or “POST”. Second, if any ServiceWorkers intercept these requests,
+ they may not add or override any headers except for these .
+ Third, JavaScript may not access any properties of the resulting Response.
+ This ensures that ServiceWorkers do not affect the semantics of the Web
+ and prevents security and privacy issues that could arise from leaking
+ data across domains.
+
"cors"
mode is what you’ll usually use to make known cross-origin
+ requests to access various APIs offered by other vendors. These are expected
+ to adhere to
+ the CORS protocol .
+ Only a limited set of
+ headers is exposed in the Response, but the body is readable. For example,
+ you could get a list of Flickr’s most interesting photos
+ today like this:
-
-
var u = new URLSearchParams( ) ;
+ var u = new URLSearchParams( ) ;
u.append ( 'method' , 'flickr.interestingness.getList' ) ;
u.append ( 'api_key' , '<insert api key here>' ) ;
u.append ( 'format' , 'json' ) ;
u.append ( 'nojsoncallback' , '1' ) ;
-
+
var apiCall = fetch( 'https://api.flickr.com/services/rest?' + u) ;
-
+
apiCall.then ( function ( response) {
return response.json ( ) .then ( function ( json) {
// photo is a list of photos.
@@ -162,117 +225,191 @@ Request
photos.forEach ( function ( photo) {
console.log ( photo.title ) ;
} ) ;
-} ) ;
-
-
You may not read out the “Date” header since Flickr does not allow it via Access-Control-Expose-Headers
.
+
} ) ;
+
+
You may not read out the “Date” header since Flickr does not allow it
+ via
+ Access-Control-Expose-Headers
.
-
-
response.headers .get ( "Date" ) ; // null
-
-
The credentials
enumeration determines if cookies for the other domain are sent to cross-origin requests. This is similar to XHR’s withCredentials
flag, but tri-valued as "omit"
(default), "same-origin"
and "include"
.
-
The Request object will also give the ability to offer caching hints to the user-agent. This is currently undergoing some security review . Firefox exposes the attribute, but it has no effect.
-
Requests have two read-only attributes that are relevant to ServiceWorkers intercepting them. There is the string referrer
, which is set by the UA to be the referrer of the Request. This may be an empty string. The other is context
which is a rather large enumeration defining what sort of resource is being fetched. This could be “image” if the request is from an <img>tag in the controlled document, “worker” if it is an attempt to load a worker script, and so on. When used with the fetch()
function, it is “fetch”.
-
Response
-
Response
instances are returned by calls to fetch()
. They can also be created by JS, but this is only useful in ServiceWorkers.
-
We have already seen some attributes of Response when we looked at fetch()
. The most obvious candidates are status
, an integer (default value 200) and statusText
(default value “OK”), which correspond to the HTTP status code and reason. The ok
attribute is just a shorthand for checking that status
is in the range 200-299 inclusive.
-
headers
is the Response’s Headers object, with guard “response”. The url
attribute reflects the URL of the corresponding request.
-
Response also has a type
, which is “basic”, “cors”, “default”, “error” or “opaque”.
-
- "basic"
: normal, same origin response, with all headers exposed except “Set-Cookie” and “Set-Cookie2″.
- "cors"
: response was received from a valid cross-origin request. Certain headers and the body may be accessed.
- "error"
: network error. No useful information describing the error is available. The Response’s status is 0, headers are empty and immutable. This is the type for a Response obtained from Response.error()
.
- "opaque"
: response for “no-cors” request to cross-origin resource. Severely
- restricted
-
-
The “error” type results in the fetch()
Promise rejecting with TypeError.
-
There are certain attributes that are useful only in a ServiceWorker scope. The idiomatic way to return a Response to an intercepted request in ServiceWorkers is:
+
response.headers .get ( "Date" ) ; // null
+
+
The credentials
enumeration determines if cookies for the other
+ domain are
+ sent to cross-origin requests. This is similar to XHR’s withCredentials
+ flag, but tri-valued as "omit"
(default), "same-origin"
and "include"
.
+
The Request object will also give the ability to offer caching hints to
+ the user-agent. This is currently undergoing some security review .
+ Firefox exposes the attribute, but it has no effect.
+
Requests have two read-only attributes that are relevant to ServiceWorkers
+ intercepting them. There is the string referrer
, which is
+ set by the UA to be
+ the referrer of the Request. This may be an empty string. The other is
+ context
which is a rather large enumeration defining
+ what sort of resource is being fetched. This could be “image” if the request
+ is from an
+ <img>tag in the controlled document, “worker” if it is an attempt to load a
+ worker script, and so on. When used with the fetch()
function,
+ it is “fetch”.
+
+
Response
+
+
Response
instances are returned by calls to fetch()
.
+ They can also be created by JS, but this is only useful in ServiceWorkers.
+
We have already seen some attributes of Response when we looked at fetch()
.
+ The most obvious candidates are status
, an integer (default
+ value 200) and statusText
(default value “OK”), which correspond
+ to the HTTP status code and reason. The ok
attribute is just
+ a shorthand for checking that status
is in the range 200-299
+ inclusive.
+
headers
is the Response’s Headers object, with guard “response”.
+ The url
attribute reflects the URL of the corresponding request.
+
Response also has a type
, which is “basic”, “cors”, “default”,
+ “error” or
+ “opaque”.
+
"basic"
: normal, same origin response, with all headers exposed
+ except
+ “Set-Cookie” and “Set-Cookie2″.
+ "cors"
: response was received from a valid cross-origin request.
+ Certain headers and the body may be accessed.
+ "error"
: network error. No useful information describing
+ the error is available. The Response’s status is 0, headers are empty and
+ immutable. This is the type for a Response obtained from Response.error()
.
+ "opaque"
: response for “no-cors” request to cross-origin
+ resource. Severely
+ restricted
+
+ The “error” type results in the fetch()
Promise rejecting with
+ TypeError.
+
There are certain attributes that are useful only in a ServiceWorker scope.
+ The
+ idiomatic way to return a Response to an intercepted request in ServiceWorkers
+ is:
-
-
addEventListener( 'fetch' , function ( event) {
+ addEventListener( 'fetch' , function ( event) {
event.respondWith ( new Response( "Response body" , {
headers: { "Content-Type" : "text/plain" }
} ) ;
-} ) ;
-
-
As you can see, Response has a two argument constructor, where both arguments are optional. The first argument is a body initializer, and the second is a dictionary to set the status
, statusText
and headers
.
-
The static method Response.error()
simply returns an error response. Similarly, Response.redirect(url, status)
returns a Response resulting in a redirect to url
.
-
Dealing with bodies
-
Both Requests and Responses may contain body data. We’ve been glossing over it because of the various data types body may contain, but we will cover it in detail now.
+
} ) ;
+
+
As you can see, Response has a two argument constructor, where both arguments
+ are optional. The first argument is a body initializer, and the second
+ is a dictionary to set the status
, statusText
and headers
.
+
The static method Response.error()
simply returns an error
+ response. Similarly, Response.redirect(url, status)
returns
+ a Response resulting in
+ a redirect to url
.
+
+
Dealing with bodies
+
+
Both Requests and Responses may contain body data. We’ve been glossing
+ over it because of the various data types body may contain, but we will
+ cover it in detail now.
A body is an instance of any of the following types.
-
- ArrayBuffer
- ArrayBufferView (Uint8Array and friends)
- Blob / File
+
- In addition, Request and Response both offer the following methods to extract their body. These all return a Promise that is eventually resolved with the actual content.
-
- arrayBuffer()
- blob()
- json()
- text()
- formData()
-
- This is a significant improvement over XHR in terms of ease of use of non-text data!
+ URLSearchParams
+
+ FormData –
+ currently not supported by either Gecko or Blink. Firefox expects to ship
+ this in version 39 along with the rest of Fetch.
+ In addition, Request and Response both offer the following methods to
+ extract their body. These all return a Promise that is eventually resolved
+ with the actual content.
+
arrayBuffer()
+
+ blob()
+
+ json()
+
+ text()
+
+ formData()
+
+ This is a significant improvement over XHR in terms of ease of use of
+ non-text data!
Request bodies can be set by passing body
parameters:
-
-
var form = new FormData( document.getElementById ( 'login-form' ) ) ;
+ var form = new FormData( document.getElementById ( 'login-form' ) ) ;
fetch( "/login" , {
method: "POST" ,
body: form
-} )
-
-
Responses take the first argument as the body.
-
+} )
+
+
Responses take the first argument as the body.
-
var res = new Response( new File( [ "chunk" , "chunk" ] , "archive.zip" ,
- { type: "application/zip" } ) ) ;
-
-
Both Request and Response (and by extension the fetch()
function), will try to intelligently determine the content type . Request will also automatically set a “Content-Type” header if none is set in the dictionary.
-
Streams and cloning
-
It is important to realise that Request and Response bodies can only be read once! Both interfaces have a boolean attribute bodyUsed
to determine if it is safe to read or not.
-
+
var res = new Response( new File( [ "chunk" , "chunk" ] , "archive.zip" ,
+ { type: "application/zip" } ) ) ;
+
+
Both Request and Response (and by extension the fetch()
function),
+ will try to intelligently determine the content type .
+ Request will also automatically set a “Content-Type” header if none is
+ set in the dictionary.
+
+
Streams and cloning
+
+
It is important to realise that Request and Response bodies can only be
+ read once! Both interfaces have a boolean attribute bodyUsed
to
+ determine if it is safe to read or not.
-
var res = new Response( "one time use" ) ;
+ var res = new Response( "one time use" ) ;
console.log ( res.bodyUsed ) ; // false
res.text ( ) .then ( function ( v) {
console.log ( res.bodyUsed ) ; // true
} ) ;
console.log ( res.bodyUsed ) ; // true
-
+
res.text ( ) .catch ( function ( e) {
console.log ( "Tried to read already consumed Response" ) ;
-} ) ;
-
-
This decision allows easing the transition to an eventual stream-based Fetch API. The intention is to let applications consume data as it arrives, allowing for JavaScript to deal with larger files like videos, and perform things like compression and editing on the fly.
-
Often, you’ll want access to the body multiple times. For example, you can use the upcoming Cache API to store Requests and Responses for offline use, and Cache requires bodies to be available for reading.
-
So how do you read out the body multiple times within such constraints? The API provides a clone()
method on the two interfaces. This will return a clone of the object, with a ‘new’ body. clone()
MUST be called before the body of the corresponding object has been used. That is, clone()
first, read later.
-
+} ) ;
+
+
This decision allows easing the transition to an eventual stream-based Fetch
+ API. The intention is to let applications consume data as it arrives, allowing
+ for JavaScript to deal with larger files like videos, and perform things
+ like compression and editing on the fly.
+
Often, you’ll want access to the body multiple times. For example, you
+ can use the upcoming Cache API to
+ store Requests and Responses for offline use, and Cache requires bodies
+ to be available for reading.
+
So how do you read out the body multiple times within such constraints?
+ The API provides a clone()
method on the two interfaces. This
+ will return a clone of the object, with a ‘new’ body. clone()
MUST
+ be called before the body of the corresponding object has been used. That
+ is, clone()
first, read later.
-
addEventListener( 'fetch' , function ( evt) {
+ addEventListener( 'fetch' , function ( evt) {
var sheep = new Response( "Dolly" ) ;
console.log ( sheep.bodyUsed ) ; // false
var clone = sheep.clone ( ) ;
console.log ( clone.bodyUsed ) ; // false
-
+
clone.text ( ) ;
console.log ( sheep.bodyUsed ) ; // false
console.log ( clone.bodyUsed ) ; // true
-
+
evt.respondWith ( cache.add ( sheep.clone ( ) ) .then ( function ( e) {
return sheep;
} ) ;
-} ) ;
-
-
Future improvements
-
Along with the transition to streams, Fetch will eventually have the ability to abort running fetch()
es and some way to report the progress of a fetch. These are provided by XHR, but are a little tricky to fit in the Promise-based nature of the Fetch API.
-
You can contribute to the evolution of this API by participating in discussions on the WHATWG mailing list and in the issues in the Fetch and ServiceWorker specifications.
-
For a better web!
-
The author would like to thank Andrea Marchesini, Anne van Kesteren and Ben
-Kelly for helping with the specification and implementation.
-
-
-
\ No newline at end of file
+
} ) ;
+
+
+
Future improvements
+
+
Along with the transition to streams, Fetch will eventually have the ability
+ to abort running fetch()
es and some way to report the progress
+ of a fetch. These are provided by XHR, but are a little tricky to fit in
+ the Promise-based nature of the Fetch API.
+
You can contribute to the evolution of this API by participating in discussions
+ on the WHATWG mailing list and
+ in the issues in the Fetch and
+ ServiceWorker specifications.
+
For a better web!
+
The author would like to thank Andrea Marchesini, Anne van Kesteren and Ben
+Kelly for helping with the specification and implementation.
+
+
\ No newline at end of file
diff --git a/test/test-pages/clean-links/expected.html b/test/test-pages/clean-links/expected.html
index eb620776..8c1b8b12 100644
--- a/test/test-pages/clean-links/expected.html
+++ b/test/test-pages/clean-links/expected.html
@@ -1,261 +1,1386 @@
-
-
-
-
Study Webtext
-
"Bartleby the Scrivener: A Story of Wall-Street " (1853) Herman Melville
-
-
Prepared by Ann
+
+
+
Study Webtext
+
"Bartleby the Scrivener: A Story of Wall-Street " (1853)
+ Herman Melville
+
+
+
Prepared by Ann
Woodlief, Virginia Commonwealth University
-
Click on text in red for hypertext notes and questions I am a rather elderly man. The nature of my avocations for the last thirty years has brought me into more than ordinary contact with what would seem an interesting and somewhat singular set of men of whom as yet nothing that I know of has ever been written:-- I mean the law-copyists or scriveners. I have known very many of them, professionally and privately, and if I pleased, could relate divers histories, at which good-natured gentlemen might smile, and sentimental souls might weep. But I waive the biographies of all other scriveners for a few passages in the life of Bartleby, who was a scrivener the strangest I ever saw or heard of. While of other law-copyists I might write the complete life, of Bartleby nothing of that sort can be done. I believe that no materials exist for a full and satisfactory biography of this man. It is an irreparable loss to literature. Bartleby was one of those beings of whom nothing is ascertainable, except from the original sources, and in his case those are very small. What my own astonished eyes saw of Bartleby, that is all I know of him, except, indeed, one vague report which will appear in the sequel.
-
Ere introducing the scrivener, as he first appeared to me, it is fit I make some mention of myself, my employees, my business, my chambers, and general surroundings; because some such description is indispensable to an adequate understanding of the chief character about to be presented.
-
Imprimis : I am a man who, from his youth upwards, has been filled with a profound conviction that the easiest way of life is the best.. Hence, though I belong to a profession proverbially energetic and nervous, even to turbulence, at times, yet nothing of that sort have I ever suffered to invade my peace. I am one of those unambitious lawyers who never addresses a jury, or in any way draws down public applause; but in the cool tranquillity of a snug retreat, do a snug business among rich men's bonds and mortgages and title-deeds. The late John Jacob Astor, a personage little given to poetic enthusiasm, had no hesitation in pronouncing my first grand point to be prudence; my next, method. I do not speak it in vanity, but simply record the fact, that I was not unemployed in my profession by the last John Jacob Astor; a name which, I admit, I love to repeat, for it hath a rounded and orbicular sound to it, and rings like unto bullion. I will freely add, that I was not insensible to the late John Jacob Astor's good opinion.
-
Some time prior to the period at which this little history begins, my avocations had been largely increased. The good old office, now extinct in the State of New York, of a Master in Chancery, had been conferred upon me. It was not a very arduous office, but very pleasantly remunerative. I seldom lose my temper; much more seldom indulge in dangerous indignation at wrongs and outrages; but I must be permitted to be rash here and declare, that I consider the sudden and violent abrogation of the office of Master of Chancery, by the new Constitution, as a----premature act; inasmuch as I had counted upon a life-lease of the profits, whereas I only received those of a few short years. But this is by the way.
-
My chambers were up stairs at No.--Wall-street. At one end they looked upon the white wall of the interior of a spacious sky-light shaft, penetrating the building from top to bottom. This view might have been considered rather tame than otherwise, deficient in what landscape painters call "life." But if so, the view from the other end of my chambers offered, at least, a contrast, if nothing more. In that direction my windows commanded an unobstructed view of a lofty brick wall,black by age and everlasting shade; which wall required no spy-glass to bring out its lurking beauties, but for the benefit of all near-sighted spectators, was pushed up to within ten feet of my window panes. Owing to the great height of the surrounding buildings, and my chambers being on the second floor, the interval between this wall and mine not a little resembled a huge square cistern.
-
At the period just preceding the advent of Bartleby, I had two persons as copyists in my employment, and a promising lad as an office-boy. First, Turkey; second, Nippers; third, Ginger Nut.These may seem names, the like of which are not usually found in the Directory. In truth they were nicknames, mutually conferred upon each other by my three clerks, and were deemed expressive of their respective persons or characters. Turkey was a short, pursy Englishman of about my own age, that is, somewhere not far from sixty. In the morning, one might say, his face was of a fine florid hue, but after twelve o'clock, meridian-- his dinner hour-- it blazed like a grate full of Christmas coals; and continued blazing--but, as it were, with a gradual wane--till 6 o'clock, P.M. or thereabouts, after which I saw no more of the proprietor of the face, which gaining its meridian with the sun, seemed to set with it, to rise, culminate, and decline the following day, with the like regularity and undiminished glory. There are many singular coincidences I have known in the course of my life, not the least among which was the fact that exactly when Turkey displayed his fullest beams from his red and radiant countenance, just then, too, at the critical moment, began the daily period when I considered his business capacities as seriously disturbed for the remainder of the twenty-four hours. Not that he was absolutely idle, or averse to business then; far from it. The difficulty was, he was apt to be altogether too energetic. There was a strange, inflamed, flurried, flighty recklessness of activity about him. He would be incautious in dipping his pen into his inkstand. All his blots upon my documents, were dropped there after twelve o'clock, meridian. Indeed, not only would he be reckless and sadly given to making blots in the afternoon, but some days he went further, and was rather noisy. At such times, too, his face flamed with augmented blazonry, as if cannel coal had been heaped on anthracite. He made an unpleasant racket with his chair; spilled his sand-box; in mending his pens, impatiently split them all to pieces, and threw them on the floor in a sudden passion; stood up and leaned over his table, boxing his papers about in a most indecorous manner, very sad to behold in an elderly manlike him. Nevertheless, as he was in many ways a most valuable person to me, and all the time before twelve o'clock, meridian, was the quickest, steadiest creature too, accomplishing a great deal of work in a style not easy to be matched--for these reasons, I was willingto overlook his eccentricities, though indeed, occasionally, I remonstrated with him. I did this very gently, however, because, though the civilest, nay, the blandest and most reverential of men in the morning, yet in the afternoon he was disposed, upon provocation, to be slightly rash with his tongue, in fact, insolent. Now, valuing his morning services as I did, and resolved not to lose them; yet, at the same time made uncomfortable by his inflamed ways after twelve o'clock; and being a man of peace, unwilling by my admonitions to call forth unseemingly retorts from him; I took upon me, one Saturday noon (he was always worse on Saturdays), to hint to him, very kindly, that perhaps now that he was growing old, it might be well to abridge his labors; in short, he need not come to my chambers after twelve o'clock, but, dinner over, had best go home to his lodgings and rest himself till tea-time. But no; he insisted upon his afternoon devotions. His countenance became intolerably fervid, as he oratorically assured me--gesticulating with a long ruler at the other end of the room--that if his services in the morning were useful, how indispensible, then, in the afternoon?
-
"With submission, sir," said Turkey on this occasion, "I consider myself your right-hand man. In the morning I but marshal and deploy my columns; but in the afternoon I put myself at their head, and gallantly charge the foe, thus!"--and he made a violent thrust with the ruler.
-
"But the blots, Turkey," intimated I.
-
"True,--but, with submission, sir, behold these hairs! I am getting old. Surely, sir, a blot or two of a warm afternoon is not the page--is honorable. With submission, sir, we both are getting old."
-
This appeal to my fellow-feeling was hardly to be resisted. At all events, I saw that go he would not. So I made up my mind to let him stay, resolving, nevertheless, to see to it, that during the afternoon he had to do with my less important papers.
-
Nippers, the second on my list, was a whiskered, sallow, and, upon the whole, rather piratical-looking young man of about five and twenty. I always deemed him the victim of two evil powers-- ambition and indigestion. The ambition was evinced by a certain impatience of the duties of a mere copyist, an unwarrantable usurpation of strictly profession affairs, such as the original drawing up of legal documents. The indigestion seemed betokened in an occasional nervous testiness and grinning irritability, causing the teeth to audibly grind together over mistakes committed in copying; unnecessary maledictions, hissed, rather than spoken, in the heat of business; and especially by a continual discontent with the height of the table where he worked. Though of a very ingenious mechanical turn, Nippers could never get this table to suit him. He put chips under it, blocks of various sorts, bits of pasteboard, and at last went so far as to attempt an exquisite adjustment by final pieces of folded blotting-paper. But no invention would answer. If, for the sake of easing his back, he brought the table lid at a sharp angle well up towards his chin, and wrote there like a man using the steep roof of a Dutch house for his desk:--then he declared that it stopped the circulation in his arms. If now he lowered the table to his waistbands, and stooped over it in writing, then there was a sore aching in his back. In short, the truth of the matter was, Nippers knew not what he wanted. Or, if he wanted anything, it was to be rid of a scrivener's table altogether. Among the manifestations of his diseased ambition was a fondness he had for receiving visits from certain ambiguous-looking fellows in seedy coats, whom he called his clients. Indeed I was aware that not only was he, at times, considerable of a ward-politician, but he occasionally did a little businessat the Justices' courts, and was not unknown on the steps of the Tombs. I have good reason to believe, however, that one individual who called upon him at my chambers, and who, with a grand air, he insisted was his client, was no other than a dun, and the alleged title-deed, a bill. But with all his failings, and the annoyances he caused me, Nippers, like his compatriot Turkey, was a very useful man to me; wrote a neat, swift hand; and, when he chose, was not deficient in a gentlemanly sort of deportment. Added to this, he always dressedin a gentlemanly sort of way; and so, incidentally, reflected credit upon my chambers. Whereas with respect to Turkey, I had much ado to keep him from being a reproach to me. His clothes were apt to look oily and smell of eating-houses. He wore his pantaloons very loose and baggy in summer. His coats were execrable; his hat not to be handled. But while the hat was a thing of indifference to me, inasmuch as his natural civility and deference, as a dependent Englishman, always led him to doff it the moment he entered the room, yet his coat was another matter. Concerning his coats, I reasoned with him; but with no effect. The truth was, I suppose, that a man with so small an income, could not afford to sport such a lustrous face and a lustrous coat at one and the same time. As Nippers once observed, Turkey's money went chiefly for red ink. One winter day I presented Turkey with a highly-respectable looking coat of my own, a padded gray coat, of a most comfortable warmth, and which buttoned straight up from the knee to the neck. I thought Turkey would appreciate the favor, and abate his rashness and obstreperousness of afternoons. But no. I verily believe that buttoning himself up in so downy and blanket-like a coat had a pernicious effect upon him; upon the same principle that too much oats are bad for horses. In fact, precisely as a rash, restive horse is said to feel his oats, so Turkey felt his coat. It made him insolent. He was a man whom prosperity harmed.
-
Though concerning the self-indulgent habits of Turkey I had my own private surmises, yet touching Nippers I was well persuaded that whatever might be his faults in other respects, he was, at least, a temperate young man. But indeed, nature herself seemed to have been his vintner, and at his birth charged him so thoroughly with an irritable, brandy-like disposition, that all subsequent potations were needless. When I consider how, amid the stillness of my chambers, Nippers would sometimes impatiently rise from his seat, and stooping over his table, spread his arms wide apart, seize the whole desk, and move it, and jerk it, with a grim, grinding motion on the floor, as if the table were a perverse voluntary agent, intent on thwarting and vexing him; I plainly perceive that for Nippers, brandy and water were altogether superfluous.
-
It was fortunate for me that, owing to its course--indigestion--the irritability and consequent nervousness of Nippers, were mainly observable in the morning, while in the afternoon he was comparatively mild. So that Turkey's paroxysms only coming on about twelve o'clock, I never had to do with their eccentricities at one time. Their fits relieved each other like guards. When Nippers' was on, Turkey's was off, and vice versa. This was a good natural arrangement under the circumstances.
-
Ginger Nut, the third on my list, was a lad some twelve years old. His father was a carman, ambitious of seeing his son on the bench instead of a cart, before he died. So he sent him to my office as a student at law, errand boy, and cleaner and sweeper, at the rate of one dollar a week. He had a little desk to himself, but he did not use it much. Upon inspection, the drawer exhibited a great array of the shells of various sorts of nuts. Indeed, to this quick-witted youth the whole noble science of the law was contained in a nut-shell. Not the least among the employments of Ginger Nut, as well as one which he discharged with the most alacrity, was his duty as cake and apple purveyor for Turkey and Nippers. Copying law papers being proverbially a dry, husky sort of business, my two scriveners were fain to moisten their mouths very often with Spitzenbergs to be had at the numerous stalls nigh the Custom House and Post Office. Also, they sent Ginger Nut very frequently for that peculiar cake--small, flat, round, and very spicy--after which he had been named by them. Of a cold morning when business was but dull, Turkey would gobble up scores of these cakes, as if they were mere wafers--indeed they sell them at the rate of six or eight for a penny--the scrape of his pen blending with the crunching of the crisp particles in his mouth. Of all the fiery afternoon blunders and flurried rashnesses of Turkey, was his once moistening a ginger-cake between his lips, and clapping it on to a mortgage for a seal. I came within an ace of dismissing him then. But he mollified me by making an oriental bow, and saying--"With submission, sir, it was generous of me to find you in stationery on my own account."
-
Now my original business--that of a conveyancer and title hunter, and drawer-up of recondite documents of all sorts--was considerably increased by receiving the master's office. There was now great work for scriveners. Not only must I push the clerks already with me, but I must have additional help. In answer to my advertisement, a motionless young man one morning, stood upon my office threshold, the door being open, for it was summer. I can see that figure now--pallidly neat, pitiably respectable, incurably forlorn! It was Bartleby.
-
After a few words touching his qualifications, I engaged him, glad to have among my corps of copyists a man of so singularly sedate an aspect, which I thought might operate beneficially upon the flighty temper of Turkey, and the fiery one of Nippers.
-
I should have stated before that ground glass folding-doors divided my premises into two parts, one of which was occupied by my scriveners, the other by myself. According to my humor I threw open these doors, or closed them. I resolved to assign Bartleby a corner by the folding-doors, but on my side of them, so as to have this quiet man within easy call, in case any trifling thing was to be done. I placed his desk close up to a small side window in that part of the room, a window which originally had afforded a lateral view of certain grimy back-yards and bricks, but which, owing to subsequent erections, commanded at present no view at all, though it gave some light. Within three feet of the panes was a wall, and the light came down from far above, between two lofty buildings, as from a very small opening in a dome. Still further to a satisfactory arrangement, I procured a high green folding screen, which might entirely isolate Bartleby from my sight, though not remove him from my voice. And thus, in a manner, privacy and society were conjoined.
-
At first Bartleby did an extraordinary quantity of writing. As if long famishingfor something to copy, he seemed to gorge himself on my documents. There was no pause for digestion. He ran a day and night line, copying by sun-light and by candle-light. I should have been quite delighted with his application, had be been cheerfully industrious. But he wrote on silently, palely, mechanically.
-
It is, of course, an indispensable part of a scrivener's business to verify the accuracy of his copy, word by word. Where there are two or more scriveners in an office, they assist each other in this examination, one reading from the copy, the other holding the original. It is a very dull, wearisome, and lethargic affair. I can readily imagine that to some sanguine temperaments it would be altogether intolerable. For example, I cannot credit that the mettlesome poet Byron would have contentedly sat down with Bartleby to examine a law document of, say five hundred pages, closely written in a crimpy hand.
-
Now and then, in the haste of business, it had been my habit to assist in comparing some brief document myself, calling Turkey or Nippers for this purpose. One object I had in placing Bartleby so handy to me behind the screen, was to avail myself of his services on such trivial occasions. It was on the third day, I think, of his being with me, and before any necessity had arisen for having his own writing examined, that, being much hurried to complete a small affair I had in hand, I abruptly called to Bartleby. In my haste and natural expectancy of instant compliance, I sat with my head bent over the original on my desk, and my right hand sideways, and somewhat nervously extended with the copy, so that immediately upon emerging from his retreat, Bartleby might snatch it and proceed to business without the least delay.
-
In this very attitude did I sit when I called to him, rapidly stating what it was I wanted him to do--namely, to examine a small paper with me. Imagine my surprise, nay, my consternation, when without moving from his privacy, Bartleby in a singularly mild, firm voice, replied,"I would prefer not to."
-
I sat awhile in perfect silence, rallying my stunned faculties. Immediately it occurred to me that my ears had deceived me, or Bartleby had entirely misunderstood my meaning. I repeated my request in the clearest tone I could assume. But in quite as clear a one came the previous reply, "I would prefer not to."
-
"Prefer not to," echoed I, rising in high excitement, and crossing the room with a stride, "What do you mean? Are you moon-struck? I want you to help me compare this sheet here--take it," and I thrust it towards him.
-
"I would prefer not to," said he.
-
I looked at him steadfastly. His face was leanly composed; his gray eye dimly calm. Not a wrinkle of agitation rippled him. Had there been the least uneasiness, anger, impatience or impertinence in his manner; in other words, had there been any thing ordinarily human about him, doubtless I should have violently dismissed him from the premises. But as it was, I should have as soon thought of turning my pale plaster-of-paris bust of Cicero out of doors. I stood gazing at him awhile, as he went on with his own writing, and then reseated myself at my desk. This is very strange, thought I. What had one best do? But my business hurried me. I concluded to forget the matter for the present, reserving it for my future leisure. So calling Nippers from the other room, the paper was speedily examined.
-
A few days after this, Bartleby concluded four lengthy documents, being quadruplicates of a week's testimony taken before me in my High Court of Chancery. It became necessary to examine them. It was an important suit, and great accuracy was imperative. Having all things arranged I called Turkey, Nippers and Ginger Nut from the next room, meaning to place the four copies in the hands of my four clerks, while I should read from the original. Accordingly Turkey, Nippers and Ginger Nut had taken their seats in a row, each with his document in hand, when I called to Bartleby to join this interesting group.
-
"Bartleby! quick, I am waiting."
-
I heard a low scrape of his chair legs on the unscraped floor, and soon he appeared standing at the entrance of his hermitage.
-
"What is wanted?" said he mildly.
-
"The copies, the copies," said I hurriedly. "We are going to examine them. There"--and I held towards him the fourth quadruplicate.
-
"I would prefer not to," he said, and gently disappeared behind the screen.
-
For a few moments I was turned into a pillar of salt, standing at the head of my seated column of clerks. Recovering myself, I advanced towards the screen, and demanded the reason for such extraordinary conduct.
-
"Why do you refuse?"
-
"I would prefer not to."
-
With any other man I should have flown outright into a dreadful passion, scorned all further words, and thrust him ignominiously from my presence. But there was something about Bartleby that not only strangely disarmed me, but in a wonderful manner touched and disconcerted me. I began to reason with him.
-
"These are your own copies we are about to examine. It is labor saving to you, because one examination will answer for your four papers. It is common usage. Every copyist is bound to help examine his copy. Is it not so? Will you not speak? Answer!"
-
"I prefer not to," he replied in a flute-like tone. It seemed to me that while I had been addressing him, he carefully revolved every statement that I made; fully comprehended the meaning; could not gainsay the irresistible conclusion; but, at the same time, some paramount consideration prevailed with him to reply as he did.
-
"You are decided, then, not to comply with my request--a request made according to common usage and common sense?"
-
He briefly gave me to understand that on that point my judgment was sound. Yes: his decision was irreversible.
-
It is not seldom the case that when a man is browbeaten in some unprecedented and violently unreasonable way, he begins to stagger in his own plainest faith. He begins, as it were, vaguely to surmise that, wonderful as it may be, all the justice and all the reason is on the other side. Accordingly, if any disinterested persons are present, he turns to them for some reinforcement for his own faltering mind.
-
"Turkey," said I, "what do you think of this? Am I not right?"
-
"With submission, sir," said Turkey, with his blandest tone, "I think that you are."
-
"Nippers," said I, "what do you think of it?"
-
"I think I should kick him out of the office."
-
(The reader of nice perceptions will here perceive that, it being morning, Turkey's answer is couched in polite and tranquil terms, but Nippers replies in ill-tempered ones. Or, to repeat a previous sentence, Nipper's ugly mood was on duty, and Turkey's off.)
-
"Ginger Nut," said I, willing to enlist the smallest suffrage in my behalf, "what do you think of it?"
-
"I think, sir, he's a little luny ," replied Ginger Nut, with a grin.
-
"You hear what they say," said I, turning towards the screen, "come forth and do your duty."
-
But he vouchsafed no reply. I pondered a moment in sore perplexity. But once more business hurried me. I determined again to postpone the consideration of this dilemma to my future leisure. With a little trouble we made out to examine the papers without Bartleby, though at every page or two, Turkey deferentially dropped his opinion that this proceeding was quite out of the common; while Nippers, twitching in his chair with a dyspeptic nervousness, ground out between his set teeth occasional hissing maledictions against the stubborn oaf behind the screen. And for his (Nipper's) part, this was the first and the last time he would do another man's business without pay.
-
Meanwhile Bartleby sat in his hermitage, oblivious to every thing but his own peculiar business there.
-
Some days passed, the scrivener being employed upon another lengthy work. His late remarkable conduct led me to regard his way narrowly. I observed that he never went to dinner; indeed that he never went any where. As yet I had never of my personal knowledge known him to be outside of my office. He was a perpetual sentry in the corner. At about eleven o'clock though, in the morning, I noticed that Ginger Nut would advance toward the opening in Bartleby's screen, as if silently beckoned thither by a gesture invisible to me where I sat. That boy would then leave the office jingling a few pence, and reappear with a handful of ginger-nuts which he delivered in the hermitage, receiving two of the cakes for his trouble.
-
He lives, then, on ginger-nuts, thought I; never eats a dinner, properly speaking; he must be a vegetarian then, but no; he never eats even vegetables, he eats nothing but ginger-nuts. My mind then ran on in reveries concerning the probable effects upon the human constitution of living entirely on ginger-nuts. Ginger-nuts are so called because they contain ginger as one of their peculiar constituents, and the final flavoring one. Now what was ginger? A hot, spicy thing. Was Bartleby hot and spicy? Not at all. Ginger, then, had no effect upon Bartleby. Probably he preferred it should have none.
-
Nothing so aggravates an earnest person as a passive resistance. If the individual so resisted be of a not inhumane temper, and the resisting one perfectly harmless in his passivity; then, in the better moods of the former, he will endeavor charitably to construe to his imagination what proves impossible to be solved by his judgment. Even so, for the most part, I regarded Bartleby and his ways. Poor fellow! thought I, he means no mischief; it is plain he intends no insolence; his aspect sufficiently evinces that his eccentricities are involuntary. He is useful to me. I can get along with him. If I turn him away, the chances are he will fall in with some less indulgent employer, and then he will be rudely treated, and perhaps driven forth miserably to starve. Yes. Here I can cheaply purchase a delicious self-approval. To befriend Bartleby; to humor him in his strange willfulness, will cost me little or nothing, while I lay up in my soul what will eventually prove a sweet morsel for my conscience. But this mood was not invariable with me. The passiveness of Bartleby sometimes irritated me. I felt strangely goaded on to encounter him in new opposition, to elicit some angry spark from him answerable to my own. But indeed I might as well have essayed to strike fire with my knuckles against a bit of Windsor soap. But one afternoon the evil impulse in me mastered me, and the following little scene ensued:
-
"Bartleby," said I, "when those papers are all copied, I will compare them with you."
-
"I would prefer not to."
-
"How? Surely you do not mean to persist in that mulish vagary?"
-
No answer.
-
I threw open the folding-doors near by, and turning upon Turkey and Nippers, exclaimed in an excited manner--
-
"He says, a second time, he won't examine his papers. What do you think of it, Turkey?"
-
It was afternoon, be it remembered. Turkey sat glowing like a brass boiler, his bald head steaming, his hands reeling among his blotted papers.
-
"Think of it?" roared Turkey; "I think I'll just step behind his screen, and black his eyes for him!"
-
So saying, Turkey rose to his feet and threw his arms into a pugilistic position. He was hurrying away to make good his promise, when I detained him, alarmed at the effect of incautiously rousing Turkey's combativeness after dinner.
-
"Sit down, Turkey," said I, "and hear what Nippers has to say. What do you think of it, Nippers? Would I not be justified in immediately dismissing Bartleby?"
-
"Excuse me, that is for you to decide, sir. I think his conduct quite unusual, and indeed unjust, as regards Turkey and myself. But it may only be a passing whim."
-
"Ah," exclaimed I, "you have strangely changed your mind then--you speak very gently of him now."
-
"All beer," cried Turkey; "gentleness is effects of beer--Nippers and I dined together to-day. You see how gentle I am, sir. Shall I go and black his eyes?"
-
"You refer to Bartleby, I suppose. No, not to-day, Turkey," I replied; "pray, put up your fists."
-
I closed the doors, and again advanced towards Bartleby. I felt additional incentives tempting me to my fate. I burned to be rebelled against again. I remembered that Bartleby never left the office.
-
"Bartleby," said I, "Ginger Nut is away; just step round to the Post Office, won't you? (it was but a three minutes walk,) and see if there is any thing for me."
-
"I would prefer not to."
-
"You will not?"
-
"I prefer not."
-
I staggered to my desk, and sat there in a deep study. My blind inveteracy returned. Was there any other thing in which I could procure myself to be ignominiously repulsed by this lean, penniless with?--my hired clerk? What added thing is there, perfectly reasonable, that he will be sure to refuse to do?
-
"Bartleby!"
-
No answer.
-
"Bartleby," in a louder tone.
-
No answer.
-
"Bartleby," I roared.
-
Like a very ghost, agreeably to the laws of magical invocation, at the third summons, he appeared at the entrance of his hermitage.
-
"Go to the next room, and tell Nippers to come to me."
-
"I prefer not to," he respectfully and slowly said, and mildly disappeared.
-
"Very good, Bartleby," said I, in a quiet sort of serenely severe self-possessed tone, intimating the unalterable purpose of some terrible retribution very close at hand. At the moment I half intended something of the kind. But upon the whole, as it was drawing towards my dinner-hour, I thought it best to put on my hat and walk home for the day, suffering much from perplexity and distress of mind.
-
Shall I acknowledge it? The conclusion of this whole business was that it soon became a fixed fact of my chambers, that a pale young scrivener, by the name of Bartleby, had a desk there; that he copied for me at the usual rate of four cents a folio (one hundred words); but he was permanently exempt from examining the work done by him, that duty being transferred to Turkey and Nippers, one of compliment doubtless to their superior acuteness; moreover, said Bartleby was never on any account to be dispatched on the most trivial errand of any sort; and that even if entreated to take upon him such a matter, it was generally understood that he would prefer not to--in other words, that he would refuse point-blank.
-
32 As days passed on, I became considerably reconciled to Bartleby. His steadiness, his freedom from all dissipation, his incessant industry (except when he chose to throw himself into a standing revery behind his screen), his great stillness, his unalterableness of demeanor under all circumstances, made him a valuable acquisition. One prime thing was this,--he was always there;--first in the morning, continually through the day, and the last at night. I had a singular confidence in his honesty. I felt my most precious papers perfectly safe in his hands. Sometimes to be sure I could not, for the very soul of me, avoid falling into sudden spasmodic passions with him. For it was exceeding difficult to bear in mind all the time those strange peculiarities, privileges, and unheard of exemptions, forming the tacit stipulations on Bartleby's part under which he remained in my office. Now and then, in the eagerness of dispatching pressing business, I would inadvertently summon Bartleby, in a short, rapid tone, to put his finger, say, on the incipient tie of a bit of red tape with which I was about compressing some papers. Of course, from behind the screen the usual answer, "I prefer not to," was sure to come; and then, how could a human creature with the common infirmities of our nature, refrain from bitterly exclaiming upon such perverseness--such unreasonableness. However, every added repulse of this sort which I received only tended to lessen the probability of my repeating the inadvertence.
-
Here is must be said, that according to the custom of most legal gentlemen occupying chambers in densely-populated law buildings, there were several keys to my door. One was kept by a woman residing in the attic, which person weekly scrubbed and daily swept and dusted my apartments. Another was kept by Turkey for convenience sake. The third I sometimes carried in my own pocket. The fourth I knew not who had.
-
Now, one Sunday morning I happened to go to Trinity Church, to hear a celebrated preacher, and finding myself rather early on the ground, I thought I would walk round to my chambers for a while. Luckily I had my key with me; but upon applying it to the lock, I found it resisted by something inserted from the inside. Quite surprised, I called out; when to my consternation a key was turned from within; and thrusting his lean visage at me, and holding the door ajar, the apparition of Bartleby appeared, in his shirt sleeves, and otherwise in a strangely tattered dishabille, saying quietly that he was sorry, but he was deeply engaged just then, and--preferred not admitting me at present. In a brief word or two, he moreover added, that perhaps I had better walk round the block two or three times, and by that time he would probably have concluded his affairs. Now, the utterly unsurmised appearance of Bartleby, tenanting my law-chambers of a Sunday morning, with his cadaverously gentlemanly nonchalance, yet withal firm and self-possessed, had such a strange effect upon me, that incontinently I slunk away from my own door, and did as desired. But not without sundry twinges of impotent rebellion against the mild effrontery of this unaccountable scrivener. Indeed, it was his wonderful mildness chiefly, which not only disarmed me, but unmanned me, as it were. For I consider that one, for the time, is a sort of unmanned when he tranquilly permits his hired clerk to dictate to him, and order him away from his own premises. Furthermore, I was full of uneasiness as to what Bartleby could possibly be doing in my office in his shirt sleeves, and in an otherwise dismantled condition of a Sunday morning. Was any thing amiss going on? Nay, that was out of the question. It was not to be thought of for a moment that Bartleby was an immoral person. But what could he be doing there?--copying? Nay again, whatever might be his eccentricities, Bartleby was an eminently decorous person. He would be the last man to sit down to his desk in any state approaching to nudity. Besides, it was Sunday; and there was something about Bartleby that forbade the supposition that we would by any secular occupation violate the proprieties of the day.
-
Nevertheless, my mind was not pacified; and full of a restless curiosity, at last I returned to the door. Without hindrance I inserted my key, opened it, and entered. Bartleby was not to be seen. I looked round anxiously, peeped behind his screen; but it was very plain that he was gone. Upon more closely examining the place, I surmised that for an indefinite period Bartleby must have ate, dressed, and slept in my office, and that too without plate, mirror, or bed. The cushioned seat of a rickety old sofa in one corner bore t faint impress of a lean, reclining form. Rolled away under his desk, I found a blanket; under the empty grate, a blacking box and brush; on a chair, a tin basin, with soap and a ragged towel; in a newspaper a few crumbs of ginger-nuts and a morsel of cheese. Yet, thought I, it is evident enough that Bartleby has been making his home here, keeping bachelor's hallall by himself. Immediately then the thought came sweeping across me, What miserable friendlessness and loneliness are here revealed! His poverty is great; but his solitude, how horrible! Think of it. Of a Sunday, Wall-street is deserted as Petra; and every night of every day it is an emptiness. This building too, which of week-days hums with industry and life, at nightfall echoes with sheer vacancy, and all through Sunday is forlorn. And here Bartleby makes his home; sole spectator of a solitude which he has seen all populous--a sort of innocent and transformed Marius brooding among the ruins of Carthage!
-
For the first time in my life a feeling of overpowering stinging melancholy seized me. Before, I had never experienced aught but a not-unpleasing sadness. The bond of a common humanity now drew me irresistibly to gloom. A fraternal melancholy! For both I and Bartleby were sons of Adam. I remembered the bright silks and sparkling faces I had seen that day in gala trim, swan-like sailing down the Mississippi of Broadway; and I contrasted them with the pallid copyist, and thought to myself, Ah, happiness courts the light, so we deem the world is gay; but misery hides aloof, so we deem that misery there is none. These sad fancyings-- chimeras, doubtless, of a sick and silly brain--led on to other and more special thoughts, concerning the eccentricities of Bartleby. Presentiments of strange discoveries hovered round me. The scrivener's pale form appeared to me laid out, among uncaring strangers, in its shivering winding sheet.
-
Suddenly I was attracted by Bartleby's closed desk, the key in open sight left in the lock.
-
I mean no mischief, seek the gratification of no heartless curiosity, thought I; besides, the desk is mine, and its contents too, so I will make bold to look within. Every thing was methodically arranged, the papers smoothly placed. The pigeon holes were deep, and removing the files of documents, I groped into their recesses. Presently I felt something there, and dragged it out. It was an old bandanna handkerchief, heavy and knotted. I opened it, and saw it was a savings' bank.
-
I now recalled all the quiet mysteries which I had noted in the man. I remembered that he never spoke but to answer; that though at intervals he had considerable time to himself, yet I had never seen him reading--no, not even a newspaper; that for long periods he would stand looking out, at his pale window behind the screen, upon the dead brick wall; I was quite sure he never visited any refectory or eating house; while his pale face clearly indicated that he never drank beer like Turkey, or tea and coffee even, like other men; that he never went any where in particular that I could learn; never went out for a walk, unless indeed that was the case at present; that he had declined telling who he was, or whence he came, or whether he had any relatives in the world; that though so thin and pale, he never complained of ill health. And more than all, I remembered a certain unconscious air of pallid--how shall I call it?--of pallid haughtiness, say, or rather an austere reserve about him, which had positively awed me into my tame compliance with his eccentricities, when I had feared to ask him to do the slightest incidental thing for me, even though I might know, from his long-continued motionlessness, that behind his screen he must be standing in one of those dead-wall reveries of his.
-
Revolving all these things, and coupling them with the recently discovered fact that he made my office his constant abiding place and home, and not forgetful of his morbid moodiness; revolving all these things, a prudential feeling began to steal over me. My first emotions had been those of pure melancholy and sincerest pity; but just in proportion as the forlornness of Bartleby grew and grew to my imagination, did that same melancholy merge into fear, that pity into repulsion. So true it is, and so terrible too, that up to a certain point the thought or sight of misery enlists our best affections; but, in certain special cases, beyond that point it does not. They err who would assert that invariably this is owing to the inherent selfishness of the human heart. It rather proceeds from a certain hopelessness of remedying excessive and organic ill. To a sensitive being, pity is not seldom pain. And when at last it is perceived that such pity cannot lead to effectual succor, common sense bids the soul be rid of it. What I saw that morning persuaded me that the scrivener was the victim of innate and incurable disorder. I might give alms to his body; but his body did not pain him; it was his soul that suffered, and his soul I could not reach.
-
I did not accomplish the purpose of going to Trinity Church that morning. Somehow, the things I had seen disqualified me for the time from church-going. I walked homeward, thinking what I would do with Bartleby. Finally, I resolvedupon this;--I would put certain calm questions to him the next morning, touching his history, &c., and if he declined to answer then openly and reservedly (and I supposed he would prefer not), then to give him a twenty dollar bill over and above whatever I might owe him, and tell him his services were no longer required; but that if in any other way I could assist him, I would be happy to do so, especially if he desired to return to his native place, wherever that might be, I would willingly help to defray the expenses. Moreover, if after reaching home, he found himself at any time in want of aid, a letter from him would be sure of a reply.
-
The next morning came.
-
"Bartleby," said I, gently calling to him behind the screen.
-
No reply.
-
"Bartleby," said I, in a still gentler tone, "come here; I am not going to ask you to do any thing you would prefer not to do--I simply wish to speak to you."
-
Upon this he noiselessly slid into view.
-
"Will you tell me, Bartleby, where you were born?"
-
"I would prefer not to."
-
"Will you tell me anything about yourself?"
-
"I would prefer not to."
-
"But what reasonable objection can you have to speak to me? I feel friendly towards you."
-
He did not look at me while I spoke, but kept his glance fixed upon my bust of Cicero, which as I then sat, was directly behind me, some six inches above my head. "What is your answer, Bartleby?" said I, after waiting a considerable time for a reply, during which his countenance remained immovable, only there was the faintest conceivable tremor of the white attenuated mouth.
-
"At present I prefer to give no answer," he said, and retired into his hermitage.
-
It was rather weak in me I confess, but his manner on this occasion nettled me. Not only did there seem to lurk in it a certain disdain, but his perverseness seemed ungrateful, considering the undeniable good usage and indulgence he had received from me.
-
Again I sat ruminating what I should do.Mortified as I was at his behavior, and resolved as I had been to dismiss him when I entered my office, nevertheless I strangely felt something superstitious knocking at my heart, and forbidding me to carry out my purpose, and denouncing me for a villain if I dared to breathe one bitter word against this forlornest of mankind. At last, familiarly drawing my chair behind his screen, I sat down and said: "Bartleby, never mind then about revealing your history; but let me entreat you, as a friend, to comply as far as may be with the usages of this office. Say now you will help to examine papers tomorrow or next day: in short, say now that in a day or two you will begin to be a little reasonable:--say so, Bartleby."
-
"At present I would prefer not to be a little reasonable was his idly cadaverous reply.,"
-
Just then the folding-doors opened, and Nippers approached. He seemed suffering from an unusually bad night's rest, induced by severer indigestion than common. He overheard those final words of Bartleby.
-
"Prefer not, eh?" gritted Nippers--"I'd prefer him, if I were you, sir," addressing me--"I'd prefer him; I'd give him preferences, the stubborn mule! What is it, sir, pray, that he prefers not to do now?"
-
Bartleby moved not a limb.
-
"Mr. Nippers," said I, "I'd prefer that you would withdraw for the present."
-
Somehow, of late I had got into the way of involuntary using this word "prefer" upon all sorts of not exactly suitable occasions. And I trembled to think that my contact with the scrivener had already and seriously affected me in a mental way. And what further and deeper aberration might it not yet produce? This apprehension had not been without efficacy in determining me to summary means.
-
As Nippers, looking very sour and sulky, was departing, Turkey blandly and deferentially approached.
-
"With submission, sir," said he, "yesterday I was thinking about Bartleby here, and I think that if he would but prefer to take a quart of good ale every day, it would do much towards mending him, and enabling him to assist in examining his papers."
-
"So you have got the word too," said I, slightly excited.
-
"With submission, what word, sir," asked Turkey, respectfully crowding himself into the contracted space behind the screen, and by so doing, making me jostle the scrivener. "What word, sir?"
-
"I would prefer to be left alone here," said Bartleby, as if offended at being mobbed in his privacy.
-
"That's the word, Turkey," said I--"that's it."
-
"Oh, prefer oh yes--queer word. I never use it myself. But, sir as I was saying, if he would but prefer--"
-
"Turkey," interrupted I, "you will please withdraw."
-
"Oh, certainly, sir, if you prefer that I should."
-
As he opened the folding-door to retire, Nippers at his desk caught a glimpse of me, and asked whether I would prefer to have a certain paper copied on blue paper or white. He did not in the least roguishly accent the word prefer. It was plain that it involuntarily rolled from his tongue. I thought to myself, surely I must get rid of a demented man, who already has in some degree turned the tongues, if not the heads of myself and clerks. But I thought it prudent not to break the dismission at once.
-
The next day I noticed that Bartleby did nothing but stand at his window in his dead-wall revery. Upon asking him why he did not write, he said that he had decided upon doing no more writing.
-
"Why, how now? what next?" exclaimed I, "do no more writing?"
-
"No more."
-
"And what is the reason?"
-
"Do you not see the reason for yourself," he indifferently replied.
-
I looked steadfastly at him, and perceived that his eyes looked dull and glazed. Instantly it occurred to me, that his unexampled diligence in copying by his dim window for the first few weeks of his stay with me might have temporarily impaired his vision.
-
I was touched. I said something in condolence with him. I hinted that of course he did wisely in abstaining from writing for a while; and urged him to embrace that opportunity of taking wholesome exercise in the open air. This, however, he did not do. A few days after this, my other clerks being absent, and being in a great hurry to dispatch certain letters by the mail, I thought that, having nothing else earthly to do, Bartleby would surely be less inflexible than usual, and carry these letters to the post-office. But he blankly declined. So, much to my inconvenience, I went myself.
-
Still added days went by. Whether Bartleby's eyes improved or not, I could not say. To all appearance, I thought they did. But when I asked him if they did, he vouchsafed no answer. At all events, he would do no copying. At last, in reply to my urgings, he informed me that he had permanently given up copying.
-
"What!" exclaimed I; "suppose your eyes should get entirely well- better than ever before--would you not copy then?"
-
"I have given up copying," he answered, and slid aside.
-
He remained as ever, a fixture in my chamber. Nay--if that were possible--he became still more of a fixture than before. What was to be done? He would do nothing in the office: why should he stay there? In plain fact, he had now become a millstone to me, not only useless as a necklace, but afflictive to bear. Yet I was sorry for him. I speak less than truth when I say that, on his own account, he occasioned me uneasiness. If he would but have named a single relative or friend, I would instantly have written, and urged their taking the poor fellow away to some convenient retreat. But he seemed alone, absolutely alone in the universe. A bit of wreck</font> in the mid Atlantic. At length, necessities connected with my business tyrannized over all other considerations. Decently as I could, I told Bartleby that in six days' time he must unconditionally leave the office. I warned him to take measures, in the interval, for procuring some other abode. I offered to assist him in this endeavor, if he himself would but take the first step towards a removal. "And when you finally quit me, Bartleby," added I, "I shall see that you go not away entirely unprovided. Six days from this hour, remember."
-
At the expiration of that period, I peeped behind the screen, and lo! Bartleby was there.
-
I buttoned up my coat, balanced myself; advanced slowly towards him, touched his shoulder, and said, "The time has come; you must quit this place; I am sorry for you; here is money; but you must go."
-
"I would prefer not," he replied, with his back still towards me.
-
"You must ."
-
He remained silent.
-
Now I had an unbounded confidence in this man's common honesty. He had frequently restored to me six pences and shillings carelessly dropped upon the floor, for I am apt to be very reckless in such shirt-button affairs. The proceeding then which followed will not be deemed extraordinary. "Bartleby," said I, "I owe you twelve dollars on account; here are thirty-two; the odd twenty are yours.--Will you take it? and I handed the bills towards him.
-
But he made no motion.
-
"I will leave them here then," putting them under a weight on the table. Then taking my hat and cane and going to the door I tranquilly turned and added--"After you have removed your things from these offices, Bartleby, you will of course lock the door--since every one is now gone for the day but you--and if you please, slip your key underneath the mat, so that I may have it in the morning. I shall not see you again; so good-bye to you. If hereafter in your new place of abode I can be of any service to you, do not fail to advise me by letter. Good-bye, Bartleby, and fare you well."
-
But he answered not a word; like the last column of some ruined temple, he remained standing mute and solitary in the middle of the otherwise deserted room.
-
As I walked home in a pensive mood, my vanity got the better of my pity. I could not but highly plume myself on my masterly management in getting rid of Bartleby. Masterly I call it, and such it must appear to any dispassionate thinker. The beauty of my procedure seemed to consist in its perfect quietness. There was no vulgar bullying, no bravado of any sort, no choleric hectoring and striding to and fro across the apartment, jerking out vehement commands for Bartleby to bundle himself off with his beggarly traps. Nothing of the kind. Without loudly bidding Bartleby depart--as an inferior genius might have done--I assumed the ground that depart he must; and upon the assumption built all I had to say. The more I thought over my procedure, the more I was charmed with it. Nevertheless, next morning, upon awakening, I had my doubts,--I had somehow slept off the fumes of vanity. One of the coolest and wisest hours a man has, is just after he awakes in the morning. My procedure seemed as sagacious as ever,--but only in theory. How it would prove in practice--there was the rub. It was truly a beautiful thought to have assumed Bartleby's departure; but, after all, that assumption was simply my own, and none of Bartleby's. The great point was, not whether I had assumed that he would quit me, but whether he would prefer so to do. He was more a man of preferences than assumptions.
-
After breakfast, I walked down town, arguing the probabilities pro and con. One moment I thought it would prove a miserable failure, and Bartleby would be found all alive at my office as usual; the next moment it seemed certain that I should see his chair empty. And so I kept veering about. At the corner of Broadway and Canal- street, I saw quite an excited group of people standing in earnest conversation.
-
"I'll take odds he doesn't," said a voice as I passed.
-
"Doesn't go?--done!" said I, "put up your money."
-
I was instinctively putting my hand in my pocket to produce my own, when I remembered that this was an election day. The words I had overheard bore no reference to Bartleby, but to the success or non-success of some candidate for the mayoralty. In my intent frame of mind, I had, as it were, imagined that all Broadway shared in my excitement, and were debating the same question with me. I passed on, very thankful that the uproar of the street screened my momentary absent-mindedness.
-
As I had intended, I was earlier than usual at my office door. I stood listening for a moment. All was still. He must be gone. I tried the knob. The door was locked. Yes, my procedure had worked to a charm; he indeed must be vanished. Yet a certain melancholy mixed with this: I was almost sorry for my brilliant success. I was fumbling under the door mat for the key, which Bartleby was to have left there for me, when accidentally my knee knocked against a panel, producing a summoning sound, and in response a voice came to me from within--"Not yet; I am occupied."
-
It was Bartleby.
-
I was thunderstruck. For an instant I stood like the man who, pipe in mouth, was killed one cloudless afternoon long ago in Virginia, by summer lightning; at his own warm open window he was killed, and remained leaning out there upon the dreamy afternoon, till some one touched him, when he fell. "Not gone!" I murmured at last. But again obeying that wondrous ascendancy which the inscrutable scrivener had over me, and from which ascendancy, for all my chafing, I could not completely escape, I slowly went down stairs and out into the street, and while walking round the block, considered what I should next do in this unheard-of-perplexity. Turn the man out by an actual thrusting I could not; to drive him away by calling him hard names would not do; calling in the police was an unpleasant idea; and yet, permit him to enjoy his cadaverous triumph over me,--this too I could not think of. What was to be done? or, if nothing could be done, was there any thing further that I could assume in the matter? Yes, as before I had prospectively assumed that Bartleby would depart, so now I might retrospectively assume that departed he was. In the legitimate carrying out of this assumption, I might enter my office in a great hurry, and pretending not to see Bartleby at all, walk straight against him as if he were air. Such a proceeding would in a singular degree have the appearance of a home-thrust. It was hardly possible that Bartleby could withstand such an application of the doctrine of assumptions. But upon second thoughts the success of the plan seemed rather dubious. I resolved to argue the matter over with him again.
-
Bartleby," said I, entering the office, with a quietly severe expression. "I am seriously displeased. I am pained, Bartleby. I had thought better of you. I had imagined you of such a gentlemanly organization, that in any delicate dilemma a slight hint would suffice--in short, an assumption. But it appears I am deceived. Why," I added, unaffectedly starting, "you have not even touched the money yet," pointing to it, just where I had left it the evening previous.
-
He answered nothing.
-
"Will you, or will you not, quit me?" I now demanded in a sudden passion, advancing close to him.
-
"I would prefer not to quit you," he replied, gently emphasizing the not .
-
"What earthly right have you to stay here? do you pay any rent? Do you pay my taxes? Or is this property yours?"
-
He answered nothing.
-
"Are you ready to go on and write now? Are your eyes recovered? Could you copy a small paper for me this morning? or help examine a few lines? or step round to the post-office? In a word, will you do any thing at all, to give a coloring to your refusal to depart the premises?"
-
He silently retired into his hermitage.
-
I was now in such a state of nervous resentment that I thought it but prudentto check myself at present from further demonstrations. Bartleby and I were alone. I remembered the tragedy of the unfortunate Adams and the still more unfortunate Colt in the solitary office of the latter; and how poor Colt, being dreadfully incensed by Adams, and imprudently permitting himself to get wildly excited, was at unawares hurried into his fatal act--an act which certainly no man could possibly deplore more than the actor himself. Often it had occurred to me in my ponderings upon the subject, that had that altercation taken place in the public street, or at a private residence, it would not have terminated as it did. It was the circumstance of being alone in a solitary office, up stairs, of a building entirely unhallowed by humanizing domestic associations--an uncarpeted office, doubtless of a dusty, haggard sort of appearance;--this it must have been, which greatly helped to enhance the irritable desperation of the hapless Colt.
-
But when this old Adam of resentment rose in me and tempted me concerning Bartleby, I grappled him and threw him. How? Why, simply by recalling the divine injunction: "A new commandment give I unto you, that ye love one another." Yes, this it was that saved me. Aside from higher considerations, charity often operates as a vastly wise and prudent principle--a great safeguard to its possessor. Men have committed murder for jealousy's sake, and anger's sake, and hatred's sake, and selfishness' sake, and spiritual pride's sake; but no man that ever I heard of, ever committed a diabolical murder for sweet charity's sake. Mere self-interest, then, if no better motive can be enlisted, should, especially with high-tempered men, prompt all beings to charity and philanthropy. At any rate, upon the occasion in question, I strove to drown my exasperated feelings towards the scrivener by benevolently construing his conduct. Poor fellow, poor fellow! thought I, he don't mean any thing; and besides, he has seen hard times, and ought to be indulged.
-
I endeavored also immediately to occupy myself, and at the same time to comfort my despondency.I tried to fancy that in the course of the morning, at such time as might prove agreeable to him, Bartleby, of his own free accord, would emerge from his hermitage, and take up some decided line of march in the direction of the door. But no. Half-past twelve o'clock came; Turkey began to glow in the face, overturn his inkstand, and become generally obstreperous; Nippers abated down into quietude and courtesy; Ginger Nut munched his noon apple; and Bartleby remained standing at his window in one of his profoundest deadwall reveries. Will it be credited? Ought I to acknowledge it? That afternoon I left the office without saying one further word to him.
-
Some days now passed, during which, at leisure intervals I looked a little into Edwards on the Will," and "Priestly on Necessity." Under the circumstances, those books induced a salutary feeling. Gradually I slid into the persuasion that these troubles of mine touching the scrivener, had been all predestinated from eternity, and Bartleby was billeted upon me for some mysterious purpose of an all-wise Providence, which it was not for a mere mortal like me to fathom. Yes, Bartleby, stay there behind your screen, thought I; I shall persecute you no more; you are harmless and noiseless as any of these old chairs; in short, I never feel so private as when I know you are here. At least I see it, I feel it; I penetrate to the predestinated purpose of my life. I am content. Others may have loftier parts to enact; but my mission in this world, Bartleby, is to furnish you with office-room for such period as you may see fit to remain.
-
I believe that this wise and blessed frame of mind would have continued with me, had it not been for the unsolicited and uncharitable remarks obtruded upon me by my professional friends who visited the rooms. But thus it often is, that the constant friction of illiberal minds wears out at last the best resolves of the more generous. Though to be sure, when I reflected upon it, it was not strange that people entering my office should be struck by the peculiar aspect of the unaccountable Bartleby, and so be tempted to throw out some sinister observations concerning him. Sometimes an attorney having business with me, and calling at my office, and finding no one but the scrivener there, would undertake to obtain some sort of precise information from him touching my whereabouts; but without heeding his idle talk, Bartleby would remain standing immovable in the middle of the room. So after contemplating him in that position for a time, the attorney would depart, no wiser than he came.
-
Also, when a Reference was going on, and the room full of lawyers and witnesses and business was driving fast; some deeply occupied legal gentleman present, seeing Bartleby wholly unemployed, would request him to run round to his (the legal gentleman's) office and fetch some papers for him. Thereupon, Bartleby would tranquilly decline, and remain idle as before. Then the lawyer would give a great stare, and turn to me. And what could I say? At last I was made aware that all through the circle of my professional acquaintance, a whisper of wonder was running round, having reference to the strange creature I kept at my office. This worried me very much. And as the idea came upon me of his possibly turning out a long-lived man, and keep occupying my chambers, and denying my authority; and perplexing my visitors; and scandalizing my professional reputation; and casting a general gloom over the premises; keeping soul and body together to the last upon his savings (for doubtless he spent but half a dime a day), and in the end perhaps outlive me, and claim possession of my office by right of his perpetual occupancy: as all these dark anticipations crowded upon me more and more, and my friends continually intruded their relentless remarks upon the apparition in my room; a great change was wrought in me. I resolved to gather all my faculties together, and for ever rid me of this intolerable incubus.
-
Ere revolving any complicated project, however, adapted to this end, I first simply suggested to Bartleby the propriety of his permanent departure. In a calm and serious tone, I commended the idea to his careful and mature consideration. But having taken three days to meditate upon it, he apprised me that his original determination remained the same; in short, that he still preferred to abide with me.
-
What shall I do? I now said to myself, buttoning up my coat to the last button. What shall I do? what ought I to do? what does conscience say I should do with this man, or rather ghost. Rid myself of him, I must; go, he shall. But how? You will not thrust him, the poor, pale, passive mortal,--you will not thrust such a helpless creature out of your door? you will not dishonor yourself by such cruelty? No, I will not, I cannot do that. Rather would I let him live and die here, and then mason up his remains in the wall. What then will you do? For all your coaxing, he will not budge. Bribes he leaves under your own paperweight on your table; in short, it is quite plain that he prefers to cling to you.
-
Then something severe, something unusual must be done. What! surely you will not have him collared by a constable, and commit his innocent pallor to the common jail? And upon what ground could you procure such a thing to be done?--a vagrant, is he? What! he a vagrant, a wanderer, who refuses to budge? It is because he will not be a vagrant, then, that you seek to count him as a vagrant. That is too absurd. No visible means of support: there I have him. Wrong again: for indubitably he does support himself, and that is the only unanswerable proof that any man can show of his possessing the means so to do. No more then. Since he will not quit me, I must quit him. I will change my offices; I will move elsewhere; and give him fair notice, that if I find him on my new premises I will then proceed against him as a common trespasser.
-
Acting accordingly, next day I thus addressed him: "I find these chambers too far from the City Hall; the air is unwholesome. In a word, I propose to remove my offices next week, and shall no longer require your services. I tell you this now, in order that you may seek another place."
-
He made no reply, and nothing more was said.
-
On the appointed day I engaged carts and men, proceeded to my chambers, and having but little furniture, every thing was removed in a few hours. Throughout, the scrivener remained standing behind the screen, which I directed to be removed the last thing. It was withdrawn; and being folded up like a huge folio, left him the motionless occupant of a naked room. I stood in the entry watching him a moment, while something from within me upbraided me.
-
I re-entered, with my hand in my pocket--and--and my heart in my mouth.
-
"Good-bye, Bartleby; I am going--good-bye, and God some way bless you; and take that," slipping something in his hand. But it dropped to the floor, and then,--strange to say--I tore myself from him whom I had so longed to be rid of.
-
Established in my new quarters, for a day or two I kept the door locked, and started at every footfall in the passages. When I returned to my rooms after any little absence, I would pause at the threshold for an instant, and attentively listen, ere applying my key. But these fears were needless. Bartleby never came nigh me.
-
I thought all was going well, when a perturbed looking stranger visited me, inquiring whether I was the person who had recently occupied rooms at No.--Wall-street.
-
Full of forebodings, I replied that I was.
-
"Then, sir," said the stranger, who proved a lawyer, "you are responsible for the man you left there. He refuses to do any copying; he refuses to do any thing; he says he prefers not to; and he refuses to quit the premises."
-
"I am very sorry, sir," said I, with assumed tranquillity, but an inward tremor, "but, really, the man you allude to is nothing to me --he is no relation or apprentice of mine, that you should hold me responsible for him."
-
"In mercy's name, who is he?"
-
"I certainly cannot inform you. I know nothing about him. Formerly I employed him as a copyist; but he has done nothing for me now for some time past."
-
"I shall settle him then,--good morning, sir."
-
Several days passed, and I heard nothing more; and though I often felt a charitable prompting to call at the place and see poor Bartleby, yet a certain squeamishness of I know not what withheld me.
-
All is over with him, by this time, thought I at last, when through another week no further intelligence reached me. But coming to my room the day after, I found several persons waiting at my door in a high state of nervous excitement.
-
"That's the man--here he comes," cried the foremost one, whom recognized as the lawyer who had previously called upon me alone.
-
"You must take him away, sir, at once," cried a portly person among them, advancing upon me, and whom I knew to be the landlord of No.--Wall-street. "These gentlemen, my tenants, cannot stand it any longer; Mr. B--" pointing to the lawyer, "has turned him out of his room, and he now persists in haunting the buildinggenerally, sitting upon the banisters of the stairs by day, and sleeping in the entry by night. Every body is concerned; clients are leaving the offices; some fears are entertained of a mob; something you must do, and that without delay."
-
Aghast at this torment, I fell back before it, and would fain have locked myselfin my new quarters. In vain I persisted that Bartleby was nothing to me--no more than to any one else. In vain:--I was the last person known to have any thing to do with him, and they held me to the terrible account. Fearful then of being exposed in the papers (as one person present obscurely threatened) I considered the matter, and at length said, that if the lawyer would give me a confidential interview with the scrivener, in his (the lawyer's) own room, I would that afternoon strive my best to rid them of the nuisance they complained of.
-
Going up stairs to my old haunt, there was Bartleby silently sitting upon the banister at the landing.
-
"What are you doing here, Bartleby?" said I.
-
"Sitting upon the banister," he mildly replied.
-
I motioned him into the lawyer's room, who then left us.
-
"Bartleby," said I, "are you aware that you are the cause of great tribulation to me, by persisting in occupying the entry after being dismissed from the office?"
-
No answer.
-
"Now one of two things must take place. Either you must do something or something must be done to you. Now what sort of business would you like to engage in? Would you like to re-engage in copying for some one?"
-
"No; I would prefer not to make any change."
-
"Would you like a clerkship in a dry-goods store?"
-
"There is too much confinement about that. No, I would not like a clerkship; but I am not particular."
-
"Too much confinement," I cried, "why you keep yourself confined all the time!"
-
"I would prefer not to take a clerkship," he rejoined, as if to settle that little item at once.
-
"How would a bar-tender's business suit you? There is no trying of the eyesight in that."
-
"I would not like it at all; though, as I said before, I am not particular."
-
His unwonted wordiness inspirited me. I returned to the charge.
-
"Well then, would you like to travel through the country collecting bills for the merchants? That would improve your health."
-
"No, I would prefer to be doing something else."
-
"How then would going as a companion to Europe, to entertain some young gentleman with your conversation,--how would that suit you?"
-
"Not at all. It does not strike me that there is any thing definite about that. I like to be stationary. But I am not particular.
-
"Stationary you shall be then," I cried, now losing all patience, and for the first time in all my exasperating connection with him fairly flying into a passion. "If you do not go away from these premises before night, I shall feel bound--indeed I am bound--to-- to--to quit the premises myself!" I rather absurdly concluded, knowing not with what possible threat to try to frighten his immobility into compliance. Despairing of all further efforts, I was precipitately leaving him, when a final thought occurred to me--one which had not been wholly unindulged before.
-
"Bartleby," said I, in the kindest tone I could assume under such exciting circumstances, "will you go home with me now--not to my office, but my dwelling--and remain there till we can conclude upon some convenient arrangement for you at our leisure? Come, let us start now, right away."
-
"No: at present I would prefer not to make any change at all."
-
I answered nothing; but effectualy dodging every one by the suddenness and rapidity of my flight, rushed from the building, ran up Wall-street towards Broadway, and jumping into the first omnibus was soon removed from pursuit. As soon as tranquility returned I distinctly perceived that I had now done all that I possibly could, both in respect to the demands of the landlord and his tenants, and with regard to my own desire and sense of duty, to benefit Bartleby, and shield him from rude persecution. I now strove to be entirely care-free and quiescent; and my conscience justified me in the attempt; though indeed it was not so successful as I could have wished. So fearful was I of being again hunted out by the incensed landlord and his exasperated tenants, that, surrendering my business to Nippers, for a few days I drove about the upper part of the town and through the suburbs, in my rockaway; crossed over to Jersey City and Hoboken, and paid fugitive visits to Manhattanville and Astoria. In fact I almost lived in my rockaway for the time.
-
When again I entered my office, lo, a note from the landlord lay upon desk. opened it with trembling hands. informed me that writer had sent to police, and Bartleby removed the Tombs as a vagrant. Moreover, since I knew more about him than any one else, he wished me to appear at that place, and make a suitable statement of the facts. These tidings had a conflicting effect upon me. At first I was indignant; but at last almost approved. The landlord's energetic, summary disposition, had led him to adopt a procedure which I do not think I would have decided upon myself; and yet as a last resort, under such peculiar circumstances, it seemed the only plan.
-
As I afterwards learned, the poor scrivener, when told that he must be conducted to the Tombs, offered not the slightest obstacle, but in his pale unmoving way, silently acquiesced.
-
Some of the compassionate and curious bystanders joined the party; and headed by one of the constables arm in arm with Bartleby, the silent procession filed its way through all the noise, and heat, and joy of the roaring thoroughfares at noon.
-
The same day I received the note I went to the Tombs, or to speak more properly, the Halls of Justice. Seeking the right officer, I stated the purpose of my call, and was informed that the individual I described was indeed within. I then assured the functionary that Bartleby was a perfectly honest man, and greatly to be compassionated, however unaccountably eccentric. I narrated all I knew,and closed by suggesting the idea of letting him remain in as indulgent confinement as possible till something less harsh might be done--though indeed I hardly knew what. At all events, if nothing else could be decided upon, the alms-house must receive him. I then begged to have an interview.
-
Being under no disgraceful charge, and quite serene and harmless in all his ways, they had permitted him freely to wander about the prison, and especially in the inclosed grass-platted yards thereof. And so I found him there, standing all alone in the quietest of the yards, his face towards a high wall, while all around, from the narrow slits of the jail windows, I thought I saw peering out upon him the eyes of murderers and thieves.
-
"Bartleby!"
-
"I know you," he said, without looking round,--"and I want nothing to say to you."
-
"It was not I that brought you here, Bartleby," said I, keenly pained at his implied suspicion. "And to you, this should not be so vile a place. Nothing reproachful attaches to you by being here. And see, it is not so sad a place as one might think. Look, there is the sky, and here is the grass."
-
"I know where I am," he replied, but would say nothing more, and so I left him.
-
As I entered the corridor again, a broad meat-like man in an apron, accosted me, and jerking his thumb over his shoulder said--"Is that your friend?"
-
"Yes."
-
"Does he want to starve? If he does, let him live on the prison fare, that's all.
-
"Who are you?" asked I, not knowing what to make of such an unofficially speaking person in such a place.
-
"I am the grub-man. Such gentlemen as have friends here, hire me to provide them with something good to eat."
-
"Is this so?" said I, turning to the turnkey.
-
He said it was.
-
"Well then," said I, slipping some silver into the grub-man's hands (for so they called him). "I want you to give particular attention to my friend there; let him have the best dinner you can get. And you must be as polite to him as possible."
-
"Introduce me, will you?" said the grub-man, looking at me with an expression which seemed to say he was all impatience for an opportunity to give a specimen of his breeding.
-
Thinking it would prove of benefit to the scrivener, I acquiesced; and asking the grub-man his name, went up with him to Bartleby.
-
"Bartleby, this is a friend; you will find him very useful to you."
-
"Your sarvant, sir, your sarvant," said the grub-man, making a low salutation behind his apron. "Hope you find it pleasant here, sir;--spacious grounds--cool apartments, sir--hope you'll stay with us some time--try to make it agreeable. What will you have for dinner today?"
-
"I prefer not to dine to-day," said Bartleby, turning away. "It would disagree with me; I am unused to dinners." So saying he slowly moved to the other side of the inclosure, and took up a position fronting the dead-wall.
-
"How's this?" said the grub-man, addressing me with a stare of astonishment. "He's odd, aint he?"
-
"I think he is a little deranged," said I, sadly.
-
"Deranged? deranged is it? Well now, upon my word, I thought that friend of yourn was a gentleman forger; they are always pale and genteel-like, them forgers. I can't help pity 'em--can't help it, sir. Did you know Monroe Edwards?" he added touchingly, and paused. Then, laying his hand pityingly on my shoulder, sighed, "he died of consumption at Sing-Sing. so you weren't acquainted with Monroe?"
-
"No, I was never socially acquainted with any forgers. But I cannot stop longer. Look to my friend yonder. You will not lose by it. I will see you again."
-
Some few days after this, I again obtained admission to the Tombs, and went through the corridors in quest of Bartleby; but without finding him.
-
"I saw him coming from his cell not long ago," said a turnkey, "may be he's gone to loiter in the yards."
-
So I went in that direction.
-
"Are you looking for the silent man?" said another turnkey passing me. "Yonder he lies--sleeping in the yard there. 'Tis not twenty minutes since I saw him lie down."
-
The yard was entirely quiet. It was not accessible to the common prisoners. The surrounding walls, of amazing thickness, kept off all sound behind them. The Egyptian character of the masonry weighed upon me with its gloom. But a soft imprisoned turf grew under foot. The heart of the eternal pyramids, it seemed, wherein, by some strange magic, through the clefts, grass-seed, dropped by birds, had sprung.
-
Strangely huddled at the base of the wall, his knees drawn up, and lying on his side, his head touching the cold stones, I saw the wasted Bartleby. But nothing stirred. I paused; then went close up to him; stooped over, and saw that his dim eyes were open; otherwise he seemed profoundly sleeping. Something prompted me to touch him. I felt his hand, when a tingling shiver ran up my arm and down my spine to my feet.
-
The round face of the grub-man peered upon me now. "His dinner is ready. Won't he dine to-day, either? Or does he live without dining?"
-
"Lives without dining," said I, and closed the eyes.
-
"Eh!--He's asleep, aint he?"
-
"With kings and counsellors," murmured I.
-
* * * * * * * *
-
There would seem little need for proceeding further in this history. Imagination will readily supply the meagre recital of poor Bartleby's interment. But ere parting with the reader, let me say, that if this little narrative has sufficiently interested him, to awaken curiosity as to who Bartleby was, and what manner of life he led prior to the present narrator's making his acquaintance, I can only reply, that in such curiosity I fully share, but am wholly unable to gratify it. Yet here I hardly know whether I should divulge one little item of rumor, which came to my ear a few months after the scrivener's decease. Upon what basis it rested, I could never ascertain; and hence how true it is I cannot now tell. But inasmuch as this vague report has not been without a certain strange suggestive interest to me, however said, it may prove the same with some others; and so I will briefly mention it. The report was this: that Bartleby had been a subordinate clerk in the Dead Letter Office at Washington , from which he had been suddenly removed by a change in the administration. When I think over this rumor, I cannot adequately express the emotions which seize me. Dead letters! does it not sound like dead men? Conceive a man by nature and misfortune prone to a pallid hopelessness, can any business seem more fitted to heighten it than that of continually handling these dead letters and assorting them for the flames? For by the cart-load they are annually burned. Sometimes from out the folded paper the pale clerk takes a ring:--the bank-note sent in swiftest charity:--he whom it would relieve, nor eats nor hungers any more; pardon for those who died despairing; hope for those who died unhoping; good tidings for those who died stifled by unrelieved calamities. On errands of life, these letters speed to death.
-
Ah Bartleby! Ah humanity!
-
-
-
\ No newline at end of file
+
Click on text in red for hypertext notes and questions
+ I
+ am a rather elderly man. The nature of my avocations
+ for the last thirty years has brought me into more than ordinary contact
+ with what would seem an interesting and somewhat singular set of men of whom as yet
+ nothing that I know of has ever been written:-- I mean the law-copyists
+ or scriveners.
+ I have known very many of them, professionally and privately, and if I
+ pleased, could relate divers histories, at which good-natured gentlemen
+ might smile, and sentimental souls might weep. But I waive the biographies
+ of all other scriveners for a few passages
+ in the life of Bartleby, who was a scrivener the strangest
+ I ever saw or heard of. While of other law-copyists I might write the
+ complete life, of Bartleby nothing of that sort can be done. I believe that
+ no materials exist for a full and satisfactory biography of this man. It is an irreparable loss to literature. Bartleby
+ was one of those beings of whom nothing is ascertainable, except from
+ the original sources, and in his case those are very small. What my own
+ astonished eyes saw of Bartleby, that is all I know of him, except, indeed,
+ one vague report which will appear in the sequel.
+
Ere introducing the scrivener, as he first appeared to me, it is fit
+ I make some mention of myself, my employees, my business, my chambers,
+ and general surroundings; because some such description is indispensable
+ to an adequate understanding of the chief character about to be presented.
+
Imprimis : I am a man who, from his youth upwards, has been
+ filled with a profound conviction that the easiest way of life is the best.. Hence, though I belong to a profession
+ proverbially energetic and nervous, even to turbulence, at times, yet
+ nothing of that sort have I ever suffered to invade
+ my peace. I am one of those unambitious lawyers who never addresses
+ a jury, or in any way draws down public applause; but in the cool tranquillity
+ of a snug retreat, do a snug business among rich men's bonds and mortgages and title-deeds. The late John Jacob Astor, a personage little given to poetic enthusiasm, had
+ no hesitation in pronouncing my first
+ grand point to be prudence; my next, method. I do not speak
+ it in vanity, but simply record the fact, that I was not
+ unemployed in my profession by the last John Jacob Astor; a name which,
+ I admit, I love to repeat, for it hath a rounded and orbicular sound to
+ it, and rings
+ like unto bullion. I will freely add, that I was not
+ insensible to the late John Jacob Astor's good opinion.
+
Some time prior to the period at which this little history begins, my
+ avocations had been largely increased. The good old office, now
+ extinct in the State of New York, of a Master in Chancery,
+ had been conferred upon me. It was not a very arduous office, but very
+ pleasantly remunerative. I
+ seldom lose my temper; much more seldom indulge in dangerous
+ indignation at wrongs and outrages; but I must be permitted to be rash
+ here and declare, that I consider the sudden and violent abrogation of
+ the office of Master of Chancery, by the new Constitution, as a----premature
+ act; inasmuch as I had counted upon a life-lease of the
+ profits, whereas I only received those of a few short years. But this is
+ by the way.
+
My chambers were up stairs at No.--Wall-street. At one end they looked
+ upon the white wall of the interior of a spacious sky-light shaft, penetrating
+ the building from top to bottom. This view might have been considered rather
+ tame than otherwise, deficient
+ in what landscape painters call "life." But if so, the view
+ from the other end of my chambers offered, at least, a contrast, if nothing
+ more. In that direction my windows commanded an unobstructed view of a
+ lofty brick wall,black by age and everlasting shade; which wall required
+ no spy-glass to bring out its lurking beauties, but for the benefit of
+ all near-sighted spectators, was pushed up to within ten feet of my window
+ panes. Owing to the great height of the surrounding buildings, and my chambers
+ being on the second floor, the interval between this wall and mine not
+ a little resembled a huge square cistern.
+
At the period just preceding the advent of Bartleby, I had two persons
+ as copyists in my employment, and a promising lad as an office-boy. First,
+ Turkey; second, Nippers; third, Ginger Nut.These may seem names, the like
+ of which are not usually found in the Directory. In truth they were nicknames, mutually conferred upon
+ each other by my three clerks, and were deemed expressive of their respective
+ persons or characters. Turkey was a short, pursy Englishman of about my
+ own age, that is, somewhere not far from sixty. In the morning, one might
+ say, his face was of a fine florid hue, but after twelve o'clock, meridian--
+ his dinner hour-- it blazed like a grate full of Christmas coals;
+ and continued blazing--but, as it were, with a gradual wane--till 6 o'clock,
+ P.M. or thereabouts, after which I saw no more of the proprietor of the
+ face, which gaining its meridian with the sun, seemed to set with it, to
+ rise, culminate, and decline the following day, with the like regularity
+ and undiminished glory. There are many singular coincidences I have known
+ in the course of my life, not the least among which was the fact that exactly
+ when Turkey displayed his fullest beams from his red and radiant countenance,
+ just then, too, at the critical moment, began the daily period when I considered
+ his business capacities as seriously disturbed for the remainder of the
+ twenty-four hours. Not that he was absolutely idle, or averse to business
+ then; far from it. The difficulty was, he was apt to be altogether too
+ energetic. There was a strange, inflamed, flurried, flighty
+ recklessness of activity about him. He would be incautious in dipping his
+ pen into his inkstand. All his blots upon my documents, were dropped there
+ after twelve o'clock, meridian. Indeed, not only would he be reckless and
+ sadly given to making blots in the afternoon, but some days he went further,
+ and was rather noisy. At such times, too, his face
+ flamed with augmented blazonry, as if cannel
+ coal had been heaped on anthracite. He made an unpleasant
+ racket with his chair; spilled his sand-box; in mending his pens, impatiently
+ split them all to pieces, and threw them on the floor in a sudden passion;
+ stood up and leaned over his table, boxing his papers about in a most
+ indecorous manner, very sad to behold in an elderly manlike him. Nevertheless,
+ as he was in many ways a most valuable person to me, and all the time before
+ twelve o'clock, meridian, was the quickest, steadiest creature too, accomplishing
+ a great deal of work in a style not easy to be matched--for these reasons,
+ I was willingto overlook his eccentricities, though indeed, occasionally,
+ I remonstrated with him. I did this very gently, however, because, though
+ the civilest, nay, the blandest and most reverential of men in the morning,
+ yet in the afternoon he was disposed, upon provocation, to be slightly
+ rash with his tongue, in fact, insolent. Now, valuing his morning services
+ as I did, and resolved not to lose them; yet, at the same time made uncomfortable
+ by his inflamed ways after twelve o'clock; and being a man
+ of peace, unwilling by my admonitions to call forth unseemingly
+ retorts from him; I took upon me, one Saturday noon (he was always worse
+ on Saturdays), to hint to him, very kindly, that perhaps now that he was
+ growing old, it might be well to abridge his labors; in short, he need
+ not come to my chambers after twelve o'clock, but, dinner over, had best
+ go home to his lodgings and rest himself till tea-time. But no; he insisted
+ upon his afternoon devotions. His countenance became
+ intolerably fervid, as he oratorically assured me--gesticulating with a
+ long ruler at the other end of the room--that if his services in the morning
+ were useful, how indispensible, then, in the afternoon?
+
"With
+ submission, sir," said Turkey on this occasion, "I consider
+ myself your right-hand man. In the morning I but marshal and deploy my
+ columns; but in the afternoon I
+ put myself at their head, and gallantly charge the foe,
+ thus!"--and he made a violent
+ thrust with the ruler.
+
"But the blots, Turkey," intimated I.
+
"True,--but, with submission, sir, behold these hairs! I am getting old.
+ Surely, sir, a blot or two of a warm afternoon is not the page--is honorable.
+ With submission, sir, we both are getting old."
+
This
+ appeal to my fellow-feeling was hardly to be resisted. At
+ all events, I saw that go he would not. So I made up my mind to let him
+ stay, resolving, nevertheless, to see to it, that during the afternoon
+ he had to do with my less important papers.
+
Nippers, the second on my list, was a whiskered, sallow, and, upon the
+ whole, rather piratical-looking young man of about
+ five and twenty. I always deemed him the victim of two evil powers-- ambition
+ and indigestion. The ambition was evinced by a certain impatience of the
+ duties of a mere
+ copyist, an unwarrantable usurpation of strictly profession
+ affairs, such as the original
+ drawing up of legal documents. The indigestion seemed betokened
+ in an occasional nervous testiness and grinning irritability, causing the
+ teeth to audibly grind together over mistakes committed in copying; unnecessary
+ maledictions, hissed, rather than spoken, in the heat of business; and
+ especially by a continual
+ discontent with the height of the table where he worked.
+ Though of a very ingenious mechanical turn, Nippers could never get this
+ table to suit him. He put chips under it, blocks of various sorts, bits
+ of pasteboard, and at last went so far as to attempt an exquisite adjustment
+ by final pieces of folded blotting-paper. But no invention would answer.
+ If, for the sake of easing his back, he brought the table lid at a sharp
+ angle well up towards his chin, and wrote there like a man using the steep
+ roof of a Dutch house for his desk:--then he declared that it stopped the
+ circulation in his arms. If now he lowered the table to his waistbands,
+ and stooped over it in writing, then there was a sore aching in his back.
+ In short, the truth of the matter was, Nippers knew not what he wanted.
+ Or, if
+ he wanted anything, it was to be rid of a scrivener's table
+ altogether. Among the manifestations of his diseased ambition was a fondness
+ he had for receiving visits from certain ambiguous-looking fellows in seedy
+ coats, whom he called his clients. Indeed I was aware that not only was
+ he, at times, considerable of a ward-politician, but he occasionally did
+ a little businessat the Justices' courts, and was not unknown on the
+ steps of the Tombs. I have good reason to believe, however, that one individual
+ who called upon him at my chambers, and who, with a grand air, he insisted
+ was his client, was no other than a dun, and the alleged title-deed, a
+ bill. But with all his failings, and the annoyances he caused me, Nippers,
+ like his compatriot Turkey, was a very useful
+ man to me; wrote a neat, swift hand; and, when he chose,
+ was not deficient in a gentlemanly sort of deportment. Added to this, he
+ always dressedin a gentlemanly sort of way; and so, incidentally,
+ reflected credit upon my chambers. Whereas with respect to Turkey, I had
+ much ado to keep him from being a reproach to me. His clothes were apt
+ to look oily and smell of eating-houses. He wore his pantaloons very loose
+ and baggy in summer. His coats were execrable; his hat not to be handled.
+ But while the hat was a thing of indifference to
+ me, inasmuch as his natural civility and deference, as a dependent Englishman,
+ always led him to doff it the moment he entered the room, yet his coat
+ was another matter. Concerning his coats, I reasoned with him; but with
+ no effect. The truth was, I suppose, that a man with so small an income,
+ could not afford to sport such a lustrous face and a lustrous coat at one
+ and the same time. As Nippers once observed, Turkey's money went chiefly
+ for red ink. One winter day
+ I presented Turkey with a highly-respectable looking coat
+ of my own, a padded gray coat, of a most comfortable warmth, and which
+ buttoned straight up from the knee to the neck. I thought Turkey would
+ appreciate the favor, and abate his rashness and obstreperousness of afternoons.
+ But no. I verily believe that buttoning himself up in so downy and blanket-like
+ a coat had a pernicious effect upon him; upon the same principle that too
+ much oats are bad for horses. In fact, precisely as a rash, restive horse
+ is said to feel his oats, so Turkey felt his coat. It made
+ him insolent. He was a man whom prosperity harmed.
+
Though concerning the self-indulgent habits of Turkey I had my own private
+ surmises, yet touching Nippers I was well persuaded that whatever might
+ be his faults in other respects, he was, at least, a temperate young man.
+ But indeed, nature herself seemed to have been his vintner, and at his birth charged
+ him so thoroughly with an irritable, brandy-like disposition, that all
+ subsequent potations were needless. When I consider how, amid the stillness
+ of my chambers, Nippers would sometimes impatiently rise from his seat,
+ and stooping over his table, spread his arms wide apart, seize the whole
+ desk, and move it, and jerk it, with a grim, grinding motion on the floor,
+ as if the table were a perverse
+ voluntary agent, intent on thwarting and vexing him; I plainly
+ perceive that for Nippers, brandy and water were altogether superfluous.
+
It was fortunate for me that, owing to its course--indigestion--the irritability
+ and consequent nervousness of Nippers, were mainly observable in the morning,
+ while in the afternoon he was comparatively mild. So that Turkey's paroxysms
+ only coming on about twelve o'clock, I never had to do with their eccentricities
+ at one time. Their fits relieved each other like guards. When Nippers'
+ was on, Turkey's was off, and vice versa. This was a good
+ natural arrangement under the circumstances.
+
Ginger Nut, the third on my list, was a lad some twelve years old. His
+ father was a carman, ambitious of seeing his son on the bench instead of
+ a cart, before he died. So he sent him to my office as a student at law,
+ errand boy, and cleaner and sweeper, at the rate of one dollar a week.
+ He had a little desk to himself, but he did not use it much. Upon inspection,
+ the drawer exhibited a great array of the shells of various sorts of nuts.
+ Indeed, to this quick-witted youth the whole noble science of the law was
+ contained in a nut-shell. Not the least among the employments of Ginger
+ Nut, as well as one which he discharged with the most alacrity, was his
+ duty as cake and apple purveyor for Turkey and Nippers. Copying law papers
+ being proverbially a dry,
+ husky sort of business, my two scriveners were fain to moisten
+ their mouths very often with Spitzenbergs to be had at the numerous stalls
+ nigh the Custom House and Post Office. Also, they sent Ginger Nut very
+ frequently for that peculiar cake--small, flat, round, and very spicy--after
+ which he had been named by them. Of a cold morning when business was but
+ dull, Turkey would gobble up scores of these cakes, as if they were mere
+ wafers--indeed they sell them at the rate of six or eight for a penny--the
+ scrape of his pen blending with the crunching of the crisp particles in
+ his mouth. Of all the fiery afternoon blunders and flurried rashnesses
+ of Turkey, was his once moistening a ginger-cake between his lips, and
+ clapping it on to a mortgage for a seal. I
+ came within an ace of dismissing him then. But he mollified
+ me by making an oriental bow, and saying--"With submission, sir, it was
+ generous of me to
+ find you in stationery on my own account."
+
Now my original business--that of a conveyancer
+ and title hunter, and drawer-up of recondite documents of
+ all sorts--was considerably increased by receiving the master's office.
+ There was now great work for scriveners. Not only must I push the clerks
+ already with me, but I must have additional help. In answer to my advertisement,
+ a motionless young man one morning, stood upon my office threshold, the
+ door being open, for it was summer. I can see that figure now--pallidly
+ neat, pitiably respectable, incurably forlorn! It was Bartleby.
+
After a few words touching his qualifications, I engaged him, glad to
+ have among my
+ corps of copyists a man of so singularly
+ sedate an aspect, which I thought might operate beneficially
+ upon the flighty temper of Turkey, and the fiery one of Nippers.
+
I should have stated before that ground glass folding-doors divided my
+ premises into two parts, one of which was occupied by my scriveners, the
+ other by myself. According
+ to my humor I threw open these doors, or closed them. I resolved
+ to assign Bartleby a corner by the folding-doors, but on my side of them,
+ so as to have this quiet man within easy call, in case any trifling
+ thing was to be done. I placed his desk close up to a small
+ side window in that part of the room, a window which originally had afforded
+ a lateral view of certain grimy back-yards and bricks, but which, owing
+ to subsequent
+ erections, commanded at present no view at all, though it
+ gave some light. Within three feet of the panes was a wall, and the light
+ came down from far above, between two lofty buildings, as from a very small
+ opening in a dome. Still further to a satisfactory arrangement, I procured
+ a high green folding screen, which might entirely isolate Bartleby
+ from my sight, though not remove him from my
+ voice. And thus, in a manner, privacy and society were
+ conjoined.
+
+
At first Bartleby did an extraordinary quantity of writing. As if long
+ famishingfor something to copy, he seemed to gorge himself on my documents. There
+ was no pause for digestion. He ran a day and night line, copying by sun-light
+ and by candle-light. I should have been quite delighted with his application,
+ had be been cheerfully
+ industrious. But he wrote on silently, palely, mechanically.
+
+
It is, of course, an indispensable part of a scrivener's business to verify
+ the accuracy of his copy, word by word. Where there are two or more scriveners
+ in an office, they assist each other in this examination, one reading from
+ the copy, the other holding the original. It is a very
+ dull, wearisome, and lethargic affair. I can readily imagine
+ that to some sanguine temperaments it would be altogether
+ intolerable. For example, I cannot credit that the mettlesome
+ poet Byron would have contentedly sat down with Bartleby
+ to examine a law document of, say five hundred pages, closely written in
+ a crimpy hand.
+
Now and then, in the haste of business, it had been my habit to assist
+ in comparing some brief document myself, calling Turkey or Nippers for
+ this purpose. One object I had in placing Bartleby so handy to me behind
+ the screen, was to avail myself of his services on such trivial
+ occasions. It was on the third day, I think, of his being
+ with me, and before any necessity had arisen for having his own writing
+ examined, that, being much hurried to complete a small affair I had in
+ hand, I abruptly called to Bartleby. In my haste and natural
+ expectancy of instant compliance, I sat with my head bent
+ over the original on my desk, and my right hand sideways, and somewhat
+ nervously extended with the copy, so that immediately upon emerging from
+ his retreat, Bartleby might snatch it and proceed to business without
+ the least delay.
+
In this very attitude did I sit when I called to him, rapidly stating
+ what it was I wanted him to do--namely, to examine a small paper with me.
+ Imagine my surprise, nay, my consternation, when without moving from his
+ privacy, Bartleby in a singularly mild,
+ firm voice, replied,"I
+ would prefer not to."
+
+
I sat awhile in perfect silence, rallying my stunned faculties. Immediately
+ it occurred to me that my ears had deceived me, or Bartleby had entirely
+ misunderstood my meaning. I repeated my request in the clearest tone I
+ could assume. But in quite as clear a one came the previous reply, "I would
+ prefer not to."
+
"Prefer not to," echoed I, rising in high excitement, and crossing the
+ room with a stride, "What do you mean? Are you moon-struck? I want you to help me
+ compare this sheet here--take it," and I thrust it towards him.
+
"I would prefer not to," said he.
+
I looked at him steadfastly. His face was leanly composed; his gray eye
+ dimly calm. Not a wrinkle of agitation rippled him. Had there been the
+ least uneasiness, anger, impatience or impertinence in his manner; in other
+ words, had there been any thing ordinarily
+ human about him, doubtless I
+ should have violently dismissed him from the premises. But
+ as it was, I should have as soon thought of turning my pale plaster-of-paris
+ bust of Cicero out of doors. I stood gazing at him awhile,
+ as he went on with his own writing, and then reseated myself at my desk.
+ This is very strange, thought I. What had one best do? But my business hurried
+ me. I concluded to forget the matter for the present, reserving it for
+ my future leisure. So calling Nippers from the other room, the paper was
+ speedily examined.
+
A few days after this, Bartleby concluded four lengthy documents, being
+ quadruplicates of a week's testimony taken before me in my High Court of
+ Chancery. It became necessary to examine them. It was an important suit,
+ and great accuracy was imperative. Having all things arranged I called
+ Turkey, Nippers and Ginger Nut from the next room, meaning to place the
+ four copies in the hands of my four clerks, while I should read from the
+ original. Accordingly Turkey, Nippers and Ginger Nut had taken their seats
+ in a row, each with his document in hand, when I called to Bartleby to
+ join this interesting
+ group.
+
"Bartleby! quick, I am waiting."
+
I heard a low scrape of his chair legs on the unscraped floor, and soon
+ he appeared standing at the entrance of his hermitage.
+
+
"What is wanted?" said he mildly.
+
"The copies, the copies," said I hurriedly. "We are going to examine them.
+ There"--and I held towards him the fourth quadruplicate.
+
"I would prefer not to," he said, and gently disappeared behind the screen.
+
For a few moments I was turned into a
+ pillar of salt, standing at the head of my seated column
+ of clerks. Recovering myself, I advanced towards the screen, and demanded
+ the reason for such extraordinary conduct.
+
"Why do you refuse?"
+
"I would prefer not to."
+
With any other man I should have flown
+ outright into a dreadful passion, scorned all further words,
+ and thrust him ignominiously from my presence. But there was something
+ about Bartleby that not only strangely disarmed me, but in a wonderful
+ manner touched and disconcerted me. I began to reason with him.
+
"These are your own copies we are about to examine. It is labor saving
+ to you, because one examination will answer for your four papers. It
+ is common usage. Every copyist is bound to help examine his
+ copy. Is it not so? Will you not speak? Answer!"
+
"I prefer not to," he replied in a flute-like tone. It seemed to me that
+ while I had been addressing him, he carefully revolved every statement
+ that I made; fully comprehended the meaning; could not gainsay the irresistible
+ conclusion; but, at the same time, some paramount consideration prevailed
+ with him to reply as he did.
+
"You are decided, then, not to comply with my request--a request made
+ according to common usage and common sense?"
+
He briefly gave me to understand that on that point my
+ judgment was sound. Yes: his decision was irreversible.
+
It is not seldom the case that when a man is browbeaten in some unprecedented and
+ violently unreasonable way, he
+ begins to stagger in his own plainest faith. He begins, as
+ it were, vaguely to surmise that, wonderful as it may be, all the justice
+ and all the reason is on the other side. Accordingly, if any disinterested
+ persons are present, he turns to them for some reinforcement for his own
+ faltering mind.
+
+
"Turkey," said I, "what do you think of this? Am I not right?"
+
"With submission, sir," said Turkey, with his blandest tone, "I think
+ that you are."
+
"Nippers," said I, "what do you think of it?"
+
"I think I should kick him out of the office."
+
(The reader of nice perceptions will here perceive that, it being morning,
+ Turkey's answer is couched in polite and tranquil terms, but Nippers replies
+ in ill-tempered ones. Or, to repeat a previous sentence, Nipper's ugly
+ mood was on duty, and Turkey's off.)
+
"Ginger Nut," said I, willing to enlist the smallest suffrage in my behalf,
+ "what do you think of it?"
+
"I think, sir, he's a little luny ," replied Ginger Nut, with a
+ grin.
+
"You hear what they say," said I, turning towards the screen, "come forth
+ and do
+ your duty."
+
But he vouchsafed no reply. I pondered a moment in sore perplexity. But
+ once more business hurried me. I determined again to postpone the consideration
+ of this dilemma to my future leisure. With a little trouble we made out
+ to examine the papers without Bartleby, though at every page or two, Turkey
+ deferentially dropped his opinion that this proceeding was quite out of
+ the common; while Nippers, twitching in his chair with a dyspeptic nervousness,
+ ground out between his set teeth occasional hissing maledictions against
+ the stubborn oaf behind the screen. And for his (Nipper's) part, this was
+ the first and the last time he would do another man's business without
+ pay.
+
Meanwhile Bartleby sat in his hermitage, oblivious to every thing but
+ his own peculiar business there.
+
Some days passed, the scrivener being employed upon another lengthy work.
+ His late remarkable conduct led me to regard his way narrowly. I observed
+ that he never went to dinner; indeed that he never went any where. As yet
+ I had never of my personal knowledge known him to be outside of my office.
+ He was a perpetual
+ sentry in the corner. At about eleven o'clock though, in
+ the morning, I noticed that Ginger Nut would advance toward the opening
+ in Bartleby's screen, as if silently beckoned thither by a gesture invisible
+ to me where I sat. That boy would then leave the office jingling a few
+ pence, and reappear with a handful of ginger-nuts which he delivered in
+ the hermitage, receiving two of the cakes for his trouble.
+
He lives, then, on ginger-nuts, thought I; never eats a dinner, properly
+ speaking; he must be a vegetarian then, but no; he never eats even vegetables,
+ he eats
+ nothing but ginger-nuts. My mind then ran on in reveries
+ concerning the probable effects upon the human constitution of living entirely
+ on ginger-nuts. Ginger-nuts are so called because they contain ginger as
+ one of their peculiar constituents, and the final flavoring one. Now what
+ was ginger? A hot, spicy thing. Was Bartleby hot and spicy? Not at all.
+ Ginger, then, had no effect upon Bartleby. Probably
+ he preferred it should have none.
+
+
Nothing so aggravates an earnest person as a passive
+ resistance. If the individual so resisted be of a not inhumane
+ temper, and the resisting one perfectly harmless in his passivity; then,
+ in the better moods of the former, he will endeavor charitably to construe
+ to his imagination what proves impossible to be solved by
+ his judgment. Even so, for the most part, I regarded Bartleby and his ways.
+ Poor fellow! thought I, he means no mischief; it is plain he intends no
+ insolence; his aspect sufficiently evinces that his eccentricities are
+ involuntary. He
+ is useful to me. I can get along with him. If I turn him
+ away, the chances are he will fall in with some less indulgent employer,
+ and then he will be rudely treated, and perhaps driven forth miserably
+ to starve. Yes. Here I
+ can cheaply purchase a delicious self-approval. To befriend
+ Bartleby; to humor him in his strange willfulness, will cost me little
+ or nothing, while I lay up in my soul what will eventually prove a sweet
+ morsel for my conscience. But this mood was not invariable
+ with me. The passiveness of Bartleby sometimes irritated me. I felt strangely
+ goaded on to encounter him in new opposition, to elicit some angry spark
+ from him answerable to my own. But indeed I might as well have essayed
+ to strike fire with my knuckles against a bit of Windsor
+ soap. But one afternoon the evil impulse in me mastered
+ me, and the following little scene ensued:
+
"Bartleby," said I, "when those papers are all copied, I will compare
+ them with you."
+
"I would prefer not to."
+
"How? Surely you do not mean to persist in that mulish
+ vagary?"
+
No answer.
+
I threw open the folding-doors near by, and turning upon Turkey and Nippers,
+ exclaimed in an excited manner--
+
"He says, a second time, he won't examine his papers. What do you think
+ of it, Turkey?"
+
It was afternoon, be it remembered. Turkey sat glowing like a brass boiler,
+ his bald head steaming, his hands reeling among his blotted papers.
+
"Think of it?" roared Turkey; "I think I'll just step behind his screen,
+ and black his eyes for him!"
+
So saying, Turkey rose to his feet and threw his arms into a pugilistic
+ position. He was hurrying away to make good his promise,
+ when I detained him, alarmed at the effect of incautiously rousing Turkey's
+ combativeness after dinner.
+
"Sit down, Turkey," said I, "and hear what Nippers has to say. What do
+ you think of it, Nippers? Would I not be justified in immediately dismissing
+ Bartleby?"
+
"Excuse me, that is for you to decide, sir. I think his conduct quite
+ unusual, and indeed unjust, as regards Turkey and myself. But it may only
+ be a passing whim."
+
"Ah," exclaimed I, "you have strangely changed your mind then--you speak
+ very gently of him now."
+
"All beer," cried Turkey; "gentleness is effects of beer--Nippers and
+ I dined together to-day. You see how gentle I am, sir. Shall I go and black
+ his eyes?"
+
"You refer to Bartleby, I suppose. No, not to-day, Turkey," I replied;
+ "pray, put up your fists."
+
I closed the doors, and again advanced towards Bartleby. I felt additional
+ incentives tempting me to my fate. I
+ burned to be rebelled against again. I remembered that Bartleby
+ never left the office.
+
"Bartleby," said I, "Ginger Nut is away; just step round to the Post
+ Office, won't you? (it was but a three minutes walk,) and
+ see if there is any thing for me."
+
"I would prefer not to."
+
"You will not?"
+
"I prefer not."
+
I staggered to my desk, and sat there
+ in a deep study. My blind
+ inveteracy returned. Was there any other thing in which I
+ could procure myself to be ignominiously repulsed by this lean,
+ penniless with?--my
+ hired clerk? What added thing is there, perfectly reasonable,
+ that he will be sure to refuse to do?
+
"Bartleby!"
+
No answer.
+
"Bartleby," in a louder tone.
+
No answer.
+
"Bartleby," I roared.
+
Like a
+ very ghost, agreeably to the laws of magical invocation,
+ at the third summons, he appeared at the entrance of his hermitage.
+
"Go to the next room, and tell Nippers to come to me."
+
"I prefer not to," he respectfully
+ and slowly said, and mildly disappeared.
+
"Very good, Bartleby," said I, in a quiet sort of serenely severe self-possessed
+ tone, intimating the unalterable purpose of some terrible
+ retribution very close at hand. At the moment I half intended
+ something of the kind. But upon the whole, as it was drawing towards my
+ dinner-hour, I thought it best to put on my hat and walk home for the day,
+ suffering much from perplexity and distress of mind.
+
Shall
+ I acknowledge it? The conclusion of this whole business was
+ that it soon became a fixed fact of my chambers, that a pale young scrivener,
+ by the name of Bartleby, had a desk there; that he copied for me at the
+ usual rate of four
+ cents a folio (one hundred words); but he was permanently
+ exempt from examining the work done by him, that duty being transferred
+ to Turkey and Nippers, one of compliment doubtless to their superior acuteness;
+ moreover, said Bartleby was never on any account to be dispatched on the
+ most trivial errand of any sort; and that even if entreated to take upon
+ him such a matter, it was generally understood that he would prefer not
+ to--in other words, that he would refuse point-blank.
+
+
32 As days passed on, I became considerably reconciled to Bartleby. His
+ steadiness, his freedom from all dissipation, his incessant industry (except
+ when he chose to throw himself into a standing revery behind his screen),
+ his great stillness, his unalterableness of demeanor under all circumstances,
+ made him a
+ valuable acquisition. One prime thing was this,--he was
+ always there;--first in the morning, continually through the day, and the
+ last at night. I had a singular confidence in his honesty. I felt my most
+ precious papers perfectly safe in his hands. Sometimes to be sure I could
+ not, for
+ the very soul of me, avoid falling into sudden spasmodic
+ passions with him. For it was exceeding difficult to bear in mind all the
+ time those strange peculiarities, privileges, and unheard of exemptions,
+ forming the tacit stipulations on Bartleby's part under which he remained
+ in my office. Now and then, in the eagerness of dispatching pressing business,
+ I would inadvertently summon Bartleby, in a short, rapid tone, to put his
+ finger, say, on the incipient tie of a bit of red tape with which I was
+ about compressing some papers. Of course, from behind the screen the usual
+ answer, "I prefer not to," was sure to come; and then, how
+ could a human creature with the common infirmities of our
+ nature, refrain from bitterly exclaiming upon such perverseness--such unreasonableness.
+ However, every added repulse of this sort which I received only tended
+ to lessen the probability of my repeating the inadvertence.
+
Here is must be said, that according to the custom of most legal gentlemen
+ occupying chambers in densely-populated law buildings, there were several
+ keys to my door. One was kept by a woman residing in the attic, which person
+ weekly scrubbed and daily swept and dusted my apartments. Another was kept
+ by Turkey for convenience sake. The third I sometimes carried in my own
+ pocket. The fourth I knew not who had.
+
Now, one Sunday morning I happened to go to Trinity Church, to
+ hear a celebrated preacher, and finding myself rather early
+ on the ground, I thought I would walk round to my chambers for a while.
+ Luckily I had my key with me; but upon applying it to the lock, I found
+ it resisted by something inserted from the inside. Quite surprised, I called
+ out; when to my consternation a key was turned from within; and thrusting
+ his lean visage at me, and holding the door ajar, the
+ apparition of Bartleby appeared, in his shirt sleeves, and
+ otherwise in a strangely tattered dishabille, saying quietly that he was
+ sorry, but he was deeply engaged just then, and--preferred not admitting
+ me at present. In a brief word or two, he moreover added, that perhaps
+ I had better walk round the block two or three times, and by that time
+ he would probably have concluded his affairs. Now, the utterly unsurmised
+ appearance of Bartleby, tenanting my law-chambers of a Sunday
+ morning, with his cadaverously gentlemanly nonchalance,
+ yet withal firm and self-possessed, had such a strange effect upon me,
+ that incontinently I slunk away from my own door, and did as desired. But
+ not without sundry twinges of impotent rebellion against the mild effrontery
+ of this unaccountable scrivener. Indeed, it was his wonderful mildness
+ chiefly, which not only disarmed me, but unmanned me, as it were. For I consider
+ that one, for the time, is a sort of unmanned when he tranquilly permits
+ his hired clerk to dictate to him, and order
+ him away from his own premises. Furthermore, I was full of
+ uneasiness as to what Bartleby could possibly be doing in my office in
+ his shirt sleeves, and in an otherwise dismantled condition of a Sunday
+ morning. Was any thing amiss going on? Nay, that was out of the question.
+ It was not to be thought of for a moment that Bartleby was an immoral person.
+ But what could he be doing there?--copying? Nay again, whatever might be
+ his eccentricities, Bartleby was an eminently decorous person. He would
+ be the last man to sit down to his desk in any state approaching to nudity.
+ Besides, it was Sunday; and there was something about Bartleby that forbade
+ the supposition that we would by any secular occupation violate the
+ proprieties of the day.
+
Nevertheless, my mind was not pacified; and full of a restless curiosity,
+ at last I returned to the door. Without hindrance I inserted my key, opened
+ it, and entered. Bartleby was not to be seen. I looked round anxiously,
+ peeped behind his screen; but it was very plain that he was gone. Upon
+ more closely examining the place, I surmised that for an indefinite period
+ Bartleby must have ate, dressed, and slept in my office, and that too without
+ plate, mirror, or bed. The cushioned seat of a rickety old sofa in one
+ corner bore t faint impress of a lean, reclining form. Rolled away under
+ his desk, I found a blanket; under the empty grate, a blacking box and
+ brush; on a chair, a tin basin, with soap and a ragged towel; in a newspaper
+ a few crumbs of ginger-nuts and a morsel of cheese. Yet, thought I, it
+ is evident enough that Bartleby has been making his home here, keeping
+ bachelor's hallall by himself. Immediately then the thought came sweeping
+ across me, What miserable friendlessness and loneliness are here revealed!
+ His poverty is great; but his solitude, how
+ horrible! Think of it. Of a Sunday, Wall-street is deserted
+ as Petra; and every night of every day
+ it is an emptiness. This building too, which of week-days hums with industry
+ and life, at nightfall echoes with sheer vacancy, and all through Sunday
+ is forlorn. And here Bartleby makes his home; sole spectator of a solitude
+ which he has seen all populous--a sort of innocent and transformed Marius
+ brooding among the ruins of Carthage!
+
+
For the first
+ time in my life a feeling of overpowering stinging melancholy
+ seized me. Before, I had never experienced aught but a not-unpleasing sadness.
+ The bond of a common humanity now drew me irresistibly to gloom. A fraternal
+ melancholy! For both I and Bartleby were sons
+ of Adam. I remembered the bright silks and sparkling faces
+ I had seen that day in gala trim, swan-like sailing down the Mississippi
+ of Broadway; and I contrasted them with the pallid copyist, and thought
+ to myself, Ah, happiness courts the light, so we deem the world is gay;
+ but misery hides aloof, so we deem that misery there is none. These sad
+ fancyings-- chimeras, doubtless, of a sick and
+ silly brain--led on to other and more special thoughts, concerning the
+ eccentricities of Bartleby. Presentiments of strange discoveries hovered
+ round me. The scrivener's pale form appeared to me laid
+ out, among uncaring strangers, in its shivering winding
+ sheet.
+
Suddenly I was attracted by Bartleby's closed desk, the key in open sight
+ left in the lock.
+
I
+ mean no mischief, seek the gratification of no heartless
+ curiosity, thought I; besides, the desk is mine, and its contents too,
+ so I will make bold to look within. Every thing was methodically arranged,
+ the papers smoothly placed. The pigeon holes were deep, and removing the
+ files of documents, I groped into their recesses. Presently I felt something
+ there, and dragged it out. It was an old bandanna handkerchief, heavy and
+ knotted. I opened it, and saw it was a savings' bank.
+
I now recalled all the quiet mysteries which I had noted in the man. I
+ remembered that he never spoke but to answer; that though at intervals
+ he had considerable time to himself, yet I had never seen him reading--no,
+ not even a newspaper; that for long periods he would stand looking out,
+ at his pale window behind the screen, upon the dead brick wall; I was quite
+ sure he never visited any refectory or eating house; while his pale face
+ clearly indicated that he never drank beer like Turkey, or tea and coffee
+ even, like other men; that he never went any where in particular that I
+ could learn; never went out for a walk, unless indeed that was the case
+ at present; that he had declined telling who he was, or whence he came,
+ or whether he had any relatives in the world; that though so thin and pale,
+ he never complained of ill health. And more than all, I remembered a certain
+ unconscious air of pallid--how shall I call it?--of pallid
+ haughtiness, say, or rather an austere reserve about him,
+ which had positively awed me into my tame compliance with his eccentricities,
+ when I had feared to ask him to do the slightest incidental thing for me,
+ even though I might know, from his long-continued motionlessness, that
+ behind his screen he must be standing in one of those dead-wall
+ reveries of his.
+
Revolving all these things, and coupling them with the recently discovered
+ fact that he made my office his constant abiding place and home, and not
+ forgetful of his morbid moodiness; revolving all these things, a prudential
+ feeling began to steal over me. My first emotions had been
+ those of pure melancholy and sincerest pity; but just in proportion as
+ the forlornness of Bartleby grew and grew to my imagination, did that same
+ melancholy merge into fear, that pity into repulsion. So
+ true it is, and so terrible too, that up to a certain point the thought
+ or sight of misery enlists our best affections; but, in certain special
+ cases, beyond that point it does not. They err who would assert that invariably
+ this is owing to the inherent selfishness of the human heart. It rather
+ proceeds from a certain hopelessness of remedying excessive and organic
+ ill. To a sensitive being, pity is not seldom pain. And when at last it
+ is perceived that such pity cannot lead to effectual succor, common sense
+ bids the soul be rid of it. What I saw that morning persuaded me that the
+ scrivener was the victim of
+ innate and incurable disorder. I might give alms to his body;
+ but his body did not pain him; it was his soul that suffered, and his
+ soul I could not reach.
+
+
I did not accomplish the purpose of going to Trinity Church that morning.
+ Somehow, the
+ things I had seen disqualified me for the time from church-going.
+ I walked homeward, thinking what I would do with Bartleby. Finally, I
+ resolvedupon this;--I would put certain calm questions to him the
+ next morning, touching his history, &c., and if he declined to answer
+ then openly and reservedly (and I supposed he would prefer not), then to
+ give him a twenty dollar bill over and above whatever I might owe him,
+ and tell him his services were no longer required; but that if in any other
+ way I could assist him, I would be happy to do so, especially if he desired
+ to return to his native place, wherever that might be, I would willingly
+ help to defray the expenses. Moreover, if after reaching home, he found
+ himself at any time in want of aid, a letter from him would be sure of
+ a reply.
+
The next morning came.
+
"Bartleby," said I, gently calling to him behind the screen.
+
No reply.
+
"Bartleby," said I, in a still gentler tone, "come here; I am not going
+ to ask you to do any thing you would prefer not to do--I simply wish to
+ speak to you."
+
Upon this he noiselessly slid into view.
+
"Will you tell me, Bartleby, where
+ you were born?"
+
+
"I would prefer not to."
+
"Will you tell me anything about yourself?"
+
"I would prefer not to."
+
"But what reasonable
+ objection can you have to speak to me? I feel friendly towards
+ you."
+
He did not look at me while I spoke, but kept his glance fixed upon my
+ bust of Cicero, which as I then sat, was directly behind me, some
+ six inches above my head. "What is your answer, Bartleby?" said I, after
+ waiting a considerable time for a reply, during which his countenance remained
+ immovable, only there was the faintest
+ conceivable tremor of the white attenuated mouth.
+
"At present I prefer to give no answer," he said, and retired into his
+ hermitage.
+
It was rather weak in me I confess, but his manner on this occasion nettled
+ me. Not only did there seem to lurk in it a certain disdain, but his
+ perverseness seemed ungrateful, considering the undeniable
+ good usage and indulgence he had received from me.
+
Again I sat ruminating what I should do.Mortified as I was at his behavior,
+ and resolved as I had been to dismiss him when I entered my office, nevertheless
+ I strangely felt something superstitious knocking at my heart, and forbidding
+ me to carry out my purpose, and denouncing me for a villain if I dared
+ to breathe one bitter word against this forlornest of mankind. At last,
+ familiarly drawing my chair behind his screen, I sat down and said: "Bartleby,
+ never mind then about revealing your history; but let me entreat you,
+ as a friend, to comply as far as may be with the usages of this office.
+ Say now you will help to examine papers tomorrow or next day: in short,
+ say now that in a day or two you will begin to be a little reasonable:--say
+ so, Bartleby."
+
"At present I would prefer not to be a little reasonable
+ was his idly cadaverous reply.,"
+
Just then the folding-doors opened, and Nippers approached. He seemed
+ suffering from an unusually bad night's rest, induced by severer indigestion
+ than common. He overheard those final words of Bartleby.
+
"Prefer not,
+ eh?" gritted Nippers--"I'd prefer him, if I were you, sir," addressing
+ me--"I'd prefer him; I'd give him preferences, the stubborn mule!
+ What is it, sir, pray, that he prefers not to do now?"
+
Bartleby moved not a limb.
+
"Mr.
+ Nippers," said I, "I'd prefer that you would withdraw for the present."
+
+
Somehow, of late I had got into the way of involuntary using this word
+ "prefer" upon all sorts of not exactly suitable occasions. And I trembled
+ to think that my contact with the scrivener had already and seriously affected
+ me in a mental way. And what further and deeper aberration might it not yet produce?
+ This apprehension had not been without efficacy in determining me to summary
+ means.
+
As Nippers, looking very sour and sulky, was departing, Turkey blandly
+ and deferentially approached.
+
"With submission, sir," said he, "yesterday I was thinking about Bartleby
+ here, and I think that if he would but prefer to take a quart of good ale
+ every day, it would do much towards mending him, and enabling him to assist
+ in examining his papers."
+
"So you have got the word too," said I, slightly excited.
+
"With submission, what word, sir," asked Turkey, respectfully crowding
+ himself into the contracted space behind the screen, and by so doing, making
+ me jostle
+ the scrivener. "What word, sir?"
+
"I would prefer to be left alone here," said Bartleby, as if offended
+ at being mobbed
+ in his privacy.
+
+
"That's the word, Turkey," said I--"that's it."
+
"Oh, prefer oh yes--queer word. I never use it myself. But, sir
+ as I was saying, if he would but prefer--"
+
"Turkey," interrupted I, "you will please withdraw."
+
"Oh, certainly, sir, if
+ you prefer that I should."
+
As he opened the folding-door to retire, Nippers at his desk caught a
+ glimpse of me, and asked whether I would prefer to have a certain paper
+ copied on blue paper or white. He did not in the least roguishly accent
+ the word prefer. It was plain that it involuntarily rolled from his tongue.
+ I thought to myself, surely I must get rid of a demented man, who already has in some
+ degree turned the tongues, if not the heads of myself and clerks. But I
+ thought it prudent not to break the dismission
+ at once.
+
The next day I noticed that Bartleby
+ did nothing but stand at his window in his dead-wall revery.
+ Upon asking him why he did not write, he said that he had decided upon
+ doing no more writing.
+
"Why, how now? what next?" exclaimed I, "do no more writing?"
+
"No more."
+
"And what is the reason?"
+
"Do
+ you not see the reason for yourself," he indifferently replied.
+
I looked steadfastly at him, and perceived that his eyes looked dull and
+ glazed. Instantly it occurred to me, that his unexampled diligence in copying
+ by his dim window for the first few weeks of his stay with me might have
+ temporarily impaired
+ his vision.
+
I was touched. I said something in condolence with him. I hinted that
+ of course he did wisely in abstaining from writing for a while; and urged
+ him to embrace that opportunity of taking wholesome exercise in the open
+ air. This, however, he
+ did not do. A few days after this, my other clerks being
+ absent, and being in a great hurry to dispatch certain letters by the mail,
+ I thought that, having nothing else earthly to do, Bartleby would surely
+ be less inflexible than usual, and carry these letters to
+ the post-office. But he blankly declined. So, much to my
+ inconvenience, I went myself.
+
Still added
+ days went by. Whether Bartleby's eyes improved or not, I
+ could not say. To all appearance, I thought they did. But when I asked
+ him if they did, he vouchsafed no answer. At all events, he would do no
+ copying. At last, in reply to my urgings, he informed me that he had permanently
+ given up copying.
+
"What!" exclaimed I; "suppose your eyes should get entirely well- better
+ than ever before--would you not copy then?"
+
"I have given up copying," he answered, and slid
+ aside.
+
+
He remained as ever, a
+ fixture in my chamber. Nay--if that were possible--he became
+ still more of a fixture than before. What was to be done? He would do nothing
+ in the office: why should he stay there? In plain fact, he had now become
+ a millstone to me, not only useless as a necklace, but afflictive to bear.
+ Yet I was sorry for him. I speak less than truth when I say that, on his
+ own account, he occasioned me uneasiness. If he would but have named a
+ single relative or friend, I would instantly have written, and urged their
+ taking the poor fellow away to some convenient retreat. But he seemed alone,
+ absolutely alone in the universe. A
+ bit of wreck</font> in the mid Atlantic. At length,
+ necessities connected with my business tyrannized over all other considerations.
+ Decently as I could, I told Bartleby that in six days' time he must unconditionally
+ leave the office. I warned him to take measures, in the interval, for procuring
+ some other abode. I offered to assist him in this endeavor, if he himself
+ would but take the first step towards a removal. "And when you finally
+ quit me, Bartleby," added I, "I shall see that you go not away entirely
+ unprovided. Six days from this hour, remember."
+
At the expiration of that period, I peeped behind the screen, and lo!
+ Bartleby was there.
+
+
I buttoned
+ up my coat, balanced myself; advanced slowly towards him,
+ touched his shoulder, and said, "The time has come; you must quit this
+ place; I am sorry for you; here is money; but you must go."
+
"I would prefer not," he replied, with his back still towards me.
+
"You must ."
+
He remained silent.
+
Now I had an unbounded confidence in this man's common honesty. He had
+ frequently restored to me six pences and shillings carelessly dropped upon
+ the floor, for I am apt to be very reckless in such shirt-button
+ affairs. The proceeding then which followed will not be
+ deemed extraordinary. "Bartleby,"
+ said I, "I owe you twelve dollars on account; here are thirty-two; the
+ odd twenty are yours.--Will you take it? and I handed the
+ bills towards him.
+
But he made no motion.
+
"I will leave them here then," putting them under a weight on the table.
+ Then taking my hat and cane and going to the door I tranquilly turned and
+ added--"After you have removed your things from these offices, Bartleby,
+ you will of course lock the door--since every one is now gone for the day
+ but you--and if you please, slip your key underneath the mat, so that I
+ may have it in the morning. I shall not see you again; so good-bye to you.
+ If hereafter in your new place of abode I can be of any service to you,
+ do not fail to advise me by letter. Good-bye, Bartleby, and fare you well."
+
But he answered not a word; like the
+ last column of some ruined temple, he remained standing
+ mute and solitary in the middle of the otherwise deserted room.
+
As I walked home in a pensive mood, my vanity
+ got the better of my pity. I could not but highly plume
+ myself on my masterly management in getting rid of Bartleby. Masterly I
+ call it, and such it must appear to any dispassionate thinker. The beauty
+ of my procedure seemed to consist in its perfect quietness. There was
+ no vulgar bullying, no bravado of any sort, no choleric hectoring
+ and striding to and fro across the apartment, jerking out vehement commands
+ for Bartleby to bundle himself off with his beggarly traps. Nothing of
+ the kind. Without loudly bidding Bartleby depart--as an
+ inferior genius might have done--I assumed the ground that
+ depart he must; and upon the assumption built all I had to say. The more
+ I thought over my procedure, the more I was charmed with it. Nevertheless,
+ next morning, upon awakening, I had my doubts,--I had somehow slept off
+ the fumes of vanity. One of the coolest and wisest hours a man has, is
+ just after he awakes in the morning. My procedure seemed as sagacious as
+ ever,--but only in theory. How it would prove in practice--there was the
+ rub. It was truly a beautiful thought to have assumed Bartleby's departure;
+ but, after all, that assumption was simply my own, and none of Bartleby's.
+ The great point was, not whether I had assumed that he would quit me, but
+ whether he would prefer so to do. He was more a man
+ of preferences than assumptions.
+
After breakfast, I walked down town, arguing the probabilities pro and
+ con. One moment I thought it would prove a miserable failure, and Bartleby
+ would be found all alive at my office as usual; the next moment it seemed
+ certain that I should see his chair empty. And so I kept veering about.
+ At the corner of Broadway and Canal- street, I saw quite an excited group
+ of people standing in earnest conversation.
+
"I'll take odds he doesn't," said a voice as I passed.
+
"Doesn't go?--done!" said I, "put up your money."
+
I was instinctively putting my hand in my pocket to produce my own, when
+ I remembered that this was an election day. The words I had overheard bore
+ no reference to Bartleby, but to the success or non-success of some candidate
+ for the mayoralty. In my intent frame of mind, I had, as it were, imagined
+ that all Broadway shared in my excitement, and were debating
+ the same question with me. I passed on, very thankful that the uproar of
+ the street screened my momentary absent-mindedness.
+
As I had intended, I was earlier than usual at my office door. I stood
+ listening for a moment. All was still. He must be gone. I tried the knob.
+ The door was locked. Yes, my procedure had worked to a charm; he indeed
+ must be vanished. Yet a certain melancholy mixed with this: I was almost
+ sorry for my brilliant success. I was fumbling under the
+ door mat for the key, which Bartleby was to have left there for me, when
+ accidentally my knee knocked against a panel, producing a summoning sound,
+ and in response a voice came to me from within--"Not yet; I am occupied."
+
It was Bartleby.
+
I was thunderstruck. For an instant I stood like
+ the man who, pipe in mouth, was killed one cloudless afternoon
+ long ago in Virginia, by summer lightning; at his own warm open window
+ he was killed, and remained leaning out there upon the dreamy afternoon,
+ till some one touched him, when he fell. "Not gone!" I murmured at last.
+ But again obeying that wondrous
+ ascendancy which the inscrutable scrivener had over me, and
+ from which ascendancy, for all my chafing, I could not completely escape,
+ I slowly went down stairs and out into the street, and while walking round
+ the block, considered what I should next do in this unheard-of-perplexity.
+ Turn the man out by an actual thrusting I could not; to drive him away
+ by calling him hard names would not do; calling in the police was an unpleasant
+ idea; and yet, permit
+ him to enjoy his cadaverous triumph over me,--this too I
+ could not think of. What was to be done? or, if nothing could be done,
+ was there any thing further that I could assume in the matter? Yes, as before
+ I had prospectively assumed that Bartleby would depart, so now I might
+ retrospectively assume that departed he was. In the legitimate carrying
+ out of this assumption, I might enter my office in a great hurry, and pretending
+ not to see Bartleby at all, walk straight against him as if he were air.
+ Such a proceeding would in a singular degree have the appearance of a
+ home-thrust. It was hardly possible that Bartleby could withstand
+ such an application of the doctrine of assumptions. But upon second thoughts
+ the success of the plan seemed rather dubious. I resolved to argue the
+ matter over with him again.
+
Bartleby," said I, entering the office, with a quietly severe expression.
+ "I am seriously displeased. I am pained, Bartleby. I had thought better
+ of you. I had imagined you of such a gentlemanly
+ organization, that in any delicate dilemma a slight hint
+ would suffice--in short, an assumption. But it appears I am deceived. Why,"
+ I added, unaffectedly
+ starting, "you have not even touched the money yet," pointing
+ to it, just where I had left it the evening previous.
+
He answered nothing.
+
"Will you, or will you not, quit me?" I now demanded in a sudden
+ passion, advancing close to him.
+
"I would prefer not to quit you," he replied, gently
+ emphasizing the not .
+
"What earthly
+ right have you to stay here? do you pay any rent? Do you
+ pay my taxes? Or is this property yours?"
+
He answered nothing.
+
"Are you ready to go on and write now? Are your eyes recovered? Could
+ you copy a small paper for me this morning? or help examine a few lines?
+ or step round to the post-office? In a word, will you do any thing at all,
+ to give a coloring to your refusal to depart the premises?"
+
He silently
+ retired into his hermitage.
+
I was now in such a state of nervous resentment that I thought it but
+ prudentto check myself at present from further demonstrations. Bartleby
+ and I were alone. I
+ remembered the tragedy of the unfortunate Adams and the still
+ more unfortunate Colt in the solitary office of the latter; and how poor
+ Colt, being dreadfully incensed by Adams, and imprudently permitting himself
+ to get wildly excited, was at unawares hurried into his fatal
+ act--an act which certainly no
+ man could possibly deplore more than the actor himself. Often
+ it had occurred to me in my ponderings upon the subject, that had
+ that altercation taken place in the public street, or at a private residence,
+ it would not have terminated as it did. It was the circumstance of being
+ alone in a solitary office, up stairs, of a building entirely unhallowed
+ by humanizing domestic associations--an uncarpeted
+ office, doubtless of a dusty, haggard sort of appearance;--this
+ it must have been, which greatly helped to enhance the irritable desperation
+ of the hapless Colt.
+
But when this old
+ Adam of resentment rose in me and tempted me concerning Bartleby,
+ I grappled him and threw him. How? Why, simply by recalling the divine
+ injunction: "A new commandment give I unto you, that ye
+ love one another." Yes, this it was that saved me. Aside from higher considerations,
+ charity often operates as a
+ vastly wise and prudent principle--a great safeguard to its
+ possessor. Men have committed murder for jealousy's sake, and anger's sake,
+ and hatred's sake, and selfishness' sake, and spiritual pride's sake; but
+ no man that ever I heard of, ever committed
+ a diabolical murder for sweet charity's sake. Mere
+ self-interest, then, if no better motive can be enlisted,
+ should, especially with high-tempered men, prompt all beings to charity
+ and philanthropy. At any rate, upon the occasion in question, I strove
+ to drown
+ my exasperated feelings towards the scrivener by benevolently
+ construing his conduct. Poor fellow, poor fellow! thought I, he don't mean
+ any thing; and besides, he has seen hard times, and ought to be indulged.
+
I endeavored also immediately to occupy myself, and at the same time
+ to comfort my despondency.I tried to fancy that in the course of the
+ morning, at such time as might prove agreeable to him, Bartleby, of his
+ own free accord, would emerge from his hermitage, and take up some decided
+ line of march in the direction of the door. But no. Half-past twelve o'clock
+ came; Turkey began to glow in the face, overturn his inkstand, and become
+ generally obstreperous; Nippers abated down into quietude and courtesy;
+ Ginger Nut munched his noon apple; and Bartleby remained standing at his
+ window in one of his profoundest deadwall reveries. Will
+ it be credited? Ought I to acknowledge it? That afternoon
+ I left the office without saying one further word to him.
+
Some days now passed, during which, at leisure intervals I looked a little
+ into Edwards
+ on the Will," and "Priestly on Necessity." Under the circumstances,
+ those books induced a salutary feeling. Gradually I slid
+ into the persuasion that these troubles of mine touching
+ the scrivener, had been all predestinated
+ from eternity, and Bartleby was billeted upon me for some mysterious
+ purpose of an all-wise Providence, which it was not for a mere mortal like
+ me to fathom. Yes, Bartleby, stay there behind your screen, thought
+ I; I shall persecute you no more; you are harmless and noiseless
+ as any of these old chairs; in short, I never feel so private as when I
+ know you are here. At least I see it, I feel it; I penetrate to the predestinated
+ purpose of my life. I am content. Others may have loftier parts to enact;
+ but my
+ mission in this world, Bartleby, is to furnish you with office-room
+ for such period as you may see fit to remain.
+
I believe that this wise and blessed frame of mind would have continued
+ with me, had it not been for the unsolicited and uncharitable remarks obtruded
+ upon me by my
+ professional friends who visited the rooms. But thus it often
+ is, that the constant friction of illiberal minds wears out at last the
+ best resolves of the more generous. Though to be sure, when
+ I reflected upon it, it was not strange that people entering my office
+ should be struck by the peculiar aspect of the unaccountable Bartleby,
+ and so be tempted to throw out some sinister observations concerning him.
+ Sometimes an attorney having business with me, and calling at my office,
+ and finding no one but the scrivener there, would undertake to obtain some
+ sort of precise information from him touching my whereabouts; but without
+ heeding his idle
+ talk, Bartleby would remain standing immovable in the middle
+ of the room. So after contemplating him in that position for a time, the
+ attorney would depart, no wiser than he came.
+
Also, when a Reference was going on, and the room full of lawyers and
+ witnesses and business was driving fast; some deeply occupied legal gentleman
+ present, seeing Bartleby wholly unemployed, would request him to run round
+ to his (the legal gentleman's) office and fetch some papers for him. Thereupon,
+ Bartleby would tranquilly decline, and remain idle as before. Then the
+ lawyer would give a great stare, and turn to me. And what could I say?
+ At last I was made aware that all through the circle of my professional
+ acquaintance, a whisper of wonder was running round, having reference to
+ the strange creature I kept at my office. This worried
+ me very much. And as the idea came upon me of his possibly
+ turning out a long-lived man, and keep occupying my chambers, and denying
+ my authority; and perplexing my visitors; and scandalizing
+ my professional reputation; and casting a general gloom over the premises;
+ keeping soul and body together to the last upon his savings (for doubtless
+ he spent but half a dime a day), and in the end perhaps outlive
+ me, and claim possession of my office by right of his perpetual
+ occupancy: as all these dark anticipations crowded upon me more and more,
+ and my friends continually intruded their relentless remarks upon the apparition
+ in my room; a great change was wrought in me. I resolved to gather all
+ my faculties together, and for ever rid me of this intolerable
+ incubus.
+
Ere revolving any complicated project, however, adapted to this end, I
+ first simply suggested to Bartleby the propriety of his permanent departure.
+ In a calm and serious tone, I commended the idea to his careful and mature
+ consideration. But having taken three days to meditate upon it, he apprised
+ me that his original determination remained the same; in short, that he
+ still preferred to abide
+ with me.
+
What shall I do? I now said to myself, buttoning
+ up my coat to the last button. What shall I do? what ought
+ I to do? what does conscience say I should do with this man, or rather
+ ghost. Rid myself of him, I must; go, he shall. But how? You will not thrust
+ him, the poor, pale, passive mortal,--you will not thrust such a helpless
+ creature out of your door? you will not dishonor
+ yourself by such cruelty? No, I will not, I cannot do that.
+ Rather would I let him live and die here, and then mason
+ up his remains in the wall. What then will you do? For all
+ your coaxing, he will not budge. Bribes he leaves under your own paperweight
+ on your table; in short, it is quite plain that he prefers
+ to cling to you.
+
Then something severe, something unusual must be done. What! surely you
+ will not have him collared by a constable, and commit his innocent pallor
+ to the common jail? And upon what ground could you procure such a thing
+ to be done?--a vagrant, is he? What! he a vagrant, a wanderer, who
+ refuses to budge? It is because he will not be a vagrant, then, that you
+ seek to count him as a vagrant. That is too absurd. No visible means of
+ support: there I have him. Wrong again: for indubitably he does support
+ himself, and that is the only unanswerable proof that any man can show
+ of his possessing the means so to do. No more then. Since he will not quit
+ me, I must quit him. I will change my offices; I will move elsewhere; and
+ give him fair notice, that if I find him on my new premises I will then
+ proceed against him as a common trespasser.
+
Acting accordingly, next day I thus addressed him: "I find these chambers
+ too far from the City Hall; the air is unwholesome. In a word, I propose
+ to remove my offices next week, and shall no longer require your services.
+ I tell you this now, in order that you may seek another place."
+
He made no reply, and nothing more was said.
+
On the appointed day I engaged carts and men, proceeded to my chambers,
+ and having but little furniture, every thing was removed in a few hours.
+ Throughout, the scrivener remained standing behind the
+ screen, which I directed to be removed the last thing. It
+ was withdrawn; and being folded up like a huge folio, left him the motionless
+ occupant of a naked room. I stood in the entry watching him
+ a moment, while something from within me upbraided me.
+
I re-entered, with my hand
+ in my pocket--and--and my heart in my mouth.
+
+
"Good-bye, Bartleby; I am going--good-bye, and God some way bless you;
+ and take that," slipping something in his hand. But it dropped to the floor,
+ and then,--strange
+ to say--I tore myself from him whom I had so longed to be
+ rid of.
+
Established in my new quarters, for a day or two I kept the door locked,
+ and started at every footfall in the passages. When I returned to my rooms
+ after any little absence, I would pause at the threshold for an instant,
+ and attentively listen, ere applying my key. But these fears were needless.
+ Bartleby never came nigh me.
+
I thought all was going well, when a perturbed looking stranger visited
+ me, inquiring whether I was the person who had recently occupied rooms
+ at No.--Wall-street.
+
Full of forebodings, I replied that I was.
+
"Then, sir," said the stranger,
+ who proved a lawyer, "you are responsible for the man you
+ left there. He refuses to do any copying; he refuses to do any thing; he
+ says he prefers not to; and he refuses to quit the premises."
+
"I am very sorry, sir," said I, with assumed tranquillity, but an inward
+ tremor, "but, really, the
+ man you allude to is nothing to me --he is no relation or
+ apprentice of mine, that you should hold me responsible for him."
+
"In mercy's name, who is he?"
+
"I certainly cannot inform you. I know nothing about him. Formerly I employed
+ him as a copyist; but he has done nothing for me now for some time past."
+
"I
+ shall settle him then,--good morning, sir."
+
Several days passed, and I heard nothing more; and though I often felt
+ a charitable prompting to call at the place and see poor Bartleby, yet
+ a certain squeamishness of I know not what withheld
+ me.
+
All is over with him, by this time, thought I at last, when through another
+ week no further intelligence reached me. But coming to my room the day
+ after, I found several persons waiting at my door in a high state of nervous
+ excitement.
+
"That's the man--here he comes," cried the foremost one, whom recognized
+ as the lawyer who had previously called upon me alone.
+
"You must take him away, sir, at once," cried a portly person among them,
+ advancing upon me, and whom I knew to be the landlord of No.--Wall-street.
+ "These gentlemen, my tenants, cannot stand it any longer; Mr. B--" pointing
+ to the lawyer, "has turned him out of his room, and he now persists in
+ haunting the buildinggenerally, sitting upon the banisters of the
+ stairs by day, and sleeping in the entry by night. Every body is concerned;
+ clients are leaving the offices; some
+ fears are entertained of a mob; something you must do, and
+ that without delay."
+
Aghast
+ at this torment, I fell back before it, and would fain have
+ locked myselfin my new quarters. In vain I persisted that Bartleby
+ was nothing to me--no more than to any one else. In vain:--I was the last
+ person known to have any thing to do with him, and they held me to the
+ terrible account. Fearful
+ then of being exposed in the papers (as one person present
+ obscurely threatened) I considered the matter, and at length said, that
+ if the lawyer would give me a confidential interview with the scrivener,
+ in his (the lawyer's) own room, I would that afternoon strive my best to
+ rid them of the nuisance they complained of.
+
Going up stairs to my old haunt, there was Bartleby silently sitting upon
+ the banister at the landing.
+
"What are you doing here, Bartleby?" said I.
+
"Sitting upon the banister," he mildly replied.
+
I motioned him into the lawyer's room, who then left us.
+
"Bartleby,"
+ said I, "are you aware that you are the cause of great tribulation
+ to me, by persisting in occupying the entry after being dismissed from
+ the office?"
+
No answer.
+
"Now one of two things must take place. Either you must do something or
+ something must be done to you. Now what sort of business would you like
+ to engage in? Would you like to re-engage in copying for some one?"
+
"No; I would prefer not to make any change."
+
"Would you like a clerkship in a dry-goods store?"
+
"There is too much confinement about that. No, I would not like a clerkship;
+ but I am not particular."
+
"Too much confinement," I cried, "why you keep yourself confined all the
+ time!"
+
"I would prefer not to take a clerkship," he rejoined, as if to settle
+ that little item at once.
+
"How would a bar-tender's business suit you? There is no trying of the
+ eyesight in that."
+
"I would not like it at all; though, as I said before, I am not particular."
+
His unwonted wordiness inspirited me. I returned to the charge.
+
"Well then, would you like to travel through the country collecting bills
+ for the merchants? That would improve your health."
+
"No, I would prefer to be doing something else."
+
"How then would going as a companion to Europe, to entertain some young
+ gentleman with your conversation,--how would that suit you?"
+
"Not at all. It does not strike me that there is any thing definite about
+ that. I like to be stationary. But I am not particular.
+
"Stationary you shall be then," I cried, now losing all patience, and
+ for the first time in all my exasperating connection with him fairly flying
+ into a passion. "If you do not go away from these premises before night,
+ I shall feel bound--indeed I am bound--to-- to--to quit the premises
+ myself!" I rather absurdly concluded, knowing not with what possible
+ threat to try to frighten his immobility into compliance.
+ Despairing of all further efforts, I was precipitately leaving him, when
+ a final thought occurred to me--one
+ which had not been wholly unindulged before.
+
+
"Bartleby," said I, in the kindest tone
+ I could assume under such exciting circumstances, "will you
+ go home with me now--not to my office, but my dwelling--and remain there
+ till we can conclude upon some convenient arrangement for you at our leisure?
+ Come, let us start now, right away."
+
"No: at present I would prefer not to make any change at all."
+
I answered nothing; but effectualy dodging every one by the suddenness
+ and rapidity of my flight, rushed from the building, ran
+ up Wall-street towards Broadway, and jumping into the first omnibus was
+ soon removed from pursuit. As soon as tranquility returned I distinctly
+ perceived that I had now done all that I possibly could, both in respect
+ to the demands of the landlord and his tenants, and with regard to my own
+ desire and sense of duty, to benefit Bartleby, and shield him from rude
+ persecution. I now strove to be entirely care-free and quiescent; and my
+ conscience justified me in the attempt; though indeed it was not so successful
+ as I could have wished. So fearful was I of being again hunted out by the
+ incensed landlord and his exasperated tenants, that, surrendering my business
+ to Nippers, for a few days I drove about the upper part of the town and
+ through the suburbs, in my rockaway; crossed over to Jersey City and Hoboken,
+ and paid fugitive visits to Manhattanville and Astoria. In fact I almost
+ lived in my rockaway for the time.
+
When again I entered my office, lo, a note from the landlord lay upon
+ desk. opened it with trembling hands. informed me that writer had sent
+ to police, and Bartleby removed the
+ Tombs as a vagrant. Moreover, since I knew more
+ about him than any one else, he wished me to appear at that place, and
+ make a suitable statement of the facts. These tidings had a conflicting
+ effect upon me. At first I was indignant; but at last almost approved.
+ The landlord's energetic, summary disposition, had led him to adopt a procedure
+ which I do not think I would have decided upon myself; and yet as a last
+ resort, under such peculiar circumstances, it seemed the only plan.
+
As I afterwards learned, the poor scrivener, when told that he must be
+ conducted to the Tombs, offered not the slightest obstacle, but in his
+ pale unmoving way, silently
+ acquiesced.
+
+
Some of the compassionate and curious bystanders joined the party; and
+ headed by one of the constables arm in arm with Bartleby, the
+ silent procession filed its way through all the noise, and
+ heat, and joy of the roaring thoroughfares at noon.
+
The same day I received the note I went to the Tombs, or to speak more
+ properly, the Halls of Justice. Seeking the right officer, I stated the
+ purpose of my call, and was informed that the individual I described was
+ indeed within. I then assured the functionary that Bartleby was a perfectly
+ honest man, and greatly to be compassionated, however unaccountably eccentric.
+ I narrated all I knew,and closed by suggesting the idea of letting
+ him remain in as indulgent confinement as possible till something less
+ harsh might be done--though indeed I hardly knew what. At all events, if
+ nothing else could be decided upon, the alms-house must receive him. I
+ then begged to have an interview.
+
Being under no disgraceful charge, and quite serene and harmless in all
+ his ways, they had permitted him freely to wander about the prison, and
+ especially in the inclosed grass-platted yards thereof. And so I found
+ him there, standing all alone in the quietest of the yards, his face
+ towards a high wall, while all around, from the narrow slits of the
+ jail windows, I thought I
+ saw peering out upon him the eyes of murderers and thieves.
+
+
"Bartleby!"
+
"I
+ know you," he said, without looking round,--"and I want
+ nothing to say to you."
+
"It was not I that brought you here, Bartleby," said I, keenly
+ pained at his implied suspicion. "And to you, this should
+ not be so vile a place. Nothing reproachful attaches to you by being here.
+ And see, it
+ is not so sad a place as one might think. Look, there is
+ the sky, and here is the grass."
+
"I know where I am," he replied, but would say nothing more, and so I
+ left him.
+
As I entered the corridor again, a broad meat-like
+ man in an apron, accosted me, and jerking his thumb over
+ his shoulder said--"Is that your
+ friend?"
+
"Yes."
+
"Does he want to starve? If he does, let him live on the prison fare,
+ that's all.
+
"Who are you?" asked I, not knowing what to make of such an unofficially
+ speaking person in such a place.
+
"I am the grub-man. Such gentlemen as have friends here, hire me to provide
+ them with something good to eat."
+
"Is this so?" said I, turning to the turnkey.
+
He said it was.
+
"Well then," said I, slipping some silver into the grub-man's hands (for
+ so they called him). "I want you to give particular attention to my friend
+ there; let him have the best dinner you can get. And you must be as polite
+ to him as possible."
+
"Introduce me, will you?" said the grub-man, looking at me with an expression
+ which seemed to say he was all impatience for an opportunity to give a
+ specimen of his breeding.
+
Thinking it would prove of benefit to the scrivener, I acquiesced; and
+ asking the grub-man his name, went up with him to Bartleby.
+
"Bartleby, this is a
+ friend; you will find him very useful to you."
+
"Your
+ sarvant, sir, your sarvant," said the grub-man, making a
+ low salutation behind his apron. "Hope you find it pleasant
+ here, sir;--spacious grounds--cool apartments, sir--hope
+ you'll stay with us some time--try to make it agreeable. What will you
+ have for dinner today?"
+
"I prefer not to dine to-day," said Bartleby, turning away. "It would
+ disagree with me; I am unused to dinners." So saying he slowly moved to
+ the other side of the inclosure, and took up a
+ position fronting the dead-wall.
+
"How's this?" said the grub-man, addressing me with a stare of astonishment.
+ "He's odd, aint he?"
+
"I think he is a little deranged," said I, sadly.
+
"Deranged? deranged is it? Well now, upon my word, I thought that friend
+ of yourn was a gentleman
+ forger; they are always pale and genteel-like, them forgers.
+ I can't help pity 'em--can't help it, sir. Did you know Monroe Edwards?"
+ he added touchingly, and paused. Then, laying his hand pityingly on my
+ shoulder, sighed, "he died of consumption at Sing-Sing. so you weren't
+ acquainted with Monroe?"
+
"No, I was never socially acquainted with any forgers. But I cannot stop
+ longer. Look to my friend yonder. You will not lose by it. I will see you
+ again."
+
Some few days after this, I again obtained admission to the Tombs, and
+ went through the corridors in quest of Bartleby; but without finding him.
+
"I saw him coming from his cell not long ago," said a turnkey, "may be
+ he's gone to loiter in the yards."
+
So I went in that direction.
+
"Are you looking for the silent man?" said another turnkey passing me.
+ "Yonder he lies--sleeping in the yard there. 'Tis not twenty minutes since
+ I saw him lie down."
+
The yard was entirely quiet. It was not accessible to the common prisoners.
+ The surrounding walls, of amazing thickness, kept
+ off all sound behind them. The Egyptian
+ character of the masonry weighed upon me with its gloom.
+ But a soft imprisoned
+ turf grew under foot. The heart of the eternal pyramids,
+ it seemed, wherein, by some strange magic, through the clefts, grass-seed,
+ dropped by birds, had sprung.
+
Strangely huddled at the base of the wall, his
+ knees drawn up, and lying on his side, his head touching
+ the cold stones, I saw the wasted Bartleby. But nothing stirred. I paused;
+ then went close up to him; stooped over, and saw that his dim eyes were
+ open; otherwise he seemed profoundly sleeping. Something prompted me
+ to touch him. I felt his hand, when a tingling shiver ran up my arm
+ and down my spine to my feet.
+
The round face of the grub-man peered upon me now. "His dinner is ready.
+ Won't he dine to-day, either? Or does he live without dining?"
+
"Lives without dining," said I, and closed the eyes.
+
"Eh!--He's asleep, aint he?"
+
"With
+ kings and counsellors," murmured I.
+
* * * * * * * *
+
There would seem little need for proceeding further in this history. Imagination
+ will readily supply the meagre recital of poor Bartleby's interment. But
+ ere parting with the reader, let me say, that if this little narrative
+ has sufficiently interested him, to awaken curiosity as to who Bartleby
+ was, and what manner of life he led prior to the present narrator's making
+ his acquaintance, I can only reply, that in such curiosity I fully share,
+ but am wholly unable to gratify it. Yet here I hardly know whether I should
+ divulge one
+ little item of rumor, which came to my ear a few months
+ after the scrivener's decease. Upon what basis it rested, I could never
+ ascertain; and hence how true it is I cannot now tell. But inasmuch as
+ this vague report has not been without a certain strange suggestive
+ interest to me, however said, it may prove the same with
+ some others; and so I will briefly mention it. The report was this: that
+ Bartleby had been a subordinate clerk in the Dead
+ Letter Office at Washington , from which he had been suddenly removed
+ by a change in the administration. When I think over this rumor, I cannot
+ adequately express the emotions which seize me. Dead
+ letters! does it not sound like dead men? Conceive a man
+ by nature and misfortune prone to a pallid hopelessness, can any business
+ seem more fitted to heighten it than that of continually handling these
+ dead letters and assorting them for the flames? For by the cart-load they
+ are annually burned. Sometimes from out the folded paper
+ the pale clerk takes a ring:--the bank-note sent in swiftest charity:--he
+ whom it would relieve, nor eats nor hungers any more; pardon for those
+ who died despairing; hope for those who died unhoping; good tidings for
+ those who died stifled by unrelieved calamities. On
+ errands of life, these letters speed to death.
+
+
Ah
+ Bartleby! Ah humanity!
+
\ No newline at end of file
diff --git a/test/test-pages/links-in-tables/expected.html b/test/test-pages/links-in-tables/expected.html
index 12777fc3..05e07233 100644
--- a/test/test-pages/links-in-tables/expected.html
+++ b/test/test-pages/links-in-tables/expected.html
@@ -1,164 +1,174 @@
-
-
-
Posted by Andrew Hayden, Software Engineer on Google Play
-
Android users are downloading tens of billions of apps and games on Google Play. We're also seeing developers update their apps frequently in order to provide users with great content, improve security, and enhance the overall user experience. It takes a lot of data to download these updates and we know users care about how much data their devices are using. Earlier this year, we announced that we started using the
+
+
+Posted by Andrew Hayden, Software Engineer on Google Play
+
+
+Android users are downloading tens of billions of apps and games on Google Play.
+ We're also seeing developers update their apps frequently in order to provide
+users with great content, improve security, and enhance the overall user
+experience. It takes a lot of data to download these updates and we know users
+care about how much data their devices are using. Earlier this year, we
+announced that we started using the
bsdiff algorithm (by
-Colin Percival) . Using bsdiff, we were able to reduce the size of app updates on average by 47% compared to the full APK size.
-
Today, we're excited to share a new approach that goes further — File-by-File
-patching . App Updates using File-by-File patching are, on average, 65% smaller than the full app , and in some cases more than 90% smaller.
-
The savings, compared to our previous approach, add up to 6 petabytes of user data saved per day!
-
In order to get the new version of the app, Google Play sends your device a patch that describes the differences between the old and new versions of the app.
-
Imagine you are an author of a book about to be published, and wish to change a single sentence - it's much easier to tell the editor which sentence to change and what to change, rather than send an entirely new book. In the same way, patches are much smaller and much faster to download than the entire APK.
-
Techniques used in File-by-File
-patching
-
Android apps are packaged as APKs, which are ZIP files with special conventions. Most of the content within the ZIP files (and APKs) is compressed using a technology called Deflate . Deflate is really good at compressing data but it has a drawback: it makes identifying changes in the original (uncompressed) content really hard. Even a tiny change to the original content (like changing one word in a book) can make the compressed output of deflate look completely different . Describing the differences between the original content is easy, but describing the differences between the compressed content is so hard that it leads to inefficient patches.
-
Watch how much the compressed text on the right side changes from a one-letter change in the uncompressed text on the left:
-
-
File-by-File therefore is based on detecting changes in the uncompressed data. To generate a patch, we first decompress both old and new files before computing the delta (we still use bsdiff here). Then to apply the patch, we decompress the old file, apply the delta to the uncompressed content and then recompress the new file. In doing so, we need to make sure that the APK on your device is a perfect match, byte for byte, to the one on the Play Store (see APK Signature
-Schema v2 for why).
-
When recompressing the new file, we hit two complications. First, Deflate has a number of settings that affect output; and we don't know which settings were used in the first place. Second, many versions of deflate exist and we need to know whether the version on your device is suitable.
-
Fortunately, after analysis of the apps on the Play Store, we've discovered that recent and compatible versions of deflate based on zlib (the most popular deflate library) account for almost all deflated content in the Play Store. In addition, the default settings (level=6) and maximum compression settings (level=9) are the only settings we encountered in practice.
-
Knowing this, we can detect and reproduce the original deflate settings. This makes it possible to uncompress the data, apply a patch, and then recompress the data back to exactly the same bytes as originally uploaded.
-
However, there is one trade off; extra processing power is needed on the device. On modern devices (e.g. from 2015), recompression can take a little over a second per megabyte and on older or less powerful devices it can be longer. Analysis so far shows that, on average, if the patch size is halved then the time spent applying the patch (which for File-by-File includes recompression) is doubled.
-
For now, we are limiting the use of this new patching technology to auto-updates only, i.e. the updates that take place in the background, usually at night when your phone is plugged into power and you're not likely to be using it. This ensures that users won't have to wait any longer than usual for an update to finish when manually updating an app.
-
How effective is File-by-File
-Patching?
-
Here are examples of app updates already using File-by-File Patching:
-
-
-
-
-
-
-
-
-
-
-
-
- Application
-
-
- Original Size
-
-
- Previous (BSDiff) Patch Size
- (% vs original)
-
-
- File-by-File Patch Size (% vs original)
-
-
-
-
-
-
-
- 71.1 MB
-
-
- 13.4 MB (-81%)
-
-
- 8.0 MB (-89%)
-
-
-
-
-
-
-
- 32.7 MB
-
-
- 17.5 MB (-46%)
-
-
- 9.6 MB (-71%)
-
-
-
-
-
-
-
- 17.8 MB
-
-
- 7.6 MB (-57%)
-
-
- 7.3 MB (-59%)
-
-
-
-
-
-
-
- 18.9 MB
-
-
- 17.2 MB (-9%)
-
-
- 13.1 MB (-31%)
-
-
-
-
-
-
-
- 52.4 MB
-
-
- 19.1 MB (-64%)
-
-
- 8.4 MB (-84%)
-
-
-
-
-
-
-
- 16.2 MB
-
-
- 7.7 MB (-52%)
-
-
- 1.2 MB (-92%)
-
-
-
-
-
-
-
Disclaimer: if you see different patch sizes when you press "update"
+Colin Percival). Using bsdiff, we were able to reduce the size of app
+updates on average by 47% compared to the full APK size.
+
+
+Today, we're excited to share a new approach that goes further — File-by-File
+patching . App Updates using File-by-File patching are, on average,
+65% smaller than the full app , and in some cases more than 90%
+smaller.
+
+
+The savings, compared to our previous approach, add up to 6 petabytes of user
+data saved per day!
+
+
+In order to get the new version of the app, Google Play sends your device a
+patch that describes the differences between the old and new versions
+of the app.
+
+
+Imagine you are an author of a book about to be published, and wish to change a
+single sentence - it's much easier to tell the editor which sentence to change
+and what to change, rather than send an entirely new book. In the same way,
+patches are much smaller and much faster to download than the entire APK.
+
+
+Techniques used in File-by-File
+patching
+
+
+Android apps are packaged as APKs, which are ZIP files with special conventions.
+Most of the content within the ZIP files (and APKs) is compressed using a
+technology called Deflate .
+Deflate is really good at compressing data but it has a drawback: it makes
+identifying changes in the original (uncompressed) content really hard. Even a
+tiny change to the original content (like changing one word in a book) can make
+the compressed output of deflate look completely different . Describing
+the differences between the original content is easy, but describing
+the differences between the compressed content is so hard that it leads
+to inefficient patches.
+
+
+Watch how much the compressed text on the right side changes from a one-letter
+change in the uncompressed text on the left:
+
+
+
+File-by-File therefore is based on detecting changes in the uncompressed data.
+To generate a patch, we first decompress both old and new files before computing
+the delta (we still use bsdiff here). Then to apply the patch, we decompress the
+old file, apply the delta to the uncompressed content and then recompress the
+new file. In doing so, we need to make sure that the APK on your device is a
+perfect match, byte for byte, to the one on the Play Store (see APK Signature
+Schema v2 for why).
+
+
+When recompressing the new file, we hit two complications. First, Deflate has a
+number of settings that affect output; and we don't know which settings were
+used in the first place. Second, many versions of deflate exist and we need to
+know whether the version on your device is suitable.
+
+
+Fortunately, after analysis of the apps on the Play Store, we've discovered that
+recent and compatible versions of deflate based on zlib (the most popular
+deflate library) account for almost all deflated content in the Play Store. In
+addition, the default settings (level=6) and maximum compression settings
+(level=9) are the only settings we encountered in practice.
+
+
+Knowing this, we can detect and reproduce the original deflate settings. This
+makes it possible to uncompress the data, apply a patch, and then recompress the
+data back to exactly the same bytes as originally uploaded.
+
+
+However, there is one trade off; extra processing power is needed on the device.
+On modern devices (e.g. from 2015), recompression can take a little over a
+second per megabyte and on older or less powerful devices it can be longer.
+Analysis so far shows that, on average, if the patch size is halved then the
+time spent applying the patch (which for File-by-File includes recompression) is
+doubled.
+
+
+For now, we are limiting the use of this new patching technology to auto-updates
+only, i.e. the updates that take place in the background, usually at night when
+your phone is plugged into power and you're not likely to be using it. This
+ensures that users won't have to wait any longer than usual for an update to
+finish when manually updating an app.
+
+
+How effective is File-by-File
+Patching?
+
+
+Here are examples of app updates already using File-by-File Patching:
+
+
+
+
+
Application
+Original Size
+Previous (BSDiff) Patch Size
+(% vs original)
+File-by-File Patch Size (% vs original)
+
+ 71.1 MB
+13.4 MB (-81%)
+8.0 MB (-89%)
+
+ 32.7 MB
+17.5 MB (-46%)
+9.6 MB (-71%)
+
+ 17.8 MB
+7.6 MB (-57%)
+7.3 MB (-59%)
+
+ 18.9 MB
+17.2 MB (-9%)
+13.1 MB (-31%)
+
+ 52.4 MB
+19.1 MB (-64%)
+8.4 MB (-84%)
+
+ 16.2 MB
+7.7 MB (-52%)
+1.2 MB (-92%)
+
+
+
+
Disclaimer: if you see different patch sizes when you press "update"
manually, that is because we are not currently using File-by-file for
-interactive updates, only those done in the background.
-
Saving data and making our
-users (& developers!) happy
-
These changes are designed to ensure our community of over a billion Android users use as little data as possible for regular app updates. The best thing is that as a developer you don't need to do anything. You get these reductions to your update size for free!
-
If you'd like to know more about File-by-File patching, including the technical details, head over to the Archive Patcher GitHub
-project where you can find information, including the source code. Yes, File-by-File patching is completely open-source!
-
As a developer if you're interested in reducing your APK size still further, here are some general
-tips on reducing APK size .
-
-
+interactive updates, only those done in the background.
+Saving data and making our
+users (& developers!) happy
+
+
+These changes are designed to ensure our community of over a billion Android
+users use as little data as possible for regular app updates. The best thing is
+that as a developer you don't need to do anything. You get these reductions to
+your update size for free!
+
+
+
+If you'd like to know more about File-by-File patching, including the technical
+details, head over to the Archive Patcher GitHub
+project where you can find information, including the source code. Yes,
+File-by-File patching is completely open-source!
+
+
+As a developer if you're interested in reducing your APK size still further,
+here are some general
+tips on reducing APK size .
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/wapo-2/expected.html b/test/test-pages/wapo-2/expected.html
index 78239aca..cb2a8ced 100644
--- a/test/test-pages/wapo-2/expected.html
+++ b/test/test-pages/wapo-2/expected.html
@@ -1,6 +1,6 @@
-
-
Israeli Prime Minister Benjamin Netanyahu reacts as he visits the Western Wall in Jerusalem on March 18 following his party's victory in Israel's general election. (Thomas Coex/AFP/Getty Images)
-
President Obama told the U.N. General Assembly 18 months ago that he would
+
+ Israeli Prime Minister Benjamin Netanyahu reacts as he visits the Western Wall in Jerusalem on March 18 following his party's victory in Israel's general election. (Thomas Coex/AFP/Getty Images)
+
President Obama told the U.N. General Assembly 18 months ago that he would
seek “real breakthroughs on these two issues — Iran’s nuclear program and
Israeli-Palestinian peace.”
But Benjamin Netanyahu’s triumph in Tuesday’s
From ae902403088af4b0a4266fb01041e0d614e4ed66 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 11 Nov 2018 17:52:27 +0000
Subject: [PATCH 53/92] Show libxml version in travis
---
.travis.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index a80e0947..1b567489 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,8 @@
language: php
+before_install:
+ - apt-cache policy libxml2
+
install:
- composer install
From 63accc8c8a7e16d337b24212781c00abcfb0ed96 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 11 Nov 2018 19:33:08 +0000
Subject: [PATCH 54/92] Fix issue when removing brs
---
src/Readability.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Readability.php b/src/Readability.php
index eadd50d0..02938e38 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -877,8 +877,8 @@ private function prepDocument(DOMDocument $dom)
$next = $sibling;
}
- while ($p->lastChild && preg_match(NodeUtility::$regexps['whitespace'], $p->lastChild->textContent)) {
- $p->parentNode->removeChild($p->lastChild);
+ while ($p->lastChild && $p->lastChild->isWhitespace()) {
+ $p->removeChild($p->lastChild);
}
if ($p->parentNode->tagName === "p") {
From 14e330abb0f4b7ca2b9b74e7c33ddcc914dc3034 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 11 Nov 2018 19:33:18 +0000
Subject: [PATCH 55/92] Update tests
---
test/test-pages/blogger/expected.html | 36 +++++++++----------
test/test-pages/tmz-1/expected.html | 50 ++++++++++++++++++---------
2 files changed, 51 insertions(+), 35 deletions(-)
diff --git a/test/test-pages/blogger/expected.html b/test/test-pages/blogger/expected.html
index 35e484ae..ec3a02a4 100644
--- a/test/test-pages/blogger/expected.html
+++ b/test/test-pages/blogger/expected.html
@@ -1,23 +1,23 @@
- I've written a couple of posts in the past few months but they were all for the blog at work so I figured I'm long overdue for one on Silicon Exposed.
- So what's a GreenPak?
-
Silego Technology is a fabless semiconductor company located in the SF Bay area, which makes (among other things) a line of programmable logic devices known as GreenPak. Their 5th generation parts were just announced, but I started this project before that happened so I'm still targeting the 4th generation .
GreenPak devices are kind of like itty bitty PSoCs - they have a mixed signal fabric with an ADC, DACs, comparators, voltage references, plus a digital LUT/FF fabric and some typical digital MCU peripherals like counters and oscillators (but no CPU).
It's actually an interesting architecture - FPGAs (including some devices marketed as CPLDs) are a 2D array of LUTs connected via wires to adjacent cells, and true (product term) CPLDs are a star topology of AND-OR arrays connected by a crossbar. GreenPak, on the other hand, is a star topology of LUTs, flipflops, and analog/digital hard IP connected to a crossbar.
Without further ado, here's a block diagram showing all the cool stuff you get in the SLG46620V:
+ I've written a couple of posts in the past few months but they were all for the blog at work so I figured I'm long overdue for one on Silicon Exposed.
+ So what's a GreenPak?
+ Silego Technology is a fabless semiconductor company located in the SF Bay area, which makes (among other things) a line of programmable logic devices known as GreenPak. Their 5th generation parts were just announced, but I started this project before that happened so I'm still targeting the 4th generation .
GreenPak devices are kind of like itty bitty PSoCs - they have a mixed signal fabric with an ADC, DACs, comparators, voltage references, plus a digital LUT/FF fabric and some typical digital MCU peripherals like counters and oscillators (but no CPU).
It's actually an interesting architecture - FPGAs (including some devices marketed as CPLDs) are a 2D array of LUTs connected via wires to adjacent cells, and true (product term) CPLDs are a star topology of AND-OR arrays connected by a crossbar. GreenPak, on the other hand, is a star topology of LUTs, flipflops, and analog/digital hard IP connected to a crossbar.
Without further ado, here's a block diagram showing all the cool stuff you get in the SLG46620V:
SLG46620V block diagram (from device datasheet)
-
- They're also tiny (the SLG46620V is a 20-pin 0.4mm pitch STQFN measuring 2x3 mm, and the lower gate count SLG46140V is a mere 1.6x2 mm) and probably the cheapest programmable logic device on the market - $0.50 in low volume and less than $0.40 in larger quantities.
The Vdd range of GreenPak4 is huge, more like what you'd expect from an MCU than an FPGA! It can run on anything from 1.8 to 5V, although performance is only specified at 1.8, 3.3, and 5V nominal voltages. There's also a dual-rail version that trades one of the GPIO pins for a second power supply pin, allowing you to interface to logic at two different voltage levels.
To support low-cost/space-constrained applications, they even have the configuration memory on die. It's one-time programmable and needs external Vpp to program (presumably Silego didn't want to waste die area on charge pumps that would only be used once) but has a SRAM programming mode for prototyping.
The best part is that the development software (GreenPak Designer) is free of charge and provided for all major operating systems including Linux! Unfortunately, the only supported design entry method is schematic entry and there's no way to write your design in a HDL.
While schematics may be fine for quick tinkering on really simple designs, they quickly get unwieldy. The nightmare of a circuit shown below is just a bunch of counters hooked up to LEDs that blink at various rates.
+ They're also tiny (the SLG46620V is a 20-pin 0.4mm pitch STQFN measuring 2x3 mm, and the lower gate count SLG46140V is a mere 1.6x2 mm) and probably the cheapest programmable logic device on the market - $0.50 in low volume and less than $0.40 in larger quantities.
The Vdd range of GreenPak4 is huge, more like what you'd expect from an MCU than an FPGA! It can run on anything from 1.8 to 5V, although performance is only specified at 1.8, 3.3, and 5V nominal voltages. There's also a dual-rail version that trades one of the GPIO pins for a second power supply pin, allowing you to interface to logic at two different voltage levels.
To support low-cost/space-constrained applications, they even have the configuration memory on die. It's one-time programmable and needs external Vpp to program (presumably Silego didn't want to waste die area on charge pumps that would only be used once) but has a SRAM programming mode for prototyping.
The best part is that the development software (GreenPak Designer) is free of charge and provided for all major operating systems including Linux! Unfortunately, the only supported design entry method is schematic entry and there's no way to write your design in a HDL.
While schematics may be fine for quick tinkering on really simple designs, they quickly get unwieldy. The nightmare of a circuit shown below is just a bunch of counters hooked up to LEDs that blink at various rates.
Schematic from hell!
-
- As if this wasn't enough of a problem, the largest GreenPak4 device (the SLG46620V) is split into two halves with limited routing between them, and the GUI doesn't help the user manage this complexity at all - you have to draw your schematic in two halves and add "cross connections" between them.
The icing on the cake is that schematics are a pain to diff and collaborate on. Although GreenPak schematics are XML based, which is a touch better than binary, who wants to read a giant XML diff and try to figure out what's going on in the circuit?
This isn't going to be a post on the quirks of Silego's software, though - that would be boring. As it turns out, there's one more exciting feature of these chips that I didn't mention earlier: the configuration bitstream is 100% documented in the device datasheet! This is unheard of in the programmable logic world. As Nick of Arachnid Labs says , the chip is "just dying for someone to write a VHDL or Verilog compiler for it". As you can probably guess by from the title of this post, I've been busy doing exactly that.
- Great! How does it work?
- Rather than wasting time writing a synthesizer, I decided to write a GreenPak technology library for Clifford Wolf's excellent open source synthesis tool, Yosys , and then make a place-and-route tool to turn that into a final netlist. The post-PAR netlist can then be loaded into GreenPak Designer in order to program the device.
The first step of the process is to run the "synth_greenpak4" Yosys flow on the Verilog source. This runs a generic RTL synthesis pass, then some coarse-grained extraction passes to infer shift register and counter cells from behavioral logic, and finally maps the remaining logic to LUT/FF cells and outputs a JSON-formatted netlist.
Once the design has been synthesized, my tool (named, surprisingly, gp4par) is then launched on the netlist. It begins by parsing the JSON and constructing a directed graph of cell objects in memory. A second graph, containing all of the primitives in the device and the legal connections between them, is then created based on the device specified on the command line. (As of now only the SLG46620V is supported; the SLG46621V can be added fairly easily but the SLG46140V has a slightly different microarchitecture which will require a bit more work to support.)
After the graphs are generated, each node in the netlist graph is assigned a numeric label identifying the type of cell and each node in the device graph is assigned a list of legal labels: for example, an I/O buffer site is legal for an input buffer, output buffer, or bidirectional buffer.
+ As if this wasn't enough of a problem, the largest GreenPak4 device (the SLG46620V) is split into two halves with limited routing between them, and the GUI doesn't help the user manage this complexity at all - you have to draw your schematic in two halves and add "cross connections" between them.
The icing on the cake is that schematics are a pain to diff and collaborate on. Although GreenPak schematics are XML based, which is a touch better than binary, who wants to read a giant XML diff and try to figure out what's going on in the circuit?
This isn't going to be a post on the quirks of Silego's software, though - that would be boring. As it turns out, there's one more exciting feature of these chips that I didn't mention earlier: the configuration bitstream is 100% documented in the device datasheet! This is unheard of in the programmable logic world. As Nick of Arachnid Labs says , the chip is "just dying for someone to write a VHDL or Verilog compiler for it". As you can probably guess by from the title of this post, I've been busy doing exactly that.
+ Great! How does it work?
+ Rather than wasting time writing a synthesizer, I decided to write a GreenPak technology library for Clifford Wolf's excellent open source synthesis tool, Yosys , and then make a place-and-route tool to turn that into a final netlist. The post-PAR netlist can then be loaded into GreenPak Designer in order to program the device.
The first step of the process is to run the "synth_greenpak4" Yosys flow on the Verilog source. This runs a generic RTL synthesis pass, then some coarse-grained extraction passes to infer shift register and counter cells from behavioral logic, and finally maps the remaining logic to LUT/FF cells and outputs a JSON-formatted netlist.
Once the design has been synthesized, my tool (named, surprisingly, gp4par) is then launched on the netlist. It begins by parsing the JSON and constructing a directed graph of cell objects in memory. A second graph, containing all of the primitives in the device and the legal connections between them, is then created based on the device specified on the command line. (As of now only the SLG46620V is supported; the SLG46621V can be added fairly easily but the SLG46140V has a slightly different microarchitecture which will require a bit more work to support.)
After the graphs are generated, each node in the netlist graph is assigned a numeric label identifying the type of cell and each node in the device graph is assigned a list of legal labels: for example, an I/O buffer site is legal for an input buffer, output buffer, or bidirectional buffer.
Example labeling for a subset of the netlist and device graphs
-
+
The labeled nodes now need to be placed. The initial placement uses a simple greedy algorithm to create a valid (although not necessarily optimal or even routable) placement:
Loop over the cells in the netlist. If any cell has a LOC constraint, which locks the cell to a specific physical site, attempt to assign the node to the specified site. If the specified node is the wrong type, doesn't exist, or is already used by another constrained node, the constraint is invalid so fail with an error.
Loop over all of the unconstrained cells in the netlist and assign them to the first unused site with the right label. If none are available, the design is too big for the device so fail with an error.
@@ -44,14 +44,14 @@
If an I/O buffer is connected to analog hard IP, fail with an error if it's not configured in analog mode.
Some signals (such as comparator inputs and oscillator power-down controls) are generated by a shared mux and fed to many loads. If different loads require conflicting settings for the shared mux, fail with an error.
- If DRC passes with no errors, configure all of the individual cells in the netlist based on the HDL parameters. Fail with an error if an invalid configuration was requested.
Finally, generate the bitstream from all of the per-cell configuration and write it to a file.
- Great, let's get started!
- If you don't already have one, you'll need to buy a GreenPak4 development kit . The kit includes samples of the SLG46620V (among other devices) and a programmer/emulation board. While you're waiting for it to arrive, install GreenPak Designer .
Download and install Yosys. Although Clifford is pretty good at merging my pull requests, only my fork on Github is guaranteed to have the most up-to-date support for GreenPak devices so don't be surprised if you can't use a bleeding-edge feature with mainline Yosys.
Download and install gp4par. You can get it from the Github repository .
Write your HDL, compile with Yosys, P&R with gp4par, and import the bitstream into GreenPak Designer to program the target device. The most current gp4par manual is included in LaTeX source form in the source tree and is automatically built as part of the compile process. If you're just browsing, there's a relatively recent PDF version on my web server.
If you'd like to see the Verilog that produced the nightmare of a schematic I showed above, here it is .
Be advised that this project is still very much a work in progress and there are still a number of SLG46620V features I don't support (see the manual for exact details).
- I love it / it segfaulted / there's a problem in the manual!
- Hop in our IRC channel (##openfpga on Freenode) and let me know. Feedback is great, pull requests are even better,
- You're competing with Silego's IDE. Have they found out and sued you yet?
- Nope. They're fully aware of what I'm doing and are rolling out the red carpet for me. They love the idea of a HDL flow as an alternative to schematic entry and are pretty amazed at how fast it's coming together.
After I reported a few bugs in their datasheets they decided to skip the middleman and give me direct access to the engineer who writes their documentation so that I can get faster responses. The last time I found a problem (two different parts of the datasheet contradicted each other) an updated datasheet was in my inbox and on their website by the next day. I only wish Xilinx gave me that kind of treatment!
They've even offered me free hardware to help me add support for their latest product family, although I plan to get GreenPak4 support to a more stable state before taking them up on the offer.
- So what's next?
+ If DRC passes with no errors, configure all of the individual cells in the netlist based on the HDL parameters. Fail with an error if an invalid configuration was requested.
Finally, generate the bitstream from all of the per-cell configuration and write it to a file.
+ Great, let's get started!
+ If you don't already have one, you'll need to buy a GreenPak4 development kit . The kit includes samples of the SLG46620V (among other devices) and a programmer/emulation board. While you're waiting for it to arrive, install GreenPak Designer .
Download and install Yosys. Although Clifford is pretty good at merging my pull requests, only my fork on Github is guaranteed to have the most up-to-date support for GreenPak devices so don't be surprised if you can't use a bleeding-edge feature with mainline Yosys.
Download and install gp4par. You can get it from the Github repository .
Write your HDL, compile with Yosys, P&R with gp4par, and import the bitstream into GreenPak Designer to program the target device. The most current gp4par manual is included in LaTeX source form in the source tree and is automatically built as part of the compile process. If you're just browsing, there's a relatively recent PDF version on my web server.
If you'd like to see the Verilog that produced the nightmare of a schematic I showed above, here it is .
Be advised that this project is still very much a work in progress and there are still a number of SLG46620V features I don't support (see the manual for exact details).
+ I love it / it segfaulted / there's a problem in the manual!
+ Hop in our IRC channel (##openfpga on Freenode) and let me know. Feedback is great, pull requests are even better,
+ You're competing with Silego's IDE. Have they found out and sued you yet?
+ Nope. They're fully aware of what I'm doing and are rolling out the red carpet for me. They love the idea of a HDL flow as an alternative to schematic entry and are pretty amazed at how fast it's coming together.
After I reported a few bugs in their datasheets they decided to skip the middleman and give me direct access to the engineer who writes their documentation so that I can get faster responses. The last time I found a problem (two different parts of the datasheet contradicted each other) an updated datasheet was in my inbox and on their website by the next day. I only wish Xilinx gave me that kind of treatment!
They've even offered me free hardware to help me add support for their latest product family, although I plan to get GreenPak4 support to a more stable state before taking them up on the offer.
+ So what's next?
Better testing, for starters. I have to verify functionality by hand with a DMM and oscilloscope, which is time consuming.
My contact at Silego says they're going to be giving me documentation on the SRAM emulation interface soon, so I'm going to make a hardware-in-loop test platform that connects to my desktop and the Silego ZIF socket, and lets me load new bitstreams via a scriptable interface. It'll have FPGA-based digital I/O as well as an ADC and DAC on every device pin, plus an adjustable voltage regulator for power, so I can feed in arbitrary mixed-signal test waveforms and write PC-based unit tests to verify correct behavior.
Other than that, I want to finish support for the SLG46620V in the next month or two. The SLG46621V will be an easy addition since only one pin and the relevant configuration bits have changed from the 46620 (I suspect they're the same die, just bonded out differently).
Once that's done I'll have to do some more extensive work to add the SLG46140V since the architecture is a bit different (a lot of the combinatorial logic is merged into multi-function blocks). Luckily, the 46140 has a lot in common architecturally with the GreenPak5 family, so once that's done GreenPak5 will probably be a lot easier to add support for.
My thanks go out to Clifford Wolf, whitequark, the IRC users in ##openfpga, and everyone at Silego I've worked with to help make this possible. I hope that one day this project will become mature enough that Silego will ship it as an officially supported extension to GreenPak Designer, making history by becoming the first modern programmable logic vendor to ship a fully open source synthesis and P&R suite.
\ No newline at end of file
diff --git a/test/test-pages/tmz-1/expected.html b/test/test-pages/tmz-1/expected.html
index 5429f9a0..29eac512 100644
--- a/test/test-pages/tmz-1/expected.html
+++ b/test/test-pages/tmz-1/expected.html
@@ -1,18 +1,34 @@
+
+
+
Lupita Nyong'o
-
-
-
Lupita Nyong'o
-
$150K Pearl Oscar Dress ... STOLEN!!!!
-
-
2/26/2015 7:11 AM PST BY TMZ STAFF
-
-
EXCLUSIVE
-
Lupita Nyong 'o 's now-famous Oscar dress -- adorned in pearls -- was stolen right out of her hotel room ... TMZ has learned.
-
Law enforcement sources tell TMZ ... the dress was taken out of Lupita's room at The London West Hollywood. The dress is made of pearls ... 6,000 white Akoya pearls. It's valued at $150,000.
-
Our sources say Lupita told cops it was taken from her room sometime between 8 AM and 9 PM Wednesday ... while she was gone.
-
We're told there is security footage that cops are looking at that could catch the culprit right in the act.
-
12:00 PM PT -- Sheriff's deputies were at The London Thursday morning. We know they were in the manager's office and we're told they have looked at security footage to determine if they can ID the culprit.
-
-
-
-
\ No newline at end of file
+ $150K Pearl Oscar Dress ... STOLEN!!!!
+
+
+
+ 2/26/2015 7:11 AM PST BY TMZ STAFF
+
+
+
+
EXCLUSIVE
+
+
+ Lupita Nyong 'o 's now-famous Oscar dress
+ -- adorned in pearls -- was stolen right out of her hotel room ... TMZ
+ has learned.
+
Law enforcement sources tell TMZ ... the dress was taken out of Lupita's
+ room at The London West Hollywood. The dress is made of pearls ... 6,000
+ white Akoya pearls. It's valued at $150,000.
+
Our sources say Lupita told cops it was taken from her room sometime between
+ 8 AM and 9 PM Wednesday ... while she was gone.
+
We're told there is security footage that cops are looking at that could
+ catch the culprit right in the act.
+
+ 12:00 PM PT -- Sheriff's deputies were at The London Thursday
+ morning. We know they were in the manager's office and we're told
+ they have looked at security footage to determine if they can ID the culprit.
+
+
+
+
+
\ No newline at end of file
From 6470dfd30cc347b25b4d3b580908528abdce943b Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 18 Nov 2018 11:14:07 +0000
Subject: [PATCH 56/92] Fix node shifting issues when removing chained BRs
---
src/Nodes/NodeUtility.php | 2 +-
src/Readability.php | 32 +++++++++++++++++++++++++-------
2 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/src/Nodes/NodeUtility.php b/src/Nodes/NodeUtility.php
index b5f66ba0..a3d85091 100644
--- a/src/Nodes/NodeUtility.php
+++ b/src/Nodes/NodeUtility.php
@@ -46,7 +46,7 @@ public static function nextElement($node)
$next = $node;
while ($next
&& $next->nodeType !== XML_ELEMENT_NODE
- && preg_match(NodeUtility::$regexps['whitespace'], $next->textContent)) {
+ && $next->isWhitespace()) {
$next = $next->nextSibling;
}
diff --git a/src/Readability.php b/src/Readability.php
index 02938e38..83236c71 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -815,14 +815,24 @@ private function prepDocument(DOMDocument $dom)
$this->logger->info('[PrepDocument] Preparing document for parsing...');
/*
- * DOMNodeList must be converted to an array before looping over it.
- * This is done to avoid node shifting when removing nodes.
+ * This is a very ugly hack that is probably causing a big performance hit, but after fighting with it for like
+ * 4 days this is the best solution I've came up with.
*
- * Reverse traversing cannot be done here because we need to find brs that are right next to other brs.
- * (If we go the other way around we need to search for previous nodes forcing the creation of new functions
- * that will be used only here)
+ * Because we have find the first BR and then remove the following ones, nodes shift in a different way than
+ * they do in the JS version. In the JS version, even if you remove a node, it will still appear during the
+ * foreach. This does not happen in DOMDocument, because if you remove the BR, the one in the foreach becomes
+ * orphan and gives an exception if you try to do anything with it.
+ *
+ * Shifting also occurs when we convert a P parent node to DIV, which remove the BRs from the "pool"
+ * of the foreach.
+ *
+ * So the solution is to find every BR on each loop and keep track of the ones we removed (by tweaking the value
+ * of $i)
*/
- foreach (iterator_to_array($dom->getElementsByTagName('br')) as $br) {
+ $DOMNodeList = iterator_to_array($dom->getElementsByTagName('br'));
+ $length = count($DOMNodeList);
+ for ($i = 0; $i < $length; $i++) {
+ $br = $DOMNodeList[$i];
$next = $br->nextSibling;
/*
@@ -843,6 +853,10 @@ private function prepDocument(DOMDocument $dom)
$brSibling = $next->nextSibling;
$next->parentNode->removeChild($next);
$next = $brSibling;
+
+ // We just removed a BR and we need to "go back" one step because that node will not be there
+ // anymore when we search for all the BRs at the end of this loop.
+ $i--;
}
/*
@@ -885,6 +899,10 @@ private function prepDocument(DOMDocument $dom)
NodeUtility::setNodeTag($p->parentNode, 'div');
}
}
+
+ // Search for all the BRs again and tweak the length of the for loop
+ $DOMNodeList = iterator_to_array($dom->getElementsByTagName('br'));
+ $length = count($DOMNodeList);
}
// Replace font tags with span
@@ -1460,7 +1478,7 @@ public function _cleanConditionally(DOMDocument $article, $tag)
$node = $DOMNodeList->item($length - 1 - $i);
// First check if we're in a data table, in which case don't remove us.
- if ($node->hasAncestorTag('table', -1, function($node){
+ if ($node->hasAncestorTag('table', -1, function ($node) {
return $node->isReadabilityDataTable();
})) {
continue;
From b971e6755f689adda77a0891e9447ed9a920c528 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 18 Nov 2018 12:02:39 +0000
Subject: [PATCH 57/92] Avoid looping over negative numbers
---
src/Readability.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Readability.php b/src/Readability.php
index 83236c71..a2e57c98 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -831,7 +831,7 @@ private function prepDocument(DOMDocument $dom)
*/
$DOMNodeList = iterator_to_array($dom->getElementsByTagName('br'));
$length = count($DOMNodeList);
- for ($i = 0; $i < $length; $i++) {
+ for ($i = 0; $i < $length; $i < 0 ? $i = 0 : $i++) {
$br = $DOMNodeList[$i];
$next = $br->nextSibling;
From 59a9b6e85f5016f0cf30c243a36f08b0b63f9160 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 18 Nov 2018 19:40:18 +0000
Subject: [PATCH 58/92] Add comment about issue with datatables
---
src/Nodes/NodeTrait.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index 839fa856..cfd5ebbb 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -87,6 +87,8 @@ public function isReadabilityDataTable()
* This means that even if we mark the tables in a previous step, when we want to retrieve that information,
* all the custom properties are in their default values. Somehow we need to find a way to make these properties
* permanent across the whole DOM.
+ *
+ * @see https://stackoverflow.com/questions/35654709/php-registernodeclass-and-reusing-variable-names
*/
return $this->hasAttribute('readabilityDataTable')
&& $this->getAttribute('readabilityDataTable') === '1';
From ffccb240b1bb81136c45360a14adcbfd8d35e3b7 Mon Sep 17 00:00:00 2001
From: Andres Rey
Date: Sun, 18 Nov 2018 19:42:47 +0000
Subject: [PATCH 59/92] Update tests
---
.../engadget/expected-metadata.json | 4 +-
test/test-pages/engadget/expected.html | 528 ++++++++++++------
.../fortressofsolitude/expected.html | 2 +-
test/test-pages/infobae/expected.html | 2 +-
test/test-pages/lwn-1/expected.html | 14 +-
.../needs-entity-normalization/config.json | 3 +-
test/test-pages/qq/config.json | 3 +
.../table-style-attributes/expected.html | 2 +-
.../telegraph/expected-metadata.json | 2 -
test/test-pages/tmz-1/expected.html | 4 +-
test/test-pages/wikipedia/expected.html | 146 ++---
11 files changed, 463 insertions(+), 247 deletions(-)
create mode 100644 test/test-pages/qq/config.json
diff --git a/test/test-pages/engadget/expected-metadata.json b/test/test-pages/engadget/expected-metadata.json
index 96ef2247..eb1ed25f 100644
--- a/test/test-pages/engadget/expected-metadata.json
+++ b/test/test-pages/engadget/expected-metadata.json
@@ -1,4 +1,4 @@
{
- "Title": "Xbox One X review: A console that keeps up with gaming PCs",
- "Excerpt": "The Xbox One X is the ultimate video game system. It sports more horsepower than any system ever. And it plays more titles in native 4K than Sony's PlayStation..."
+ "Title": "Xbox One X review: A console that keeps up with gaming PCs",
+ "Excerpt": "The Xbox One X is the most powerful gaming console ever, but it's not for everyone yet."
}
diff --git a/test/test-pages/engadget/expected.html b/test/test-pages/engadget/expected.html
index 29d4c038..a4d7d273 100644
--- a/test/test-pages/engadget/expected.html
+++ b/test/test-pages/engadget/expected.html
@@ -1,265 +1,479 @@
-
-
-
-
-
-
-
But only hardcore gamers will appreciate it.
-
-
+
+
+
+
+
But only hardcore
+ gamers will appreciate it.
+
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
+
-
+
-
- Gallery: Xbox One X | 14 Photos
-
-
+
+
Gallery: Xbox One
+ X | 14 Photos
+
+
-
-
+
+
+
+
+
-
- Most powerful hardware ever in a home console
- Solid selection of enhanced titles
- 4K Blu-ray drive is great for movie fans
-
-
-
-
- Expensive
- Not worth it if you don’t have a 4K TV
- Still no VR support
-
+
+
+
Most
+ powerful hardware ever in a home console
+
+ Solid
+ selection of enhanced titles
+
+ 4K Blu-ray
+ drive is great for movie fans
+
+
+
+
+
Expensive
+
+ Not worth
+ it if you don’t have a 4K TV
+
+ Still no VR
+ support
+
+
-
-
-
As promised, the Xbox One X is the most powerful game console ever. In practice, though, it really just puts Microsoft on equal footing with Sony’s PlayStation 4 Pro. 4K/HDR enhanced games look great, but it’s lack of VR is disappointing in 2017.
+
+
+
As promised, the Xbox One X is the
+ most powerful game console ever. In practice, though, it
+ really just puts Microsoft on equal footing with Sony’s
+ PlayStation 4 Pro. 4K/HDR enhanced games look great, but
+ it’s lack of VR is disappointing in 2017.
+
-
-
+
-
Hardware
-
-
Despite all the power inside, the One X is Microsoft's smallest console to date. It looks similar to the Xbox One S, except it has an entirely matte black case and is slightly slimmer. It's also surprisingly dense -- the console weighs 8.4 pounds, but it feels far heavier than you'd expect for its size, thanks to all of its new hardware. The One S, in comparison, weighs two pounds less.
-
The Xbox One X's real upgrades are under the hood. It features an 8-core CPU running at 2.3Ghz, 12GB of GDDR5 RAM, a 1 terabyte hard drive and an upgraded AMD Polaris GPU with 6 teraflops of computing power. The PS4 Pro has only 8GB of RAM and tops out at 4.2 teraflops. Microsoft's console is clearly faster. That additional horsepower means the Xbox One X can run more games in full native 4K than the Sony's console.
-
-
Along the front, there's the slot-loading 4K Blu-ray drive, a physical power button, a single USB port and a controller pairing button. And around back, there are HDMI out and in ports, the latter of which lets you plug in your cable box. Additionally, there are two USB ports, connections for optical audio, IR out, and gigabit Ethernet. If you've still got a Kinect around, you'll need to use a USB adapter to plug it in.
+
+
Hardware
+
+
Despite all the power inside, the One X is
+ Microsoft's smallest console to date. It looks
+ similar to the Xbox One S, except it has an entirely
+ matte black case and is slightly slimmer. It's also
+ surprisingly dense -- the console weighs 8.4 pounds,
+ but it feels far heavier than you'd expect for its
+ size, thanks to all of its new hardware. The One S,
+ in comparison, weighs two pounds less.
+
The Xbox One X's real upgrades are under the hood. It
+ features an 8-core CPU running at 2.3Ghz, 12GB of
+ GDDR5 RAM, a 1 terabyte hard drive and an upgraded
+ AMD Polaris GPU with 6 teraflops of computing power.
+ The PS4 Pro has only 8GB of RAM and tops out at 4.2
+ teraflops. Microsoft's console is clearly faster.
+ That additional horsepower means the Xbox One X can
+ run more games in full native 4K than the Sony's
+ console.
+
+
Along the front, there's the slot-loading 4K Blu-ray
+ drive, a physical power button, a single USB port
+ and a controller pairing button. And around back,
+ there are HDMI out and in ports, the latter of which
+ lets you plug in your cable box. Additionally, there
+ are two USB ports, connections for optical audio, IR
+ out, and gigabit Ethernet. If you've still got a
+ Kinect around, you'll need to use a USB adapter to
+ plug it in.
+
-
-
-
-
- Devindra Hardawar/AOL
-
+
+
+
+
+
Devindra Hardawar/AOL
+
-
-
-
The console's controller hasn't changed since its last mini-upgrade with the Xbox One S. That revision rounded out its seams, improved bumper performance and added a 3.5mm headphone jack. It's still a great controller, though I'm annoyed Microsoft is sticking with AA batteries as their default power source. Sure, you could just pick up some renewable batteries, or the Play and Charge kit, but that's an extra expense. And manually swapping batteries feels like a bad user experience when every other console has rechargeable controllers.
-
In use
+
+
The console's controller hasn't changed since its
+ last mini-upgrade with the Xbox One S. That revision
+ rounded out its seams, improved bumper performance
+ and added a 3.5mm headphone jack. It's still a great
+ controller, though I'm annoyed Microsoft is sticking
+ with AA batteries as their default power source.
+ Sure, you could just pick up some renewable
+ batteries, or the Play and Charge kit, but that's an
+ extra expense. And manually swapping batteries feels
+ like a bad user experience when every other console
+ has rechargeable controllers.
+
In use
+
-
-
-
-
- Devindra Hardawar/AOL
-
+
+
+
+
+
Devindra Hardawar/AOL
+
-
-
-
You won't find any major differences between the One X and the last Xbox at first — aside from a more dramatic startup sequence. Navigating the Xbox interface is fast and zippy, but mostly that's due to a recent OS upgrade. If you're moving over from an older Xbox One, you can use the backup tool to transfer your games and settings to an external hard drive. Just plug that into the new console during setup and it'll make it feel just like your old machine. It's also a lot faster than waiting for everything to download from Xbox Live.
-
You'll still have to set aside some time if you want to play an Xbox One X-enhanced title, though. Those 4K textures will make games significantly larger, but Microsoft says it's come up with a few ways to help developers make downloading them more efficient. For example, language packs and other optional content won't get installed by default.
-
We only had a few enhanced titles to test out during our review: Gears of War 4 , Killer
- Instinct and Super Lucky's Tale . They each took advantage of the console in different ways. Gears of War 4 runs natively in 4K at 30 FPS with Dolby Atmos and HDR (high dynamic range lighting) support. It looked great -- especially with HDR, which highlighted bright elements like lightning strikes -- but I noticed the frame rate dip occasionally. I was also surprised that load times were on-par with what I've seen with the game on the Xbox One S.
+
+
You won't find any major differences between the One
+ X and the last Xbox at first — aside from a more
+ dramatic startup sequence. Navigating the Xbox
+ interface is fast and zippy, but mostly that's due
+ to a recent OS upgrade. If you're moving over from
+ an older Xbox One, you can use the backup tool to
+ transfer your games and settings to an external hard
+ drive. Just plug that into the new console during
+ setup and it'll make it feel just like your old
+ machine. It's also a lot faster than waiting for
+ everything to download from Xbox Live.
+
You'll still have to set aside some time if you want
+ to play an Xbox One X-enhanced title, though. Those
+ 4K textures will make games significantly larger,
+ but Microsoft says it's come up with a few ways to
+ help developers make downloading them more
+ efficient. For example, language packs and other
+ optional content won't get installed by default.
+
We only had a few enhanced titles to test out during
+ our review: Gears of War 4 , Killer
+ Instinct and Super Lucky's Tale .
+ They each took advantage of the console in different
+ ways. Gears of War 4 runs natively in 4K at
+ 30 FPS with Dolby Atmos and HDR (high dynamic range
+ lighting) support. It looked great -- especially
+ with HDR, which highlighted bright elements like
+ lightning strikes -- but I noticed the frame rate
+ dip occasionally. I was also surprised that load
+ times were on-par with what I've seen with the game
+ on the Xbox One S.
+
-
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
+
-
-
-
You can also play in Performance mode, which bumps the frame rate up to 60FPS and uses higher quality graphical effects, while rendering it lower in 1080p. Personally, I preferred this, since it makes the game much smoother -- as if you're playing it on a high-end gaming PC, not a console. Some PlayStation 4 Pro games also let you choose how you wanted to distribute its power, so in some ways Microsoft is just following in its footsteps.
-
I've been playing Gears of War 4 on my gaming PC (which is connected to my home theater) over the past year, and I was impressed that the Xbox One X is able to deliver a similar experience. It didn't quite match my rig though, which is powered by Intel Core i7 4790k CPU running at 4GHz, 16GB DDR3 RAM and an NVIDIA GTX 1080 GPU. Typically, I play at 1,440p (2,560 by 1,440 pixels) with HDR and all of the graphical settings set to their highest level, and I can easily maintain a 60FPS frame rate. The One X felt just as solid at 1080p, but there were clearly plenty of graphics settings it couldn't take advantage of, in particular higher levels of bloom lighting and shadow detail.
+
+
You can also play in Performance mode, which bumps
+ the frame rate up to 60FPS and uses higher quality
+ graphical effects, while rendering it lower in
+ 1080p. Personally, I preferred this, since it makes
+ the game much smoother -- as if you're playing it on
+ a high-end gaming PC, not a console. Some
+ PlayStation 4 Pro games also let you choose how you
+ wanted to distribute its power, so in some ways
+ Microsoft is just following in its footsteps.
+
I've been playing Gears of War 4 on my
+ gaming PC (which is connected to my home theater)
+ over the past year, and I was impressed that the
+ Xbox One X is able to deliver a similar experience.
+ It didn't quite match my rig though, which is
+ powered by Intel Core i7 4790k CPU running at 4GHz,
+ 16GB DDR3 RAM and an NVIDIA GTX 1080 GPU. Typically,
+ I play at 1,440p (2,560 by 1,440 pixels) with HDR
+ and all of the graphical settings set to their
+ highest level, and I can easily maintain a 60FPS
+ frame rate. The One X felt just as solid at 1080p,
+ but there were clearly plenty of graphics settings
+ it couldn't take advantage of, in particular higher
+ levels of bloom lighting and shadow detail.
+
+
-
-
+
-
-
- Gallery: Xbox One X screenshots | 9 Photos
-
-
+
+
+
Gallery: Xbox
+ One X screenshots | 9 Photos
+
+
-
-
-
Killer Instinct and Super Lucky's
- Tale run in 4K at a smooth 60FPS. They both looked and played better than their standard versions, though I was surprised they didn't take advantage of HDR. As usual, I noticed the improvement in frame rates more than the higher resolution. Unless you're sitting very close to a TV above 50-inches, you'd likely have a hard time telling between 4K and 1080p.
-
That poses a problem for Microsoft: It's betting that gamers will actually want true 4K rendering. In practice, though, PlayStation 4 Pro titles running in HDR and resolutions between 1080p and 4K often look just as good to the naked eye. The Xbox One X's big advantage is that its hardware could let more games reach 60FPS compared to Sony's console.
-
Microsoft says over 130 Xbox One X-enhanced titles are in the works. That includes already-released games like Forza Motorsport 7 and Assassin's
- Creed Origins , as well as upcoming titles like Call of Duty: WW2 . You'll be able to find them easily in a special section in the Xbox store. There is also a handful of Xbox 360 games that'll get enhanced eventually, including Halo
- 3 and Fallout 3 . Some of those titles will get bumped up to a higher resolution, while others will get HDR support. Microsoft describes these upgrades as a bonus for developers who were prescient about how they built their games. Basically, don't expect your entire 360 library to get enhanced.
+
+
Killer Instinct and Super Lucky's
+ Tale run in 4K at a smooth 60FPS. They both
+ looked and played better than their standard
+ versions, though I was surprised they didn't take
+ advantage of HDR. As usual, I noticed the
+ improvement in frame rates more than the higher
+ resolution. Unless you're sitting very close to a TV
+ above 50-inches, you'd likely have a hard time
+ telling between 4K and 1080p.
+
That poses a problem for Microsoft: It's betting that
+ gamers will actually want true 4K rendering. In
+ practice, though, PlayStation 4 Pro titles running
+ in HDR and resolutions between 1080p and 4K often
+ look just as good to the naked eye. The Xbox One X's
+ big advantage is that its hardware could let more
+ games reach 60FPS compared to Sony's console.
+
Microsoft says over 130 Xbox One X-enhanced titles
+ are in the works. That includes already-released
+ games like Forza Motorsport 7 and Assassin's
+ Creed Origins , as well as upcoming titles
+ like Call of Duty: WW2 . You'll be able to
+ find them easily in a special section in the Xbox
+ store. There is also a handful of Xbox 360 games
+ that'll get enhanced eventually, including Halo
+ 3 and Fallout 3 . Some of those
+ titles will get bumped up to a higher resolution,
+ while others will get HDR support. Microsoft
+ describes these upgrades as a bonus for developers
+ who were prescient about how they built their games.
+ Basically, don't expect your entire 360 library to
+ get enhanced.
+
-
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
+
-
-
-
Even if a game isn't specifically tuned for the new console, Microsoft says you might still see some performance improvements. The PlayStation 4 Pro, meanwhile, has over one hundred games built for its hardware, and its boost mode can speed up some older games.
-
Microsoft is still pushing the Xbox as more than just a game console, though. 4K Blu-rays loaded up quickly, and I didn't notice many delays as I skipped around films. Planet Earth II , in particular, looked fantastic thanks to its brilliant use of HDR. Unfortunately, the One X doesn't support Dolby Vision, so you're stuck with the slightly less capable HDR 10 standard. That makes sense since it's more widely supported, but it would have been nice to see Dolby's, too.
-
VIDEO
-
And speaking of Dolby technology, Microsoft is also highlighting Atmos support on the One X, just like it did with the One S. The company's app lets you configure the console to pass audio Atmos signals to your audio receiver. You can also shell out $15 to get Atmos support for headphones, which simulates immersive surround sound. It's strange to pay money to unlock Dolby features, but it's worth it since it's significantly better than Microsoft's audio virtualization technology. The Netflix app also supports Atmos for a handful of films (something that the Xbox One S and PlayStation 4 offer, as well).
-
One thing you won't find in the new Xbox is VR support. Microsoft has mentioned that the console will offer some sort of mixed reality, but it hasn't offered up any details yet. It's technically powerful enough to work with any of the Windows Mixed Reality headsets launching this fall. It's a shame that Microsoft is being so wishy-washy because Sony has had a very successful head start with the PlayStation VR.
-
Pricing and the competition
+
+
Even if a game isn't specifically tuned for the new
+ console, Microsoft says you might still see some
+ performance improvements. The PlayStation 4 Pro,
+ meanwhile, has over one hundred games built for its
+ hardware, and its boost mode can speed up some older
+ games.
+
Microsoft is still pushing the Xbox as more than just
+ a game console, though. 4K Blu-rays loaded up
+ quickly, and I didn't notice many delays as I
+ skipped around films. Planet Earth II , in
+ particular, looked fantastic thanks to its brilliant
+ use of HDR. Unfortunately, the One X doesn't support
+ Dolby Vision, so you're stuck with the slightly less
+ capable HDR 10 standard. That makes sense since it's
+ more widely supported, but it would have been nice
+ to see Dolby's, too.
+
+ VIDEO
+
+
And speaking of Dolby technology, Microsoft is also
+ highlighting Atmos support on the One X, just like
+ it did with the One S. The company's app lets you
+ configure the console to pass audio Atmos signals to
+ your audio receiver. You can also shell out $15 to
+ get Atmos support for headphones, which simulates
+ immersive surround sound. It's strange to pay money
+ to unlock Dolby features, but it's worth it since
+ it's significantly better than Microsoft's audio
+ virtualization technology. The Netflix app also
+ supports Atmos for a handful of films (something
+ that the Xbox One S and PlayStation 4 offer, as
+ well).
+
One thing you won't find in the new Xbox is VR
+ support. Microsoft has mentioned that the console
+ will offer some sort of mixed reality, but it hasn't
+ offered up any details yet. It's technically
+ powerful enough to work with any of the Windows
+ Mixed Reality headsets launching this fall. It's a
+ shame that Microsoft is being so wishy-washy because
+ Sony has had a very successful head start with the
+ PlayStation VR.
+
Pricing and the competition
+
-
-
-
-
- Devindra Hardawar/AOL
-
+
+
+
+
+
Devindra Hardawar/AOL
+
-
-
-
The biggest knock against the Xbox One X is its $500 price. The PS4 Pro launched at $400 last year, and there's a good chance we'll see plenty of deals around the holidays. If your friends are on Xbox Live, or you're a devotee of Microsoft's first party franchises, then the X makes more sense. If you just want to play third-party titles that come to both platforms, though, the PS4 Pro is clearly the better deal.
-
If you're looking to upgrade from an original Xbox One, and you have a new TV, the One X might be more compelling. It's faster and offers more features than the One S, and more importantly, it'll last you much longer without needing an upgrade. There's also plenty of wisdom in simply waiting a while before you buy the One X, especially if you haven't moved to a 4K TV yet. The new console can make games look better on 1080p sets, since it'll supersample high-res textures and have more graphical effects, but it's simply not worth the upgrade since those TVs don't support HDR.
-
If price isn't a huge concern for you, it's worth considering investing in a gaming PC. A decent one costs between $600 and $800, plus the price of a monitor, but it'll easily be more powerful than the One X. And you have the added benefit of upgrading components down the line. Now that Microsoft and game publishers are offering most major titles on PC, you won't be missing out on much by ditching consoles.
-
Wrap-up
-
-
Ultimately, the Xbox One X offers some major performance upgrades that gamers will notice -- especially if you're coming from an original Xbox One. But it's also a bit disappointing since it's coming a year after the PS4 Pro, and it doesn't offer VR yet. For Microsoft fans, though, none of that will matter. It's exactly what the company promised: the fastest game console ever made.
+
+
The biggest knock against the Xbox One X is its $500
+ price. The PS4 Pro launched at $400 last year, and
+ there's a good chance we'll see plenty of deals
+ around the holidays. If your friends are on Xbox
+ Live, or you're a devotee of Microsoft's first party
+ franchises, then the X makes more sense. If you just
+ want to play third-party titles that come to both
+ platforms, though, the PS4 Pro is clearly the better
+ deal.
+
If you're looking to upgrade from an original Xbox
+ One, and you have a new TV, the One X might be more
+ compelling. It's faster and offers more features
+ than the One S, and more importantly, it'll last you
+ much longer without needing an upgrade. There's also
+ plenty of wisdom in simply waiting a while before
+ you buy the One X, especially if you haven't moved
+ to a 4K TV yet. The new console can make games look
+ better on 1080p sets, since it'll supersample
+ high-res textures and have more graphical effects,
+ but it's simply not worth the upgrade since those
+ TVs don't support HDR.
+
If price isn't a huge concern for you, it's worth
+ considering investing in a gaming PC. A decent one
+ costs between $600 and $800, plus the price of a
+ monitor, but it'll easily be more powerful than the
+ One X. And you have the added benefit of upgrading
+ components down the line. Now that Microsoft and
+ game publishers are offering most major titles on
+ PC, you won't be missing out on much by ditching
+ consoles.
+
Wrap-up
+
+
Ultimately, the Xbox One X offers some major
+ performance upgrades that gamers will notice --
+ especially if you're coming from an original Xbox
+ One. But it's also a bit disappointing since it's
+ coming a year after the PS4 Pro, and it doesn't
+ offer VR yet. For Microsoft fans, though, none of
+ that will matter. It's exactly what the company
+ promised: the fastest game console ever made.
+
-
+
+
-
-
+
-
-
-
From around the web
-
-
-
-
\ No newline at end of file
+
+
+
From around the web
+
+
+
+
\ No newline at end of file
diff --git a/test/test-pages/fortressofsolitude/expected.html b/test/test-pages/fortressofsolitude/expected.html
index 723b28ff..5dc67914 100644
--- a/test/test-pages/fortressofsolitude/expected.html
+++ b/test/test-pages/fortressofsolitude/expected.html
@@ -1 +1 @@
-
R yan Reynolds never stops surprising fans with his Deadpool , a.k.a. the Merc with the Mouth, persona. Just when you think the marketing behind the film couldn’t get any more amazing, they go and release a music video from the Deadpool 2 soundtrack starring Canadian singer Céline Dion. Yes, the one who sang the Titanic theme song. Your eyes do not deceive you.
Showtime, Mama. #EffortMaximal #Deadpool2 pic.twitter.com/ZKLrucXJO4
— Ryan Reynolds (@VancityReynolds) May 3, 2018
“What’s left to say? These prayers ain’t working anymore. Every word shot down in flames. What’s left to do with these broken pieces on the floor? I’m losing my voice calling on you,” Dion croons in the video for “Ashes”. Near the end of it, the filthy, foul-mouthed Deadpool shows up in a surprising twist mentioning that he should have gotten N’sync instead.
Deadpool 2 opens in theatres on May 18.Connect with us on Facebook , Twitter and Instagram. Sign up to our Newsletter .
\ No newline at end of file
+
R yan Reynolds never stops surprising fans with his Deadpool , a.k.a. the Merc with the Mouth, persona. Just when you think the marketing behind the film couldn’t get any more amazing, they go and release a music video from the Deadpool 2 soundtrack starring Canadian singer Céline Dion. Yes, the one who sang the Titanic theme song. Your eyes do not deceive you.
Showtime, Mama. #EffortMaximal #Deadpool2 pic.twitter.com/ZKLrucXJO4
— Ryan Reynolds (@VancityReynolds) May 3, 2018
“What’s left to say? These prayers ain’t working anymore. Every word shot down in flames. What’s left to do with these broken pieces on the floor? I’m losing my voice calling on you,” Dion croons in the video for “Ashes”. Near the end of it, the filthy, foul-mouthed Deadpool shows up in a surprising twist mentioning that he should have gotten N’sync instead.
Deadpool 2 opens in theatres on May 18.
\ No newline at end of file
diff --git a/test/test-pages/infobae/expected.html b/test/test-pages/infobae/expected.html
index 0ae36109..e575c7be 100644
--- a/test/test-pages/infobae/expected.html
+++ b/test/test-pages/infobae/expected.html
@@ -1 +1 @@
-
Jonathan Castellari tiene 25 años y fue golpeado por una patota de 8 hombres Eran casi las 6:30 de la mañana. Jonathan Castellari, de 25 años, volvía de bailar junto a Sebastián, su amigo. Les pareció una buena idea detenerse en el Mc Donald's de Avenida Córdoba al 3100 con el objetivo de desayunar y continuar el viaje hasta sus hogares. Mientras esperaban la comida, un grupo de 8 chicos de entre 20 y 25 años ingresó al local con el mismo objetivo, aunque adoptaron otro plan: mirarlos fijamente, reírse de ellos y hacer chistes sobre la sexualidad de ambos.
Sebastián relató a Infobae: "Estábamos esperando nuestro pedido, haciéndonos chistes, riéndonos de lo sucedido durante la noche. Hablábamos entre nosotros. En ese momento entró un grupo de 8 chicos, de contextura grande, y notamos que estaban alcoholizados. Nos miraban, hacían chistes, se reían de nosotros. Fue ahí cuando decidimos salir con Jonathan a fumar un cigarrillo y esperar que se fueran. Él salió primero y vi que uno de estos pibes lo abrazó y se lo llevó. Instantáneamente se metieron los demás a pegarle. Le pegaron mucho. Quise pararlos y no pude. Ligué yo también, pero nada en comparación a lo que sufrió Jonathan. Cuando lo soltaron lo agarré como pude y justo una enfermera del Sanatorio Güemes (está a dos cuadras del local) estaba tomando un café y le dio los primeros auxilios".
"Fuimos a verlo recién, no paraba de llorar y de decirnos que le pegaron por puto", dijo a Infobae María Rachid, titular del Instituto contra la Discriminación de la Defensoría del Pueblo CABA. "Lamentablemente su situación es delicada. Recién nos informaron que lo van a intervenir quirúrgicamente porque podría perder un ojo ".
Como Jonathan no conoce a los agresores, desde la Defensoría y la Federación LGBT se comunicaron con autoridades del Ministerio de Seguridad para que soliciten las cámaras de seguridad del Mc Donald's, del sanatorio Güemes y de otros negocios de la cuadra para poder identificarlos.
Gastón Llopart, abogado de Sebastián, le detalló a Infobae que Jonathan está "próximo a recibir una intervención quirúrgica, ya que tuvo fractura en el hueso del pómulo derecho de su rostro. Sebastián llamó al 911 dos veces y no fueron. Me contaron que los agresores los siguieron hasta el sanatorio mientras los insultaban: la gente de seguridad tuvo que echarlos".
Llopart agregó que la patota, mientras lo golpeaban, le gritaba: "Te vamos a matar por puto" . La familia de Jonathan está en el sanatorio a la espera de la intervención quirúrgica. Llopart dijo que "harán la denuncia el lunes por la mañana, cuando existan mayores precisiones de lo ocurrido".
Jonathan y Sebastián forman parte de Ciervos Pampas Rugby Club, un equipo que nació hace cinco años como el primer equipo de la Argentina por la diversidad sexual. Se trata de un combinado que no está integrado en un 100% por varones gays, pero en el que estos encuentran un lugar en el cual expresar libremente su orientación sexual, sin miedo a los prejuicios o a la discriminación. El club emitió un comunicado en su cuenta de Facebook, relatando los hechos y solidarizándose con Jonathan.
\ No newline at end of file
+
Jonathan Castellari tiene 25 años y fue golpeado por una patota de 8 hombres Eran casi las 6:30 de la mañana. Jonathan Castellari, de 25 años, volvía de bailar junto a Sebastián, su amigo. Les pareció una buena idea detenerse en el Mc Donald's de Avenida Córdoba al 3100 con el objetivo de desayunar y continuar el viaje hasta sus hogares. Mientras esperaban la comida, un grupo de 8 chicos de entre 20 y 25 años ingresó al local con el mismo objetivo, aunque adoptaron otro plan: mirarlos fijamente, reírse de ellos y hacer chistes sobre la sexualidad de ambos.
Sebastián relató a Infobae: "Estábamos esperando nuestro pedido, haciéndonos chistes, riéndonos de lo sucedido durante la noche. Hablábamos entre nosotros. En ese momento entró un grupo de 8 chicos, de contextura grande, y notamos que estaban alcoholizados. Nos miraban, hacían chistes, se reían de nosotros. Fue ahí cuando decidimos salir con Jonathan a fumar un cigarrillo y esperar que se fueran. Él salió primero y vi que uno de estos pibes lo abrazó y se lo llevó. Instantáneamente se metieron los demás a pegarle. Le pegaron mucho. Quise pararlos y no pude. Ligué yo también, pero nada en comparación a lo que sufrió Jonathan. Cuando lo soltaron lo agarré como pude y justo una enfermera del Sanatorio Güemes (está a dos cuadras del local) estaba tomando un café y le dio los primeros auxilios".
"Fuimos a verlo recién, no paraba de llorar y de decirnos que le pegaron por puto", dijo a Infobae María Rachid, titular del Instituto contra la Discriminación de la Defensoría del Pueblo CABA. "Lamentablemente su situación es delicada. Recién nos informaron que lo van a intervenir quirúrgicamente porque podría perder un ojo ".
Como Jonathan no conoce a los agresores, desde la Defensoría y la Federación LGBT se comunicaron con autoridades del Ministerio de Seguridad para que soliciten las cámaras de seguridad del Mc Donald's, del sanatorio Güemes y de otros negocios de la cuadra para poder identificarlos.
Gastón Llopart, abogado de Sebastián, le detalló a Infobae que Jonathan está "próximo a recibir una intervención quirúrgica, ya que tuvo fractura en el hueso del pómulo derecho de su rostro. Sebastián llamó al 911 dos veces y no fueron. Me contaron que los agresores los siguieron hasta el sanatorio mientras los insultaban: la gente de seguridad tuvo que echarlos".
Llopart agregó que la patota, mientras lo golpeaban, le gritaba: "Te vamos a matar por puto" . La familia de Jonathan está en el sanatorio a la espera de la intervención quirúrgica. Llopart dijo que "harán la denuncia el lunes por la mañana, cuando existan mayores precisiones de lo ocurrido".
Jonathan y Sebastián forman parte de Ciervos Pampas Rugby Club, un equipo que nació hace cinco años como el primer equipo de la Argentina por la diversidad sexual. Se trata de un combinado que no está integrado en un 100% por varones gays, pero en el que estos encuentran un lugar en el cual expresar libremente su orientación sexual, sin miedo a los prejuicios o a la discriminación. El club emitió un comunicado en su cuenta de Facebook, relatando los hechos y solidarizándose con Jonathan.
\ No newline at end of file
diff --git a/test/test-pages/lwn-1/expected.html b/test/test-pages/lwn-1/expected.html
index 76e5db37..358f9565 100644
--- a/test/test-pages/lwn-1/expected.html
+++ b/test/test-pages/lwn-1/expected.html
@@ -70,9 +70,9 @@
Development statistics
In the one-year period since late March 2014, there have been 381 changesets committed to the OpenOffice Subversion repository. The most active committers are:
- Most active OpenOffice developers
+ Most active OpenOffice developers
- By changesets
+ By changesets
Herbert Dürr
63
16.6%
@@ -123,7 +123,7 @@ Development statistics
0.5%
- By changed lines
+ By changed lines
Jürgen Schmidt
455499
88.1%
@@ -179,9 +179,9 @@ Development statistics
The picture for LibreOffice is just a little bit different; in the same one-year period, the project has committed 22,134 changesets from 268 developers. The most active of these developers were:
- Most active LibreOffice developers
+ Most active LibreOffice developers
- By changesets
+ By changesets
Caolán McNamara
4307
19.5%
@@ -244,7 +244,7 @@ Development statistics
1.0%
- By changed lines
+ By changed lines
Lionel Elie Mamane
244062
12.5%
@@ -310,7 +310,7 @@ Development statistics
To a first approximation, the top ten companies supporting LibreOffice in the last year are:
- Companies supporting LibreOffice development
+ Companies supporting LibreOffice development
(by changesets)
Red Hat
8417
diff --git a/test/test-pages/needs-entity-normalization/config.json b/test/test-pages/needs-entity-normalization/config.json
index 86cb6f0d..df4e8cae 100644
--- a/test/test-pages/needs-entity-normalization/config.json
+++ b/test/test-pages/needs-entity-normalization/config.json
@@ -1,3 +1,4 @@
{
- "normalizeEntities": true
+ "normalizeEntities": true,
+ "summonCthulhu": true
}
\ No newline at end of file
diff --git a/test/test-pages/qq/config.json b/test/test-pages/qq/config.json
new file mode 100644
index 00000000..4bb89904
--- /dev/null
+++ b/test/test-pages/qq/config.json
@@ -0,0 +1,3 @@
+{
+ "summonCthulhu": true
+}
\ No newline at end of file
diff --git a/test/test-pages/table-style-attributes/expected.html b/test/test-pages/table-style-attributes/expected.html
index 4d2e894d..77c083b2 100644
--- a/test/test-pages/table-style-attributes/expected.html
+++ b/test/test-pages/table-style-attributes/expected.html
@@ -6,7 +6,7 @@
-
+
In December 2002, I tried to install some software on my computer. The experience was, shall we say, less than pleasant. On many levels. I wrote about my experience, as I so often do.
Then in January, the jackasses over at Slashdot posted a link to it, calling it a "review" of Linux video software. I guess you could consider it a review, if you were to squint at it just right. But really what it is is a rant about how I had an evening stolen from me by crap software design. It is a flame about the pathetic state of Linux usability in general, and the handful of video players I tried out in particular. It makes no attempt to be balanced or objective or exhaustive. It is a description of my experience. Perhaps your experience was different. Good for you.
So of course that day I got hundreds of emails about it. Every Linux apologist in the world wanted to make sure I was fully informed of their opinion. The replies were roughly in the following groups:
diff --git a/test/test-pages/telegraph/expected-metadata.json b/test/test-pages/telegraph/expected-metadata.json
index 468d79a2..196d045e 100644
--- a/test/test-pages/telegraph/expected-metadata.json
+++ b/test/test-pages/telegraph/expected-metadata.json
@@ -1,6 +1,4 @@
{
"Title": "Zimbabwe coup: Robert Mugabe and wife Grace 'insisting he finishes his term', as priest steps in to mediate",
- "Author": "",
- "Direction": null,
"Excerpt": "Zimbabwe President Robert Mugabe, his wife Grace and two key figures from her G40 political faction are under house arrest at Mugabe's "Blue House" compound in Harare and are insisting the 93 year-old finishes his presidential term, a source said."
}
diff --git a/test/test-pages/tmz-1/expected.html b/test/test-pages/tmz-1/expected.html
index 29eac512..6eb48b97 100644
--- a/test/test-pages/tmz-1/expected.html
+++ b/test/test-pages/tmz-1/expected.html
@@ -28,7 +28,7 @@
morning. We know they were in the manager's office and we're told
they have looked at security footage to determine if they can ID the culprit.
-
+
-
+
\ No newline at end of file
diff --git a/test/test-pages/wikipedia/expected.html b/test/test-pages/wikipedia/expected.html
index 8e5f9c97..8de3ffab 100644
--- a/test/test-pages/wikipedia/expected.html
+++ b/test/test-pages/wikipedia/expected.html
@@ -44,7 +44,7 @@ Software [ Firefox [ edit ]
- Firefox is a web browser , and is Mozilla's flagship software product. It is available in both desktop and mobile versions. Firefox uses the Gecko layout engine to render web pages, which implements current and anticipated web standards .[42] As of late 2015[update] , Firefox has approximately 10-11% of worldwide usage share of web browsers , making it the 4th most-used web browser.[43] [44] [45]
+ Firefox is a web browser , and is Mozilla's flagship software product. It is available in both desktop and mobile versions. Firefox uses the Gecko layout engine to render web pages, which implements current and anticipated web standards .[42] As of late 2015, Firefox has approximately 10-11% of worldwide usage share of web browsers , making it the 4th most-used web browser.[43] [44] [45]
Firefox began as an experimental branch of the Mozilla codebase by Dave Hyatt , Joe Hewitt and Blake Ross . They believed the commercial requirements of Netscape's sponsorship and developer-driven feature creep compromised the utility of the Mozilla browser.[46] To combat what they saw as the Mozilla Suite's software bloat , they created a stand-alone browser, with which they intended to replace the Mozilla Suite.
Firefox was originally named Phoenix but the name was changed so as to avoid trademark conflicts with Phoenix Technologies . The initially-announced replacement, Firebird , provoked objections from the Firebird project community.[47] [48] The current name, Firefox, was chosen on February 9, 2004.[49]
Firefox Mobile [ edit ]
@@ -198,221 +198,221 @@ See also [ ^ For exceptions, see "Values" section below
- ^ "About the Mozilla Corporation" . Mozilla Foundation.
+ ^ "About the Mozilla Corporation" . Mozilla Foundation.
- ^ "Freeing the Source: The Story of Mozilla" . Open Sources: Voices from the Open Source Revolution . Retrieved 2016-05-01 .
+ ^ "Freeing the Source: The Story of Mozilla" . Open Sources: Voices from the Open Source Revolution . Retrieved 2016-05-01 .
- ^ "Mozilla.org WHOIS, DNS, & Domain Info" . DomainTools . Retrieved 1 May 2016 .
+ ^ "Mozilla.org WHOIS, DNS, & Domain Info" . DomainTools . Retrieved 1 May 2016 .
- ^ Payment, S. (2007). Marc Andreessen and Jim Clark: The Founders of Netscape . Rosen Publishing Group. ISBN 9781404207196 .
+ ^ Payment, S. (2007). Marc Andreessen and Jim Clark: The Founders of Netscape . Rosen Publishing Group. ISBN 9781404207196 .
- ^ "Netscape Announces mozilla.org, a Dedicated Team and Web Site Supporting Development of Free Client Source Code" . Netscape. Archived from the original on October 4, 2002. Retrieved 2012-08-21 .
+ ^ "Netscape Announces mozilla.org, a Dedicated Team and Web Site Supporting Development of Free Client Source Code" . Netscape. Archived from the original on October 4, 2002. Retrieved 2012-08-21 .
- ^ "Mac vendors ponder Netscape gambit." . Macworld . 1 May 1998. Retrieved 2012-08-19 .
+ ^ "Mac vendors ponder Netscape gambit." . Macworld . 1 May 1998. Retrieved 2012-08-19 .
- ^ Zawinski, Jamie (1996). "nscp dorm" . Retrieved 2007-10-12 .
+ ^ Zawinski, Jamie (1996). "nscp dorm" . Retrieved 2007-10-12 .
- ^ Dave Titus with assistance from Andrew Wong. "How was Mozilla born" .
+ ^ Dave Titus with assistance from Andrew Wong. "How was Mozilla born" .
- ^ "Introduction to Mozilla Source Code" . Mozilla. Retrieved 2012-08-18 . However, mozilla.org wants to emphasize that these milestones are being produced for testing purposes only.
+ ^ "Introduction to Mozilla Source Code" . Mozilla. Retrieved 2012-08-18 . However, mozilla.org wants to emphasize that these milestones are being produced for testing purposes only.
- ^ "mozilla.org Announces Launch of the Mozilla Foundation to Lead Open-Source Browser Efforts" . Retrieved 2012-08-18 .
+ ^ "mozilla.org Announces Launch of the Mozilla Foundation to Lead Open-Source Browser Efforts" . Retrieved 2012-08-18 .
- ^ Eich, Brendan ; David Hyatt (April 2, 2003). "mozilla development roadmap" . Mozilla. Retrieved 2009-08-02 .
+ ^ Eich, Brendan ; David Hyatt (April 2, 2003). "mozilla development roadmap" . Mozilla. Retrieved 2009-08-02 .
- ^ "Better Browsing on Your Android Smartphone" . AllThingsD. Retrieved 2012-08-18 .
+ ^ "Better Browsing on Your Android Smartphone" . AllThingsD. Retrieved 2012-08-18 .
- ^ "Mozilla Releases Test Version of Firefox OS" . PC Magazine. Retrieved 2012-08-18 .
+ ^ "Mozilla Releases Test Version of Firefox OS" . PC Magazine. Retrieved 2012-08-18 .
- ^ "Mozilla Marketplace is live, lets you run web apps like desktop programs" . Engadget. Retrieved 2012-08-18 .
+ ^ "Mozilla Marketplace is live, lets you run web apps like desktop programs" . Engadget. Retrieved 2012-08-18 .
- ^ Lardinois, Frederic (November 15, 2012). "Mozilla Releases Annual Report For 2011: Revenue Up 33% To $163M, Majority From Google" . techcrunch.com .
+ ^ Lardinois, Frederic (November 15, 2012). "Mozilla Releases Annual Report For 2011: Revenue Up 33% To $163M, Majority From Google" . techcrunch.com .
- ^ "cisco/openh264 · GitHub" . github.com. Retrieved 2014-04-05 .
+ ^ "cisco/openh264 · GitHub" . github.com. Retrieved 2014-04-05 .
- ^ "Mozilla will add H.264 to Firefox as Cisco makes eleventh-hour push for WebRTC's future — Tech News and Analysis" . gigaom.com. Retrieved 2014-04-05 .
+ ^ "Mozilla will add H.264 to Firefox as Cisco makes eleventh-hour push for WebRTC's future — Tech News and Analysis" . gigaom.com. Retrieved 2014-04-05 .
- ^ "Cisco to release open-source H.264 codec, Mozilla makes tactical retreat - TechRepublic" . techrepublic.com. Retrieved 2014-04-05 .
+ ^ "Cisco to release open-source H.264 codec, Mozilla makes tactical retreat - TechRepublic" . techrepublic.com. Retrieved 2014-04-05 .
- ^ "Video Interoperability on the Web Gets a Boost From Cisco's H.264 Codec" . Of course, this is not a not a complete solution. In a perfect world, codecs, like other basic Internet technologies such as TCP/IP, HTTP, and HTML, would be fully open and free
+ ^ "Video Interoperability on the Web Gets a Boost From Cisco's H.264 Codec" . Of course, this is not a not a complete solution. In a perfect world, codecs, like other basic Internet technologies such as TCP/IP, HTTP, and HTML, would be fully open and free
- ^ "Comments on Cisco, Mozilla, and H.264" . By endorsing Cisco's plan, there's no getting around the fact that we've caved on our principles. That said, principles can't replace being in a practical position to make a difference in the future. - Christopher Montgomery wrote in a personal capacity but works for Mozilla in their codecs team
+ ^ "Comments on Cisco, Mozilla, and H.264" . By endorsing Cisco's plan, there's no getting around the fact that we've caved on our principles. That said, principles can't replace being in a practical position to make a difference in the future. - Christopher Montgomery wrote in a personal capacity but works for Mozilla in their codecs team
- ^ "Game Creator Challenge -Contest Terms and Conditions" . - submissions to the "amateur" category have to be released as free software, but not for the other two categories
+ ^ "Game Creator Challenge -Contest Terms and Conditions" . - submissions to the "amateur" category have to be released as free software, but not for the other two categories
- ^ "Los Angeles Times - Brendan Eich contribution to Proposition 8" . latimes.com. Retrieved 2014-07-01 .
+ ^ "Los Angeles Times - Brendan Eich contribution to Proposition 8" . latimes.com. Retrieved 2014-07-01 .
- ^ "Gay Firefox developers boycott Mozilla to protest CEO hire [Updated] | Ars Technica" . arstechnica.com. Retrieved 2014-04-05 .
+ ^ "Gay Firefox developers boycott Mozilla to protest CEO hire [Updated] | Ars Technica" . arstechnica.com. Retrieved 2014-04-05 .
- ^ Kelly Faircloth (9 April 2012). "Tech Celeb Makes Prop-8 Donation; Internet Goes Berserk" . BetaBeat . BetaBeat. Retrieved 2014-04-28 .
+ ^ Kelly Faircloth (9 April 2012). "Tech Celeb Makes Prop-8 Donation; Internet Goes Berserk" . BetaBeat . BetaBeat. Retrieved 2014-04-28 .
- ^ "Screenshot of OkCupid's statement towards Firefox users" . huffingtonpost.com. Retrieved 2014-07-01 .
+ ^ "Screenshot of OkCupid's statement towards Firefox users" . huffingtonpost.com. Retrieved 2014-07-01 .
- ^ "FAQ on CEO Resignation" . The Mozilla Blog . Retrieved 2015-04-20 .
+ ^ "FAQ on CEO Resignation" . The Mozilla Blog . Retrieved 2015-04-20 .
- ^ Baker, Mitchell (3 April 2014). "Brendan Eich Steps Down as Mozilla CEO" . mozilla blog . Mozilla. Retrieved 2014-04-04 .
+ ^ Baker, Mitchell (3 April 2014). "Brendan Eich Steps Down as Mozilla CEO" . mozilla blog . Mozilla. Retrieved 2014-04-04 .
- ^ "opensecrets.org listing of Sam Yagan's contributions to political candidates" . opensecrets.org. Retrieved 2014-07-01 .
+ ^ "opensecrets.org listing of Sam Yagan's contributions to political candidates" . opensecrets.org. Retrieved 2014-07-01 .
- ^ "ontheissues.org listing of votes cast by Chris Cannon" . ontheissues.org. Retrieved 2014-07-01 .
+ ^ "ontheissues.org listing of votes cast by Chris Cannon" . ontheissues.org. Retrieved 2014-07-01 .
- ^ "ontheissues.org listing of votes cast on the permanency of the Patriot Act" . ontheissues.org. Retrieved 2014-07-01 .
+ ^ "ontheissues.org listing of votes cast on the permanency of the Patriot Act" . ontheissues.org. Retrieved 2014-07-01 .
- ^ "ontheissues.org: Chris Cannon on Homeland Security" . ontheissues.org. Retrieved 2014-07-01 .
+ ^ "ontheissues.org: Chris Cannon on Homeland Security" . ontheissues.org. Retrieved 2014-07-01 .
- ^ "ontheissues.org: Chris Cannon on Abortion" . ontheissues.org. Retrieved 2014-07-01 .
+ ^ "ontheissues.org: Chris Cannon on Abortion" . ontheissues.org. Retrieved 2014-07-01 .
- ^ Levintova, Hannah (7 April 2014). "OkCupid's CEO Donated to an Anti-Gay Campaign Once, Too" . Hanna Levintova article on motherjones.com . motherjones.com. Retrieved 2014-07-01 .
+ ^ Levintova, Hannah (7 April 2014). "OkCupid's CEO Donated to an Anti-Gay Campaign Once, Too" . Hanna Levintova article on motherjones.com . motherjones.com. Retrieved 2014-07-01 .
- ^ Lee, Stephanie M. (8 April 2014). "OKCupid CEO once donated to anti-gay politician" . Stephanie M. Lee's blog on sfgate.com . sfgate.com. Retrieved 2014-07-01 .
+ ^ Lee, Stephanie M. (8 April 2014). "OKCupid CEO once donated to anti-gay politician" . Stephanie M. Lee's blog on sfgate.com . sfgate.com. Retrieved 2014-07-01 .
- ^ a b "The Hypocrisy Of Sam Yagan & OkCupid" . uncrunched.com blog . uncrunched.com. 6 April 2014. Retrieved 2014-07-01 .
+ ^ a b "The Hypocrisy Of Sam Yagan & OkCupid" . uncrunched.com blog . uncrunched.com. 6 April 2014. Retrieved 2014-07-01 .
- ^ Bellware, Kim (31 March 2014). "OKCupid Publicly Rips Mozilla: 'We Wish Them Nothing But Failure' " . Kim Bellware article on huffingtonpost.com . huffingtonpost.com. Retrieved 2014-07-01 .
+ ^ Bellware, Kim (31 March 2014). "OKCupid Publicly Rips Mozilla: 'We Wish Them Nothing But Failure' " . Kim Bellware article on huffingtonpost.com . huffingtonpost.com. Retrieved 2014-07-01 .
- ^ "Mozilla's Appointment Of Brendan Eich As CEO Sparks Controversy After Prop 8 Donation News Re-Emerges" . huffingtonpost.com article . huffingtonpost.com. 27 March 2014. Retrieved 2014-07-01 .
+ ^ "Mozilla's Appointment Of Brendan Eich As CEO Sparks Controversy After Prop 8 Donation News Re-Emerges" . huffingtonpost.com article . huffingtonpost.com. 27 March 2014. Retrieved 2014-07-01 .
- ^ Eidelson, Josh (4 April 2014). "OkCupid's gay rights stunt has its limits: Taking a deeper look at the savvy ploy" . Josh Eidelson article on salon.com . salon.com. Retrieved 2014-07-01 .
+ ^ Eidelson, Josh (4 April 2014). "OkCupid's gay rights stunt has its limits: Taking a deeper look at the savvy ploy" . Josh Eidelson article on salon.com . salon.com. Retrieved 2014-07-01 .
- ^ a b "Mozilla Manifesto" . Mozilla.org. Retrieved 2012-03-21 .
+ ^ a b "Mozilla Manifesto" . Mozilla.org. Retrieved 2012-03-21 .
- ^ "The Mozilla Manifesto" . Retrieved 24 July 2015 .
+ ^ "The Mozilla Manifesto" . Retrieved 24 July 2015 .
- ^ "Gecko Layout Engine" . download-firefox.org. July 17, 2008. Archived from the original on 2010-11-28. Retrieved 2012-05-10 .
+ ^ "Gecko Layout Engine" . download-firefox.org. July 17, 2008. Archived from the original on 2010-11-28. Retrieved 2012-05-10 .
- ^ "Web Browser Market Share Trends" . W3Counter . Awio Web Services LLC. Retrieved 2012-05-10 .
+ ^ "Web Browser Market Share Trends" . W3Counter . Awio Web Services LLC. Retrieved 2012-05-10 .
- ^ "Top 5 Browsers" . StatCounter Global Stats . StatCounter. Retrieved 2012-05-10 .
+ ^ "Top 5 Browsers" . StatCounter Global Stats . StatCounter. Retrieved 2012-05-10 .
- ^ "Web browsers (Global marketshare)" . Clicky . Roxr Software Ltd. Retrieved 2012-05-10 .
+ ^ "Web browsers (Global marketshare)" . Clicky . Roxr Software Ltd. Retrieved 2012-05-10 .
- ^ Goodger, Ben (February 6, 2006). "Where Did Firefox Come From?" . Inside Firefox. Archived from the original on 2011-06-23. Retrieved 2012-01-07 .
+ ^ Goodger, Ben (February 6, 2006). "Where Did Firefox Come From?" . Inside Firefox. Archived from the original on 2011-06-23. Retrieved 2012-01-07 .
- ^ "Mozilla browser becomes Firebird" . IBPhoenix. Archived from the original on 2007-09-14. Retrieved 2013-06-10 . We at IBPhoenix think that having a browser and a database with the same name in the same space will confuse the market, especially as browsers and databases are often used in the same applications
+ ^ "Mozilla browser becomes Firebird" . IBPhoenix. Archived from the original on 2007-09-14. Retrieved 2013-06-10 . We at IBPhoenix think that having a browser and a database with the same name in the same space will confuse the market, especially as browsers and databases are often used in the same applications
- ^ Festa, Paul (May 6, 2003). "Mozilla's Firebird gets wings clipped" . CNET . Retrieved 2007-01-30 .
+ ^ Festa, Paul (May 6, 2003). "Mozilla's Firebird gets wings clipped" . CNET . Retrieved 2007-01-30 .
- ^ Festa, Paul (February 9, 2004). "Mozilla holds 'fire' in naming fight" . CNET News. Retrieved 2007-01-24 .
+ ^ Festa, Paul (February 9, 2004). "Mozilla holds 'fire' in naming fight" . CNET News. Retrieved 2007-01-24 .
- ^ "Mobile features" . Mozilla. Retrieved 2012-06-26 .
+ ^ "Mobile features" . Mozilla. Retrieved 2012-06-26 .
- ^ "Mobile System Requirements" .
+ ^ "Mobile System Requirements" .
- ^ "Firefox Mobile supported devices" .
+ ^ "Firefox Mobile supported devices" .
- ^ "Mozilla rules out Firefox for iPhone and BlackBerry" .
+
No Comments