change parameters

change links
This commit is contained in:
quenousimporte 2024-06-05 12:10:54 +02:00
parent 1b6c2fee28
commit 54283eeaa5
2 changed files with 10 additions and 15 deletions

View File

@ -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>

View File

@ -1,6 +1,4 @@
<?php
$lm_includeimages = false;
$lm_includecover = false;
$mp_sessionid = '';
$nyt_sessionid = ''
?>