formatting

This commit is contained in:
sose 2021-04-02 21:16:14 +00:00
parent d4494799a9
commit 2f75267251
1 changed files with 9 additions and 3 deletions

12
reader
View File

@ -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();