<commit_before><?php

error_reporting(E_ALL);

function dd($var)
{
    var_dump($var);
    die();
}

function array_get($arr, $key, $default = null)
{
    return isset($arr[$key]) ? $arr[$key] : $default;
}

// Routing for php's built in web server
$ext = array_get(pathinfo($_SERVER['REQUEST_URI']), 'extension');
if (in_array($ext, ['png', 'jpg', 'jpeg', 'css', 'js', 'gif', 'html'])) {
    return false;
}

require_once('app.php');

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/png" href="favicon.png">
    <link href="http://eventcal.flown.io/appicon.png" rel="icon" sizes="192x192"/>
    <link href="style.css" rel="stylesheet" type="text/css">
    <title>Facebook Event Calendar</title>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description"
          content="Subscribe to a subset of your Facebook events using ical. Filters out events you are not attending to or has not responded to.">
</head>
<body>

<div class="container">

    <h1><img src="appicon.png">Facebook Event Calendar</h1>

    <p class="sub-header">Subscribe to a subset of your Facebook events using ical</p>

    <p class="main-desc">
        Facebook provides a way to export and sync all your events to a third party calendar application such as Google
        Calendar. However you can't choose which events you want to sync and that's where this service steps in.<br><br>
        Right know it simply removes events you have not responded to yet as you probably won't attend them. If you want
        to filter events in some other
        way, let me know on <a href="https://google.com/+simonbengtsson">Google+</a> or
        <a href="https://twitter.com/someatoms">Twitter</a>.
    </p>

    <form id="calendar-form">
        <label for="fb-calendar">Facebook calendar</label><br>
        <input id="fb-calendar">

        <p class="help-block">
            To get your facebook calendar link follow <a href="https://www.facebook.com/help/152652248136178">these</a>
            instructions. Your calendar link should look something like this
            <em>webcal://www.facebook.com/ical/u.php?uid=1645531053&key=<KEY></em>
        </p>
    </form>

    <label for="filtered-calendar">Filtered calendar</label><br>
    <input id="filtered-calendar" readonly>
<commit_msg>Add a link to Facebook Help Center<commit_after><?php

error_reporting(E_ALL);

function dd($var)
{
    var_dump($var);
    die();
}

function array_get($arr, $key, $default = null)
{
    return isset($arr[$key]) ? $arr[$key] : $default;
}

// Routing for php's built in web server
$ext = array_get(pathinfo($_SERVER['REQUEST_URI']), 'extension');
if (in_array($ext, ['png', 'jpg', 'jpeg', 'css', 'js', 'gif', 'html'])) {
    return false;
}

require_once('app.php');

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/png" href="favicon.png">
    <link href="http://eventcal.flown.io/appicon.png" rel="icon" sizes="192x192"/>
    <link href="style.css" rel="stylesheet" type="text/css">
    <title>Facebook Event Calendar</title>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description"
          content="Subscribe to a subset of your Facebook events using ical. Filters out events you are not attending to or has not responded to.">
</head>
<body>

<div class="container">

    <h1><img src="appicon.png">Facebook Event Calendar</h1>

    <p class="sub-header">Subscribe to a subset of your Facebook events using ical</p>

    <p class="main-desc">
        Facebook provides <a href="https://www.facebook.com/help/152652248136178/">a way to export</a> and sync all your events to a third party calendar application such as Google
        Calendar. However you can't choose which events you want to sync and that's where this service steps in.<br><br>
        Right know it simply removes events you have not responded to yet as you probably won't attend them. If you want
        to filter events in some other
        way, let me know on <a href="https://google.com/+simonbengtsson">Google+</a> or
        <a href="https://twitter.com/someatoms">Twitter</a>.
    </p>

    <form id="calendar-form">
        <label for="fb-calendar">Facebook calendar</label><br>
        <input id="fb-calendar">

        <p class="help-block">
            To get your facebook calendar link follow <a href="https://www.facebook.com/help/152652248136178">these</a>
            instructions. Your calendar link should look something like this
            <em>webcal://www.facebook.com/ical/u.php?uid=1645531053&key=AQDdB7kP2hjd14uh</em>
        </p>
    </form>

    <label for="filtered-calendar">Filtered calendar</label><br>
    <input id="filtered-calendar" readonly>

{'fraction_non_alphanumeric': 0.15059116365899192, 'fraction_numerical': 0.01846090022816843, 'mean_word_length': 3.5923809523809522, 'pattern_counts': {'":': 0, '<': 94, '<?xml version=': 0, '>': 94, 'https://': 7, 'lorem ipsum': 0, 'www.': 5, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2676835', 'n_tokens_mistral': 1595, 'n_tokens_neox': 1481, 'n_words': 449}