<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<style>
h2,h3 {margin-top: 30px;}
.masterheader {position:relative;padding:15px 30px;color:white;background-color:#760000;}
.meeting_index ul { height: auto; width:100%; }
.meeting_index ul li { display: block; }
@media(min-width: 480px){
  .meeting_index ul{-webkit-column-count:1;-moz-column-count:1;column-count:1;}
}
@media(min-width: 768px){
  .meeting_index ul{-webkit-column-count:2;-moz-column-count:2;column-count:2;}
}
@media(min-width: 992px){
  .meeting_index ul{-webkit-column-count:3;-moz-column-count:3;column-count:3;}
}
@media(min-width: 1150px){
  .meeting_index ul{-webkit-column-count:4;-moz-column-count:4;column-count:4;}
}
</style>
<title>IRC channels and meetings</title>
</head>
<body>
<div class="masterheader">
  <h1>IRC channels and meetings</h1>
</div>
<div class="container">

 <a id="channels"></a>
 <h2>IRC channels</h2>
 <p>OpenDev assists a large number of channels on the OFTC IRC network for various communities' communications. You can learn more about IRC in the <a href="https://docs.openstack.org/contributors/common/irc.html">OpenStack Contributor Guide</a>.</p>
 <p>Some popular channels are:</p>
 <ul>
  <li><a href="https://webchat.oftc.net/?channels=opendev">#opendev</a> (for questions about the project infrastructure)</li>
  <li><a href="https://webchat.oftc.net/?channels=openstack">#openstack</a> (for OpenStack usage questions)</li>
  <li><a href="https://webchat.oftc.net/?channels=openstack-dev">#openstack-dev (for OpenStack development questions)</a></li>
 </ul>
 <p>OpenDev logs many IRC channels. You can find those channels and their logs here:</p>
<div class="well"><span class="glyphicon glyphicon-fast-backward"></span>&nbsp;
<a href="irclogs/">IRC Channel Logs</a></div>
 <p>Links to specific meeting logs can be found on meeting descriptions below.</p>

 <a id="meetings"></a>
 <h2>IRC meetings schedule</h2>
 <p>The IRC meetings schedule is driven by the
<a href=https://opendev.org/opendev/irc-meetings>opendev/irc-meetings</a> repository.
To propose a change, please submit a change to that repository in Gerrit.</p>
 <p>Here is the link to an ICS file containing all scheduled IRC meetings, for
use in your favorite calendaring app:</p>
<div class="well"><span class="glyphicon glyphicon-download"></span>&nbsp;
<a href="irc-meetings.ical">iCalendar Complete Meeting Schedule</a>
</div>
 <h2>Meeting details</h2>
  <small>
  <div class="meeting_index">
  <ul>
  {% for meeting in meetings|sort(attribute='project') %}
    <li><a href="#{{ meeting.project|replace(' ', '_') }}">{{ meeting.project }}</a></li>
  {% endfor %}
  </ul>
  </div>
  </small>

{% for meeting in meetings|sort(attribute='project') %}
 <a id="{{ meeting.project|replace(' ', '_') }}"></a>
 <h3>{{ meeting.project }}</h3>
 <div class="panel panel-default">
  <div class="panel-heading"><small>{{ meeting.description|urlize }}</small>
  </div>
  <div class="panel-body">
{% for schedule in meeting.schedules %}
   <div><span class="glyphicon glyphicon-time"></span>&nbsp;
{{ schedule.recurrence }} on {% if schedule.recurrence.day_specifier %}{{ schedule.recurrence.day_specifier }} {% endif %}{{ schedule.day }} at
<a data-toggle="tooltip" data-placement="top" title="NotFilledInYet" utctime="{{schedule.utc}}" weekday="{{schedule.day}}"
    href="http://www.timeanddate.com/worldclock/fixedtime.html?hour={{ schedule.utc[:2] }}&amp;min={{ schedule.utc[2:] }}&amp;sec=0" 
    class="timelink">
        {{ schedule.utc }} UTC
</a>
in <a href="ircs://irc.oftc.net:6697/{{ schedule.irc }}">#{{ schedule.irc }}</a>
(IRC <a href="https://webchat.oftc.net/?randomnick=1&channels=%23{{ schedule.irc }}&prompt=1&uio=d4">webclient</a>)
   </div>
{% endfor %}
   <div><span class="glyphicon glyphicon-calendar"></span>&nbsp;
<a href="calendars/{{ meeting.outfile }}">ICS file</a> for this specific
meeting</div>
   <div><span class="glyphicon glyphicon-user"></span>&nbsp;
Chair (to contact for more information): {{ meeting.chair }}</div>
{% if meeting.extras.meeting_id %}
   <div><span class="glyphicon glyphicon-fast-backward"></span>&nbsp;
Logs from <a href="http://eavesdrop.openstack.org/meetings/{{meeting.extras.meeting_id|replace('-', '_')}}/">past meetings</a></div>
   <div><span class="glyphicon glyphicon-tags"></span>&nbsp;
       Start this meeting using: <tt>#startmeeting {{meeting.extras.meeting_id|replace('-', '_')}}</tt>
   </div>
{% endif %}
{% if meeting.extras.agenda_url %}
   <div><span class="glyphicon glyphicon-list-alt"></span>&nbsp;
<a href="{{meeting.extras.agenda_url}}">Agenda</a> for next meeting</div>
{% endif %}
  </div>
 </div>
{% endfor %}
 <small>Page generated on {{ timestamp }} UTC</small>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script>
function setTimeTooltips() {
    var timelinks = [].slice.call(document.getElementsByClassName('timelink'));
    for (var i in timelinks) {
        var link = timelinks[i];
        var local_date = new Date();
        var local_zone_name = local_date.toLocaleString('en', {timeZoneName:'short'}).split(' ').pop();
        var offset = local_date.getTimezoneOffset() / 60 * 100;
        var utc_meeting_time = link.getAttribute('utctime');
        var local_meeting_time = parseInt(utc_meeting_time) - offset;
        var day_offset = 0;
        if (local_meeting_time < 0) {
            day_offset = -1;
            local_meeting_time += 2400;
        } else if (local_meeting_time > 2400) {
            day_offset = 1;
            local_meeting_time -= 2400;
        }
        local_meeting_time = checkUTC4DigitString(String(local_meeting_time));
        var weekday = link.getAttribute('weekday');
        weekday = moveWeekday(weekday, day_offset);
        weekday = toTitleCase(weekday);
        link.title = weekday + ' at ' + local_meeting_time + ' ' + local_zone_name;
    }
}
function toTitleCase(str) {
    return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}
function checkUTC4DigitString(s) { // turns '100' into '0100'
    return repeat('0', 4 - s.length) + s;
}
function repeat(s, n){
    var a = [];
    while(a.length < n){
        a.push(s);
    }
    return a.join('');
}
function moveWeekday(day, offset) {
    var days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
    var i = days.indexOf(day.toLowerCase());
    i += offset;
    if (i < 0)
        i += 7;
    else if (i > 6)
        i -= 7;
    return days[i];
}
$(document).ready(function(){
    setTimeTooltips()
    $('[data-toggle="tooltip"]').tooltip();
});
</script>
</body>
</html>