h qw<mkpath>;
use File::Copy;
use Data::Dumper;
use Template::Plex;
use Template::Plexsite;
use JSON;
#use GetOpt::Long;
use feature ":all";
my $html_root="site";
#Takes a list or multiple input
:json_menu \%nav, \%url_table;
my $json_menu=encode_json $menu;
#write to site as menu file?
my $fh;
my $file=$html_root."/menu.json";
unless(open $fh, ">", $file){
warn "Could not create menu.json
file $file";
}
print $fh $json_menu;
close $fh;
html_unordered_list
html_ordered_list
build_time
section_start
section_end
div_script
html_menu
json_menu
>;
our @EXPORT=@EXPORT_OK;
sub html_unordered_list {
"<ul>"
.(Template::Plex::jmap
pairs $level->%*;
}
sub json_menu {
my ($nav, $url_table, $object)=@_;
my $first;
unless(defined $object){
$first=1;
$object={};
}
#Convert hash structure into json
#_data becomes data (