From: rsiddharth Date: Thu, 8 Aug 2019 02:04:11 +0000 (-0400) Subject: lpschedule-generator version 0.10 related changes. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=706288d39d1c5df320dafad6338615a08c1fc1f5;p=libreplanet-static.git lpschedule-generator version 0.10 related changes. - Remove jinja2 templates. The 'speakers' and 'schedule' templates are now part of the lpschedule-generator package and don't have to be specified by the user on the commandline. - The 'sessions' switch has been rename from '-s' to '-sc'. --- diff --git a/2016/Makefile b/2016/Makefile index b8de8dbc..ff13f6d7 100644 --- a/2016/Makefile +++ b/2016/Makefile @@ -16,11 +16,9 @@ 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 @@ -43,11 +41,11 @@ both: $(SPEAKERS_HTML) $(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 diff --git a/2016/assets/templates/lp-sch-2016.jinja2 b/2016/assets/templates/lp-sch-2016.jinja2 deleted file mode 100644 index 0f0e3725..00000000 --- a/2016/assets/templates/lp-sch-2016.jinja2 +++ /dev/null @@ -1,123 +0,0 @@ -{# -*- 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 - . -#} - -{# macros start #} - -{# make speakers macro #} -{% macro mk_speakers(speakers) %} - - {% for speaker in speakers %} - {% if loop.last %} - {{ speaker }} - {% else %} - {{ speaker }}, - {% endif %} - {% endfor %} - -{% endmacro %} - -{# make room macro #} -{% macro mk_room(room) %} - {% if room|lower != 'roomtba' %} - {{ room }} - {% endif %} -{% endmacro %} - -{# make day header macro #} -{% macro mk_day_header(day, collapse_area) %} - {% if day|trim != '' %} -
-
-

{{ day }}

-
-
- {% endif %} -{% endmacro %} - -{# make timeslot header macro #} -{% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %} - {% if timeslot|trim != '' %} -
-
-

{{ timeslot }}

-
-
- {% endif %} -{% endmacro %} - -{# make session header macro #} -{% macro mk_session_header(session) %} -
-
-

{{ session }}

-
-
-{% endmacro %} - -{# desc macro #} -{% macro desc(disc_list) %} - {% for desc_p in disc_list %} -

{{ desc_p }}

- {% endfor %} -{% endmacro %} - -{# populate sessions macro #} -{% macro populate_sessions(sessions, day_index, timeslot_index) %} - {% for session, session_info in sessions.iteritems() %} {# session start #} -
- {{ mk_session_header(session) }} - {{ mk_speakers(session_info['speakers']) }} -

- {{ mk_room(session_info['room']) }} - -

-
- {{ desc(session_info['desc']) }} -
-
- {% endfor %} {# session end #} -{% endmacro %} - -{# populate timeslots macro #} -{% macro populate_timeslots(timeslots, day_index) %} - {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #} -
- {{ mk_timeslot_header(timeslot) }} - {% if sessions|length > 0 %} - {{ populate_sessions(sessions, day_index, loop.index) }} - {% endif %} -
- {% endfor %} {# timeslot start #} -{% endmacro %} - -{# lp schedule 2016 template start #} -{% for day, timeslots in lp_dict.iteritems() %} {# day start #} -
- {{ mk_day_header(day) }} - {{ populate_timeslots(timeslots, loop.index) }} -
-{% endfor %} {# day loop end #} diff --git a/2016/assets/templates/lp-speakers-2016.jinja2 b/2016/assets/templates/lp-speakers-2016.jinja2 deleted file mode 100644 index 5c1c1327..00000000 --- a/2016/assets/templates/lp-speakers-2016.jinja2 +++ /dev/null @@ -1,124 +0,0 @@ -{# -*- 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 - . -#} - - -{# make speakers header macro #} -{% macro mk_speakers_header(speaker_type) %} -
-
- {% if speaker_type == 'keynote-speakers' %} -

Keynote speakers

- {% else %} -

Speakers

- {% endif %} -
-
-{% endmacro %} - -{# make keynote speaker header macro #} -{% macro mk_keynote_speaker_header(speaker, id) %} -
-
-

{{ speaker }}

-
-
-{% endmacro %} - -{# make speaker header macro #} -{% macro mk_speaker_header(speaker, id) %} -
-
-

{{ speaker }}

-
-
-{% endmacro %} - -{# make bio macro #} -{% macro mk_bio(bio_list) %} - {% for bio_p in bio_list %} -

{{ bio_p }}

- {% endfor %} -{% endmacro %} - -{# populate keynote speakers macro #} -{% macro populate_keynote_speakers(speakers) %} - {% for speaker in speakers %} -
- -
- {% if speaker.img_url %} - -
- [ {{ speaker.img_alt }} ] -
- -
- {% else %} - -
- {% endif %} - {{ mk_keynote_speaker_header(speaker.speaker, speaker.id) }} - {{ mk_bio(speaker.bio) }} -
-
-
- {% endfor %} -{% endmacro %} - -{# populate speakers macro #} -{% macro populate_speakers(speakers) %} - {% for speaker in speakers %} -
-
- {% if speaker.img_url %} - -
- [ {{ speaker.img_alt }} ] -
- -
- {% else %} - -
- {% endif %} - {{ mk_speaker_header(speaker.speaker, speaker.id) }} - {{ mk_bio(speaker.bio) }} -
-
-
- {% endfor %} -{% endmacro %} - -{# lp speakers 2016 template start #} -{% for speaker_type, speakers in lp_dict.iteritems() %} -
- {% 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 %} -
-{% endfor %} -{# lp speakers 2016 template end #} diff --git a/2017/Makefile b/2017/Makefile index 410ba86b..f49075be 100644 --- a/2017/Makefile +++ b/2017/Makefile @@ -16,11 +16,9 @@ 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 @@ -43,11 +41,11 @@ both: $(SPEAKERS_HTML) $(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 diff --git a/2017/README.md b/2017/README.md index 5a677b8c..26d99f6d 100644 --- a/2017/README.md +++ b/2017/README.md @@ -45,15 +45,7 @@ Here are specific instructions for more complex editing tasks: 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 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 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 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 . Then include their URL in the bios page to embed them. diff --git a/2017/assets/templates/lp-schedule.jinja2 b/2017/assets/templates/lp-schedule.jinja2 deleted file mode 100644 index 036b92e1..00000000 --- a/2017/assets/templates/lp-schedule.jinja2 +++ /dev/null @@ -1,132 +0,0 @@ -{# -*- 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 - . -#} - -{# macros start #} - -{# make speakers macro #} -{% macro mk_speakers(speakers) %} - {% if speakers[0]|lower != 'speakertba' %} - - {% for speaker in speakers %} - {% if loop.last %} - {{ speaker }} - {% else %} - {{ speaker }}, - {% endif %} - {% endfor %} - - {% endif %} -{% endmacro %} - -{# make room macro #} -{% macro mk_room(room) %} - {% if room|lower != 'roomtba' %} - {{ room }} - {% endif %} -{% endmacro %} - -{# make day header macro #} -{% macro mk_day_header(day, collapse_area) %} - {% if day|trim != '' %} -
-
-

{{ day }}

-
-
- {% endif %} -{% endmacro %} - -{# make timeslot header macro #} -{% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %} - {% if timeslot|trim != '' %} -
-
-

{{ timeslot }}

-
-
- {% endif %} -{% endmacro %} - -{# make session header macro #} -{% macro mk_session_header(session) %} - {% if session|trim not in ['', 'st-from-ts'] %} -
-
-

{{ session }}

-
-
- {% endif %} -{% endmacro %} - -{# desc macro #} -{% macro desc(disc_list) %} - {% for desc_p in disc_list %} -

{{ desc_p }}

- {% endfor %} -{% endmacro %} - -{# populate sessions macro #} -{% macro populate_sessions(sessions, day_index, timeslot_index) %} - {% for session, session_info in sessions.iteritems() %} {# session start #} -
- {{ mk_session_header(session) }} - {{ mk_speakers(session_info['speakers']) }} -

- {{ mk_room(session_info['room']) }} - {% if session_info['desc'][0]|lower == 'desctba' %} -

- {% else %} - -

-
- {{ desc(session_info['desc']) }} -
- {% endif %} -
- {% endfor %} {# session end #} -{% endmacro %} - -{# populate timeslots macro #} -{% macro populate_timeslots(timeslots, day_index) %} - {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #} -
- {{ mk_timeslot_header(timeslot) }} - {% if sessions|length > 0 %} - {{ populate_sessions(sessions, day_index, loop.index) }} - {% endif %} -
- {% endfor %} {# timeslot start #} -{% endmacro %} - -{# lp schedule 2016 template start #} -{% for day, timeslots in lp_dict.iteritems() %} {# day start #} -
- {{ mk_day_header(day) }} - {{ populate_timeslots(timeslots, loop.index) }} -
-{% endfor %} {# day loop end #} diff --git a/2017/assets/templates/lp-speakers.jinja2 b/2017/assets/templates/lp-speakers.jinja2 deleted file mode 100644 index 5c1c1327..00000000 --- a/2017/assets/templates/lp-speakers.jinja2 +++ /dev/null @@ -1,124 +0,0 @@ -{# -*- 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 - . -#} - - -{# make speakers header macro #} -{% macro mk_speakers_header(speaker_type) %} -
-
- {% if speaker_type == 'keynote-speakers' %} -

Keynote speakers

- {% else %} -

Speakers

- {% endif %} -
-
-{% endmacro %} - -{# make keynote speaker header macro #} -{% macro mk_keynote_speaker_header(speaker, id) %} -
-
-

{{ speaker }}

-
-
-{% endmacro %} - -{# make speaker header macro #} -{% macro mk_speaker_header(speaker, id) %} -
-
-

{{ speaker }}

-
-
-{% endmacro %} - -{# make bio macro #} -{% macro mk_bio(bio_list) %} - {% for bio_p in bio_list %} -

{{ bio_p }}

- {% endfor %} -{% endmacro %} - -{# populate keynote speakers macro #} -{% macro populate_keynote_speakers(speakers) %} - {% for speaker in speakers %} -
- -
- {% if speaker.img_url %} - -
- [ {{ speaker.img_alt }} ] -
- -
- {% else %} - -
- {% endif %} - {{ mk_keynote_speaker_header(speaker.speaker, speaker.id) }} - {{ mk_bio(speaker.bio) }} -
-
-
- {% endfor %} -{% endmacro %} - -{# populate speakers macro #} -{% macro populate_speakers(speakers) %} - {% for speaker in speakers %} -
-
- {% if speaker.img_url %} - -
- [ {{ speaker.img_alt }} ] -
- -
- {% else %} - -
- {% endif %} - {{ mk_speaker_header(speaker.speaker, speaker.id) }} - {{ mk_bio(speaker.bio) }} -
-
-
- {% endfor %} -{% endmacro %} - -{# lp speakers 2016 template start #} -{% for speaker_type, speakers in lp_dict.iteritems() %} -
- {% 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 %} -
-{% endfor %} -{# lp speakers 2016 template end #} diff --git a/2018/Makefile b/2018/Makefile index d68f6fba..dff644a3 100644 --- a/2018/Makefile +++ b/2018/Makefile @@ -16,11 +16,9 @@ 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 @@ -43,11 +41,11 @@ both: $(SPEAKERS_HTML) $(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 diff --git a/2018/README.md b/2018/README.md index 0d49d199..ca16e066 100644 --- a/2018/README.md +++ b/2018/README.md @@ -45,7 +45,7 @@ Here are specific instructions for more complex editing tasks: 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 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 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 . Then include their URL in the bios page to embed them. diff --git a/2018/assets/templates/lp-schedule.jinja2 b/2018/assets/templates/lp-schedule.jinja2 deleted file mode 100644 index cffee780..00000000 --- a/2018/assets/templates/lp-schedule.jinja2 +++ /dev/null @@ -1,160 +0,0 @@ -{# -*- 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 - . -#} - -{# macros start #} - -{# make speakers macro #} -{% macro mk_speakers(speakers) %} - {% if speakers[0]|lower != 'speakertba' %} -
- {% for speaker in speakers %} - {% if loop.last %} - {{ speaker }} - {% else %} - {{ speaker }}, - {% endif %} - {% endfor %} -
- {% endif %} -{% endmacro %} - -{# make room macro #} -{% macro mk_room(room) %} - {% if room|lower != 'roomtba' %} -
- {{ room }} -
- {% endif %} -{% endmacro %} - -{# make video macro #} -{% macro mk_video(video) %} - {% if video|lower != 'videotba' %} - - - - {% endif %} -{% endmacro %} - -{# make desc details button macro #} -{% macro mk_desc_details_btn(disc_list) %} - {% if disc_list[0]|lower != 'desctba' %} - - {% endif %} -{% endmacro %} - -{% macro mk_desc(disc_list) %} - {% if disc_list[0]|lower != 'desctba' %} -
- {{ desc(disc_list) }} -
- {% endif %} -{% endmacro %} - -{# make day header macro #} -{% macro mk_day_header(day, collapse_area) %} - {% if day|trim != '' %} -
-
-

{{ day }}

-
-
- {% endif %} -{% endmacro %} - -{# make timeslot header macro #} -{% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %} - {% if timeslot|trim != '' %} -
-
-

{{ timeslot }}

-
-
- {% endif %} -{% endmacro %} - -{# make session header macro #} -{% macro mk_session_header(session) %} - {% if session|trim not in ['', 'st-from-ts'] %} -
-
-

{{ session }}

-
-
- {% endif %} -{% endmacro %} - -{# desc macro #} -{% macro desc(disc_list) %} - {% for desc_p in disc_list %} -

{{ desc_p }}

- {% endfor %} -{% endmacro %} - -{# populate sessions macro #} -{% macro populate_sessions(sessions, day_index, timeslot_index) %} - {% for session, session_info in sessions.iteritems() %} {# session start #} -
- {{ mk_session_header(session) }} - {{ mk_speakers(session_info['speakers']) }} -
- {{ 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 %} -
- -
- {% call mk_desc(session_info['desc']) %} - day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse - {% endcall %} -
-
- {% endfor %} {# session end #} -{% endmacro %} - -{# populate timeslots macro #} -{% macro populate_timeslots(timeslots, day_index) %} - {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #} -
- {{ mk_timeslot_header(timeslot) }} - {% if sessions|length > 0 %} - {{ populate_sessions(sessions, day_index, loop.index) }} - {% endif %} -
- {% endfor %} {# timeslot start #} -{% endmacro %} - -{# lp schedule 2016 template start #} -{% for day, timeslots in lp_dict.iteritems() %} {# day start #} -
- {{ mk_day_header(day) }} - {{ populate_timeslots(timeslots, loop.index) }} -
-{% endfor %} {# day loop end #} diff --git a/2018/assets/templates/lp-speakers.jinja2 b/2018/assets/templates/lp-speakers.jinja2 deleted file mode 100644 index 5c1c1327..00000000 --- a/2018/assets/templates/lp-speakers.jinja2 +++ /dev/null @@ -1,124 +0,0 @@ -{# -*- 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 - . -#} - - -{# make speakers header macro #} -{% macro mk_speakers_header(speaker_type) %} -
-
- {% if speaker_type == 'keynote-speakers' %} -

Keynote speakers

- {% else %} -

Speakers

- {% endif %} -
-
-{% endmacro %} - -{# make keynote speaker header macro #} -{% macro mk_keynote_speaker_header(speaker, id) %} -
-
-

{{ speaker }}

-
-
-{% endmacro %} - -{# make speaker header macro #} -{% macro mk_speaker_header(speaker, id) %} -
-
-

{{ speaker }}

-
-
-{% endmacro %} - -{# make bio macro #} -{% macro mk_bio(bio_list) %} - {% for bio_p in bio_list %} -

{{ bio_p }}

- {% endfor %} -{% endmacro %} - -{# populate keynote speakers macro #} -{% macro populate_keynote_speakers(speakers) %} - {% for speaker in speakers %} -
- -
- {% if speaker.img_url %} - -
- [ {{ speaker.img_alt }} ] -
- -
- {% else %} - -
- {% endif %} - {{ mk_keynote_speaker_header(speaker.speaker, speaker.id) }} - {{ mk_bio(speaker.bio) }} -
-
-
- {% endfor %} -{% endmacro %} - -{# populate speakers macro #} -{% macro populate_speakers(speakers) %} - {% for speaker in speakers %} -
-
- {% if speaker.img_url %} - -
- [ {{ speaker.img_alt }} ] -
- -
- {% else %} - -
- {% endif %} - {{ mk_speaker_header(speaker.speaker, speaker.id) }} - {{ mk_bio(speaker.bio) }} -
-
-
- {% endfor %} -{% endmacro %} - -{# lp speakers 2016 template start #} -{% for speaker_type, speakers in lp_dict.iteritems() %} -
- {% 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 %} -
-{% endfor %} -{# lp speakers 2016 template end #} diff --git a/2019/Makefile b/2019/Makefile index cac9fc67..43e3cf9f 100644 --- a/2019/Makefile +++ b/2019/Makefile @@ -16,11 +16,9 @@ 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 @@ -43,11 +41,11 @@ both: $(SPEAKERS_HTML) $(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 diff --git a/2019/README.md b/2019/README.md index 11b6645f..cfcb3f31 100644 --- a/2019/README.md +++ b/2019/README.md @@ -45,7 +45,7 @@ Here are specific instructions for more complex editing tasks: 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 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 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 . Then include their URL in the bios page to embed them. diff --git a/2019/assets/templates/lp-schedule.jinja2 b/2019/assets/templates/lp-schedule.jinja2 deleted file mode 100644 index cffee780..00000000 --- a/2019/assets/templates/lp-schedule.jinja2 +++ /dev/null @@ -1,160 +0,0 @@ -{# -*- 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 - . -#} - -{# macros start #} - -{# make speakers macro #} -{% macro mk_speakers(speakers) %} - {% if speakers[0]|lower != 'speakertba' %} -
- {% for speaker in speakers %} - {% if loop.last %} - {{ speaker }} - {% else %} - {{ speaker }}, - {% endif %} - {% endfor %} -
- {% endif %} -{% endmacro %} - -{# make room macro #} -{% macro mk_room(room) %} - {% if room|lower != 'roomtba' %} -
- {{ room }} -
- {% endif %} -{% endmacro %} - -{# make video macro #} -{% macro mk_video(video) %} - {% if video|lower != 'videotba' %} - - - - {% endif %} -{% endmacro %} - -{# make desc details button macro #} -{% macro mk_desc_details_btn(disc_list) %} - {% if disc_list[0]|lower != 'desctba' %} - - {% endif %} -{% endmacro %} - -{% macro mk_desc(disc_list) %} - {% if disc_list[0]|lower != 'desctba' %} -
- {{ desc(disc_list) }} -
- {% endif %} -{% endmacro %} - -{# make day header macro #} -{% macro mk_day_header(day, collapse_area) %} - {% if day|trim != '' %} -
-
-

{{ day }}

-
-
- {% endif %} -{% endmacro %} - -{# make timeslot header macro #} -{% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %} - {% if timeslot|trim != '' %} -
-
-

{{ timeslot }}

-
-
- {% endif %} -{% endmacro %} - -{# make session header macro #} -{% macro mk_session_header(session) %} - {% if session|trim not in ['', 'st-from-ts'] %} -
-
-

{{ session }}

-
-
- {% endif %} -{% endmacro %} - -{# desc macro #} -{% macro desc(disc_list) %} - {% for desc_p in disc_list %} -

{{ desc_p }}

- {% endfor %} -{% endmacro %} - -{# populate sessions macro #} -{% macro populate_sessions(sessions, day_index, timeslot_index) %} - {% for session, session_info in sessions.iteritems() %} {# session start #} -
- {{ mk_session_header(session) }} - {{ mk_speakers(session_info['speakers']) }} -
- {{ 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 %} -
- -
- {% call mk_desc(session_info['desc']) %} - day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse - {% endcall %} -
-
- {% endfor %} {# session end #} -{% endmacro %} - -{# populate timeslots macro #} -{% macro populate_timeslots(timeslots, day_index) %} - {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #} -
- {{ mk_timeslot_header(timeslot) }} - {% if sessions|length > 0 %} - {{ populate_sessions(sessions, day_index, loop.index) }} - {% endif %} -
- {% endfor %} {# timeslot start #} -{% endmacro %} - -{# lp schedule 2016 template start #} -{% for day, timeslots in lp_dict.iteritems() %} {# day start #} -
- {{ mk_day_header(day) }} - {{ populate_timeslots(timeslots, loop.index) }} -
-{% endfor %} {# day loop end #} diff --git a/2019/assets/templates/lp-speakers.jinja2 b/2019/assets/templates/lp-speakers.jinja2 deleted file mode 100644 index 5c1c1327..00000000 --- a/2019/assets/templates/lp-speakers.jinja2 +++ /dev/null @@ -1,124 +0,0 @@ -{# -*- 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 - . -#} - - -{# make speakers header macro #} -{% macro mk_speakers_header(speaker_type) %} -
-
- {% if speaker_type == 'keynote-speakers' %} -

Keynote speakers

- {% else %} -

Speakers

- {% endif %} -
-
-{% endmacro %} - -{# make keynote speaker header macro #} -{% macro mk_keynote_speaker_header(speaker, id) %} -
-
-

{{ speaker }}

-
-
-{% endmacro %} - -{# make speaker header macro #} -{% macro mk_speaker_header(speaker, id) %} -
-
-

{{ speaker }}

-
-
-{% endmacro %} - -{# make bio macro #} -{% macro mk_bio(bio_list) %} - {% for bio_p in bio_list %} -

{{ bio_p }}

- {% endfor %} -{% endmacro %} - -{# populate keynote speakers macro #} -{% macro populate_keynote_speakers(speakers) %} - {% for speaker in speakers %} -
- -
- {% if speaker.img_url %} - -
- [ {{ speaker.img_alt }} ] -
- -
- {% else %} - -
- {% endif %} - {{ mk_keynote_speaker_header(speaker.speaker, speaker.id) }} - {{ mk_bio(speaker.bio) }} -
-
-
- {% endfor %} -{% endmacro %} - -{# populate speakers macro #} -{% macro populate_speakers(speakers) %} - {% for speaker in speakers %} -
-
- {% if speaker.img_url %} - -
- [ {{ speaker.img_alt }} ] -
- -
- {% else %} - -
- {% endif %} - {{ mk_speaker_header(speaker.speaker, speaker.id) }} - {{ mk_bio(speaker.bio) }} -
-
-
- {% endfor %} -{% endmacro %} - -{# lp speakers 2016 template start #} -{% for speaker_type, speakers in lp_dict.iteritems() %} -
- {% 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 %} -
-{% endfor %} -{# lp speakers 2016 template end #}