parent
1b6c2fee28
commit
54283eeaa5
23
epub.php
23
epub.php
|
@ -41,6 +41,9 @@
|
|||
// Le Monde
|
||||
if (isset($_POST['lemonde']) && $_POST['lemonde'])
|
||||
{
|
||||
// hardcoded for now
|
||||
$includeimages = false;
|
||||
$includecover = false;
|
||||
$url = $_POST['lmurl'];
|
||||
|
||||
// extract url from curl command
|
||||
|
@ -55,7 +58,7 @@
|
|||
$epub->epub_file = 'epub/lemonde.epub';
|
||||
$epub->title = 'Le Monde ' . $date ;
|
||||
|
||||
if ($lm_includecover)
|
||||
if ($includecover)
|
||||
{
|
||||
// todo get correct cover according to date and time
|
||||
$coverurl = 'https://www.lemonde.fr/thumbnail/journal/'. $date .'/1000/1490';
|
||||
|
@ -101,7 +104,7 @@
|
|||
$pagecontent .= '<b>' . $articlebody->Introduction . '</b>';
|
||||
}
|
||||
|
||||
if ($lm_includeimages)
|
||||
if ($includeimages)
|
||||
{
|
||||
$images = array_values(array_filter($article->ContentItem, function($item) { return $item->ContentType == 'graphic/jpeg' || $item->ContentType == 'image/jpeg'; }));
|
||||
foreach ($images as $image)
|
||||
|
@ -363,17 +366,6 @@
|
|||
}
|
||||
?>
|
||||
|
||||
<h3>Existing Files</h3>
|
||||
<div>
|
||||
<?php
|
||||
$files = glob('epub/*');
|
||||
foreach ($files as $file)
|
||||
{
|
||||
echo date('F d Y H:i:s', filemtime($file)) . ' <a href="' . $file . '">' . str_replace('epub/', '', $file) . '</a><br>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<h3>Generate epub</h3>
|
||||
<div>
|
||||
<form method="post">
|
||||
|
@ -381,6 +373,8 @@
|
|||
Parameters:
|
||||
<br>
|
||||
GetPublicationContentItems url: <input name="lmurl"><br>
|
||||
<!--Update MPSESSID: <input name="mpsessid"><br>
|
||||
Update NYT-S: <input name="nyts"><br>-->
|
||||
<br>
|
||||
|
||||
Newspapers:
|
||||
|
@ -404,5 +398,8 @@
|
|||
<input type="submit">
|
||||
</form>
|
||||
</div>
|
||||
<br>
|
||||
<a href="../epub">Fichiers générés</a><br>
|
||||
<a href="../">Revue de presse</a>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +1,4 @@
|
|||
<?php
|
||||
$lm_includeimages = false;
|
||||
$lm_includecover = false;
|
||||
$mp_sessionid = '';
|
||||
$nyt_sessionid = ''
|
||||
?>
|
Loading…
Reference in New Issue