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