formatting
This commit is contained in:
parent
d4494799a9
commit
2f75267251
12
reader
12
reader
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
$VENDOR_DIR = "/../vendor/";
|
||||
$VENDOR_DIR = "/../vendor/";
|
||||
# ^^^^^^^ Path to the folder containing composer packages
|
||||
|
||||
|
||||
|
@ -39,10 +39,16 @@ try {
|
|||
|
||||
$title = $readability->getTitle();
|
||||
$author = $readability->getAuthor();
|
||||
if ($title === null) { $title = ""; } else { $title = "# " . $title . "\n"; }
|
||||
if ($author === null) { $author = "\n"; } else { $author = "\n## By " . $author . "\n\n"; }
|
||||
|
||||
if ($title === null) { $title = ""; }
|
||||
else { $title = "# " . $title . "\n"; }
|
||||
|
||||
if ($author === null) { $author = "\n"; }
|
||||
else { $author = "\n## By " . $author . "\n\n"; }
|
||||
|
||||
echo $title;
|
||||
echo $author;
|
||||
|
||||
$dom = $readability->getDOMDocument();
|
||||
$paragraphs = $dom->getElementsByTagName("p");
|
||||
$images = $readability->getImages();
|
||||
|
|
Loading…
Reference in New Issue