| ... | ... |
@@ -225,8 +225,7 @@ function NewsSection($sourceHTML) {
|
| 225 | 225 |
downloadInnerHtml(filename, 'article-current','text/html'); |
| 226 | 226 |
} |
| 227 | 227 |
function printHTMLAll(channel) {
|
| 228 |
- var filename = channel+".html"; |
|
| 229 |
- downloadInnerHtmlAll(filename, 'text/html'); |
|
| 228 |
+ var win = window.open("sources/all-"+channel, '_blank');
|
|
| 230 | 229 |
} |
| 231 | 230 |
function printPDF() {
|
| 232 | 231 |
var filename = 'test.pdf' |
| ... | ... |
@@ -10,13 +10,13 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "conspiracy.html"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- //echo '<h4>' . $channel['title'] . '</h4>'; |
|
| 19 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 19 |
+ echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 20 | 20 |
$cpt=0; |
| 21 | 21 |
foreach ($xml->channel->item as $item) {
|
| 22 | 22 |
$article = array(); |
| ... | ... |
@@ -7,13 +7,13 @@ if ($xml === false) {
|
| 7 | 7 |
echo 'Failed to read RSS'; |
| 8 | 8 |
} else {
|
| 9 | 9 |
$channel = array(); |
| 10 |
+ $channel['name'] = "franceinfo.html"; |
|
| 10 | 11 |
$channel['title'] = $xml->channel->title; |
| 11 | 12 |
$channel['link'] = $xml->channel->link; |
| 12 | 13 |
$channel['description'] = $xml->channel->description; |
| 13 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 14 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 15 |
- //echo '<h4>' . $channel['title'] . '</h4>'; |
|
| 16 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 16 |
+ echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 17 | 17 |
$cpt=0; |
| 18 | 18 |
foreach ($xml->channel->item as $item) {
|
| 19 | 19 |
$article = array(); |
| ... | ... |
@@ -10,13 +10,13 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "huffingtonpostfr.html"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- //echo '<h4>' . $channel['title'] . '</h4>'; |
|
| 19 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 19 |
+ echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 20 | 20 |
$cpt=0; |
| 21 | 21 |
foreach ($xml->channel->item as $item) {
|
| 22 | 22 |
$article = array(); |
| ... | ... |
@@ -7,13 +7,13 @@ if ($xml === false) {
|
| 7 | 7 |
echo 'Failed to read RSS'; |
| 8 | 8 |
} else {
|
| 9 | 9 |
$channel = array(); |
| 10 |
+ $channel['name'] = "lemonde.html"; |
|
| 10 | 11 |
$channel['title'] = $xml->channel->title; |
| 11 | 12 |
$channel['link'] = $xml->channel->link; |
| 12 | 13 |
$channel['description'] = $xml->channel->description; |
| 13 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 14 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 15 |
- //echo '<h4>' . $channel['title'] . '</h4>'; |
|
| 16 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 16 |
+ echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 17 | 17 |
$cpt=0; |
| 18 | 18 |
foreach ($xml->channel->item as $item) {
|
| 19 | 19 |
$article = array(); |
| ... | ... |
@@ -7,13 +7,14 @@ if ($xml === false) {
|
| 7 | 7 |
echo 'Failed to read RSS'; |
| 8 | 8 |
} else {
|
| 9 | 9 |
$channel = array(); |
| 10 |
+ $channel['name'] = "lesinrocks.html"; |
|
| 10 | 11 |
$channel['title'] = $xml->channel->title; |
| 11 | 12 |
$channel['link'] = $xml->channel->link; |
| 12 | 13 |
$channel['description'] = $xml->channel->description; |
| 13 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 14 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 15 | 16 |
//echo '<h4>' . $channel['title'] . '</h4>'; |
| 16 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 17 |
+ echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 17 | 18 |
$cpt=0; |
| 18 | 19 |
foreach ($xml->channel->item as $item) {
|
| 19 | 20 |
$article = array(); |
| ... | ... |
@@ -7,11 +7,11 @@ if ($xml === false) {
|
| 7 | 7 |
echo 'Failed to read RSS'; |
| 8 | 8 |
} else {
|
| 9 | 9 |
$channel = array(); |
| 10 |
+ $channel['name'] = "liberation.html"; |
|
| 10 | 11 |
$channel['title'] = $xml->title; |
| 11 | 12 |
$channel['pubDate'] = $xml->updated; |
| 12 | 13 |
$channel['timestamp'] = strtotime($xml->updated); |
| 13 |
- //echo '<h4>' . $channel['title'] . '</h4>'; |
|
| 14 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 14 |
+ echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 15 | 15 |
$cpt=0; |
| 16 | 16 |
foreach ($xml->entry as $item) |
| 17 | 17 |
{
|
| ... | ... |
@@ -7,12 +7,13 @@ if ($xml === false) {
|
| 7 | 7 |
echo 'Failed to read RSS'; |
| 8 | 8 |
} else {
|
| 9 | 9 |
$channel = array(); |
| 10 |
+ $channel['name'] = "lobs.html"; |
|
| 10 | 11 |
$channel['title'] = $xml->channel->title; |
| 11 | 12 |
$channel['link'] = $xml->channel->link; |
| 12 | 13 |
$channel['description'] = $xml->channel->description; |
| 13 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 14 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 15 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.urlencode($channel['title']).'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 16 |
+ echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.urlencode($channel['name']).'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 16 | 17 |
$cpt=0; |
| 17 | 18 |
foreach ($xml->channel->item as $item) {
|
| 18 | 19 |
$article = array(); |
| ... | ... |
@@ -7,13 +7,13 @@ if ($xml === false) {
|
| 7 | 7 |
echo 'Failed to read RSS'; |
| 8 | 8 |
} else {
|
| 9 | 9 |
$channel = array(); |
| 10 |
+ $channel['name'] = "numerama.html"; |
|
| 10 | 11 |
$channel['title'] = $xml->channel->title; |
| 11 | 12 |
$channel['link'] = $xml->channel->link; |
| 12 | 13 |
$channel['description'] = $xml->channel->description; |
| 13 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 14 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 15 |
- //echo '<h4>' . $channel['title'] . '</h4>'; |
|
| 16 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 16 |
+ echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 17 | 17 |
$cpt=0; |
| 18 | 18 |
foreach ($xml->channel->item as $item) {
|
| 19 | 19 |
$article = array(); |
| ... | ... |
@@ -7,13 +7,13 @@ if ($xml === false) {
|
| 7 | 7 |
echo 'Failed to read RSS'; |
| 8 | 8 |
} else {
|
| 9 | 9 |
$channel = array(); |
| 10 |
+ $channel['name'] = "slatefr.html"; |
|
| 10 | 11 |
$channel['title'] = $xml->channel->title; |
| 11 | 12 |
$channel['link'] = $xml->channel->link; |
| 12 | 13 |
$channel['description'] = $xml->channel->description; |
| 13 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 14 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 15 |
- //echo '<h4>' . $channel['title'] . '</h4>'; |
|
| 16 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 16 |
+ echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 17 | 17 |
$cpt=0; |
| 18 | 18 |
foreach ($xml->channel->item as $item) {
|
| 19 | 19 |
$article = array(); |
| ... | ... |
@@ -10,13 +10,13 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "vicefr.html"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- //echo '<h4>' . $channel['title'] . '</h4>'; |
|
| 19 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 19 |
+ echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
| 20 | 20 |
$cpt=0; |
| 21 | 21 |
foreach ($xml->channel->item as $item) {
|
| 22 | 22 |
$article = array(); |
| ... | ... |
@@ -104,7 +104,7 @@ foreach ($articles as $article ) {
|
| 104 | 104 |
echo '<button id="pdf-btn" onclick="printPDF()" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
| 105 | 105 |
echo '<div id="nav-prev" onclick="onArticle('.$cpt_prev.')" style="display:inline;"><i class="fa fa-chevron-left fa-2x"></i></div> '.PHP_EOL;
|
| 106 | 106 |
echo '<div id="nav-next" onclick="onArticle('.$cpt_next.')" style="display:inline;"><i class="fa fa-chevron-right fa-2x"></i></div>'.PHP_EOL;
|
| 107 |
- echo '<div class="extract-content" id="'.$cpt.'">'.$article_only.'</div>'.PHP_EOL; |
|
| 107 |
+ echo '<div class="extract-content" id="'.$cpt.'"><h1>'.$article['title'].'</h1>'.$article_only.'</div>'.PHP_EOL; |
|
| 108 | 108 |
echo '<div id="nav-up" style="display:inline;"><a href="#top"><i class="fa fa-home fa-2x"></i></a></div> '.PHP_EOL; |
| 109 | 109 |
echo '<div id="nav-up" style="display:inline;"><a href="#article-top"><i class="fa fa-chevron-up fa-2x"></i></a></div> '.PHP_EOL; |
| 110 | 110 |
echo '<div id="nav-source" style="display:inline;"><a href="'.$article['link'].'" target="new-'.$cpt.'"><i class="fa fa-link fa-2x"></i></a></div> '.PHP_EOL; |
| ... | ... |
@@ -29,17 +29,22 @@ $html = "<html>".PHP_EOL; |
| 29 | 29 |
$html .= "<head>".PHP_EOL; |
| 30 | 30 |
$html .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'.PHP_EOL; |
| 31 | 31 |
$html .= '<meta name="viewport" content="width=device-width, initial-scale=1.0">'.PHP_EOL; |
| 32 |
+$html .= '<title>'.$source.'</title>'; |
|
| 32 | 33 |
$html .= '<style>'.PHP_EOL; |
| 33 | 34 |
$html .= 'html { font-family: "Lucida Sans", sans-serif; }'.PHP_EOL;
|
| 34 | 35 |
$html .= 'img { width: 80%; margin-left: auto; margin-right: auto; }'.PHP_EOL;
|
| 35 | 36 |
$html .= '.img-conspiracy { width: 50%; margin-left: 30%; margin-right: auto; }'.PHP_EOL;
|
| 36 | 37 |
$html .= 'iframe { width: 80%; margin-left: auto; margin-right: auto; }'.PHP_EOL;
|
| 38 |
+$html .= '.article-sep { width: 90%; border: 5px solid gray; margin-left: auto; margin-right: auto; margin-top: 100px;}'.PHP_EOL;
|
|
| 39 |
+$html .= '.article-ext { max-width: 800px;}'.PHP_EOL;
|
|
| 37 | 40 |
$html .= '</style>'.PHP_EOL; |
| 38 | 41 |
$html .= '</head>'.PHP_EOL; |
| 39 | 42 |
$html .= '<body>'.PHP_EOL; |
| 40 | 43 |
for($i=0; $i < $MAX_ITEMS; $i++ ) {
|
| 44 |
+ $html .= '<div class="article-ext">'.PHP_EOL; |
|
| 41 | 45 |
$html .= DOMInnerHTML($doc->getElementById($i)); |
| 42 |
- $html .= '<hr>'.PHP_EOL; |
|
| 46 |
+ $html .= '<div class="article-sep"></div>'.PHP_EOL; |
|
| 47 |
+ $html .= '</div>'.PHP_EOL; |
|
| 43 | 48 |
} |
| 44 | 49 |
$html .= '</body>'.PHP_EOL; |
| 45 | 50 |
$html .= '</html>'.PHP_EOL; |