<commit_before><?php

$baseDir = '../../';
$templateDir = $baseDir . 'views';

require_once __DIR__ . '/' . $baseDir . 'vendor/autoload.php';

use Jadu\Pulsar\Twig\Extension\ConfigExtension;
use Jadu\Pulsar\Twig\Extension\RelativeTimeExtension;
use Jadu\Pulsar\Twig\Extension\UrlParamsExtension;
use Jadu\Pulsar\Twig\Extension\TabsExtension;

$loader = new Twig_Loader_Filesystem($templateDir);
$loader->addPath($templateDir, 'pulsar');

$twig = new Twig_Environment($loader, array('debug' => true));

$twig->addExtension(new ConfigExtension($baseDir . 'pulsar.json'));
$twig->addExtension(new RelativeTimeExtension());
$twig->addExtension(new UrlParamsExtension($_GET));
$twig->addExtension(new TabsExtension());
$twig->addExtension(new Twig_Extension_Debug());

$template = $twig->loadTemplate('homepages/main.html.twig');

$breadcrumb = array(
    'Pulsar' => '/',
    'Homepage Designer' => null
    );

$widgets = array(
    array(
        'id' => 'analytics',
        'title' => 'Analytics',
        'widgets' => array(
            array(
                'id' => 'browsers',
                'title' => 'Browser Usage',
                'source' => 'browsers.html.twig',
                'price' => '0',
                'description' => 'Show which browsers your users have used to visit your site.'
            )
        )
    ),
    array(
        'id' => 'search',
        'title' => 'Search',
        'widgets' => array(
            array(
                'id' => 'trending',
                'title' => 'Trending Searches',
                'source' => 'trending.html.twig',
                'price' => '9.99',
                'description' => 'Show which search terms are currently popular on your site(s).'
            )
        )
    ),
    array(
        'id' => 'system',
        'title' => 'System Information',
        'widgets' => array(
            array(
                'id' => 'cpu',
                'title' => 'CPU Load',
                'source' => 'cpu.html.twig',
                'price' => '0',
                'description' => 'Shows how hard your server is working at the moment.'
            ),
            array(
                'id' => 'galaxies_count',
                'title' => 'Galaxies Sites',
                'source' => 'galaxies.html.twig',
                'price' => '0',
                'description' => 'Shows how many Galaxies sites are currently active.'
            )                
        )
    ),
    array(
        'id' => 'users',
        'title' => 'User Information',
        'widgets' => array(
            array(
                'id' => 'admins',
                'title' => 'Admins',
                'source' => 'admins.html.twig',
                'price' => '0',
                'description' => 'Show how many administrators you have.'
            )                
        )
    )
);

print $template->render(array(
    'breadcrumb' => $breadcrumb,
    'widgets' => $widgets
    ));
<commit_msg>Add new widgets object which includes GUID<commit_after><?php

$baseDir = '../../';
$templateDir = $baseDir . 'views';

require_once __DIR__ . '/' . $baseDir . 'vendor/autoload.php';

use Jadu\Pulsar\Twig\Extension\ConfigExtension;
use Jadu\Pulsar\Twig\Extension\RelativeTimeExtension;
use Jadu\Pulsar\Twig\Extension\UrlParamsExtension;
use Jadu\Pulsar\Twig\Extension\TabsExtension;

$loader = new Twig_Loader_Filesystem($templateDir);
$loader->addPath($templateDir, 'pulsar');

$twig = new Twig_Environment($loader, array('debug' => true));

$twig->addExtension(new ConfigExtension($baseDir . 'pulsar.json'));
$twig->addExtension(new RelativeTimeExtension());
$twig->addExtension(new UrlParamsExtension($_GET));
$twig->addExtension(new TabsExtension());
$twig->addExtension(new Twig_Extension_Debug());

$template = $twig->loadTemplate('homepages/main.html.twig');

$breadcrumb = array(
    'Pulsar' => '/',
    'Homepage Designer' => null
    );

$widgets = array(
    array(
        'id' => 'analytics',
        'title' => 'Analytics',
        'widgets' => array(
            array(
                'guid' => 'browsers',
                'version' => '0.0.1',
                'title' => 'Browser Usage',
                'price' => '0',
                'description' => 'Show which browsers your users have used to visit your site.'
            ),
            array(
                'guid' => 'fillmurray',
                'version' => '0.0.1',
                'title' => 'Fill Murray',
                'price' => '0',
                'description' => 'Some Bill Murray Placeholder'
            )
        )
    ),
    array(
        'id' => 'search',
        'title' => 'Search',
        'widgets' => array(
            array(
                'guid' => 'trending',
                'version' => '0.0.1',
                'title' => 'Trending Searches',
                'price' => '9.99',
                'description' => 'Show which search terms are currently popular on your site(s).'
            )
        )
    ),
    array(
        'id' => 'system',
        'title' => 'System Information',
        'widgets' => array(
            array(
                'guid' => 'cpu',
                'version' => '0.0.1',
                'title' => 'CPU Load',
                'price' => '0',
                'description' => 'Shows how hard your server is working at the moment.'
            ),
            array(
                'guid' => 'galaxies_count',
                'version' => '0.0.1',
                'title' => 'Galaxies Sites',
                'price' => '0',
                'description' => 'Shows how many Galaxies sites are currently active.'
            )                
        )
    ),
    array(
        'id' => 'users',
        'title' => 'User Information',
        'widgets' => array(
            array(
                'guid' => 'admins',
                'version' => '0.0.1',
                'title' => 'Admins',
                'price' => '0',
                'description' => 'Show how many administrators you have.'
            )                
        )
    )
);

print $template->render(array(
    'breadcrumb' => $breadcrumb,
    'widgets' => $widgets
    ));

{'fraction_non_alphanumeric': 0.16090642321486795, 'fraction_numerical': 0.005379850016302576, 'mean_word_length': 1.7194148936170213, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 108, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1168534', 'n_tokens_mistral': 1887, 'n_tokens_neox': 1826, 'n_words': 387}