|
|
@ -105,46 +105,21 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<button onclick="window.open('file:///home/angeliki/.local/bin/podcast')">
|
|
|
|
<button>
|
|
|
|
make your own podcast
|
|
|
|
make your own podcast
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div>latest episode</div>
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
//insert the folder HERE
|
|
|
|
//insert the folder HERE
|
|
|
|
$files = scandir("project/podcasts", SCANDIR_SORT_DESCENDING);
|
|
|
|
$files = scandir("project/podcasts", SCANDIR_SORT_DESCENDING);
|
|
|
|
$newest_file = $files[0];
|
|
|
|
$newest_file = $files[0];
|
|
|
|
echo $newest_file
|
|
|
|
echo "<audio controls src='project/podcasts/$newest_file'></audio>";
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
echo "My first PHP script!";
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script >
|
|
|
|
|
|
|
|
var fs = require('fs'),
|
|
|
|
|
|
|
|
path = require('project/podcasts/'),
|
|
|
|
|
|
|
|
_ = require('underscore');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Return only base file name without dir
|
|
|
|
|
|
|
|
function getMostRecentFileName(dir) {
|
|
|
|
|
|
|
|
var files = fs.readdirSync(dir);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// use underscore for max()
|
|
|
|
|
|
|
|
return _.max(files, function (f) {
|
|
|
|
|
|
|
|
var fullpath = path.join(dir, f);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ctime = creation time is used
|
|
|
|
|
|
|
|
// replace with mtime for modification time
|
|
|
|
|
|
|
|
return fs.statSync(fullpath).ctime;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|