mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +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();
|
||||
}
|
||||
|
||||
#::: Open File
|
||||
my $filename = 'lua-api.md';
|
||||
open(my $fh, '>', $filename) or die "Could not open file '$filename' $!";
|
||||
|
||||
my $export = $ARGV[0];
|
||||
$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;
|
||||
foreach $method (@methods) {
|
||||
print $fh $method;
|
||||
print $method;
|
||||
}
|
||||
|
||||
print $fh "```\n\n";
|
||||
}
|
||||
|
||||
close $fh;
|
||||
|
||||
#::: Trim Whitespaces
|
||||
sub trim {
|
||||
my $string = $_[0];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user