new commit (forgot what is different since the previous commit, but i think some edits on code like actions, rotation fix, etc.

This commit is contained in:
GZod01 2025-02-07 15:30:52 +01:00
parent 2883c73a65
commit a0942253ee
50 changed files with 6665 additions and 3 deletions

View file

@ -1,9 +1,8 @@
#!/usr/bin/env php
<?php
include "/home/aurel/vendor/autoload.php";
function get_opts() {
$opts = array();
foreach($_SERVER["argv"] as $k => $a){
foreach(is_string($_SERVER["argv"])?explode(" ",$_SERVER["argv"]):$_SERVER["argv"] as $k => $a){
if(preg_match( '@\-\-(.+)=(.+)@' , $a, $m))
$opts[$m[1]] = $m[2];
elseif(preg_match( '@\-\-(.+)@' , $a, $m))
@ -19,7 +18,7 @@ function get_opts() {
}
$opt = [];
$opt =get_opts();
$sitedir= isset($opt["source"])?$opt["source"]:(isset($opt["s"])?$opt["s"]:getcwd());
$sitedir=$opt["source"]??($opt["s"]??getcwd());
$sitedir = str_starts_with($sitedir, "/")?$sitedir:getcwd()."/".$sitedir;
if (isset($argv[1])) {
switch ($argv[1]) {
@ -190,3 +189,4 @@ function createFiles($basepath, $staticmode = false)
$finalsitemap = $sitemapstart . $sitemap . $sitemapend;
file_put_contents($publishpath . "sitemap.xml", $finalsitemap);
}