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:
parent
2883c73a65
commit
a0942253ee
50 changed files with 6665 additions and 3 deletions
6
gammaphp
6
gammaphp
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue