<commit_before><?php
include_once('common.php');
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$device = 'device';

if(strpos($ua, 'curl') !== False) {
  echo "The current stations are healthy:\n\n";
  foreach(active_stations() as $station) {
    echo ' * http://indycast.net/' . $station['callsign'] . "/\n";
  }
  echo "\nQuery the /help end-point to see\nsupported features on a per-station basis.\n\nThanks for using $ua ;-).\n";
  exit(0);
}
if(strpos($ua, 'mobile') !== False) {
  $device = 'smartphone';
}
if(strpos($ua, 'android') !== False) {
  $device = 'Android smartphone';
}
if(strpos($ua, 'iOS') !== False or strpos($ua, 'iPhone') != False) {
  $device = 'Apple device';
}
if(strpos($ua, 'windows') !== False) {
  $device = 'Windows machine';
}

if(isset($_GET['callsign'])) {
  $callsign = $_GET['callsign'];
} else {
  $callsign = '';
}
?>
<!DOCTYPE HTML>
<html>
  <head>
    <title>Indycast - Podcasting <?= $callsign ? strtoupper($callsign) : "the World's Independent Radio" ?></title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--[if lte IE 8]><script src="/assets/js/ie/html5shiv.js"></script><![endif]-->
    <link rel="stylesheet" href="/assets/css/main.css" />
    <!--[if lte IE 8]><link rel="stylesheet" href="/assets/css/ie8.css" /><![endif]-->

    <meta name="description" content="<?= $callsign ? strtoupper($callsign) : "the World's Independent Radio" ?> - podcasted." />
    <meta property="og:site_name" content="Indycast" />
    <meta property="og:url" content="http://indycast.net" />
    <meta property="og:title" content="Indycast - Podcasting <?= $callsign ? strtoupper($callsign) : "the World's Independent Radio" ?>" />
    <meta property="og:type" content="website" />
    <meta property="og:description" content="Subscribe to your favorite <?= $callsign ?> shows. Listen on your time, not airtime." />
    <meta property="og:image" content="http://indycast.net/og-image.php" />
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:site" content="@indycaster" />
    <meta name="twitter:creator" content="@indycaster" />
    <meta name="twitter:title" content="Indycast - Podcasting <?= $callsign ? strtoupper($callsign) : "the World's Independent Radio" ?>" />
    <meta name="twitter:url" content="http://indycast.net" />
    <meta name="twitter:description" content="Subscribe to your <?= $callsign ?> favorite shows. Listen on your time, not airtime." />
    <meta name="twitter:image:src" content="http://indycast.net/images/twit-image.jpg" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="favicon.ico" >
  </head>
  <body>
    <div id="header">
      <h1>Indycast Radio</h1>
      <p>A free service podcasting <?= $callsign ? strtoupper($callsign) : "the World's Independent Radio" ?>
      <?php if ($callsign) { ?><br/><small>(<a href="/">and more</a>)</small><?php } ?></p>
      <small>Works on your <?= $device ?>. No signup or app needed.</small>
    </div>

    <div id="main">

      <header class="major container 75%">
        <h2>
        Listen on your time and
        <br />
        Never miss that <?= $callsign ?> show again!
        </h2>
      </header>

      <div class="box alt container"><?php 
      if(!$callsign) { ?>
        <section class="feature left">
          <a href="#" class="image icon fa-signal"><img src="/images/pic01.jpg" alt="" /><div id="description"></div></a>
          <div class="content">
            <h3>Choose the station</h3>
            <div id='station-search-box'>
              <i class="fa fa-search"></i>
              <input type="text" placeholder="Search" id='station-query'>
            </div>
            <ul class="radio-group group" id="station"><?php
              foreach(active_stations() as $station) {
                echo '<li><a desc="' . $station['description'] . '" class="button">' . ($station['callsign']) . '</a></li>';
              }
            ?></ul>
            <a href="#volunteer">Volunteer to add a station!</a>
          </div>
        </section>
        <?php } ?>
        <section class="feature right">
          <a href="#" class="image icon fa-clock-o"><img src="/images/pic02.jpg" alt="" /></a>
          <div class="content" id='day-picker'>

            <label for="day">day of week to record on</label>
            <ul class="week-group" id="day">
              <li><a class="button">sun</a></li>
              <li><a class="button">mon</a></li>
              <li><a class="button">tue</a></li>
              <li><a class="button">wed</a></li>
              <li><a class="button">thu</a></li>
              <li><a class="button">fri</a></li>
              <li><a class="button">sat</a></li>
            </ul>
            <div id='time'>
              <label for="start">Starting at</label>
              <div id='time-controls'>
                <input class="text" size=4 type="text" name="start" id="start" value="" placeholder="ex: 3:30 PM" /><ul class="week-group group inline" id="ampm">
                  <li><a class="button">am</a></li>
                  <li><a class="button">pm</a></li>
                </ul>
              </div>

            </div>
            <label for="duration">For how long</label>
            <ul class="week-group group" id="duration">
              <li><a data="30" class="button">30 min</a></li>
              <li><a data="1hr" class="button">1 hr</a></li>
              <li><a data="1hr30" class="button">1&frac12; hrs</a></li>
              <li><a data="2hr" class="button">2 hrs</a></li>
            </ul>
          </div>
        </section>
        <section class="feature left">
          <a href="#" class="image icon fa-mobile"><img src="/images/pic03.jpg" alt="" /></a>
          <div class="content">
            <h3>Give it a name</h3>
            <input class="text" type="text" name="name" id="name" value="" placeholder="ex. Alien Air Music" />
          </div>
        </section>
      </div>
      <footer class="major container">
        <div id="podcast-done">
          <h3>Your podcast link</h3>
          <a id="podcast-url"></a>
        </div>
        <div id="podcast-notdone">
          <h3>The podcast will appear here</h3>
          <p>Please select desired day<?= $callsign ? '' : ', station, ' ?> and time above.</p>
        </div>
      </footer>

    </div>

    <div id="footer">
      <div class="container 75%">

        <header class="major last">
          <h2>About</h2>
        </header>
        <div style="text-align: left">
          <p>Due to their limited resources, much of independent radio is not syndicated or available after broadcast.  We want to enjoy the benefits of time-shifted programming on these stations.</p>

          <a name="volunteer"></a><h3>How it works</h3>
          <p>The web stream of the station is recorded and then saved and delivered for personal use.  Every station is a different server which acts in a federation.</p>

          <h3>Who runs this</h3><commit_msg>Cleanup of main site<commit_after><?php
include_once('common.php');
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$device = 'device';

if(strpos($ua, 'curl') !== False) {
  echo "The current stations are healthy:\n\n";
  foreach(active_stations() as $station) {
    echo ' * http://indycast.net/' . $station['callsign'] . "/\n";
  }
  echo "\nQuery the /help end-point to see\nsupported features on a per-station basis.\n\nThanks for using $ua ;-).\n";
  exit(0);
}
if(strpos($ua, 'mobile') !== False) {
  $device = 'smartphone';
}
if(strpos($ua, 'android') !== False) {
  $device = 'Android smartphone';
}
if(strpos($ua, 'iOS') !== False or strpos($ua, 'iPhone') != False) {
  $device = 'Apple device';
}
if(strpos($ua, 'windows') !== False) {
  $device = 'Windows machine';
}

if(isset($_GET['callsign'])) {
  $callsign = $_GET['callsign'];
} else {
  $callsign = '';
}
?>
<!DOCTYPE HTML>
<html>
  <head>
    <title>Indycast - Podcasting <?= $callsign ? strtoupper($callsign) : "the World's Independent Radio" ?></title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--[if lte IE 8]><script src="/assets/js/ie/html5shiv.js"></script><![endif]-->
    <link rel="stylesheet" href="/assets/css/main.css" />
    <!--[if lte IE 8]><link rel="stylesheet" href="/assets/css/ie8.css" /><![endif]-->

    <meta name="description" content="<?= $callsign ? strtoupper($callsign) : "the World's Independent Radio" ?> - podcasted." />
    <meta property="og:site_name" content="Indycast" />
    <meta property="og:url" content="http://indycast.net" />
    <meta property="og:title" content="Indycast - Podcasting <?= $callsign ? strtoupper($callsign) : "the World's Independent Radio" ?>" />
    <meta property="og:type" content="website" />
    <meta property="og:description" content="Subscribe to your favorite <?= $callsign ?> shows. Listen on your time, not airtime." />
    <meta property="og:image" content="http://indycast.net/og-image.php" />
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:site" content="@indycaster" />
    <meta name="twitter:creator" content="@indycaster" />
    <meta name="twitter:title" content="Indycast - Podcasting <?= $callsign ? strtoupper($callsign) : "the World's Independent Radio" ?>" />
    <meta name="twitter:url" content="http://indycast.net" />
    <meta name="twitter:description" content="Subscribe to your <?= $callsign ?> favorite shows. Listen on your time, not airtime." />
    <meta name="twitter:image:src" content="http://indycast.net/images/twit-image.jpg" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="favicon.ico" >
  </head>
  <body>
    <div id="header">
      <h1>Indycast Radio</h1>
      <p>A free service podcasting <?= $callsign ? strtoupper($callsign) : "the World's Independent Radio" ?>
      <?php if ($callsign) { ?><br/><small>(<a href="/">and more</a>)</small><?php } ?></p>
      <small>Works on your <?= $device ?>. No signup or app needed.</small>
    </div>

    <div id="main">

      <header class="major container 75%">
        <h2>
        Listen on your time and
        <br />
        Never miss that <?= $callsign ?> show again!
        </h2>
      </header>

      <div class="box alt container"><?php 
      if(!$callsign) { ?>
        <section class="feature left">
          <a href="#" class="image icon fa-signal"><img src="/images/pic01.jpg" alt="" /><div id="description"></div></a>
          <div class="content">
            <h3>Choose the station</h3>
            <div id='station-search-box'>
              <i class="fa fa-search"></i>
              <input type="text" placeholder="Search" id='station-query'>
            </div>
            <ul class="radio-group group" id="station"><?php
              foreach(active_stations() as $station) {
                echo '<li><a desc="' . $station['description'] . '" class="button">' . ($station['callsign']) . '</a></li>';
              }
            ?></ul>
            <a href="#volunteer">Volunteer to add a station!</a>
          </div>
        </section>
        <?php } ?>
        <section class="feature right">
          <a href="#" class="image icon fa-clock-o"><img src="/images/pic02.jpg" alt="" /></a>
          <div class="content" id='day-picker'>

            <label for="day">day of week to record on</label>
            <ul class="week-group" id="day">
              <li><a class="button">sun</a></li>
              <li><a class="button">mon</a></li>
              <li><a class="button">tue</a></li>
              <li><a class="button">wed</a></li>
              <li><a class="button">thu</a></li>
              <li><a class="button">fri</a></li>
              <li><a class="button">sat</a></li>
            </ul>
            <div id='time'>
              <label for="start">Starting at</label>
              <div id='time-controls'>
                <input class="text" size=4 type="text" name="start" id="start" value="" placeholder="ex: 3:30 PM" /><ul class="week-group group inline" id="ampm">
                  <li><a class="button">am</a></li>
                  <li><a class="button">pm</a></li>
                </ul>
              </div>

            </div>
            <label for="duration">For how long</label>
            <ul class="week-group group" id="duration">
              <li><a data="30" class="button">30 min</a></li>
              <li><a data="1hr" class="button">1 hr</a></li>
              <li><a data="1hr30" class="button">1&frac12; hrs</a></li>
              <li><a data="2hr" class="button">2 hrs</a></li>
            </ul>
          </div>
        </section>
        <section class="feature left">
          <a href="#" class="image icon fa-mobile"><img src="/images/pic03.jpg" alt="" /></a>
          <div class="content">
            <h3>Give it a name</h3>
            <input class="text" type="text" name="name" id="name" value="" placeholder="ex. Alien Air Music" />
          </div>
        </section>
      </div>
      <footer class="major container">
        <div id="podcast-done">
          <h3>Your podcast link</h3>
          <a id="podcast-url" class='big-button'></a>
        </div>
        <div id="podcast-notdone">
          <h3>The podcast will appear here</h3>
          <p>Please select desired day<?= $callsign ? '' : ', station, ' ?> and time above.</p>
        </div>
      </footer>

    </div>

    <div id="footer">
      <div class="container 75%">

        <header class="major last">
          <h2>About</h2>
        </header>
        <div style="text-align: left">
          <p>Due to their limited resources, much of independent radio is not syndicated or available after broadcast.  We want to enjoy the benefits of time-shifted programming on these stations.</p>

          <a name="volunteer"></a><h3>How it works</h3>
          <p>The web stream of the station is recorded and then saved and delivered for personal use.  Every station is a different server which acts in a federation.</p>

          <h3>Who runs this</h3>
{'fraction_non_alphanumeric': 0.19621848739495798, 'fraction_numerical': 0.007563025210084034, 'mean_word_length': 2.6356924643584523, 'pattern_counts': {'":': 0, '<': 429, '<?xml version=': 0, '>': 429, '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': '4295543', 'n_tokens_mistral': 4607, 'n_tokens_neox': 4468, 'n_words': 1083}