mirror of
https://github.com/j0k3r/php-readability.git
synced 2026-09-27 06:26:17 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c506b7ebd7 | ||
|
|
d0af21814a | ||
|
|
5b1eba79bd | ||
|
|
fabf096ce6 | ||
|
|
8ce1663238 | ||
|
|
eb72a315c4 | ||
|
|
d5330a9c28 | ||
|
|
635f8963dc | ||
|
|
19b2a25d96 | ||
|
|
9a490fac07 | ||
|
|
6f6b1f9e2b | ||
|
|
ea1368fac0 | ||
|
|
be81eb2a4f | ||
|
|
9632c4df8c | ||
|
|
bd9ca1b2cd | ||
|
|
6c917794a7 | ||
|
|
7cea79c23a | ||
|
|
c6425cc28b | ||
|
|
e6ad806460 | ||
|
|
3fa88461a0 | ||
|
|
6a8ecf232f | ||
|
|
52b1ddba57 | ||
|
|
90c625bb57 | ||
|
|
4d1c3b1777 | ||
|
|
d649b59414 | ||
|
|
44bebfc3d6 | ||
|
|
b1acc9ed73 | ||
|
|
9306996b47 | ||
|
|
bb75b4f089 | ||
|
|
11d2946904 | ||
|
|
ff78c63e6d | ||
|
|
f808c1b0a2 | ||
|
|
bb65caf864 | ||
|
|
de1b1d9775 | ||
|
|
2e20f76195 | ||
|
|
3c0289bf89 | ||
|
|
74d9cc605a | ||
|
|
6a0f3337a6 | ||
|
|
2dce2879bf | ||
|
|
49ce4233fa | ||
|
|
26c881d864 | ||
|
|
db69fe59a2 | ||
|
|
a78f01f656 | ||
|
|
db4508003b | ||
|
|
15b12ea2d6 | ||
|
|
694f0308fe | ||
|
|
bbe9021fe7 | ||
|
|
9dee4a240d | ||
|
|
eef6d6d456 | ||
|
|
30a577c617 | ||
|
|
70b393a2a3 | ||
|
|
9ab6d0d9e8 | ||
|
|
8712db510e | ||
|
|
422c74f29c | ||
|
|
ed3393a79f | ||
|
|
63cd304dba | ||
|
|
43939f88d9 | ||
|
|
3a7350a8a7 | ||
|
|
4c68cc9f09 | ||
|
|
276684ab6d | ||
|
|
163058aeff | ||
|
|
6427dd7371 | ||
|
|
613a63c062 | ||
|
|
05089bbd03 |
+3
-2
@@ -4,9 +4,10 @@ root = true
|
|||||||
; Unix-style newlines
|
; Unix-style newlines
|
||||||
[*]
|
[*]
|
||||||
end_of_line = LF
|
end_of_line = LF
|
||||||
|
|
||||||
[*.php]
|
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[.github/**.yml]
|
||||||
|
indent_size = 2
|
||||||
|
|||||||
+2
-1
@@ -4,6 +4,7 @@
|
|||||||
/.scrutinizer.yml export-ignore
|
/.scrutinizer.yml export-ignore
|
||||||
/.travis.yml export-ignore
|
/.travis.yml export-ignore
|
||||||
/.php_cs export-ignore
|
/.php_cs export-ignore
|
||||||
/README.md export-ignore
|
|
||||||
/phpunit.xml.dist export-ignore
|
/phpunit.xml.dist export-ignore
|
||||||
|
/phpstan.neon export-ignore
|
||||||
|
/.github export-ignore
|
||||||
/tests export-ignore
|
/tests export-ignore
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
github: j0k3r
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
name: "CS"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
env:
|
||||||
|
SYMFONY_PHPUNIT_VERSION: 7.5
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
coding-standards:
|
||||||
|
name: "CS Fixer & PHPStan"
|
||||||
|
runs-on: "ubuntu-20.04"
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php:
|
||||||
|
- "7.4"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout"
|
||||||
|
uses: "actions/checkout@v2"
|
||||||
|
|
||||||
|
- name: "Install PHP"
|
||||||
|
uses: "shivammathur/setup-php@v2"
|
||||||
|
with:
|
||||||
|
coverage: "none"
|
||||||
|
php-version: "${{ matrix.php }}"
|
||||||
|
tools: cs2pr, composer:v2
|
||||||
|
ini-values: "date.timezone=Europe/Paris"
|
||||||
|
env:
|
||||||
|
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: "Add PHPStan"
|
||||||
|
run: "composer require phpstan/phpstan phpstan/phpstan-phpunit --dev --no-progress --no-suggest"
|
||||||
|
|
||||||
|
- name: "Install dependencies with Composer"
|
||||||
|
uses: "ramsey/composer-install@v1"
|
||||||
|
with:
|
||||||
|
composer-options: "--optimize-autoloader --prefer-dist"
|
||||||
|
|
||||||
|
- name: "Run PHP CS Fixer"
|
||||||
|
run: "php vendor/bin/php-cs-fixer fix --verbose --dry-run --format=checkstyle | cs2pr"
|
||||||
|
|
||||||
|
- name: "Install PHPUnit for PHPStan"
|
||||||
|
run: "php vendor/bin/simple-phpunit install"
|
||||||
|
|
||||||
|
- name: "Run PHPStan"
|
||||||
|
run: "php vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"
|
||||||
@@ -0,0 +1,203 @@
|
|||||||
|
name: "CI"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
|
||||||
|
env:
|
||||||
|
fail-fast: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
phpunit:
|
||||||
|
name: "PHPUnit (PHP ${{ matrix.php }})"
|
||||||
|
runs-on: "ubuntu-20.04"
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php:
|
||||||
|
- "5.6"
|
||||||
|
- "7.0"
|
||||||
|
- "7.1"
|
||||||
|
- "7.2"
|
||||||
|
- "7.3"
|
||||||
|
- "7.4"
|
||||||
|
- "8.0"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout"
|
||||||
|
uses: "actions/checkout@v2"
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: "Install PHP"
|
||||||
|
uses: "shivammathur/setup-php@v2"
|
||||||
|
with:
|
||||||
|
php-version: "${{ matrix.php }}"
|
||||||
|
coverage: "none"
|
||||||
|
tools: composer:v1
|
||||||
|
extensions: tidy
|
||||||
|
ini-values: "date.timezone=Europe/Paris"
|
||||||
|
env:
|
||||||
|
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: "Force PHPUnit version"
|
||||||
|
if: matrix.php >= '7.2'
|
||||||
|
run: "echo $SYMFONY_PHPUNIT_VERSION"
|
||||||
|
env:
|
||||||
|
SYMFONY_PHPUNIT_VERSION: 7.5
|
||||||
|
|
||||||
|
- name: "Remove useless deps"
|
||||||
|
run: "composer remove friendsofphp/php-cs-fixer --dev --no-progress --no-update"
|
||||||
|
|
||||||
|
- name: "Install dependencies with Composer"
|
||||||
|
uses: "ramsey/composer-install@v1"
|
||||||
|
with:
|
||||||
|
composer-options: "--optimize-autoloader --prefer-dist"
|
||||||
|
|
||||||
|
- name: "Setup logs"
|
||||||
|
run: "mkdir -p build/logs"
|
||||||
|
|
||||||
|
- name: "Run PHPUnit"
|
||||||
|
run: "php vendor/bin/simple-phpunit -v"
|
||||||
|
|
||||||
|
phpunit-coverage:
|
||||||
|
name: "PHPUnit coverage (PHP ${{ matrix.php }})"
|
||||||
|
runs-on: "ubuntu-20.04"
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php:
|
||||||
|
- "7.4"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout"
|
||||||
|
uses: "actions/checkout@v2"
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: "Install PHP with Xdebug"
|
||||||
|
uses: "shivammathur/setup-php@v2"
|
||||||
|
with:
|
||||||
|
php-version: "${{ matrix.php }}"
|
||||||
|
coverage: "xdebug"
|
||||||
|
tools: composer:v1
|
||||||
|
extensions: tidy
|
||||||
|
ini-values: "date.timezone=Europe/Paris"
|
||||||
|
env:
|
||||||
|
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: "Remove useless deps"
|
||||||
|
run: "composer remove friendsofphp/php-cs-fixer --dev --no-progress --no-update"
|
||||||
|
|
||||||
|
- name: "Install dependencies with Composer"
|
||||||
|
uses: "ramsey/composer-install@v1"
|
||||||
|
with:
|
||||||
|
composer-options: "--optimize-autoloader --prefer-dist"
|
||||||
|
|
||||||
|
- name: "Setup logs"
|
||||||
|
run: "mkdir -p build/logs"
|
||||||
|
|
||||||
|
- name: "Run PHPUnit (with coverage)"
|
||||||
|
run: "php vendor/bin/simple-phpunit -v --coverage-clover build/logs/clover.xml"
|
||||||
|
env:
|
||||||
|
SYMFONY_PHPUNIT_VERSION: 7.5
|
||||||
|
|
||||||
|
- name: "Retrieve Coveralls phar"
|
||||||
|
run: "wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.2/php-coveralls.phar"
|
||||||
|
|
||||||
|
- name: "Enable Coveralls phar"
|
||||||
|
run: "chmod +x php-coveralls.phar"
|
||||||
|
|
||||||
|
- name: "Upload to Coveralls"
|
||||||
|
run: "php php-coveralls.phar -v -x build/logs/clover.xml"
|
||||||
|
env:
|
||||||
|
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
phpunit-lowest:
|
||||||
|
name: "PHPUnit lowest deps (PHP ${{ matrix.php }})"
|
||||||
|
runs-on: "ubuntu-20.04"
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php:
|
||||||
|
- "7.2"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout"
|
||||||
|
uses: "actions/checkout@v2"
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: "Install PHP"
|
||||||
|
uses: "shivammathur/setup-php@v2"
|
||||||
|
with:
|
||||||
|
php-version: "${{ matrix.php }}"
|
||||||
|
coverage: "none"
|
||||||
|
tools: composer:v1
|
||||||
|
extensions: tidy
|
||||||
|
ini-values: "date.timezone=Europe/Paris"
|
||||||
|
env:
|
||||||
|
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: "Remove useless deps"
|
||||||
|
run: "composer remove friendsofphp/php-cs-fixer --dev --no-progress --no-update"
|
||||||
|
|
||||||
|
- name: "Install dependencies with Composer"
|
||||||
|
uses: "ramsey/composer-install@v1"
|
||||||
|
with:
|
||||||
|
composer-options: "--optimize-autoloader --prefer-dist"
|
||||||
|
dependency-versions: "lowest"
|
||||||
|
|
||||||
|
- name: "Setup logs"
|
||||||
|
run: "mkdir -p build/logs"
|
||||||
|
|
||||||
|
- name: "Run PHPUnit"
|
||||||
|
run: "php vendor/bin/simple-phpunit -v"
|
||||||
|
env:
|
||||||
|
SYMFONY_PHPUNIT_VERSION: 7.5
|
||||||
|
|
||||||
|
phpunit-composerv2:
|
||||||
|
name: "PHPUnit with Composer v2 (PHP ${{ matrix.php }})"
|
||||||
|
runs-on: "ubuntu-20.04"
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php:
|
||||||
|
- "7.4"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout"
|
||||||
|
uses: "actions/checkout@v2"
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: "Install PHP"
|
||||||
|
uses: "shivammathur/setup-php@v2"
|
||||||
|
with:
|
||||||
|
php-version: "${{ matrix.php }}"
|
||||||
|
coverage: "none"
|
||||||
|
tools: composer:v2
|
||||||
|
extensions: tidy
|
||||||
|
ini-values: "date.timezone=Europe/Paris"
|
||||||
|
env:
|
||||||
|
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: "Remove useless deps"
|
||||||
|
run: "composer remove friendsofphp/php-cs-fixer --dev --no-progress --no-update"
|
||||||
|
|
||||||
|
- name: "Install dependencies with Composer"
|
||||||
|
uses: "ramsey/composer-install@v1"
|
||||||
|
with:
|
||||||
|
composer-options: "--optimize-autoloader --prefer-dist"
|
||||||
|
|
||||||
|
- name: "Setup logs"
|
||||||
|
run: "mkdir -p build/logs"
|
||||||
|
|
||||||
|
- name: "Run PHPUnit"
|
||||||
|
run: "php vendor/bin/simple-phpunit -v"
|
||||||
|
env:
|
||||||
|
SYMFONY_PHPUNIT_VERSION: 7.5
|
||||||
@@ -2,3 +2,4 @@ vendor/
|
|||||||
coverage/
|
coverage/
|
||||||
composer.lock
|
composer.lock
|
||||||
.php_cs.cache
|
.php_cs.cache
|
||||||
|
.phpunit.result.cache
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$finder = (new PhpCsFixer\Finder())
|
||||||
|
->in(__DIR__)
|
||||||
|
->exclude(['vendor', 'var', 'web'])
|
||||||
|
;
|
||||||
|
|
||||||
|
return (new PhpCsFixer\Config())
|
||||||
|
->setUsingCache(true)
|
||||||
|
->setRiskyAllowed(true)
|
||||||
|
->setRules([
|
||||||
|
'@Symfony' => true,
|
||||||
|
'@Symfony:risky' => true,
|
||||||
|
'array_syntax' => ['syntax' => 'short'],
|
||||||
|
'combine_consecutive_unsets' => true,
|
||||||
|
'heredoc_to_nowdoc' => true,
|
||||||
|
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
|
||||||
|
'no_unreachable_default_argument_value' => true,
|
||||||
|
'no_useless_else' => true,
|
||||||
|
'no_useless_return' => true,
|
||||||
|
'ordered_class_elements' => true,
|
||||||
|
'ordered_imports' => true,
|
||||||
|
'php_unit_strict' => false,
|
||||||
|
'phpdoc_order' => true,
|
||||||
|
// 'psr4' => true,
|
||||||
|
'strict_comparison' => true,
|
||||||
|
'strict_param' => true,
|
||||||
|
'concat_space' => ['spacing' => 'one'],
|
||||||
|
])
|
||||||
|
->setFinder($finder)
|
||||||
|
;
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return Symfony\CS\Config\Config::create()
|
|
||||||
->setUsingCache(true)
|
|
||||||
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
|
|
||||||
// use default SYMFONY_LEVEL and extra fixers:
|
|
||||||
->fixers(array(
|
|
||||||
'concat_with_spaces',
|
|
||||||
'ordered_use',
|
|
||||||
'phpdoc_order',
|
|
||||||
'strict',
|
|
||||||
'strict_param',
|
|
||||||
'long_array_syntax',
|
|
||||||
))
|
|
||||||
->finder(
|
|
||||||
Symfony\CS\Finder\DefaultFinder::create()
|
|
||||||
->in(__DIR__)
|
|
||||||
->exclude(array('vendor'))
|
|
||||||
)
|
|
||||||
;
|
|
||||||
@@ -1,2 +1,12 @@
|
|||||||
tools:
|
tools:
|
||||||
external_code_coverage: false
|
external_code_coverage: false
|
||||||
|
|
||||||
|
build:
|
||||||
|
nodes:
|
||||||
|
analysis:
|
||||||
|
tests:
|
||||||
|
override:
|
||||||
|
- php-scrutinizer-run
|
||||||
|
environment:
|
||||||
|
php:
|
||||||
|
version: 7.2
|
||||||
|
|||||||
-53
@@ -1,53 +0,0 @@
|
|||||||
language: php
|
|
||||||
|
|
||||||
php:
|
|
||||||
- 5.3.3
|
|
||||||
- 5.3
|
|
||||||
- 5.4
|
|
||||||
- 5.5
|
|
||||||
- 5.6
|
|
||||||
- 7.0
|
|
||||||
- 7.1
|
|
||||||
- nightly
|
|
||||||
- hhvm
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- php: 7.0
|
|
||||||
env: CS_FIXER=run
|
|
||||||
fast_finish: true
|
|
||||||
allow_failures:
|
|
||||||
- php: hhvm
|
|
||||||
- php: nightly
|
|
||||||
|
|
||||||
# faster builds on new travis setup not using sudo
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
# cache vendor dirs
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- vendor
|
|
||||||
- $HOME/.composer/cache
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
|
|
||||||
# disable TLS for composer because openssl is disabled for PHP 5.3.3 on travis
|
|
||||||
# see: https://blog.travis-ci.com/upcoming_ubuntu_11_10_migration/
|
|
||||||
- if [[ $TRAVIS_PHP_VERSION = 5.3.3 ]]; then composer config -g -- disable-tls true; fi;
|
|
||||||
- if [[ $TRAVIS_PHP_VERSION = 5.3.3 ]]; then composer config -g -- secure-http false; fi;
|
|
||||||
# no version compatible with PHP > 7.1
|
|
||||||
- if [[ $TRAVIS_PHP_VERSION = 7.2.* ]]; then composer remove friendsofphp/php-cs-fixer; fi;
|
|
||||||
|
|
||||||
install:
|
|
||||||
- composer self-update
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- composer install --prefer-dist --no-interaction
|
|
||||||
|
|
||||||
script:
|
|
||||||
- mkdir -p build/logs
|
|
||||||
- php vendor/bin/simple-phpunit -v --coverage-clover build/logs/clover.xml
|
|
||||||
- if [ "$CS_FIXER" = "run" ]; then php vendor/bin/php-cs-fixer fix --verbose --dry-run ; fi;
|
|
||||||
|
|
||||||
after_script:
|
|
||||||
- php vendor/bin/coveralls -v
|
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
# Readability
|
# Readability
|
||||||
|
|
||||||
[](https://travis-ci.org/j0k3r/php-readability)
|

|
||||||
[](https://coveralls.io/github/j0k3r/php-readability/?branch=master)
|
[](https://coveralls.io/github/j0k3r/php-readability/?branch=master)
|
||||||
|
[](https://packagist.org/packages/j0k3r/php-readability)
|
||||||
|
[](https://packagist.org/packages/j0k3r/php-readability)
|
||||||
|
|
||||||
This is an extract of the Readability class from this [full-text-rss](https://github.com/Dither/full-text-rss) fork. It can be defined as a better version of the original [php-readability](https://bitbucket.org/fivefilters/php-readability/overview).
|
This is an extract of the Readability class from this [full-text-rss](https://github.com/Dither/full-text-rss) fork. It can be defined as a better version of the original [php-readability](https://bitbucket.org/fivefilters/php-readability/overview).
|
||||||
|
|
||||||
|
|||||||
+9
-6
@@ -24,20 +24,23 @@
|
|||||||
"role": "Developer (original JS version)"
|
"role": "Developer (original JS version)"
|
||||||
}],
|
}],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3",
|
"php": ">=5.6.0",
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"psr/log": "^1.0"
|
"psr/log": "^1.0",
|
||||||
|
"masterminds/html5": "^2.7"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"satooshi/php-coveralls": "~0.6",
|
"friendsofphp/php-cs-fixer": "^2.14",
|
||||||
"friendsofphp/php-cs-fixer": "<2",
|
"monolog/monolog": "^1.24|^2.1",
|
||||||
"monolog/monolog": "^1.13",
|
"symfony/phpunit-bridge": "^4.4|^5.3"
|
||||||
"symfony/phpunit-bridge": "^3.2"
|
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-tidy": "Used to clean up given HTML and to avoid problems with bad HTML structure."
|
"ext-tidy": "Used to clean up given HTML and to avoid problems with bad HTML structure."
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": { "Readability\\": "src/" }
|
"psr-4": { "Readability\\": "src/" }
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": { "Tests\\Readability\\": "tests/" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
parameters:
|
||||||
|
level: 1
|
||||||
|
paths:
|
||||||
|
- src
|
||||||
|
- tests
|
||||||
|
|
||||||
|
# https://github.com/phpstan/phpstan/issues/694#issuecomment-350724288
|
||||||
|
bootstrapFiles:
|
||||||
|
- vendor/bin/.phpunit/phpunit-7.5-0/vendor/autoload.php
|
||||||
|
|
||||||
|
includes:
|
||||||
|
- vendor/phpstan/phpstan-phpunit/extension.neon
|
||||||
|
- vendor/phpstan/phpstan-phpunit/rules.neon
|
||||||
+1
-2
@@ -7,7 +7,6 @@
|
|||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
processIsolation="false"
|
processIsolation="false"
|
||||||
stopOnFailure="false"
|
stopOnFailure="false"
|
||||||
syntaxCheck="false"
|
|
||||||
bootstrap="vendor/autoload.php"
|
bootstrap="vendor/autoload.php"
|
||||||
>
|
>
|
||||||
|
|
||||||
@@ -27,6 +26,6 @@
|
|||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
<!-- <logging>
|
<!-- <logging>
|
||||||
<log type="coverage-html" target="coverage" title="Readability" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70"/>
|
<log type="coverage-html" target="coverage" lowUpperBound="35" highLowerBound="70"/>
|
||||||
</logging> -->
|
</logging> -->
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
@@ -45,17 +45,19 @@ class JSLikeHTMLElement extends \DOMElement
|
|||||||
*/
|
*/
|
||||||
public function __set($name, $value)
|
public function __set($name, $value)
|
||||||
{
|
{
|
||||||
if ($name !== 'innerHTML') {
|
if ('innerHTML' !== $name) {
|
||||||
$trace = debug_backtrace();
|
$trace = debug_backtrace();
|
||||||
trigger_error('Undefined property via __set(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_NOTICE);
|
trigger_error('Undefined property via __set(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], \E_USER_NOTICE);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// first, empty the element
|
// first, empty the element
|
||||||
|
if (isset($this->childNodes)) {
|
||||||
for ($x = $this->childNodes->length - 1; $x >= 0; --$x) {
|
for ($x = $this->childNodes->length - 1; $x >= 0; --$x) {
|
||||||
$this->removeChild($this->childNodes->item($x));
|
$this->removeChild($this->childNodes->item($x));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// $value holds our new inner HTML
|
// $value holds our new inner HTML
|
||||||
$value = trim($value);
|
$value = trim($value);
|
||||||
@@ -109,24 +111,34 @@ class JSLikeHTMLElement extends \DOMElement
|
|||||||
*/
|
*/
|
||||||
public function __get($name)
|
public function __get($name)
|
||||||
{
|
{
|
||||||
if ($name === 'innerHTML') {
|
if ('innerHTML' === $name) {
|
||||||
$inner = '';
|
$inner = '';
|
||||||
|
|
||||||
|
if (isset($this->childNodes)) {
|
||||||
foreach ($this->childNodes as $child) {
|
foreach ($this->childNodes as $child) {
|
||||||
$inner .= $this->ownerDocument->saveXML($child);
|
$inner .= $this->ownerDocument->saveXML($child);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $inner;
|
return $inner;
|
||||||
}
|
}
|
||||||
|
|
||||||
$trace = debug_backtrace();
|
$trace = debug_backtrace();
|
||||||
trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_NOTICE);
|
trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], \E_USER_NOTICE);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return '[' . $this->tagName . ']';
|
return '[' . $this->tagName . ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getInnerHtml()
|
||||||
|
{
|
||||||
|
return $this->__get('innerHTML');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setInnerHtml($value)
|
||||||
|
{
|
||||||
|
return $this->__set('innerHTML', $value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+614
-616
File diff suppressed because it is too large
Load Diff
+116
-87
@@ -6,22 +6,11 @@ use Monolog\Handler\TestHandler;
|
|||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Readability\Readability;
|
use Readability\Readability;
|
||||||
|
|
||||||
class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
class ReadabilityTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
public $logHandler;
|
public $logHandler;
|
||||||
public $logger;
|
public $logger;
|
||||||
|
|
||||||
private function getReadability($html, $url = null, $parser = 'libxml', $useTidy = true)
|
|
||||||
{
|
|
||||||
$readability = new Readability($html, $url, $parser, $useTidy);
|
|
||||||
|
|
||||||
$this->logHandler = new TestHandler();
|
|
||||||
$this->logger = new Logger('test', array($this->logHandler));
|
|
||||||
$readability->setLogger($this->logger);
|
|
||||||
|
|
||||||
return $readability;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @requires extension tidy
|
* @requires extension tidy
|
||||||
*/
|
*/
|
||||||
@@ -33,6 +22,15 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertInstanceOf('DomDocument', $readability->dom);
|
$this->assertInstanceOf('DomDocument', $readability->dom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testConstructHtml5Parser()
|
||||||
|
{
|
||||||
|
$readability = $this->getReadability('<html/>', 'http://0.0.0.0', 'html5lib');
|
||||||
|
|
||||||
|
$this->assertEquals('http://0.0.0.0', $readability->url);
|
||||||
|
$this->assertInstanceOf('DomDocument', $readability->dom);
|
||||||
|
$this->assertEquals('<html/>', $readability->original_html);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @requires extension tidy
|
* @requires extension tidy
|
||||||
*/
|
*/
|
||||||
@@ -75,8 +73,8 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertFalse($res);
|
$this->assertFalse($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('Sorry, Readability was unable to parse this page for content.', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('Sorry, Readability was unable to parse this page for content.', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInitP()
|
public function testInitP()
|
||||||
@@ -87,9 +85,9 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertContains('<div readability=', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('<div readability=', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is the awesome content :)', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is the awesome content :)', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInitDivP()
|
public function testInitDivP()
|
||||||
@@ -100,9 +98,9 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertContains('<div readability=', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('<div readability=', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is the awesome content :)', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is the awesome content :)', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInitDiv()
|
public function testInitDiv()
|
||||||
@@ -114,9 +112,9 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertContains('<div readability=', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('<div readability=', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is the awesome content :)', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is the awesome content :)', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithFootnotes()
|
public function testWithFootnotes()
|
||||||
@@ -129,11 +127,11 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertContains('<div readability=', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('<div readability=', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertContains('readabilityFootnoteLink', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('readabilityFootnoteLink', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertContains('readabilityLink-3', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('readabilityLink-3', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testStandardClean()
|
public function testStandardClean()
|
||||||
@@ -146,11 +144,11 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertContains('<div readability=', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('<div readability=', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertContains('will NOT be removed', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('will NOT be removed', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertNotContains('<h2>', $readability->getContent()->innerHTML);
|
$this->assertStringNotContainsString('<h2>', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithIframe()
|
public function testWithIframe()
|
||||||
@@ -162,10 +160,10 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertContains('<div readability=', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('<div readability=', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertContains('nofollow', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('nofollow', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithArticle()
|
public function testWithArticle()
|
||||||
@@ -177,10 +175,10 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertContains('alt="article"', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('alt="article"', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertContains('nofollow', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('nofollow', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithAside()
|
public function testWithAside()
|
||||||
@@ -192,10 +190,10 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertNotContains('<aside>', $readability->getContent()->innerHTML);
|
$this->assertStringNotContainsString('<aside>', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertContains('<footer readability="4"/>', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('<footer readability="5"/>', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithClasses()
|
public function testWithClasses()
|
||||||
@@ -207,10 +205,10 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertContains('alt="article"', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('alt="article"', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertNotContains('This text should be removed', $readability->getContent()->innerHTML);
|
$this->assertStringNotContainsString('This text should be removed', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithClassesWithoutLightClean()
|
public function testWithClassesWithoutLightClean()
|
||||||
@@ -223,10 +221,10 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertContains('alt="article"', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('alt="article"', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertNotContains('This text should be removed', $readability->getContent()->innerHTML);
|
$this->assertStringNotContainsString('This text should be removed', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithTd()
|
public function testWithTd()
|
||||||
@@ -238,8 +236,8 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithSameClasses()
|
public function testWithSameClasses()
|
||||||
@@ -251,9 +249,9 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertContains('This text is also an awesome text and you should know that', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This text is also an awesome text and you should know that', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithScript()
|
public function testWithScript()
|
||||||
@@ -265,9 +263,9 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertEmpty($readability->getTitle()->innerHTML);
|
$this->assertEmpty($readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertNotContains('This text is also an awesome text and you should know that', $readability->getContent()->innerHTML);
|
$this->assertStringNotContainsString('This text is also an awesome text and you should know that', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTitle()
|
public function testTitle()
|
||||||
@@ -279,9 +277,9 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertEquals('this is my title', $readability->getTitle()->innerHTML);
|
$this->assertEquals('this is my title', $readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertNotContains('This text is also an awesome text and you should know that', $readability->getContent()->innerHTML);
|
$this->assertStringNotContainsString('This text is also an awesome text and you should know that', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTitleWithDash()
|
public function testTitleWithDash()
|
||||||
@@ -293,9 +291,9 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertEquals('title2 - title3', $readability->getTitle()->innerHTML);
|
$this->assertEquals('title2 - title3', $readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertNotContains('This text is also an awesome text and you should know that', $readability->getContent()->innerHTML);
|
$this->assertStringNotContainsString('This text is also an awesome text and you should know that', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTitleWithDoubleDot()
|
public function testTitleWithDoubleDot()
|
||||||
@@ -307,9 +305,9 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertEquals('title2 : title3', $readability->getTitle()->innerHTML);
|
$this->assertEquals('title2 : title3', $readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertNotContains('This text is also an awesome text and you should know that', $readability->getContent()->innerHTML);
|
$this->assertStringNotContainsString('This text is also an awesome text and you should know that', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTitleTooShortUseH1()
|
public function testTitleTooShortUseH1()
|
||||||
@@ -321,18 +319,11 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertEquals('this is my h1 title !', $readability->getTitle()->innerHTML);
|
$this->assertEquals('this is my h1 title !', $readability->getTitle()->getInnerHtml());
|
||||||
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertNotContains('This text is also an awesome text and you should know that', $readability->getContent()->innerHTML);
|
$this->assertStringNotContainsString('This text is also an awesome text and you should know that', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function testConstructParser()
|
|
||||||
// {
|
|
||||||
// $readability = $this->getReadability('<html/>', 'http://0.0.0.0', 'html5lib');
|
|
||||||
|
|
||||||
// $this->assertEquals('http://0.0.0.0', $readability->url);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// dummy function to be used to the next test
|
// dummy function to be used to the next test
|
||||||
public function error2Exception($code, $string, $file, $line, $context)
|
public function error2Exception($code, $string, $file, $line, $context)
|
||||||
{
|
{
|
||||||
@@ -341,9 +332,9 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testAutoClosingIframeNotThrowingException()
|
public function testAutoClosingIframeNotThrowingException()
|
||||||
{
|
{
|
||||||
error_reporting(E_ALL | E_STRICT);
|
error_reporting(\E_ALL | \E_STRICT);
|
||||||
ini_set('display_errors', true);
|
ini_set('display_errors', true);
|
||||||
set_error_handler(array($this, 'error2Exception'), E_ALL | E_STRICT);
|
set_error_handler([$this, 'error2Exception'], \E_ALL | \E_STRICT);
|
||||||
|
|
||||||
$data = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
$data = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="ru-RU" prefix="og: http://ogp.me/ns#">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="ru-RU" prefix="og: http://ogp.me/ns#">
|
||||||
@@ -378,8 +369,8 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
|
||||||
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
|
||||||
$this->assertContains('<iframe src="https://www.youtube.com/embed/PUep6xNeKjA" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"> </iframe>', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('<iframe src="https://www.youtube.com/embed/PUep6xNeKjA" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"> </iframe>', $readability->getContent()->getInnerHtml());
|
||||||
$this->assertContains('3D Touch', $readability->getTitle()->innerHTML);
|
$this->assertStringContainsString('3D Touch', $readability->getTitle()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -443,13 +434,13 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testPostFilters()
|
public function testPostFilters()
|
||||||
{
|
{
|
||||||
$readability = $this->getReadability('<div>' . str_repeat('<p>This <b>is</b> the awesome content :)</p>', 10) . '</div>', 'http://0.0.0.0');
|
$readability = $this->getReadability('<div>' . str_repeat('<p>This <strong>is</strong> the awesome content :)</p>', 10) . '</div>', 'http://0.0.0.0');
|
||||||
$readability->addPostFilter('!<strong[^>]*>(.*?)</strong>!is', '');
|
$readability->addPostFilter('!<strong[^>]*>(.*?)</strong>!is', '');
|
||||||
|
|
||||||
$res = $readability->init();
|
$res = $readability->init();
|
||||||
|
|
||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertContains('This the awesome content :)', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This the awesome content :)', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testPreFilters()
|
public function testPreFilters()
|
||||||
@@ -462,7 +453,7 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
$res = $readability->init();
|
$res = $readability->init();
|
||||||
|
|
||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
$this->assertContains('This the awesome and WONDERFUL content :)', $readability->getContent()->innerHTML);
|
$this->assertStringContainsString('This the awesome and WONDERFUL content :)', $readability->getContent()->getInnerHtml());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testChildNodeGoneNull()
|
public function testChildNodeGoneNull()
|
||||||
@@ -477,4 +468,42 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$this->assertTrue($res);
|
$this->assertTrue($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testKeepFootnotes()
|
||||||
|
{
|
||||||
|
// from https://www.schreibdichte.de/blog/feed-aggregator-und-spaeter-lesen-dienst-im-team
|
||||||
|
$html = file_get_contents('tests/fixtures/keepFootnotes.html');
|
||||||
|
|
||||||
|
$readability = $this->getReadability($html, 'http://0.0.0.0');
|
||||||
|
$readability->debug = true;
|
||||||
|
$res = $readability->init();
|
||||||
|
|
||||||
|
$this->assertTrue($res);
|
||||||
|
$this->assertStringContainsString('<sup id="fnref1:fnfeed_2"><a href="#fn:fnfeed_2" class="footnote-ref">2</a></sup>', $readability->getContent()->getInnerHtml());
|
||||||
|
$this->assertStringContainsString('<a href="#fnref1:fnfeed_2" rev="footnote"', $readability->getContent()->getInnerHtml());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testWithWipedBody()
|
||||||
|
{
|
||||||
|
// from https://www.cs.cmu.edu/~rgs/alice-table.html
|
||||||
|
$html = file_get_contents('tests/fixtures/wipedBody.html');
|
||||||
|
|
||||||
|
$readability = $this->getReadability($html, 'http://0.0.0.0', 'libxml', false);
|
||||||
|
$readability->debug = true;
|
||||||
|
$res = $readability->init();
|
||||||
|
|
||||||
|
$this->assertTrue($res);
|
||||||
|
$this->assertStringContainsString('<a href="alice-I.html">Down the Rabbit-Hole</a>', $readability->getContent()->getInnerHtml());
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getReadability($html, $url = null, $parser = 'libxml', $useTidy = true)
|
||||||
|
{
|
||||||
|
$readability = new Readability($html, $url, $parser, $useTidy);
|
||||||
|
|
||||||
|
$this->logHandler = new TestHandler();
|
||||||
|
$this->logger = new Logger('test', [$this->logHandler]);
|
||||||
|
$readability->setLogger($this->logger);
|
||||||
|
|
||||||
|
return $readability;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+54
@@ -0,0 +1,54 @@
|
|||||||
|
<article>
|
||||||
|
|
||||||
|
<h1>Feed-Aggregator und Später-Lesen-Dienst im Team</h1>
|
||||||
|
|
||||||
|
<figure>
|
||||||
|
<img src="https://www.schreibdichte.de/content/1-blog/20170505-feed-aggregator-und-spaeter-lesen-dienst-im-team/workflow.png" alt="Feed-Aggregator und Später-Lesen-Dienst im Team" >
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<time datetime="2017-05-05T18:40:00+00:00" >05.05.2017</time>
|
||||||
|
|
||||||
|
<p> <span class="tag">Tags:</span>
|
||||||
|
<ul class="tag_list">
|
||||||
|
<li><a href="https://www.schreibdichte.de/blog/tag:Software">Software</a></li>
|
||||||
|
<li><a href="https://www.schreibdichte.de/blog/tag:Web">Web</a></li>
|
||||||
|
<li><a href="https://www.schreibdichte.de/blog/tag:Tools">Tools</a></li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<p>Dank einer Mitteilung <sup id="fnref1:fnfeed_1"><a href="#fn:fnfeed_1" class="footnote-ref">1</a></sup> im OSBN <sup id="fnref1:fnfeed_2"><a href="#fn:fnfeed_2" class="footnote-ref">2</a></sup>, bin ich auf den Feed-Aggregator Miniflux <sup id="fnref1:fnfeed_3"><a href="#fn:fnfeed_3" class="footnote-ref">3</a></sup> aufmerksam geworden. Ich hatte schon lange nach einer Alternative zu Fever <sup id="fnref1:fnfeed_4"><a href="#fn:fnfeed_4" class="footnote-ref">4</a></sup> gesucht, da der Anschein vorlag, dass die Entwicklung nicht mehr weiter ging. Was sich bestätigte.</p>
|
||||||
|
<p>Miniflux ist prima, einfach gehalten und erledigt genau dass, was es machen soll. Zudem wird die Fever-API unterstützt, was bedeutet, dass ich weiterhin meine Feed-Reader nutzen kann, was den Dialog mit Miniflux auf dem Server betrifft. Das ist deshalb interessant, um den Lesestatus oder das Favorisieren von Feeds zentral auf dem Server zu berücksichtigen und nicht lokal. So habe ich sowohl auf dem lokalen Rechner, als auch auf allen mobilen Geräten den gleichen Stand und Status meiner abonnierten Feeds.</p>
|
||||||
|
<p>Für das spätere Lesen von Webseiten, nutze ich seit längerem wallabag <sup id="fnref1:fnfeed_5"><a href="#fn:fnfeed_5" class="footnote-ref">5</a></sup>. Wallabag wird mit Inhalten über den Browser gefüttert. Die Webseiten werden bei der Konservierung von Werbung befreit, damit der reine Text vorliegt. Bilder dagegen nicht und gehen evtl. verloren, wenn es die Quelle mal nicht mehr geben sollte. Ich habe also zwei Orte, an denen Informationen gehalten werden. Miniflux zur Verwaltung von Feed-Nachrichten und Wallabag für Webseiten.</p>
|
||||||
|
<p>Bei einem Update von Miniflux ist mit aufgefallen, dass es nun eine API für Wallabag gibt. Dabei werden alle gespeicherten Feeds von Miniflux an Wallabag übergeben. Eine prima Angelegenheit, da ich jetzt nur noch einen Topf habe, woraus ich meine gesammelten Informationen aus dem Netz entnehme.</p>
|
||||||
|
<p>Miniflux als auch wallabag sind selbst gehostete Web-Applikationen, die auch über den Browser erreichbar sind. Native wallabag-Apps für iOS bzw. Android werden ebenfalls angeboten. Wallabag bietet zusätzlich einen Feed an, um die gesammelten Informationen per Feed-Reader zu lesen. Hierbei drängt sich evtl. die Idee auf, diesen Feed wieder in Miniflux zu abonnieren, da dann zentral alles aus verschiedenen Quellen vorliegt. Hier hätten wir allerdings eine gewisse Redundanz.</p>
|
||||||
|
<p>Ich nutze seit ein paar Monaten Devonthink <sup id="fnref1:fnfeed_6"><a href="#fn:fnfeed_6" class="footnote-ref">6</a></sup> auf dem Mac. Das ist eine lokale Dokumentenverwaltung (DMS), die heute u.a. meine Bücher, Notizen und mein Mail-Archiv verwaltet und ihre Stärke u.a. in der Suche von Informationen hat. Devonthink versteht es auch Feeds zu abonnieren. Für mich war dies der Moment, nun den Feed von wallabag mit all meinen gespeicherten Informationen aus dem Web mit zu integrieren. Ich muss sagen, eine runde Lösung, denn jetzt habe ich für die lokale Suche und das Lesen eine zentrale Stelle.</p>
|
||||||
|
<p>Die Grafik veranschaulicht das Teamplay zwischen Feed-Aggregator Miniflux und wallabag als Später-Lesen-Dienst, zusammengeführt in Devonthink. Ich kenne leider keine Dokumentenverwaltung für Linux oder Windows, die auch Feeds versteht. Wer etwas kennt, bitte melden. Wer zudem etwas zum Thema hören möchte, für dem ist ggf. die Podcast-Folge "Der eigene Workflow" <sup id="fnref1:fnfeed_7"><a href="#fn:fnfeed_7" class="footnote-ref">7</a></sup> interessant.</p>
|
||||||
|
<div class="footnotes">
|
||||||
|
<hr />
|
||||||
|
<ol>
|
||||||
|
<li id="fn:fnfeed_1">
|
||||||
|
<p>Artikel zu Miniflux: <a href="Link"><a href="https://www.robbinaer.info/index.php?post/78">https://www.robbinaer.info/index.php?post/78</a></a> <a href="#fnref1:fnfeed_1" rev="footnote" class="footnote-backref">↩</a></p>
|
||||||
|
</li>
|
||||||
|
<li id="fn:fnfeed_2">
|
||||||
|
<p>OSBN: <a href="Link"><a href="https://osbn.de">https://osbn.de</a></a> <a href="#fnref1:fnfeed_2" rev="footnote" class="footnote-backref">↩</a></p>
|
||||||
|
</li>
|
||||||
|
<li id="fn:fnfeed_3">
|
||||||
|
<p>Miniflux: <a href="Link"><a href="https://miniflux.net">https://miniflux.net</a></a> <a href="#fnref1:fnfeed_3" rev="footnote" class="footnote-backref">↩</a></p>
|
||||||
|
</li>
|
||||||
|
<li id="fn:fnfeed_4">
|
||||||
|
<p>Fever: <a href="Link"><a href="https://feedafever.com">https://feedafever.com</a></a> <a href="#fnref1:fnfeed_4" rev="footnote" class="footnote-backref">↩</a></p>
|
||||||
|
</li>
|
||||||
|
<li id="fn:fnfeed_5">
|
||||||
|
<p>wallabag: <a href="Link"><a href="https://wallabag.org/de">https://wallabag.org/de</a></a> <a href="#fnref1:fnfeed_5" rev="footnote" class="footnote-backref">↩</a></p>
|
||||||
|
</li>
|
||||||
|
<li id="fn:fnfeed_6">
|
||||||
|
<p>Devonthink: <a href="Link"><a href="http://www.devontechnologies.com/de/produkte/devonthink/ueberblick.html">http://www.devontechnologies.com/de/produkte/devonthink/ueberblick.html</a></a> <a href="#fnref1:fnfeed_6" rev="footnote" class="footnote-backref">↩</a></p>
|
||||||
|
</li>
|
||||||
|
<li id="fn:fnfeed_7">
|
||||||
|
<p>Podcast MacMittwoch: <a href="Link"><a href="https://itunes.apple.com/de/podcast/macmittwoch/id1212750085?mt=2ueberblick.html">https://itunes.apple.com/de/podcast/macmittwoch/id1212750085?mt=2ueberblick.html</a></a> <a href="#fnref1:fnfeed_7" rev="footnote" class="footnote-backref">↩</a></p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
</article>
|
||||||
Vendored
+67
@@ -0,0 +1,67 @@
|
|||||||
|
|
||||||
|
<HTML>
|
||||||
|
<HEAD>
|
||||||
|
<TITLE>Alice's Adventures in Wonderland (Project Gutenberg)</TITLE>
|
||||||
|
</HEAD>
|
||||||
|
|
||||||
|
<frameset Rows="50, *">
|
||||||
|
<frame src="alice-finfo.html">
|
||||||
|
<frame src="alice-ftitle.html" name="alice-main">
|
||||||
|
</frameset>
|
||||||
|
|
||||||
|
<noframes>
|
||||||
|
<BODY>
|
||||||
|
<H1>Alice's Adventures in Wonderland</H1>
|
||||||
|
<H1>Lewis Carroll</H1>
|
||||||
|
<H1>The Millennium Fulcrum Edition 3.0</H1>
|
||||||
|
|
||||||
|
NOTE: This is a hypertext formatted version of the Project Gutenberg edition.
|
||||||
|
For more information, check the
|
||||||
|
<A HREF="alice-small.txt">small print</A>
|
||||||
|
or check out the
|
||||||
|
<A HREF="ftp://uiarchive.cso.uiuc.edu/pub/etext/gutenberg/etext91/alice30.txt">
|
||||||
|
full ascii text</A>. The original Tenniel illustrations are also available
|
||||||
|
due to the efforts of Project Gutenberg. You can if you like, grab them as a
|
||||||
|
<A HREF="ftp://uiarchive.cso.uiuc.edu/pub/etext/gutenberg/etext94/algif10.zip">
|
||||||
|
"zip file"</A> or read the <A HREF="algif-small.txt">small print</A>
|
||||||
|
that comes with them.
|
||||||
|
This document is part of a small, but growing collection of html formatted
|
||||||
|
etexts. (Others may be found in either my <A
|
||||||
|
HREF="http://www.cs.cmu.edu/Web/People/rgs/rgs-home.html">home page</A> or
|
||||||
|
John Ockerbloom's indexes by <A
|
||||||
|
HREF="http://www.cs.cmu.edu/Web/bookauthors.html">author</A> and <A
|
||||||
|
HREF="http://www.cs.cmu.edu/Web/booktitles.html">title</A>.)
|
||||||
|
I am still trying to figure out whether anyone else is interested in these
|
||||||
|
on-line readable documents. If you appreciate this document or would like to
|
||||||
|
see more such, send me mail at "rgs@cs.cmu.edu".
|
||||||
|
<P>
|
||||||
|
<A HREF="alice01a.gif"><IMG SRC="alice01th.gif"></A>
|
||||||
|
<P>
|
||||||
|
<H2>CONTENTS</H2>
|
||||||
|
<PRE>
|
||||||
|
CHAPTER I: <A HREF="alice-I.html">Down the Rabbit-Hole</A>
|
||||||
|
CHAPTER II: <A HREF="alice-II.html">The Pool of Tears</A>
|
||||||
|
CHAPTER III: <A HREF="alice-III.html">A Caucus-Race and a Long Tale</A>
|
||||||
|
CHAPTER IV: <A HREF="alice-IV.html">The Rabbit Sends in a Little Bill</A>
|
||||||
|
CHAPTER V: <A HREF="alice-V.html">Advice from a Caterpillar</A>
|
||||||
|
CHAPTER VI: <A HREF="alice-VI.html">Pig and Pepper</A>
|
||||||
|
CHAPTER VII: <A HREF="alice-VII.html">A Mad Tea-Party</A>
|
||||||
|
CHAPTER VIII: <A HREF="alice-VIII.html">The Queen's Croquet-Ground</A>
|
||||||
|
CHAPTER IX: <A HREF="alice-IX.html">The Mock Turtle's Story</A>
|
||||||
|
CHAPTER X: <A HREF="alice-X.html">The Lobster Quadrille</A>
|
||||||
|
CHAPTER XI: <A HREF="alice-XI.html">Who Stole the Tarts?</A>
|
||||||
|
CHAPTER XII: <A HREF="alice-XII.html">Alice's Evidence</A>
|
||||||
|
</PRE>
|
||||||
|
|
||||||
|
<ADDRESS><A HREF="mailto:rgs@cs.cmu.edu">Robert Stockton</A></ADDRESS>
|
||||||
|
<P>
|
||||||
|
<!- Access counter added 5/25 1:49am ->
|
||||||
|
<A href="http://www.dbasics.com/cgi-bin/pages.cgi?143205747"><IMG SRC="http://www.dbasics.com/cgi-bin/counter.cgi?143205747.2&(none)"></A> Access statistics from htmlZine
|
||||||
|
<!- This page has been visited
|
||||||
|
A HREF="http://counter.digits.com/wc?--info=yes&--name=rgsalice"
|
||||||
|
IMG SRC="http://counter.digits.com/wc/-d/4/-r/-z/rgsalice"
|
||||||
|
ALIGN=absmiddle WIDTH=60 HEIGHT=20 BORDER=0 HSPACE=4 ALT="????"/A
|
||||||
|
times since March 2, 1996. ->
|
||||||
|
</BODY>
|
||||||
|
</noframes>
|
||||||
|
</HTML>
|
||||||
Reference in New Issue
Block a user