LP_YEAR = 2016
-SPEAKERS_TEMPLATE = assets/templates/lp-speakers-2016.jinja2
SPEAKERS_MD = /home/owner/brains/campaigns/libreplanet/2016/program/bios-for-site.mdwn
SPEAKERS_HTML = program/generated-bios.html
-SESSIONS_TEMPLATE = assets/templates/lp-sch-2016.jinja2
SESSIONS_MD = /home/owner/brains/campaigns/libreplanet/2016/program/sessions-for-site.mdwn
SESSIONS_HTML = program/generated-sessions.html
$(SPEAKERS_HTML): $(SPEAKERS_MD)
- @lps_gen -sp $(SPEAKERS_TEMPLATE) $< > $@
+ @lps_gen -sp $< > $@
$(SESSIONS_HTML): $(SESSIONS_MD)
- @lps_gen -s --ical $(LP_YEAR) $(SESSIONS_TEMPLATE) $< > $@
+ @lps_gen -sc --ical $(LP_YEAR) $< > $@
.PHONY: all speakers sessions both clean
+++ /dev/null
-{# -*- mode: jinja2; -*- #}
-{#
- Copyright (C) 2015 lpschedule-generator contributors. See CONTRIBUTORS.
-
- This file is part of lpschedule-generator.
-
- lpschedule-generator is free software: you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- lpschedule-generator is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with lpschedule-generator (see COPYING). If not, see
- <http://www.gnu.org/licenses/>.
-#}
-
-{# macros start #}
-
-{# make speakers macro #}
-{% macro mk_speakers(speakers) %}
- <span class="program-session-speaker">
- {% for speaker in speakers %}
- {% if loop.last %}
- {{ speaker }}
- {% else %}
- {{ speaker }},
- {% endif %}
- {% endfor %}
- </span>
-{% endmacro %}
-
-{# make room macro #}
-{% macro mk_room(room) %}
- {% if room|lower != 'roomtba' %}
- <span class="label label-default">{{ room }}</span>
- {% endif %}
-{% endmacro %}
-
-{# make day header macro #}
-{% macro mk_day_header(day, collapse_area) %}
- {% if day|trim != '' %}
- <header class="program-day-header">
- <hgroup>
- <h2>{{ day }}</h2>
- </hgroup>
- </header>
- {% endif %}
-{% endmacro %}
-
-{# make timeslot header macro #}
-{% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %}
- {% if timeslot|trim != '' %}
- <header class="program-timeslot-header">
- <hgroup>
- <h2>{{ timeslot }}</h2>
- </hgroup>
- </header>
- {% endif %}
-{% endmacro %}
-
-{# make session header macro #}
-{% macro mk_session_header(session) %}
- <header class="program-session-header">
- <hgroup>
- <h2>{{ session }}</h2>
- </hgroup>
- </header>
-{% endmacro %}
-
-{# desc macro #}
-{% macro desc(disc_list) %}
- {% for desc_p in disc_list %}
- <p>{{ desc_p }}</p>
- {% endfor %}
-{% endmacro %}
-
-{# populate sessions macro #}
-{% macro populate_sessions(sessions, day_index, timeslot_index) %}
- {% for session, session_info in sessions.iteritems() %} {# session start #}
- <section id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}" class="program-session">
- {{ mk_session_header(session) }}
- {{ mk_speakers(session_info['speakers']) }}
- <p class="program-session-room-details">
- {{ mk_room(session_info['room']) }}
- <button class="btn btn-default btn-xs"
- data-toggle="collapse" aria-expanded="false"
- aria-controls="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse"
- data-target="#day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse">
- Details
- </button>
- </p>
- <div class="collapse in"
- id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse">
- {{ desc(session_info['desc']) }}
- </div> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse end -->
- </section> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }} end -->
- {% endfor %} {# session end #}
-{% endmacro %}
-
-{# populate timeslots macro #}
-{% macro populate_timeslots(timeslots, day_index) %}
- {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #}
- <article id="day-{{ day_index }}-timeslot-{{ loop.index }}" class="program-timeslot">
- {{ mk_timeslot_header(timeslot) }}
- {% if sessions|length > 0 %}
- {{ populate_sessions(sessions, day_index, loop.index) }}
- {% endif %}
- </article> <!-- day-{{ day_index }}-timeslot-{{ loop.index }} end -->
- {% endfor %} {# timeslot start #}
-{% endmacro %}
-
-{# lp schedule 2016 template start #}
-{% for day, timeslots in lp_dict.iteritems() %} {# day start #}
- <article id="day-{{ loop.index }}-program" class="program-day">
- {{ mk_day_header(day) }}
- {{ populate_timeslots(timeslots, loop.index) }}
- </article> <!-- day-{{ loop.index }} end -->
-{% endfor %} {# day loop end #}
+++ /dev/null
-{# -*- mode: jinja2; -*- #}
-{#
- Copyright (C) 2016 lpschedule-generator contributors. See CONTRIBUTORS.
-
- This file is part of lpschedule-generator.
-
- lpschedule-generator is free software: you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- lpschedule-generator is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with lpschedule-generator (see COPYING). If not, see
- <http://www.gnu.org/licenses/>.
-#}
-
-
-{# make speakers header macro #}
-{% macro mk_speakers_header(speaker_type) %}
- <header class="{{ speaker_type }}-header">
- <hgroup>
- {% if speaker_type == 'keynote-speakers' %}
- <h2>Keynote speakers</h2>
- {% else %}
- <h2>Speakers</h2>
- {% endif %}
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make keynote speaker header macro #}
-{% macro mk_keynote_speaker_header(speaker, id) %}
- <header id="{{ id }}" class="keynote-speaker-header">
- <hgroup>
- <h2>{{ speaker }}</h2>
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make speaker header macro #}
-{% macro mk_speaker_header(speaker, id) %}
- <header id="{{ id }}" class="speaker-header">
- <hgroup>
- <h2>{{ speaker }}</h2>
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make bio macro #}
-{% macro mk_bio(bio_list) %}
- {% for bio_p in bio_list %}
- <p>{{ bio_p }}</p>
- {% endfor %}
-{% endmacro %}
-
-{# populate keynote speakers macro #}
-{% macro populate_keynote_speakers(speakers) %}
- {% for speaker in speakers %}
- <section class="speaker-block" id="lp-keynote-speaker-{{ loop.index }}">
- <!-- keynote-speaker-{{ loop.index }} row start -->
- <div class="row">
- {% if speaker.img_url %}
- <!-- keynote-speaker-{{ loop.index }} img column start -->
- <div class="col-md-3 col-sm-4 col-xs-5">
- <img class="img-responsive" src="{{ speaker.img_url }}"
- alt="[ {{ speaker.img_alt }} ]" />
- </div> <!-- keynote-speaker-{{ loop.index }} img column end -->
- <!-- keynote-speaker-{{ loop.index }} content column start -->
- <div class="col-md-9 col-sm-8 col-xs-7">
- {% else %}
- <!-- keynote-speaker-{{ loop.index }} content column start -->
- <div class="col-md-offset-3 col-sm-offset-4 col-xs-offset-5 col-md-9 col-sm-8 col-xs-7">
- {% endif %}
- {{ mk_keynote_speaker_header(speaker.speaker, speaker.id) }}
- {{ mk_bio(speaker.bio) }}
- </div> <!-- keynote-speaker-{{ loop.index }} content column end -->
- </div> <!-- keynote-speaker-{{ loop.index }} row end -->
- </section>
- {% endfor %}
-{% endmacro %}
-
-{# populate speakers macro #}
-{% macro populate_speakers(speakers) %}
- {% for speaker in speakers %}
- <section class="speaker-block" id="lp-speaker-{{ loop.index }}">
- <div class="row"> <!-- speaker-{{ loop.index }} row start -->
- {% if speaker.img_url %}
- <!-- speaker-{{ loop.index }} img column start -->
- <div class="col-md-2 col-sm-3 col-xs-4">
- <img class="img-responsive" src="{{ speaker.img_url }}"
- alt="[ {{ speaker.img_alt }} ]" />
- </div> <!-- speaker-{{ loop.index }} img column end -->
- <!-- speaker-{{ loop.index }} content column start -->
- <div class="col-md-10 col-sm-9 col-xs-8">
- {% else %}
- <!-- speaker-{{ loop.index }} content column start -->
- <div class="col-md-offset-2 col-sm-offset-3 col-xs-offset-4 col-md-10 col-sm-9 col-xs-8">
- {% endif %}
- {{ mk_speaker_header(speaker.speaker, speaker.id) }}
- {{ mk_bio(speaker.bio) }}
- </div> <!-- speaker-{{ loop.index }} content column end -->
- </div> <!-- speaker-{{ loop.index }} row end -->
- </section>
- {% endfor %}
-{% endmacro %}
-
-{# lp speakers 2016 template start #}
-{% for speaker_type, speakers in lp_dict.iteritems() %}
- <article class="speakers-block" id="lp-{{ speaker_type }}">
- {% if speaker_type == 'keynote-speakers' %}
- {{ mk_speakers_header(speaker_type) }}
- {{ populate_keynote_speakers(speakers) }}
- {% elif speaker_type == 'speakers' %}
- {{ mk_speakers_header(speaker_type) }}
- {{ populate_speakers(speakers) }}
- {% endif %}
- </article>
-{% endfor %}
-{# lp speakers 2016 template end #}
LP_YEAR = 2017
-SPEAKERS_TEMPLATE = assets/templates/lp-speakers.jinja2
SPEAKERS_MD = /home/owner/brains/campaigns/libreplanet/2017/program/bios-for-site.mdwn
SPEAKERS_HTML = program/generated-bios.html
-SESSIONS_TEMPLATE = assets/templates/lp-schedule.jinja2
SESSIONS_MD = /home/owner/brains/campaigns/libreplanet/2017/program/sessions-for-site.mdwn
SESSIONS_HTML = program/generated-sessions.html
$(SPEAKERS_HTML): $(SPEAKERS_MD)
- @lps_gen -sp $(SPEAKERS_TEMPLATE) $< > $@
+ @lps_gen -sp $< > $@
$(SESSIONS_HTML): $(SESSIONS_MD)
- @lps_gen -s --ical $(LP_YEAR) $(SESSIONS_TEMPLATE) $< > $@
+ @lps_gen -sc --ical $(LP_YEAR) $< > $@
.PHONY: all speakers sessions both clean
The workflow for this is Edit the Brains page with the schedule, then run a script to convert it into HTML and dump it into your checkout of the repo, then push that change up to the Web like any other edit.
-<<<<<<< HEAD
-See instructions at <http://pythonhosted.org/lpschedule-generator> for installing and running the script. The source files are stored in Brains in markdown but with special tags, so that you can edit them without needing to know this whole process. The jinja2 templates are stored in the the Web site's git repo at assets/templates.
-
-NOTE: **Before each time you use the script, make sure to update it with this command:**
-
-pip install --upgrade lpschedule-generator
-=======
-See instructions at <https://ricketyspace.net/lpschedule-generator> for installing and running the script. The source files are stored in Brains in markdown but with special tags, so that you can edit them without needing to know this whole process. The jinja2 templates are stored in the the Web site's git repo at assets/templates.
->>>>>>> master
+See instructions at <https://ricketyspace.net/lpschedule-generator> for installing and running the script. The source files are stored in Brains in markdown but with special tags, so that you can edit them without needing to know this whole process.
Please crop all photos of speakers too 100x100 px (200x200 px for keynotes) and then upload them to <http://static.fsf.org/nosvn/libreplanet/speaker-pics/>. Then include their URL in the bios page to embed them.
+++ /dev/null
-{# -*- mode: jinja2; -*- #}
-{#
- Copyright © 2017 lpschedule-generator contributors. See CONTRIBUTORS.
-
- This file is part of lpschedule-generator.
-
- lpschedule-generator is free software: you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- lpschedule-generator is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with lpschedule-generator (see COPYING). If not, see
- <http://www.gnu.org/licenses/>.
-#}
-
-{# macros start #}
-
-{# make speakers macro #}
-{% macro mk_speakers(speakers) %}
- {% if speakers[0]|lower != 'speakertba' %}
- <span class="program-session-speaker">
- {% for speaker in speakers %}
- {% if loop.last %}
- {{ speaker }}
- {% else %}
- {{ speaker }},
- {% endif %}
- {% endfor %}
- </span>
- {% endif %}
-{% endmacro %}
-
-{# make room macro #}
-{% macro mk_room(room) %}
- {% if room|lower != 'roomtba' %}
- <span class="room label label-default">{{ room }}</span>
- {% endif %}
-{% endmacro %}
-
-{# make day header macro #}
-{% macro mk_day_header(day, collapse_area) %}
- {% if day|trim != '' %}
- <header class="program-day-header">
- <hgroup>
- <h2>{{ day }}</h2>
- </hgroup>
- </header>
- {% endif %}
-{% endmacro %}
-
-{# make timeslot header macro #}
-{% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %}
- {% if timeslot|trim != '' %}
- <header class="program-timeslot-header">
- <hgroup>
- <h2>{{ timeslot }}</h2>
- </hgroup>
- </header>
- {% endif %}
-{% endmacro %}
-
-{# make session header macro #}
-{% macro mk_session_header(session) %}
- {% if session|trim not in ['', 'st-from-ts'] %}
- <header class="program-session-header">
- <hgroup>
- <h2>{{ session }}</h2>
- </hgroup>
- </header>
- {% endif %}
-{% endmacro %}
-
-{# desc macro #}
-{% macro desc(disc_list) %}
- {% for desc_p in disc_list %}
- <p>{{ desc_p }}</p>
- {% endfor %}
-{% endmacro %}
-
-{# populate sessions macro #}
-{% macro populate_sessions(sessions, day_index, timeslot_index) %}
- {% for session, session_info in sessions.iteritems() %} {# session start #}
- <section id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}" class="program-session">
- {{ mk_session_header(session) }}
- {{ mk_speakers(session_info['speakers']) }}
- <p class="program-session-room-details">
- {{ mk_room(session_info['room']) }}
- {% if session_info['desc'][0]|lower == 'desctba' %}
- </p>
- {% else %}
- <button class="btn btn-default btn-xs"
- data-toggle="collapse" aria-expanded="false"
- aria-controls="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse"
- data-target="#day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse">
- Show details
- <span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
- </button>
- </p>
- <div class="session-desc collapse in"
- id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse">
- {{ desc(session_info['desc']) }}
- </div> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse end -->
- {% endif %}
- </section> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }} end -->
- {% endfor %} {# session end #}
-{% endmacro %}
-
-{# populate timeslots macro #}
-{% macro populate_timeslots(timeslots, day_index) %}
- {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #}
- <article id="day-{{ day_index }}-timeslot-{{ loop.index }}" class="program-timeslot">
- {{ mk_timeslot_header(timeslot) }}
- {% if sessions|length > 0 %}
- {{ populate_sessions(sessions, day_index, loop.index) }}
- {% endif %}
- </article> <!-- day-{{ day_index }}-timeslot-{{ loop.index }} end -->
- {% endfor %} {# timeslot start #}
-{% endmacro %}
-
-{# lp schedule 2016 template start #}
-{% for day, timeslots in lp_dict.iteritems() %} {# day start #}
- <article id="day-{{ loop.index }}-program" class="program-day">
- {{ mk_day_header(day) }}
- {{ populate_timeslots(timeslots, loop.index) }}
- </article> <!-- day-{{ loop.index }} end -->
-{% endfor %} {# day loop end #}
+++ /dev/null
-{# -*- mode: jinja2; -*- #}
-{#
- Copyright (C) 2016 lpschedule-generator contributors. See CONTRIBUTORS.
-
- This file is part of lpschedule-generator.
-
- lpschedule-generator is free software: you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- lpschedule-generator is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with lpschedule-generator (see COPYING). If not, see
- <http://www.gnu.org/licenses/>.
-#}
-
-
-{# make speakers header macro #}
-{% macro mk_speakers_header(speaker_type) %}
- <header class="{{ speaker_type }}-header">
- <hgroup>
- {% if speaker_type == 'keynote-speakers' %}
- <h2>Keynote speakers</h2>
- {% else %}
- <h2>Speakers</h2>
- {% endif %}
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make keynote speaker header macro #}
-{% macro mk_keynote_speaker_header(speaker, id) %}
- <header id="{{ id }}" class="keynote-speaker-header">
- <hgroup>
- <h2>{{ speaker }}</h2>
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make speaker header macro #}
-{% macro mk_speaker_header(speaker, id) %}
- <header id="{{ id }}" class="speaker-header">
- <hgroup>
- <h2>{{ speaker }}</h2>
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make bio macro #}
-{% macro mk_bio(bio_list) %}
- {% for bio_p in bio_list %}
- <p>{{ bio_p }}</p>
- {% endfor %}
-{% endmacro %}
-
-{# populate keynote speakers macro #}
-{% macro populate_keynote_speakers(speakers) %}
- {% for speaker in speakers %}
- <section class="speaker-block" id="lp-keynote-speaker-{{ loop.index }}">
- <!-- keynote-speaker-{{ loop.index }} row start -->
- <div class="row">
- {% if speaker.img_url %}
- <!-- keynote-speaker-{{ loop.index }} img column start -->
- <div class="col-md-3 col-sm-4 col-xs-5">
- <img class="img-responsive" src="{{ speaker.img_url }}"
- alt="[ {{ speaker.img_alt }} ]" />
- </div> <!-- keynote-speaker-{{ loop.index }} img column end -->
- <!-- keynote-speaker-{{ loop.index }} content column start -->
- <div class="col-md-9 col-sm-8 col-xs-7">
- {% else %}
- <!-- keynote-speaker-{{ loop.index }} content column start -->
- <div class="col-md-offset-3 col-sm-offset-4 col-xs-offset-5 col-md-9 col-sm-8 col-xs-7">
- {% endif %}
- {{ mk_keynote_speaker_header(speaker.speaker, speaker.id) }}
- {{ mk_bio(speaker.bio) }}
- </div> <!-- keynote-speaker-{{ loop.index }} content column end -->
- </div> <!-- keynote-speaker-{{ loop.index }} row end -->
- </section>
- {% endfor %}
-{% endmacro %}
-
-{# populate speakers macro #}
-{% macro populate_speakers(speakers) %}
- {% for speaker in speakers %}
- <section class="speaker-block" id="lp-speaker-{{ loop.index }}">
- <div class="row"> <!-- speaker-{{ loop.index }} row start -->
- {% if speaker.img_url %}
- <!-- speaker-{{ loop.index }} img column start -->
- <div class="col-md-2 col-sm-3 col-xs-4">
- <img class="img-responsive" src="{{ speaker.img_url }}"
- alt="[ {{ speaker.img_alt }} ]" />
- </div> <!-- speaker-{{ loop.index }} img column end -->
- <!-- speaker-{{ loop.index }} content column start -->
- <div class="col-md-10 col-sm-9 col-xs-8">
- {% else %}
- <!-- speaker-{{ loop.index }} content column start -->
- <div class="col-md-offset-2 col-sm-offset-3 col-xs-offset-4 col-md-10 col-sm-9 col-xs-8">
- {% endif %}
- {{ mk_speaker_header(speaker.speaker, speaker.id) }}
- {{ mk_bio(speaker.bio) }}
- </div> <!-- speaker-{{ loop.index }} content column end -->
- </div> <!-- speaker-{{ loop.index }} row end -->
- </section>
- {% endfor %}
-{% endmacro %}
-
-{# lp speakers 2016 template start #}
-{% for speaker_type, speakers in lp_dict.iteritems() %}
- <article class="speakers-block" id="lp-{{ speaker_type }}">
- {% if speaker_type == 'keynote-speakers' %}
- {{ mk_speakers_header(speaker_type) }}
- {{ populate_keynote_speakers(speakers) }}
- {% elif speaker_type == 'speakers' %}
- {{ mk_speakers_header(speaker_type) }}
- {{ populate_speakers(speakers) }}
- {% endif %}
- </article>
-{% endfor %}
-{# lp speakers 2016 template end #}
LP_YEAR = 2018
-SPEAKERS_TEMPLATE = assets/templates/lp-speakers.jinja2
SPEAKERS_MD = /home/owner/brains/campaigns/libreplanet/2018/program/bios-for-site.mdwn
SPEAKERS_HTML = program/generated-bios.html
-SESSIONS_TEMPLATE = assets/templates/lp-schedule.jinja2
SESSIONS_MD = /home/owner/brains/campaigns/libreplanet/2018/program/sessions-for-site.mdwn
SESSIONS_HTML = program/generated-sessions.html
$(SPEAKERS_HTML): $(SPEAKERS_MD)
- @lps_gen -sp $(SPEAKERS_TEMPLATE) $< > $@
+ @lps_gen -sp $< > $@
$(SESSIONS_HTML): $(SESSIONS_MD)
- @lps_gen -s --ical $(LP_YEAR) $(SESSIONS_TEMPLATE) $< > $@
+ @lps_gen -sc --ical $(LP_YEAR) $< > $@
.PHONY: all speakers sessions both clean
The workflow for this is Edit the Brains page with the schedule, then run a script to convert it into HTML and dump it into your checkout of the repo, then push that change up to the Web like any other edit.
-See instructions at <https://ricketyspace.net/lpschedule-generator> for installing and running the script. The source files are stored in Brains in markdown but with special tags, so that you can edit them without needing to know this whole process. The jinja2 templates are stored in the the Web site's git repo at assets/templates.
+See instructions at <https://ricketyspace.net/lpschedule-generator> for installing and running the script. The source files are stored in Brains in markdown but with special tags, so that you can edit them without needing to know this whole process.
Please crop all photos of speakers too 100x100 px (200x200 px for keynotes) and then upload them to <http://static.fsf.org/nosvn/libreplanet/speaker-pics/>. Then include their URL in the bios page to embed them.
+++ /dev/null
-{# -*- mode: jinja2; -*- #}
-{#
- Copyright © 2017 lpschedule-generator contributors. See CONTRIBUTORS.
-
- This file is part of lpschedule-generator.
-
- lpschedule-generator is free software: you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- lpschedule-generator is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with lpschedule-generator (see COPYING). If not, see
- <http://www.gnu.org/licenses/>.
-#}
-
-{# macros start #}
-
-{# make speakers macro #}
-{% macro mk_speakers(speakers) %}
- {% if speakers[0]|lower != 'speakertba' %}
- <div class="program-session-speaker">
- {% for speaker in speakers %}
- {% if loop.last %}
- {{ speaker }}
- {% else %}
- {{ speaker }},
- {% endif %}
- {% endfor %}
- </div>
- {% endif %}
-{% endmacro %}
-
-{# make room macro #}
-{% macro mk_room(room) %}
- {% if room|lower != 'roomtba' %}
- <div class="program-session-room-details">
- <span class="room label label-default">{{ room }}</span>
- </div>
- {% endif %}
-{% endmacro %}
-
-{# make video macro #}
-{% macro mk_video(video) %}
- {% if video|lower != 'videotba' %}
- <a class="btn btn-default btn-xs" href="{{ video }}">
- <span class="glyphicon glyphicon-facetime-video"></span>
- </a>
- {% endif %}
-{% endmacro %}
-
-{# make desc details button macro #}
-{% macro mk_desc_details_btn(disc_list) %}
- {% if disc_list[0]|lower != 'desctba' %}
- <button class="btn btn-default btn-xs"
- data-toggle="collapse" aria-expanded="false"
- aria-controls="{{ caller()|trim }}"
- data-target="#{{ caller()|trim }}">
- Show details
- <span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
- </button>
- {% endif %}
-{% endmacro %}
-
-{% macro mk_desc(disc_list) %}
- {% if disc_list[0]|lower != 'desctba' %}
- <div class="session-desc collapse in"
- id="{{ caller()|trim }}">
- {{ desc(disc_list) }}
- </div> <!-- {{ caller()|trim }} end -->
- {% endif %}
-{% endmacro %}
-
-{# make day header macro #}
-{% macro mk_day_header(day, collapse_area) %}
- {% if day|trim != '' %}
- <header class="program-day-header">
- <hgroup>
- <h2>{{ day }}</h2>
- </hgroup>
- </header>
- {% endif %}
-{% endmacro %}
-
-{# make timeslot header macro #}
-{% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %}
- {% if timeslot|trim != '' %}
- <header class="program-timeslot-header">
- <hgroup>
- <h2>{{ timeslot }}</h2>
- </hgroup>
- </header>
- {% endif %}
-{% endmacro %}
-
-{# make session header macro #}
-{% macro mk_session_header(session) %}
- {% if session|trim not in ['', 'st-from-ts'] %}
- <header class="program-session-header">
- <hgroup>
- <h2>{{ session }}</h2>
- </hgroup>
- </header>
- {% endif %}
-{% endmacro %}
-
-{# desc macro #}
-{% macro desc(disc_list) %}
- {% for desc_p in disc_list %}
- <p>{{ desc_p }}</p>
- {% endfor %}
-{% endmacro %}
-
-{# populate sessions macro #}
-{% macro populate_sessions(sessions, day_index, timeslot_index) %}
- {% for session, session_info in sessions.iteritems() %} {# session start #}
- <section id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}" class="program-session">
- {{ mk_session_header(session) }}
- {{ mk_speakers(session_info['speakers']) }}
- <div class="program-session-shelf">
- {{ mk_room(session_info['room']) }}
- {{ mk_video(session_info['video']) }}
- {% call mk_desc_details_btn(session_info['desc']) %}
- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse
- {% endcall %}
- </div>
-
- <div class="program-session-desc-block">
- {% call mk_desc(session_info['desc']) %}
- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse
- {% endcall %}
- </div>
- </section> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }} end -->
- {% endfor %} {# session end #}
-{% endmacro %}
-
-{# populate timeslots macro #}
-{% macro populate_timeslots(timeslots, day_index) %}
- {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #}
- <article id="day-{{ day_index }}-timeslot-{{ loop.index }}" class="program-timeslot">
- {{ mk_timeslot_header(timeslot) }}
- {% if sessions|length > 0 %}
- {{ populate_sessions(sessions, day_index, loop.index) }}
- {% endif %}
- </article> <!-- day-{{ day_index }}-timeslot-{{ loop.index }} end -->
- {% endfor %} {# timeslot start #}
-{% endmacro %}
-
-{# lp schedule 2016 template start #}
-{% for day, timeslots in lp_dict.iteritems() %} {# day start #}
- <article id="day-{{ loop.index }}-program" class="program-day">
- {{ mk_day_header(day) }}
- {{ populate_timeslots(timeslots, loop.index) }}
- </article> <!-- day-{{ loop.index }} end -->
-{% endfor %} {# day loop end #}
+++ /dev/null
-{# -*- mode: jinja2; -*- #}
-{#
- Copyright (C) 2016 lpschedule-generator contributors. See CONTRIBUTORS.
-
- This file is part of lpschedule-generator.
-
- lpschedule-generator is free software: you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- lpschedule-generator is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with lpschedule-generator (see COPYING). If not, see
- <http://www.gnu.org/licenses/>.
-#}
-
-
-{# make speakers header macro #}
-{% macro mk_speakers_header(speaker_type) %}
- <header class="{{ speaker_type }}-header">
- <hgroup>
- {% if speaker_type == 'keynote-speakers' %}
- <h2>Keynote speakers</h2>
- {% else %}
- <h2>Speakers</h2>
- {% endif %}
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make keynote speaker header macro #}
-{% macro mk_keynote_speaker_header(speaker, id) %}
- <header id="{{ id }}" class="keynote-speaker-header">
- <hgroup>
- <h2>{{ speaker }}</h2>
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make speaker header macro #}
-{% macro mk_speaker_header(speaker, id) %}
- <header id="{{ id }}" class="speaker-header">
- <hgroup>
- <h2>{{ speaker }}</h2>
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make bio macro #}
-{% macro mk_bio(bio_list) %}
- {% for bio_p in bio_list %}
- <p>{{ bio_p }}</p>
- {% endfor %}
-{% endmacro %}
-
-{# populate keynote speakers macro #}
-{% macro populate_keynote_speakers(speakers) %}
- {% for speaker in speakers %}
- <section class="speaker-block" id="lp-keynote-speaker-{{ loop.index }}">
- <!-- keynote-speaker-{{ loop.index }} row start -->
- <div class="row">
- {% if speaker.img_url %}
- <!-- keynote-speaker-{{ loop.index }} img column start -->
- <div class="col-md-3 col-sm-4 col-xs-5">
- <img class="img-responsive" src="{{ speaker.img_url }}"
- alt="[ {{ speaker.img_alt }} ]" />
- </div> <!-- keynote-speaker-{{ loop.index }} img column end -->
- <!-- keynote-speaker-{{ loop.index }} content column start -->
- <div class="col-md-9 col-sm-8 col-xs-7">
- {% else %}
- <!-- keynote-speaker-{{ loop.index }} content column start -->
- <div class="col-md-offset-3 col-sm-offset-4 col-xs-offset-5 col-md-9 col-sm-8 col-xs-7">
- {% endif %}
- {{ mk_keynote_speaker_header(speaker.speaker, speaker.id) }}
- {{ mk_bio(speaker.bio) }}
- </div> <!-- keynote-speaker-{{ loop.index }} content column end -->
- </div> <!-- keynote-speaker-{{ loop.index }} row end -->
- </section>
- {% endfor %}
-{% endmacro %}
-
-{# populate speakers macro #}
-{% macro populate_speakers(speakers) %}
- {% for speaker in speakers %}
- <section class="speaker-block" id="lp-speaker-{{ loop.index }}">
- <div class="row"> <!-- speaker-{{ loop.index }} row start -->
- {% if speaker.img_url %}
- <!-- speaker-{{ loop.index }} img column start -->
- <div class="col-md-2 col-sm-3 col-xs-4">
- <img class="img-responsive" src="{{ speaker.img_url }}"
- alt="[ {{ speaker.img_alt }} ]" />
- </div> <!-- speaker-{{ loop.index }} img column end -->
- <!-- speaker-{{ loop.index }} content column start -->
- <div class="col-md-10 col-sm-9 col-xs-8">
- {% else %}
- <!-- speaker-{{ loop.index }} content column start -->
- <div class="col-md-offset-2 col-sm-offset-3 col-xs-offset-4 col-md-10 col-sm-9 col-xs-8">
- {% endif %}
- {{ mk_speaker_header(speaker.speaker, speaker.id) }}
- {{ mk_bio(speaker.bio) }}
- </div> <!-- speaker-{{ loop.index }} content column end -->
- </div> <!-- speaker-{{ loop.index }} row end -->
- </section>
- {% endfor %}
-{% endmacro %}
-
-{# lp speakers 2016 template start #}
-{% for speaker_type, speakers in lp_dict.iteritems() %}
- <article class="speakers-block" id="lp-{{ speaker_type }}">
- {% if speaker_type == 'keynote-speakers' %}
- {{ mk_speakers_header(speaker_type) }}
- {{ populate_keynote_speakers(speakers) }}
- {% elif speaker_type == 'speakers' %}
- {{ mk_speakers_header(speaker_type) }}
- {{ populate_speakers(speakers) }}
- {% endif %}
- </article>
-{% endfor %}
-{# lp speakers 2016 template end #}
LP_YEAR = 2019
-SPEAKERS_TEMPLATE = assets/templates/lp-speakers.jinja2
SPEAKERS_MD = /home/owner/brains/campaigns/libreplanet/2019/program/bios-for-site.mdwn
SPEAKERS_HTML = program/generated-bios.html
-SESSIONS_TEMPLATE = assets/templates/lp-schedule.jinja2
SESSIONS_MD = /home/owner/brains/campaigns/libreplanet/2019/program/sessions-for-site.mdwn
SESSIONS_HTML = program/generated-sessions.html
$(SPEAKERS_HTML): $(SPEAKERS_MD)
- @lps_gen -sp $(SPEAKERS_TEMPLATE) $< > $@
+ @lps_gen -sp $< > $@
$(SESSIONS_HTML): $(SESSIONS_MD)
- @lps_gen -s --ical $(LP_YEAR) $(SESSIONS_TEMPLATE) $< > $@
+ @lps_gen -sc --ical $(LP_YEAR) $< > $@
.PHONY: all speakers sessions both clean
The workflow for this is Edit the Brains page with the schedule, then run a script to convert it into HTML and dump it into your checkout of the repo, then push that change up to the Web like any other edit.
-See instructions at <https://ricketyspace.net/lpschedule-generator> for installing and running the script. The source files are stored in Brains in markdown but with special tags, so that you can edit them without needing to know this whole process. The jinja2 templates are stored in the the Web site's git repo at assets/templates.
+See instructions at <https://ricketyspace.net/lpschedule-generator> for installing and running the script. The source files are stored in Brains in markdown but with special tags, so that you can edit them without needing to know this whole process.
Please crop all photos of speakers too 100x100 px (200x200 px for keynotes) and then upload them to <http://static.fsf.org/nosvn/libreplanet/speaker-pics/>. Then include their URL in the bios page to embed them.
+++ /dev/null
-{# -*- mode: jinja2; -*- #}
-{#
- Copyright © 2017 lpschedule-generator contributors. See CONTRIBUTORS.
-
- This file is part of lpschedule-generator.
-
- lpschedule-generator is free software: you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- lpschedule-generator is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with lpschedule-generator (see COPYING). If not, see
- <http://www.gnu.org/licenses/>.
-#}
-
-{# macros start #}
-
-{# make speakers macro #}
-{% macro mk_speakers(speakers) %}
- {% if speakers[0]|lower != 'speakertba' %}
- <div class="program-session-speaker">
- {% for speaker in speakers %}
- {% if loop.last %}
- {{ speaker }}
- {% else %}
- {{ speaker }},
- {% endif %}
- {% endfor %}
- </div>
- {% endif %}
-{% endmacro %}
-
-{# make room macro #}
-{% macro mk_room(room) %}
- {% if room|lower != 'roomtba' %}
- <div class="program-session-room-details">
- <span class="room label label-default">{{ room }}</span>
- </div>
- {% endif %}
-{% endmacro %}
-
-{# make video macro #}
-{% macro mk_video(video) %}
- {% if video|lower != 'videotba' %}
- <a class="btn btn-default btn-xs" href="{{ video }}">
- <span class="glyphicon glyphicon-facetime-video"></span>
- </a>
- {% endif %}
-{% endmacro %}
-
-{# make desc details button macro #}
-{% macro mk_desc_details_btn(disc_list) %}
- {% if disc_list[0]|lower != 'desctba' %}
- <button class="btn btn-default btn-xs"
- data-toggle="collapse" aria-expanded="false"
- aria-controls="{{ caller()|trim }}"
- data-target="#{{ caller()|trim }}">
- Show details
- <span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
- </button>
- {% endif %}
-{% endmacro %}
-
-{% macro mk_desc(disc_list) %}
- {% if disc_list[0]|lower != 'desctba' %}
- <div class="session-desc collapse in"
- id="{{ caller()|trim }}">
- {{ desc(disc_list) }}
- </div> <!-- {{ caller()|trim }} end -->
- {% endif %}
-{% endmacro %}
-
-{# make day header macro #}
-{% macro mk_day_header(day, collapse_area) %}
- {% if day|trim != '' %}
- <header class="program-day-header">
- <hgroup>
- <h2>{{ day }}</h2>
- </hgroup>
- </header>
- {% endif %}
-{% endmacro %}
-
-{# make timeslot header macro #}
-{% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %}
- {% if timeslot|trim != '' %}
- <header class="program-timeslot-header">
- <hgroup>
- <h2>{{ timeslot }}</h2>
- </hgroup>
- </header>
- {% endif %}
-{% endmacro %}
-
-{# make session header macro #}
-{% macro mk_session_header(session) %}
- {% if session|trim not in ['', 'st-from-ts'] %}
- <header class="program-session-header">
- <hgroup>
- <h2>{{ session }}</h2>
- </hgroup>
- </header>
- {% endif %}
-{% endmacro %}
-
-{# desc macro #}
-{% macro desc(disc_list) %}
- {% for desc_p in disc_list %}
- <p>{{ desc_p }}</p>
- {% endfor %}
-{% endmacro %}
-
-{# populate sessions macro #}
-{% macro populate_sessions(sessions, day_index, timeslot_index) %}
- {% for session, session_info in sessions.iteritems() %} {# session start #}
- <section id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}" class="program-session">
- {{ mk_session_header(session) }}
- {{ mk_speakers(session_info['speakers']) }}
- <div class="program-session-shelf">
- {{ mk_room(session_info['room']) }}
- {{ mk_video(session_info['video']) }}
- {% call mk_desc_details_btn(session_info['desc']) %}
- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse
- {% endcall %}
- </div>
-
- <div class="program-session-desc-block">
- {% call mk_desc(session_info['desc']) %}
- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse
- {% endcall %}
- </div>
- </section> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }} end -->
- {% endfor %} {# session end #}
-{% endmacro %}
-
-{# populate timeslots macro #}
-{% macro populate_timeslots(timeslots, day_index) %}
- {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #}
- <article id="day-{{ day_index }}-timeslot-{{ loop.index }}" class="program-timeslot">
- {{ mk_timeslot_header(timeslot) }}
- {% if sessions|length > 0 %}
- {{ populate_sessions(sessions, day_index, loop.index) }}
- {% endif %}
- </article> <!-- day-{{ day_index }}-timeslot-{{ loop.index }} end -->
- {% endfor %} {# timeslot start #}
-{% endmacro %}
-
-{# lp schedule 2016 template start #}
-{% for day, timeslots in lp_dict.iteritems() %} {# day start #}
- <article id="day-{{ loop.index }}-program" class="program-day">
- {{ mk_day_header(day) }}
- {{ populate_timeslots(timeslots, loop.index) }}
- </article> <!-- day-{{ loop.index }} end -->
-{% endfor %} {# day loop end #}
+++ /dev/null
-{# -*- mode: jinja2; -*- #}
-{#
- Copyright (C) 2016 lpschedule-generator contributors. See CONTRIBUTORS.
-
- This file is part of lpschedule-generator.
-
- lpschedule-generator is free software: you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- lpschedule-generator is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with lpschedule-generator (see COPYING). If not, see
- <http://www.gnu.org/licenses/>.
-#}
-
-
-{# make speakers header macro #}
-{% macro mk_speakers_header(speaker_type) %}
- <header class="{{ speaker_type }}-header">
- <hgroup>
- {% if speaker_type == 'keynote-speakers' %}
- <h2>Keynote speakers</h2>
- {% else %}
- <h2>Speakers</h2>
- {% endif %}
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make keynote speaker header macro #}
-{% macro mk_keynote_speaker_header(speaker, id) %}
- <header id="{{ id }}" class="keynote-speaker-header">
- <hgroup>
- <h2>{{ speaker }}</h2>
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make speaker header macro #}
-{% macro mk_speaker_header(speaker, id) %}
- <header id="{{ id }}" class="speaker-header">
- <hgroup>
- <h2>{{ speaker }}</h2>
- </hgroup>
- </header>
-{% endmacro %}
-
-{# make bio macro #}
-{% macro mk_bio(bio_list) %}
- {% for bio_p in bio_list %}
- <p>{{ bio_p }}</p>
- {% endfor %}
-{% endmacro %}
-
-{# populate keynote speakers macro #}
-{% macro populate_keynote_speakers(speakers) %}
- {% for speaker in speakers %}
- <section class="speaker-block" id="lp-keynote-speaker-{{ loop.index }}">
- <!-- keynote-speaker-{{ loop.index }} row start -->
- <div class="row">
- {% if speaker.img_url %}
- <!-- keynote-speaker-{{ loop.index }} img column start -->
- <div class="col-md-3 col-sm-4 col-xs-5">
- <img class="img-responsive" src="{{ speaker.img_url }}"
- alt="[ {{ speaker.img_alt }} ]" />
- </div> <!-- keynote-speaker-{{ loop.index }} img column end -->
- <!-- keynote-speaker-{{ loop.index }} content column start -->
- <div class="col-md-9 col-sm-8 col-xs-7">
- {% else %}
- <!-- keynote-speaker-{{ loop.index }} content column start -->
- <div class="col-md-offset-3 col-sm-offset-4 col-xs-offset-5 col-md-9 col-sm-8 col-xs-7">
- {% endif %}
- {{ mk_keynote_speaker_header(speaker.speaker, speaker.id) }}
- {{ mk_bio(speaker.bio) }}
- </div> <!-- keynote-speaker-{{ loop.index }} content column end -->
- </div> <!-- keynote-speaker-{{ loop.index }} row end -->
- </section>
- {% endfor %}
-{% endmacro %}
-
-{# populate speakers macro #}
-{% macro populate_speakers(speakers) %}
- {% for speaker in speakers %}
- <section class="speaker-block" id="lp-speaker-{{ loop.index }}">
- <div class="row"> <!-- speaker-{{ loop.index }} row start -->
- {% if speaker.img_url %}
- <!-- speaker-{{ loop.index }} img column start -->
- <div class="col-md-2 col-sm-3 col-xs-4">
- <img class="img-responsive" src="{{ speaker.img_url }}"
- alt="[ {{ speaker.img_alt }} ]" />
- </div> <!-- speaker-{{ loop.index }} img column end -->
- <!-- speaker-{{ loop.index }} content column start -->
- <div class="col-md-10 col-sm-9 col-xs-8">
- {% else %}
- <!-- speaker-{{ loop.index }} content column start -->
- <div class="col-md-offset-2 col-sm-offset-3 col-xs-offset-4 col-md-10 col-sm-9 col-xs-8">
- {% endif %}
- {{ mk_speaker_header(speaker.speaker, speaker.id) }}
- {{ mk_bio(speaker.bio) }}
- </div> <!-- speaker-{{ loop.index }} content column end -->
- </div> <!-- speaker-{{ loop.index }} row end -->
- </section>
- {% endfor %}
-{% endmacro %}
-
-{# lp speakers 2016 template start #}
-{% for speaker_type, speakers in lp_dict.iteritems() %}
- <article class="speakers-block" id="lp-{{ speaker_type }}">
- {% if speaker_type == 'keynote-speakers' %}
- {{ mk_speakers_header(speaker_type) }}
- {{ populate_keynote_speakers(speakers) }}
- {% elif speaker_type == 'speakers' %}
- {{ mk_speakers_header(speaker_type) }}
- {{ populate_speakers(speakers) }}
- {% endif %}
- </article>
-{% endfor %}
-{# lp speakers 2016 template end #}