Skip to content

Commit 0eb29ba

Browse files
Grzegorz Kocjangkocjan
Grzegorz Kocjan
authored andcommitted
Basic version of automatic infographic generation
Only works for 2 talks and needs cleanup
1 parent b8bf5ca commit 0eb29ba

20 files changed

+106
-7
lines changed

Diff for: assets/fonts/OpenSans-Bold.ttf

128 KB
Binary file not shown.

Diff for: assets/fonts/OpenSans-ExtraBold.ttf

128 KB
Binary file not shown.

Diff for: assets/fonts/OpenSans-Light.ttf

128 KB
Binary file not shown.

Diff for: assets/fonts/OpenSans-Medium.ttf

128 KB
Binary file not shown.

Diff for: assets/fonts/OpenSans-Regular.ttf

128 KB
Binary file not shown.

Diff for: assets/fonts/OpenSans-SemiBold.ttf

128 KB
Binary file not shown.

Diff for: assets/images/avatars/daniel-rozycki.jpeg

-220 KB
Binary file not shown.

Diff for: assets/images/avatars/daniel-rozycki.png

469 KB
Loading

Diff for: assets/images/avatars/kamil-kucharski.png

417 KB
Loading

Diff for: assets/images/avatars/mask.png

5.77 KB
Loading

Diff for: assets/images/avatars/michal-moroz.jpg

-330 KB
Binary file not shown.

Diff for: assets/images/avatars/michal-moroz.png

1.2 MB
Loading

Diff for: assets/images/infographic_template.png

810 KB
Loading

Diff for: content/spotkania/55.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Meetup #55"
33
date: 2024-11-27
44
time: "18:00"
5-
place: "Hi Piotrkowska, Łódź"
5+
place: "**IndieBI**, Piotrkowska 157A, budynek Hi Piotrkowska"
66
meetup_link: "https://www.meetup.com/python-lodz/events/303808956/"
77
sponsors: [indiebi, sunscrapers]
88

Diff for: content/spotkania/56.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Meetup #56"
33
date: 2025-01-29
44
time: "18:00"
5-
place: "Hi Piotrkowska, Łódź"
5+
place: "**IndieBI**, Piotrkowska 157A, budynek Hi Piotrkowska"
66
meetup_link: "https://www.meetup.com/python-lodz/events/305328267/"
77
sponsors: [indiebi, sunscrapers]
88

Diff for: content/spotkania/57.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Meetup #57"
33
date: 2025-03-26
44
time: "18:00"
5-
place: "Hi Piotrkowska, Łódź"
5+
place: "**IndieBI**, Piotrkowska 157A, budynek Hi Piotrkowska"
66
meetup_link: "https://www.meetup.com/python-lodz/events/305850516/"
77
live_stream: ""
88
sponsors: [indiebi, sunscrapers]
@@ -11,7 +11,9 @@ featured: true
1111

1212
talks:
1313
- speaker_id: "michal-mroz"
14-
talk_title: "Czego o product developmencie uczy 5 lat rozwoju własnej aplikacji do journalingu"
14+
talk_title: |
15+
Czego o product developmencie uczy 5 lat
16+
rozwoju własnej aplikacji do journalingu
1517
talk_description: |
1618
Rozwijam produkt, którego sam jestem klientem i product ownerem. I na pierwszy rzut oka, to powinno dawać mi natychmiastowy feedback. W końcu nie ma narzutów komunikacyjnych, czekania aż ktoś zaakceptuje jakiś pomysł. A jednak, często idee walidują się miesiącami. Dlaczego tak jest?
1719

Diff for: data/speakers/daniel-rozycki.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "Daniel Różycki"
2-
avatar: "images/avatars/daniel-rozycki.jpeg"
2+
avatar: "images/avatars/daniel-rozycki.png"
33
bio: "Daniel Różycki rozpoczął swoją karierę od budowania aplikacji do zarządzania tokenami ERC-20, koncentrując się na platformach ICO i technologii blockchain. Aktualnie pracuje jako Senior Python Developer w STX Next, gdzie kieruje rozwojem wysoko konfigurowalnej platformy AI Governance, która ma na celu usprawnienie procesów zarządzania i zwiększenie efektywności operacyjnej."
44
social: [
55
{ facebook: "https://www.facebook.com/altosterino" },

Diff for: data/speakers/michal-mroz.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "Michał Moroz"
2-
avatar: "images/avatars/michal-moroz.jpg"
2+
avatar: "images/avatars/michal-moroz.png"
33
bio: "Michał Moroz - Chief Innovation Officer i współzałożyciel Makimo – IT Consultancy & Software Services. Programista od ponad 15 lat, na co dzień zajmuje się pracą z systemami legacy i rozwojem firmy Makimo. Umiejętności przywódcze rozwijał również w organizacjach non-profit – na studiach w Niezależnym Zrzeszeniu Studentów Regionu Łódzkiego, obecnie w klubie Toastmasters Speakers of Łódź. Poza programowaniem ćwiczy się w przemawianiu publicznym, a także zbiera idee i nowe pojęcia, które może włączyć do swojego postrzegania świata."
44
social: [
55
{ facebook: "https://www.facebook.com/michalpiotrmoroz" },

Diff for: layouts/partials/infographic-image.html

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{{ $fontNormal := resources.Get "fonts/OpenSans-Medium.ttf" }}
2+
{{ $fontBold := resources.Get "fonts/OpenSans-Bold.ttf" }}
3+
4+
{{ $bg := resources.Get "images/infographic_template.png" }}
5+
{{ $final := $bg }}
6+
7+
{{ $imgWidth := $final.Width }}
8+
{{ $date := (printf "%sr. godz. %s" (.Page.Params.date | time.Format "Monday 02.01.2006"| strings.ToUpper) .Page.Params.time) }}
9+
{{ $mainDateOptions := dict
10+
"color" "#393f5f"
11+
"size" 80
12+
"x" (div $imgWidth 2)
13+
"y" 267.5
14+
"font" $fontNormal
15+
"alignx" "center"
16+
}}
17+
{{ $final = $final.Filter (images.Text $date $mainDateOptions) }}
18+
19+
{{ $bottomDateOptions := dict
20+
"color" "#393f5f"
21+
"size" 32
22+
"x" 126.6
23+
"y" 1010.3
24+
"font" $fontNormal
25+
}}
26+
{{ $final = $final.Filter (images.Text $date $bottomDateOptions) }}
27+
28+
{{ $talk1 := index .Page.Params.talks 0}}
29+
30+
{{ $speaker1 := index site.Data.speakers $talk1.speaker_id }}
31+
{{ $author1Options := dict
32+
"color" "#393f5f"
33+
"size" 32
34+
"x" 428.7
35+
"y" 543.8
36+
"font" $fontNormal
37+
}}
38+
{{ $final = $final.Filter (images.Text $speaker1.name $author1Options) }}
39+
40+
{{ $title1Options := dict
41+
"color" "#393f5f"
42+
"size" 32
43+
"x" 428.7
44+
"y" 592.1
45+
"font" $fontBold
46+
}}
47+
{{ $final = $final.Filter (images.Text $talk1.talk_title $title1Options) }}
48+
49+
{{ $avatarMaskFilter := images.Mask (resources.Get "images/avatars/mask.png") }}
50+
51+
{{ $speaker1Img := resources.Get $speaker1.avatar }}
52+
{{ $speaker1 := $speaker1Img.Fill "240x240 center" }}
53+
54+
{{ $maskedSpeaker1 := $speaker1 | images.Filter $avatarMaskFilter }}
55+
56+
{{ $final := $final.Filter (images.Overlay $maskedSpeaker1 122 490) }}
57+
58+
{{ $final := $final.Filter (images.Overlay $maskedSpeaker1 1537 585) }}
59+
{{ $talk2 := index .Page.Params.talks 1}}
60+
61+
{{ $speaker2 := index site.Data.speakers $talk2.speaker_id }}
62+
{{ $author1Options := dict
63+
"alignx" "right"
64+
"color" "#393f5f"
65+
"size" 32
66+
"x" 1495.8
67+
"y" 656.6
68+
"font" $fontNormal
69+
}}
70+
{{ $final = $final.Filter (images.Text $speaker2.name $author1Options) }}
71+
72+
{{ $title2Options := dict
73+
"alignx" "right"
74+
"color" "#393f5f"
75+
"size" 32
76+
"x" 1495.8
77+
"y" 704.9
78+
"font" $fontBold
79+
}}
80+
{{ $final = $final.Filter (images.Text $talk2.talk_title $title2Options) }}
81+
82+
83+
84+
{{ $speaker2Img := resources.Get $speaker2.avatar }}
85+
{{ $speaker2 := $speaker2Img.Fill "240x240 center" }}
86+
87+
{{ $maskedSpeaker2 := $speaker2 | images.Filter $avatarMaskFilter }}
88+
89+
{{ $final := $final.Filter (images.Overlay $maskedSpeaker2 1537 585) }}
90+
91+
92+
{{ return $final.RelPermalink }}

Diff for: layouts/shortcodes/meetup-details.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@
33
<link rel="stylesheet" href="{{ $youtubeLiteCSS.RelPermalink }}" integrity="{{ $youtubeLiteCSS.Data.Integrity }}"/>
44
<script src="{{ $youtubeLiteJS.RelPermalink }}" integrity="{{ $youtubeLiteJS.Data.Integrity }}"></script>
55

6+
{{ if eq (len .Page.Params.talks) 2 }}
7+
{{- $hero := partial "infographic-image.html" . -}}
8+
<meta property="og:image" content=" {{ $hero }}">
9+
10+
{{ end }}
611
<h2 id="prelekcje">Informacje</h2>
712
<div class="header border-b pb-2">
813
<p class="text-gray-600"><strong>Data:</strong> {{ .Page.Params.date | time.Format ":date_full" }}</p>
914
<p class="text-gray-600"><strong>Godzina:</strong> {{ .Page.Params.time }}</p>
10-
<p class="text-gray-600"><strong>Miejsce:</strong> {{ .Page.Params.place }}</p>
15+
<p class="text-gray-600"><strong>Miejsce:</strong> {{ .Page.Params.place | markdownify }}</p>
1116
<p class="text-gray-600"><strong>Zapisy:</strong> <a href="{{ .Page.Params.meetup_link }}" target="_blank" >Meetup.com</a></p>
1217
</div>
1318

0 commit comments

Comments
 (0)