mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-17 22:51:30 +00:00
Add file export to lua-api.md
This commit is contained in:
parent
3443d8eb25
commit
2d7267cb4e
@ -36,6 +36,10 @@ if($#ARGV < 0) {
|
|||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#::: Open File
|
||||||
|
my $filename = 'lua-api.md';
|
||||||
|
open(my $fh, '>', $filename) or die "Could not open file '$filename' $!";
|
||||||
|
|
||||||
my $export = $ARGV[0];
|
my $export = $ARGV[0];
|
||||||
$export=~s/--//g;
|
$export=~s/--//g;
|
||||||
|
|
||||||
@ -210,12 +214,24 @@ for my $file (@files) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#::: Header
|
||||||
|
$header = $split_key;
|
||||||
|
$header =~s/:://g;
|
||||||
|
|
||||||
|
print $fh "# " . $header . "\n";
|
||||||
|
print $fh "```lua\n";
|
||||||
|
|
||||||
@methods = sort @methods;
|
@methods = sort @methods;
|
||||||
foreach $method (@methods) {
|
foreach $method (@methods) {
|
||||||
|
print $fh $method;
|
||||||
print $method;
|
print $method;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print $fh "```\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close $fh;
|
||||||
|
|
||||||
#::: Trim Whitespaces
|
#::: Trim Whitespaces
|
||||||
sub trim {
|
sub trim {
|
||||||
my $string = $_[0];
|
my $string = $_[0];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user