Update buildreadme.php
This commit is contained in:
parent
e9cc9c5626
commit
8dff45d8dc
|
@ -19,19 +19,22 @@ $poems=$matches[1];
|
||||||
$endB="";
|
$endB="";
|
||||||
$f=file("README.md");
|
$f=file("README.md");
|
||||||
$writeStuff=true;
|
$writeStuff=true;
|
||||||
$i=1;
|
|
||||||
foreach($f as $line){
|
foreach($f as $line){
|
||||||
if(trim($line)=="<!-- BEGIN POEMLIST -->"){
|
if(trim($line)=="<!-- BEGIN POEMLIST -->"){
|
||||||
$writeStuff=false;
|
$writeStuff=false;
|
||||||
$endB.=$line;
|
$endB.=$line;
|
||||||
foreach($poems as $p) $endB.="* $i ".$p."\n";
|
$i=1;
|
||||||
|
foreach($poems as $p){
|
||||||
|
$endB.="* ".$i." ".$p."\n";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($writeStuff) $endB.=$line;
|
if($writeStuff) $endB.=$line;
|
||||||
if(trim($line)=="<!-- END POEMLIST -->"){
|
if(trim($line)=="<!-- END POEMLIST -->"){
|
||||||
$endB.=$line;
|
$endB.=$line;
|
||||||
$writeStuff=true;
|
$writeStuff=true;
|
||||||
}
|
}
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents("README.md",$endB);
|
file_put_contents("README.md",$endB);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user