Add file export to lua-api.md

This commit is contained in:
Akkadius 2018-07-02 01:15:00 -05:00
parent 3443d8eb25
commit 2d7267cb4e

View File

@ -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];