<commit_before># vim:ts=4:sw=4:expandtab
# x11vis - an X11 protocol visualizer
# © 2011 <NAME> and contributors (see ../LICENSE)
#
# XXX: This is just a proof of concept implementation to providing the
# XXX: webinterface. It’s quick and dirty and needs to be cleaned up.
#
package Web;

use strict;
use warnings;
use Dancer ':syntax';
use x11vis;
use IO::All;
use v5.10;

get '/' => sub {
    # for now, we redirect to /gui/
    redirect '/gui/';
};

get '/gui/' => sub {
    return io('../gui/poc.html')->slurp;
};

get '/gui/:file' => sub {
    if (params->{file} =~ /\.css$/) {
        header 'Content-Type' => 'text/css';
    }
    #sendfile('../gui/' . params->{file});
    return io('../gui/' . params->{file})->slurp;
};
<commit_msg>remove obsolete use of x11vis.pm<commit_after># vim:ts=4:sw=4:expandtab
# x11vis - an X11 protocol visualizer
# © 2011 <NAME> and contributors (see ../LICENSE)
#
# XXX: This is just a proof of concept implementation to providing the
# XXX: webinterface. It’s quick and dirty and needs to be cleaned up.
#
package Web;

use strict;
use warnings;
use Dancer ':syntax';
use IO::All;
use v5.10;

get '/' => sub {
    # for now, we redirect to /gui/
    redirect '/gui/';
};

get '/gui/' => sub {
    return io('../gui/poc.html')->slurp;
};

get '/gui/:file' => sub {
    if (params->{file} =~ /\.css$/) {
        header 'Content-Type' => 'text/css';
    }
    #sendfile('../gui/' . params->{file});
    return io('../gui/' . params->{file})->slurp;
};

{'fraction_non_alphanumeric': 0.19476158495634655, 'fraction_numerical': 0.020147750167897917, 'mean_word_length': 2.9210526315789473, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '6501888', 'n_tokens_mistral': 558, 'n_tokens_neox': 534, 'n_words': 166}