From 040f6e84159036b7176afc12eb1867666e39d3eb Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Fri, 1 Mar 2024 10:05:34 +0100 Subject: [PATCH] Change: put the result of every version on its own page --- .github/workflows/create-summary.yml | 13 +----- _layouts/summaries.html | 63 ++----------------------- _layouts/summary.html | 65 ++++++++++++++++++++++++++ _summaries/2024/wk01.md | 2 +- _summaries/2024/wk01/jgrpp-0.56.2.md | 10 ++++ _summaries/2024/wk02.md | 2 +- _summaries/2024/wk02/jgrpp-0.56.2.md | 10 ++++ _summaries/2024/wk03.md | 2 +- _summaries/2024/wk03/jgrpp-0.56.2.md | 10 ++++ _summaries/2024/wk03/vanilla-master.md | 10 ++++ _summaries/2024/wk04.md | 2 +- _summaries/2024/wk04/jgrpp-0.56.2.md | 10 ++++ _summaries/2024/wk04/vanilla-master.md | 10 ++++ _summaries/2024/wk05.md | 2 +- _summaries/2024/wk05/14.0-beta1.md | 10 ++++ _summaries/2024/wk05/jgrpp-0.56.2.md | 10 ++++ _summaries/2024/wk05/vanilla-master.md | 10 ++++ _summaries/2024/wk06.md | 2 +- _summaries/2024/wk06/14.0-beta2.md | 10 ++++ _summaries/2024/wk06/14.0-beta3.md | 10 ++++ _summaries/2024/wk06/jgrpp-0.56.2.md | 10 ++++ _summaries/2024/wk06/jgrpp-0.57.1.md | 10 ++++ _summaries/2024/wk06/vanilla-master.md | 10 ++++ _summaries/2024/wk07.md | 2 +- _summaries/2024/wk07/14.0-beta3.md | 10 ++++ _summaries/2024/wk07/jgrpp-0.56.2.md | 10 ++++ _summaries/2024/wk07/jgrpp-0.57.1.md | 10 ++++ _summaries/2024/wk07/vanilla-master.md | 10 ++++ _summaries/2024/wk08.md | 2 +- _summaries/2024/wk08/14.0-RC1.md | 10 ++++ _summaries/2024/wk08/14.0-beta3.md | 10 ++++ _summaries/2024/wk08/jgrpp-0.56.2.md | 10 ++++ _summaries/2024/wk08/jgrpp-0.57.1.md | 10 ++++ _summaries/2024/wk08/vanilla-master.md | 10 ++++ create_markdown/__main__.py | 51 ++++++++++++++++++++ pages/summaries.html | 1 + 36 files changed, 361 insertions(+), 78 deletions(-) create mode 100644 _layouts/summary.html create mode 100644 _summaries/2024/wk01/jgrpp-0.56.2.md create mode 100644 _summaries/2024/wk02/jgrpp-0.56.2.md create mode 100644 _summaries/2024/wk03/jgrpp-0.56.2.md create mode 100644 _summaries/2024/wk03/vanilla-master.md create mode 100644 _summaries/2024/wk04/jgrpp-0.56.2.md create mode 100644 _summaries/2024/wk04/vanilla-master.md create mode 100644 _summaries/2024/wk05/14.0-beta1.md create mode 100644 _summaries/2024/wk05/jgrpp-0.56.2.md create mode 100644 _summaries/2024/wk05/vanilla-master.md create mode 100644 _summaries/2024/wk06/14.0-beta2.md create mode 100644 _summaries/2024/wk06/14.0-beta3.md create mode 100644 _summaries/2024/wk06/jgrpp-0.56.2.md create mode 100644 _summaries/2024/wk06/jgrpp-0.57.1.md create mode 100644 _summaries/2024/wk06/vanilla-master.md create mode 100644 _summaries/2024/wk07/14.0-beta3.md create mode 100644 _summaries/2024/wk07/jgrpp-0.56.2.md create mode 100644 _summaries/2024/wk07/jgrpp-0.57.1.md create mode 100644 _summaries/2024/wk07/vanilla-master.md create mode 100644 _summaries/2024/wk08/14.0-RC1.md create mode 100644 _summaries/2024/wk08/14.0-beta3.md create mode 100644 _summaries/2024/wk08/jgrpp-0.56.2.md create mode 100644 _summaries/2024/wk08/jgrpp-0.57.1.md create mode 100644 _summaries/2024/wk08/vanilla-master.md create mode 100644 create_markdown/__main__.py diff --git a/.github/workflows/create-summary.yml b/.github/workflows/create-summary.yml index e333edc..a016366 100644 --- a/.github/workflows/create-summary.yml +++ b/.github/workflows/create-summary.yml @@ -122,18 +122,7 @@ jobs: - name: Create summary entry shell: bash run: | - mkdir -p _summaries/${{ steps.dates.outputs.year }} - summary="_summaries/${{ steps.dates.outputs.year }}/wk${{ steps.dates.outputs.week }}.md" - - echo "---" > ${summary} - echo "name: ${{ steps.dates.outputs.year }} - Week ${{ steps.dates.outputs.week }}" >> ${summary} - echo "title: Survey Result Summary - ${{ steps.dates.outputs.year }} - Week ${{ steps.dates.outputs.week }}" - echo "active_nav: summaries" >> ${summary} - echo "year: \"${{ steps.dates.outputs.year }}\"" >> ${summary} - echo "week: wk${{ steps.dates.outputs.week }}" >> ${summary} - echo "start_date: \"${{ steps.dates.outputs.start_date }}\"" >> ${summary} - echo "end_date: \"${{ steps.dates.outputs.end_date }}\"" >> ${summary} - echo "---" >> ${summary} + python -m create_markdown ${{ steps.dates.outputs.year }} ${{ steps.dates.outputs.week }} ${{ steps.dates.outputs.start_date }} ${{ steps.dates.outputs.end_date }} - name: Commit and push shell: bash diff --git a/_layouts/summaries.html b/_layouts/summaries.html index 19990b1..9d35e0c 100644 --- a/_layouts/summaries.html +++ b/_layouts/summaries.html @@ -9,74 +9,21 @@

Survey Result Summary - {{ page.name }}

- Below is the summary of the survey results from {{ page.start_date }} to {{ page.end_date }}. + Below are the versions with a summary of the survey results from {{ page.start_date }} to {{ page.end_date }}.

    - {% for version in site.data.summaries[page.year][page.week] %} - {% if version[1] == nil %}{% continue %}{% endif %} + {% for summary in site.summaries %} + {% if summary.year != page.year or summary.week != page.week or summary.version == nil %}{% continue %}{% endif %}
  • - {{ version[0] }} + {{ summary.version }}
  • {% endfor %}

- The following statistics are based on "seconds played". - That is to say, if a setting was "true" for 100 seconds of play-time and "false" for 200 seconds of play-time, it would be 33% true and 66% false. - This is to avoid biasing the results towards shorter games. -
- Worded differently, the following statistics are not counting how often something was used, but how long it was used for. -

- -

- Be mindful that these numbers are only based on those people willing to send us survey results. - It might not be representative of the entire OpenTTD player base. -

- -

- Entries listed as "(other)" are the collection of all values lower than 0.1% of the total. + Some versions are hidden because they did not receive enough survey results.

- - {% for version in site.data.summaries[page.year][page.week] %} - {% if version[1] == nil %}{% continue %}{% endif %} -
-

{{ version[0] }}

-
-
-
- {% assign seconds = version[1].summary.seconds | times: 1.0 %} - -

- We received surveys for a total of {{ version[1].summary.seconds | divided_by: 3600 | round: 2 }} hours of games played, over a total of {{ version[1].summary.ids }} games. - This is an average of {{ seconds | divided_by: version[1].summary.ids | divided_by: 3600 | round: 2 }} hours per game. -

- - - {% for summary in version[1] %} - {% if summary[0] == "summary" %}{% continue %}{% endif %} - - - - {% for line in summary[1] %} - {% assign percentage = line[1] | divided_by: seconds | percentage %} - - - - {% if percentage == "0.0" %} - - {% else %} - - {% endif %} - - {% endfor %} - {% endfor %} -
- {{ summary[0] }} -
{{ line[0] }}
<0.1%{{ percentage }}%
-
-
- {% endfor %} diff --git a/_layouts/summary.html b/_layouts/summary.html new file mode 100644 index 0000000..29eafa6 --- /dev/null +++ b/_layouts/summary.html @@ -0,0 +1,65 @@ +--- +layout: default +--- + +
+
+

Survey Result Summary - {{ page.name }}

+
+
+
+

+ Below is the summary of the survey results from {{ page.start_date }} to {{ page.end_date }} for {{ page.version }}. +

+ +

+ The following statistics are based on "seconds played". + That is to say, if a setting was "true" for 100 seconds of play-time and "false" for 200 seconds of play-time, it would be 33% true and 66% false. + This is to avoid biasing the results towards shorter games. +
+ Worded differently, the following statistics are not counting how often something was used, but how long it was used for. +

+ +

+ Be mindful that these numbers are only based on those people willing to send us survey results. + It might not be representative of the entire OpenTTD player base. +

+ +

+ Entries listed as "(other)" are the collection of all values lower than 0.1% of the total. +

+ + {% assign versions = site.data.summaries[page.year][page.week] %} + {% assign version = versions[page.version] %} + {% assign seconds = version.summary.seconds | times: 1.0 %} + +

+ We received surveys for a total of {{ version.summary.seconds | divided_by: 3600 | round: 2 }} hours of games played, over a total of {{ version.summary.ids }} games. + This is an average of {{ seconds | divided_by: version.summary.ids | divided_by: 3600 | round: 2 }} hours per game. +

+ + + {% for summary in version %} + {% if summary[0] == "summary" %}{% continue %}{% endif %} + + + + {% for line in summary[1] %} + {% assign percentage = line[1] | divided_by: seconds | percentage %} + + + + {% if percentage == "0.0" %} + + {% else %} + + {% endif %} + + {% endfor %} + {% endfor %} +
+ {{ summary[0] }} +
{{ line[0] }}
<0.1%{{ percentage }}%
+
+
+
diff --git a/_summaries/2024/wk01.md b/_summaries/2024/wk01.md index 33f6202..fb9cb06 100644 --- a/_summaries/2024/wk01.md +++ b/_summaries/2024/wk01.md @@ -2,7 +2,7 @@ name: 2024 - Week 01 active_nav: summaries year: "2024" -week: wk01 +week: "wk01" start_date: "2024-01-01" end_date: "2024-01-07" --- diff --git a/_summaries/2024/wk01/jgrpp-0.56.2.md b/_summaries/2024/wk01/jgrpp-0.56.2.md new file mode 100644 index 0000000..7d47a23 --- /dev/null +++ b/_summaries/2024/wk01/jgrpp-0.56.2.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 01 - jgrpp-0.56.2 +active_nav: summaries +year: "2024" +week: "wk01" +version: "jgrpp-0.56.2" +start_date: "2024-01-01" +end_date: "2024-01-07" +layout: "summary" +--- diff --git a/_summaries/2024/wk02.md b/_summaries/2024/wk02.md index 7fb6d67..fb0e08c 100644 --- a/_summaries/2024/wk02.md +++ b/_summaries/2024/wk02.md @@ -2,7 +2,7 @@ name: 2024 - Week 02 active_nav: summaries year: "2024" -week: wk02 +week: "wk02" start_date: "2024-01-08" end_date: "2024-01-14" --- diff --git a/_summaries/2024/wk02/jgrpp-0.56.2.md b/_summaries/2024/wk02/jgrpp-0.56.2.md new file mode 100644 index 0000000..acbd24d --- /dev/null +++ b/_summaries/2024/wk02/jgrpp-0.56.2.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 02 - jgrpp-0.56.2 +active_nav: summaries +year: "2024" +week: "wk02" +version: "jgrpp-0.56.2" +start_date: "2024-01-08" +end_date: "2024-01-14" +layout: "summary" +--- diff --git a/_summaries/2024/wk03.md b/_summaries/2024/wk03.md index 0fae156..11a2307 100644 --- a/_summaries/2024/wk03.md +++ b/_summaries/2024/wk03.md @@ -2,7 +2,7 @@ name: 2024 - Week 03 active_nav: summaries year: "2024" -week: wk03 +week: "wk03" start_date: "2024-01-15" end_date: "2024-01-21" --- diff --git a/_summaries/2024/wk03/jgrpp-0.56.2.md b/_summaries/2024/wk03/jgrpp-0.56.2.md new file mode 100644 index 0000000..9094764 --- /dev/null +++ b/_summaries/2024/wk03/jgrpp-0.56.2.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 03 - jgrpp-0.56.2 +active_nav: summaries +year: "2024" +week: "wk03" +version: "jgrpp-0.56.2" +start_date: "2024-01-15" +end_date: "2024-01-21" +layout: "summary" +--- diff --git a/_summaries/2024/wk03/vanilla-master.md b/_summaries/2024/wk03/vanilla-master.md new file mode 100644 index 0000000..be14a9f --- /dev/null +++ b/_summaries/2024/wk03/vanilla-master.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 03 - vanilla-master +active_nav: summaries +year: "2024" +week: "wk03" +version: "vanilla-master" +start_date: "2024-01-15" +end_date: "2024-01-21" +layout: "summary" +--- diff --git a/_summaries/2024/wk04.md b/_summaries/2024/wk04.md index c9faf9c..70f6b27 100644 --- a/_summaries/2024/wk04.md +++ b/_summaries/2024/wk04.md @@ -2,7 +2,7 @@ name: 2024 - Week 04 active_nav: summaries year: "2024" -week: wk04 +week: "wk04" start_date: "2024-01-22" end_date: "2024-01-28" --- diff --git a/_summaries/2024/wk04/jgrpp-0.56.2.md b/_summaries/2024/wk04/jgrpp-0.56.2.md new file mode 100644 index 0000000..165a87e --- /dev/null +++ b/_summaries/2024/wk04/jgrpp-0.56.2.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 04 - jgrpp-0.56.2 +active_nav: summaries +year: "2024" +week: "wk04" +version: "jgrpp-0.56.2" +start_date: "2024-01-22" +end_date: "2024-01-28" +layout: "summary" +--- diff --git a/_summaries/2024/wk04/vanilla-master.md b/_summaries/2024/wk04/vanilla-master.md new file mode 100644 index 0000000..5b16c35 --- /dev/null +++ b/_summaries/2024/wk04/vanilla-master.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 04 - vanilla-master +active_nav: summaries +year: "2024" +week: "wk04" +version: "vanilla-master" +start_date: "2024-01-22" +end_date: "2024-01-28" +layout: "summary" +--- diff --git a/_summaries/2024/wk05.md b/_summaries/2024/wk05.md index f4e81bd..6bf15eb 100644 --- a/_summaries/2024/wk05.md +++ b/_summaries/2024/wk05.md @@ -2,7 +2,7 @@ name: 2024 - Week 05 active_nav: summaries year: "2024" -week: wk05 +week: "wk05" start_date: "2024-01-29" end_date: "2024-02-04" --- diff --git a/_summaries/2024/wk05/14.0-beta1.md b/_summaries/2024/wk05/14.0-beta1.md new file mode 100644 index 0000000..c4ae842 --- /dev/null +++ b/_summaries/2024/wk05/14.0-beta1.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 05 - 14.0-beta1 +active_nav: summaries +year: "2024" +week: "wk05" +version: "14.0-beta1" +start_date: "2024-01-29" +end_date: "2024-02-04" +layout: "summary" +--- diff --git a/_summaries/2024/wk05/jgrpp-0.56.2.md b/_summaries/2024/wk05/jgrpp-0.56.2.md new file mode 100644 index 0000000..4e4f49e --- /dev/null +++ b/_summaries/2024/wk05/jgrpp-0.56.2.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 05 - jgrpp-0.56.2 +active_nav: summaries +year: "2024" +week: "wk05" +version: "jgrpp-0.56.2" +start_date: "2024-01-29" +end_date: "2024-02-04" +layout: "summary" +--- diff --git a/_summaries/2024/wk05/vanilla-master.md b/_summaries/2024/wk05/vanilla-master.md new file mode 100644 index 0000000..291d8ce --- /dev/null +++ b/_summaries/2024/wk05/vanilla-master.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 05 - vanilla-master +active_nav: summaries +year: "2024" +week: "wk05" +version: "vanilla-master" +start_date: "2024-01-29" +end_date: "2024-02-04" +layout: "summary" +--- diff --git a/_summaries/2024/wk06.md b/_summaries/2024/wk06.md index c924e9a..1d22729 100644 --- a/_summaries/2024/wk06.md +++ b/_summaries/2024/wk06.md @@ -2,7 +2,7 @@ name: 2024 - Week 06 active_nav: summaries year: "2024" -week: wk06 +week: "wk06" start_date: "2024-02-05" end_date: "2024-02-11" --- diff --git a/_summaries/2024/wk06/14.0-beta2.md b/_summaries/2024/wk06/14.0-beta2.md new file mode 100644 index 0000000..54ee674 --- /dev/null +++ b/_summaries/2024/wk06/14.0-beta2.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 06 - 14.0-beta2 +active_nav: summaries +year: "2024" +week: "wk06" +version: "14.0-beta2" +start_date: "2024-02-05" +end_date: "2024-02-11" +layout: "summary" +--- diff --git a/_summaries/2024/wk06/14.0-beta3.md b/_summaries/2024/wk06/14.0-beta3.md new file mode 100644 index 0000000..d227a98 --- /dev/null +++ b/_summaries/2024/wk06/14.0-beta3.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 06 - 14.0-beta3 +active_nav: summaries +year: "2024" +week: "wk06" +version: "14.0-beta3" +start_date: "2024-02-05" +end_date: "2024-02-11" +layout: "summary" +--- diff --git a/_summaries/2024/wk06/jgrpp-0.56.2.md b/_summaries/2024/wk06/jgrpp-0.56.2.md new file mode 100644 index 0000000..b2fb6e9 --- /dev/null +++ b/_summaries/2024/wk06/jgrpp-0.56.2.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 06 - jgrpp-0.56.2 +active_nav: summaries +year: "2024" +week: "wk06" +version: "jgrpp-0.56.2" +start_date: "2024-02-05" +end_date: "2024-02-11" +layout: "summary" +--- diff --git a/_summaries/2024/wk06/jgrpp-0.57.1.md b/_summaries/2024/wk06/jgrpp-0.57.1.md new file mode 100644 index 0000000..e7cbcd7 --- /dev/null +++ b/_summaries/2024/wk06/jgrpp-0.57.1.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 06 - jgrpp-0.57.1 +active_nav: summaries +year: "2024" +week: "wk06" +version: "jgrpp-0.57.1" +start_date: "2024-02-05" +end_date: "2024-02-11" +layout: "summary" +--- diff --git a/_summaries/2024/wk06/vanilla-master.md b/_summaries/2024/wk06/vanilla-master.md new file mode 100644 index 0000000..d03f02f --- /dev/null +++ b/_summaries/2024/wk06/vanilla-master.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 06 - vanilla-master +active_nav: summaries +year: "2024" +week: "wk06" +version: "vanilla-master" +start_date: "2024-02-05" +end_date: "2024-02-11" +layout: "summary" +--- diff --git a/_summaries/2024/wk07.md b/_summaries/2024/wk07.md index d191a09..f789ff9 100644 --- a/_summaries/2024/wk07.md +++ b/_summaries/2024/wk07.md @@ -2,7 +2,7 @@ name: 2024 - Week 07 active_nav: summaries year: "2024" -week: wk07 +week: "wk07" start_date: "2024-02-12" end_date: "2024-02-18" --- diff --git a/_summaries/2024/wk07/14.0-beta3.md b/_summaries/2024/wk07/14.0-beta3.md new file mode 100644 index 0000000..36adf22 --- /dev/null +++ b/_summaries/2024/wk07/14.0-beta3.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 07 - 14.0-beta3 +active_nav: summaries +year: "2024" +week: "wk07" +version: "14.0-beta3" +start_date: "2024-02-12" +end_date: "2024-02-18" +layout: "summary" +--- diff --git a/_summaries/2024/wk07/jgrpp-0.56.2.md b/_summaries/2024/wk07/jgrpp-0.56.2.md new file mode 100644 index 0000000..5b26e9c --- /dev/null +++ b/_summaries/2024/wk07/jgrpp-0.56.2.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 07 - jgrpp-0.56.2 +active_nav: summaries +year: "2024" +week: "wk07" +version: "jgrpp-0.56.2" +start_date: "2024-02-12" +end_date: "2024-02-18" +layout: "summary" +--- diff --git a/_summaries/2024/wk07/jgrpp-0.57.1.md b/_summaries/2024/wk07/jgrpp-0.57.1.md new file mode 100644 index 0000000..7830374 --- /dev/null +++ b/_summaries/2024/wk07/jgrpp-0.57.1.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 07 - jgrpp-0.57.1 +active_nav: summaries +year: "2024" +week: "wk07" +version: "jgrpp-0.57.1" +start_date: "2024-02-12" +end_date: "2024-02-18" +layout: "summary" +--- diff --git a/_summaries/2024/wk07/vanilla-master.md b/_summaries/2024/wk07/vanilla-master.md new file mode 100644 index 0000000..a01848d --- /dev/null +++ b/_summaries/2024/wk07/vanilla-master.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 07 - vanilla-master +active_nav: summaries +year: "2024" +week: "wk07" +version: "vanilla-master" +start_date: "2024-02-12" +end_date: "2024-02-18" +layout: "summary" +--- diff --git a/_summaries/2024/wk08.md b/_summaries/2024/wk08.md index 3b90c70..5f4d6af 100644 --- a/_summaries/2024/wk08.md +++ b/_summaries/2024/wk08.md @@ -2,7 +2,7 @@ name: 2024 - Week 08 active_nav: summaries year: "2024" -week: wk08 +week: "wk08" start_date: "2024-02-19" end_date: "2024-02-25" --- diff --git a/_summaries/2024/wk08/14.0-RC1.md b/_summaries/2024/wk08/14.0-RC1.md new file mode 100644 index 0000000..f1d242f --- /dev/null +++ b/_summaries/2024/wk08/14.0-RC1.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 08 - 14.0-RC1 +active_nav: summaries +year: "2024" +week: "wk08" +version: "14.0-RC1" +start_date: "2024-02-19" +end_date: "2024-02-25" +layout: "summary" +--- diff --git a/_summaries/2024/wk08/14.0-beta3.md b/_summaries/2024/wk08/14.0-beta3.md new file mode 100644 index 0000000..18e889a --- /dev/null +++ b/_summaries/2024/wk08/14.0-beta3.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 08 - 14.0-beta3 +active_nav: summaries +year: "2024" +week: "wk08" +version: "14.0-beta3" +start_date: "2024-02-19" +end_date: "2024-02-25" +layout: "summary" +--- diff --git a/_summaries/2024/wk08/jgrpp-0.56.2.md b/_summaries/2024/wk08/jgrpp-0.56.2.md new file mode 100644 index 0000000..b197022 --- /dev/null +++ b/_summaries/2024/wk08/jgrpp-0.56.2.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 08 - jgrpp-0.56.2 +active_nav: summaries +year: "2024" +week: "wk08" +version: "jgrpp-0.56.2" +start_date: "2024-02-19" +end_date: "2024-02-25" +layout: "summary" +--- diff --git a/_summaries/2024/wk08/jgrpp-0.57.1.md b/_summaries/2024/wk08/jgrpp-0.57.1.md new file mode 100644 index 0000000..15851e6 --- /dev/null +++ b/_summaries/2024/wk08/jgrpp-0.57.1.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 08 - jgrpp-0.57.1 +active_nav: summaries +year: "2024" +week: "wk08" +version: "jgrpp-0.57.1" +start_date: "2024-02-19" +end_date: "2024-02-25" +layout: "summary" +--- diff --git a/_summaries/2024/wk08/vanilla-master.md b/_summaries/2024/wk08/vanilla-master.md new file mode 100644 index 0000000..99d6ae2 --- /dev/null +++ b/_summaries/2024/wk08/vanilla-master.md @@ -0,0 +1,10 @@ +--- +name: 2024 - Week 08 - vanilla-master +active_nav: summaries +year: "2024" +week: "wk08" +version: "vanilla-master" +start_date: "2024-02-19" +end_date: "2024-02-25" +layout: "summary" +--- diff --git a/create_markdown/__main__.py b/create_markdown/__main__.py new file mode 100644 index 0000000..990bfde --- /dev/null +++ b/create_markdown/__main__.py @@ -0,0 +1,51 @@ +import json +import os +import sys + +def create_summary(year, week, start_date, end_date): + output = f"_summaries/{year}/wk{week}.md" + os.makedirs(os.path.dirname(output), exist_ok=True) + + with open(output, "w") as file: + file.write(f"""--- +name: {year} - Week {week} +active_nav: summaries +year: "{year}" +week: "wk{week}" +start_date: "{start_date}" +end_date: "{end_date}" +--- +""") + +def create_version(year, week, start_date, end_date, version): + output = f"_summaries/{year}/wk{week}/{version}.md" + os.makedirs(os.path.dirname(output), exist_ok=True) + + with open(output, "w") as file: + file.write(f"""--- +name: {year} - Week {week} - {version} +active_nav: summaries +year: "{year}" +week: "wk{week}" +version: "{version}" +start_date: "{start_date}" +end_date: "{end_date}" +layout: "summary" +--- +""") + +def main(): + year = sys.argv[1] + week = sys.argv[2] + start_date = sys.argv[3] + end_date = sys.argv[4] + + create_summary(year, week, start_date, end_date) + with open(f"_data/summaries/{year}/wk{week}.json", "r") as file: + data = json.load(file) + for version, content in data.items(): + if content: + create_version(year, week, start_date, end_date, version) + +if __name__ == "__main__": + main() diff --git a/pages/summaries.html b/pages/summaries.html index 81d56b0..c0f6969 100644 --- a/pages/summaries.html +++ b/pages/summaries.html @@ -12,6 +12,7 @@

Survey Result Summaries

{% for summary in site.summaries %} + {% if summary.version != nil %}{% continue %}{% endif %} {{ summary.end_date }}: Survey Result Summary - {{ summary.name }}
{% endfor %}