80 Commits

Author SHA1 Message Date
dc6e5ce2d3 add events 2024-03-20 13:20:59 +01:00
b288706b80 add events 2024-03-04 15:32:18 +01:00
b7a18b2b0e add link to chat in services 2024-03-04 12:26:27 +01:00
8b81831ba3 change to librex in services 2024-02-29 10:30:47 +01:00
cfa94f3bea add events.ical to gitignore 2024-02-29 09:54:22 +01:00
61db7770db Revert "remove searhx from list of services since it is not available anymore"
This reverts commit 5edf754421.
2024-02-29 09:53:36 +01:00
5b7738c728 fix account page link for thunderbird 2024-02-28 04:14:32 +01:00
ffea059296 add events 2024-02-23 01:48:01 +01:00
61d1a949f7 add events 2024-02-23 01:40:10 +01:00
b2479a045e fix ical link displayed on events page 2024-02-08 18:04:31 +01:00
bd496eac3c generate event page in prep from the whole page 2024-02-08 18:01:43 +01:00
4959a91b08 add link to ical calendar to events page 2024-02-08 17:29:48 +01:00
45eb5e6b21 fix uid ical again 2024-02-08 17:21:52 +01:00
4d4fd6d4d3 fix uid in ical 2024-02-08 17:19:13 +01:00
35198a33d2 fix ical templates 2024-02-08 17:10:51 +01:00
2c42a80a33 fix ical 2024-02-08 16:56:11 +01:00
3845e7b870 fix ical 2024-02-08 16:55:39 +01:00
95f02eb0c9 add ical page 2024-02-08 16:50:05 +01:00
17a8e7fc95 update events 2024-01-27 10:57:05 +01:00
1a0d147564 update events 2024-01-26 22:09:38 +01:00
f38fcc7dcf dogadjaji februar 2024 2024-01-23 16:51:18 +01:00
c53d73cc1b add more text to textfile 2023-12-29 20:44:23 +01:00
dfa84076b7 add text to poster image and also write events to a text file 2023-12-29 20:40:22 +01:00
b6a198ed5f add events 2023-12-29 02:01:16 +01:00
40d22dd42f add time for hacakathon 2023-11-30 04:18:19 +01:00
6b26791c2e add events 2023-11-24 00:27:54 +01:00
38b6b18a40 add events 2023-11-21 16:00:17 +01:00
3577486210 add events 2023-11-15 18:11:11 +01:00
a39f257b94 Merge pull request 'December events' (#22) from hugo/website2:master into master
Reviewed-on: #22
2023-11-12 09:32:59 +00:00
828be8cd8f Reverse archive page 2023-11-12 10:29:32 +01:00
1d20360c46 December events 2023-11-12 10:26:17 +01:00
03fb78892c add quiz night in dogadjaji.csv 2023-10-20 16:30:38 +02:00
658f47a1ae November 2023-10-18 22:12:29 +02:00
df32ef6116 Serbian letters 2023-10-18 21:59:39 +02:00
c3da6e392d replace card game night with Decentrala birthday party 2023-10-17 11:59:15 +02:00
81f136b7cb add linux install day event 2023-10-11 01:12:51 +02:00
5edf754421 remove searhx from list of services since it is not available anymore 2023-10-09 00:25:18 +02:00
ac0d32559c Merge pull request 'Support for commas in csv' (#21) from ivdv/website:csv-comma into master
lepo :D
2023-10-01 16:27:08 +00:00
7df04ecf71 Support for commas 2023-09-29 12:27:11 -07:00
25662d7bda change postiton of location and time text to make more space from events 2023-09-28 14:09:12 +02:00
12235ab51e add text to poster about time and location 2023-09-28 14:07:35 +02:00
62da74bf99 add optional argument for month 2023-09-27 17:40:11 +02:00
a321ebe765 fix wrong array index 2023-09-27 17:00:13 +02:00
a70fd1369e change NEXT_MONTH to actaul next month instead of CURRENT_TIME 2023-09-27 16:58:28 +02:00
768f1c66e6 and shebangs and make all scripts executable 2023-09-27 16:47:55 +02:00
fb50c076fe add events 2023-09-27 16:43:15 +02:00
b31a1b5ebf add events 2023-09-26 13:43:04 +02:00
ab15c97e5e add dogadjaji 2023-09-22 01:13:32 +02:00
702ab07e03 add tilda and pionir to webring 2023-09-18 22:25:32 +02:00
3232cdcf09 October events 2023-09-17 19:28:00 +00:00
aec8f74ed2 Izmena 2023-09-17 19:25:48 +00:00
62778e2679 Merge pull request 'PNG poster maker' (#20) from hugo/website2:poster into master
Reviewed-on: #20
2023-09-01 11:45:10 +00:00
4eae5c08b8 Png poster maker 2023-09-01 13:44:12 +02:00
4b700f6652 Merge pull request 'September events' (#19) from hugo/website2:events into master
Reviewed-on: #19
2023-08-30 17:47:59 +00:00
de3d5142f6 Fix navigation link 2023-08-30 19:47:10 +02:00
1bfa147cb4 Add september events. Fix events layout 2023-08-30 19:47:00 +02:00
8d942cf2f3 Merge pull request 'Archive page' (#17) from hugo/website2:archive_page into master
Reviewed-on: #17
2023-08-30 11:20:27 +00:00
39b65d0547 Fix account link 2023-08-30 13:18:43 +02:00
efe1ea873b Fix h1 tags 2023-08-30 13:17:27 +02:00
44910c183b Implement Archive builder. Change events layout 2023-08-30 13:09:10 +02:00
be37b42273 Update TODO 2023-08-30 13:00:09 +02:00
29c1b7ad55 Update events list 2023-08-30 12:59:10 +02:00
4233fe7f44 Implement events pages skeletons 2023-08-30 11:56:05 +02:00
4bcd13a713 Merge pull request 'Implement the English version' (#16) from hugo/website2:english_version into master
Reviewed-on: #16
2023-08-30 08:08:51 +00:00
05c11219d2 Wording 2023-08-30 10:08:34 +02:00
6671fb1547 Implement page builder for English 2023-08-29 15:25:20 +02:00
221dff13dd Spelling 2023-08-29 15:01:45 +02:00
1f5e541922 Fix events script 2023-08-29 14:02:39 +02:00
d31e4e10c8 Translate pages 2023-08-29 13:46:59 +02:00
005fba6010 Merge pull request 'fix wording, fix links, remove obsolete page' (#15) from hugo/website2:fixes3 into master
Reviewed-on: #15
2023-08-29 09:59:03 +00:00
b71eb393ce fix wording, fix links, remove obsolete page 2023-08-29 11:54:05 +02:00
bdd7a3e7ef Merge pull request 'change from LibreX to SearXNG for bot protection' (#14) from youshitsune/website:master into master
Reviewed-on: #14
2023-08-28 08:20:27 +00:00
703c11a5ce change from LibreX to SearXNG for bot protection 2023-08-28 08:39:06 +02:00
1db838a44c add links to events 2023-08-28 01:19:28 +02:00
0fde75bc41 add new events 2023-08-28 01:16:36 +02:00
9fa68a27b6 fix issue with using same name for two different variables 2023-08-26 01:03:33 +02:00
d878e884d4 Merge pull request 'Dodate donacije, prepisao sa hackerspaces wikija' (#12) from svitvojimilioni/website:donacije-3 into master
Reviewed-on: #12
2023-08-25 22:39:06 +00:00
f9ff147495 Merge pull request 'pravopis, gramatika, rodna ravnopravnost...' (#13) from stalker/website:pravopis-fixes into master
Reviewed-on: #13
2023-08-25 22:38:53 +00:00
Branko Kokanovic
5e90343728 pravopis, gramatika, rodna ravnopravnost... 2023-08-25 21:28:33 +02:00
1a1ee35992 Dodate donacije, prepisao sa hackerspaces wikija 2023-08-25 11:42:45 -04:00
35 changed files with 655 additions and 279 deletions

5
.gitignore vendored
View File

@@ -1,8 +1,13 @@
venv/
site/*.html
site/en/*.html
site/atom_blog.xml
site/atom_events.xml
poster.html
poster.pdf
poster_light.png
poster_dark.png
poster.txt
http.access.log
http.error.log
events.ical

View File

@@ -31,9 +31,12 @@ nginx -p . -s stop
## TODO:
- [x] create page builder
- rename `prep.py` to more informative name (`build_events.py`)
- [ ] create blogging system
- [ ] create xmpp bot that connects to events section.
- [ ] webring system
- [x] make page
- [ ] populate page
- [ ] make english version (localisation)
- [x] make english version
- double check spelling and wording
- add account and donations page and style them with the site style

View File

@@ -1,4 +1,4 @@
#! /usr/bin/python3
#! /usr/bin/env python3
# needs lowdown and feegden installed
# feedgen can be installed with pip

1
blog.py Normal file → Executable file
View File

@@ -1,3 +1,4 @@
#! /usr/bin/env python3
# just testing markdown library for now
from markdown import markdown as to_markdown

15
build_pages.py Normal file → Executable file
View File

@@ -1,3 +1,4 @@
#! /usr/bin/env python3
import os
PAGES = [
@@ -5,14 +6,16 @@ PAGES = [
{'name': 'account', 'titleSR': 'Nalog', 'titleEN': 'Account', 'style': 'account'},
{'name': 'contact', 'titleSR': 'Kontakt', 'titleEN': 'Contact', 'style': 'contact'},
{'name': 'events', 'titleSR': 'Događaji', 'titleEN': 'Events', 'style': 'events'},
{'name': 'events_archive', 'titleSR': 'Arhiva događaja', 'titleEN': 'Events archive', 'style': 'events'},
{'name': 'services', 'titleSR': 'Servisi', 'titleEN': 'Services', 'style': 'services'},
{'name': 'webring', 'titleSR': 'Webring', 'titleEN': 'Webring', 'style': ''},
]
def buildPage(pageTitle: str, pageHtml: str, pageStyle: str, template: str) -> str:
def buildPage(filename: str, pageTitle: str, pageHtml: str, pageStyle: str, template: str) -> str:
template = template.replace('<!--TITLE-->', pageTitle)
style = '' if not pageStyle else f'<link rel=\"stylesheet\" href=\"/styles/{pageStyle}.css\">'
template = template.replace('<!--ADDITIONAL_STYLE-->', style)
template = template.replace('PAGE_NAME', filename)
template = template.replace('<!--MAIN-->', pageHtml)
return template
@@ -24,10 +27,16 @@ def main():
for page in PAGES:
with open(f'pages/sr/{page["name"]}.html') as f:
pageHtml = f.read()
html = buildPage(page['titleSR'], pageHtml, page['style'], templateSR)
html = buildPage(page['name'], page['titleSR'], pageHtml, page['style'], templateSR)
f = open(f'site/{page["name"]}.html', 'w')
f.write(html)
f.close()
with open(f'pages/en/{page["name"]}.html') as f:
pageHtml = f.read()
html = buildPage(page['name'], page['titleEN'], pageHtml, page['style'], templateEN)
f = open(f'site/en/{page["name"]}.html', 'w')
f.write(html)
f.close()
if __name__ == '__main__':
main()
main()

View File

@@ -1,20 +1,133 @@
datum, vreme, lokacija, tema
03-05-2023, 12:00, Cvijeta Zuzoric https://www.openstreetmap.org/node/256367543, Otvaranje izlozbe (Q&A)
20-12-2022, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u računarske mreže
03-01-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hakaton žurka
16-01-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Radionica privatnosti na internetu
04-01-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hakaton žurka
13-02-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u Bitcoin radonica
14-02-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Privacy & Security predavanje
20-02-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cyber reconnisance radionica
21-02-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u konfiguraciju servera radionica (pomerena)
27-02-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Šta je Decentrala + hakaton
03-03-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u python
10-03-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u python
13-03-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, TLS (SSL) kriptografija
14-03-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Matrix chat protokol
20-03-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, LDAP protokol radionica
21-03-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Android reverse engineering
25-03-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Open hackerspace day - film
27-03-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, SQL baze podataka
28-03-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Esolang
03-04-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Pentest radionica
04-04-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Runtime modification of Android apps
10-04-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hakaton
11-04-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u OpenBSD
17-04-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Lan party
18-04-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Pentest radionica nastavak
23-04-2023, 19:00, Polyhedra https://www.openstreetmap.org/node/4856556781, Uvod u mreže
03-05-2023, 12:00, Cvijeta Zuzorić https://www.openstreetmap.org/node/256367543, Otvaranje izložbe (Q&A)
03-05-2023, 18:00, KC Grad https://www.openstreetmap.org/node/4118716889, Linux install fest
04-05-2023, 17:00, Cvijeta Zuzoric https://www.openstreetmap.org/node/256367543, ULUS izlozba (Q&A)
04-05-2023, 18:00, Polyhedra https://www.openstreetmap.org/node/4856556781, Uvod u racunarske mreze
04-05-2023, 17:00, Cvijeta Zuzorić https://www.openstreetmap.org/node/256367543, ULUS izložba (Q&A)
04-05-2023, 18:00, Polyhedra https://www.openstreetmap.org/node/4856556781, Uvod u računarske mreže
04-05-2023, 21:00, n/a, Online sastanak sa Zajednicom za slobodnu tehnologiju iz Kikinde
05-05-2023, 15:30, Cvijeta Zuzoric https://www.openstreetmap.org/node/256367543, ULUS izlozba (Q&A)
06-05-2023, 12:00, Cvijeta Zuzoric https://www.openstreetmap.org/node/256367543, ULUS izlozba (Q&A)
07-05-2023, 16:00, Cvijeta Zuzoric https://www.openstreetmap.org/node/256367543, ULUS izlozba (diskusija)
05-05-2023, 15:30, Cvijeta Zuzorić https://www.openstreetmap.org/node/256367543, ULUS izložba (Q&A)
06-05-2023, 12:00, Cvijeta Zuzorić https://www.openstreetmap.org/node/256367543, ULUS izložba (Q&A)
07-05-2023, 16:00, Cvijeta Zuzorić https://www.openstreetmap.org/node/256367543, ULUS izložba (diskusija)
08-05-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Linux install day
09-05-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cryptoparty - Uvod u privatnost
11-05-2023, 18:00, Polyhedra https://www.openstreetmap.org/node/4856556781, Uvod u racunarske mreze
01-08-2023, 19:00, DC Krov, Tehno veče
07-08-2023, 19:00, DC Krov, Linux ricing
08-08-2023, 19:00, DC Krov, Lambda račun
14-08-2023, 19:00, DC Krov, Linux distro diskusija
15-08-2023, 19:00, DC Krov, Pirati 777 mora
21-08-2023, 19:00, DC Krov, Python vežbe
22-08-2023, 19:00, DC Krov, Autentifikacija na internetu
28-08-2023, 19:00, DC Krov, Kviz
11-05-2023, 18:00, Polyhedra https://www.openstreetmap.org/node/4856556781, Uvod u računarske mreže
05-06-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Šifre
06-06-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Random i kriptografija
12-06-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u Blender
13-06-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cybersecurity odbrana
19-06-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Pisanje BASH skripti
20-06-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cybersecurity odbrana
26-06-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Python vežbe
27-06-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cybersecurity odbrana
03-07-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, DNS
04-07-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cybersecurity odbrana
10-07-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Blender
11-07-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cybersecurity odbrana
17-07-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, OpenGL
18-07-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cybersecurity odbrana
24-07-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Web scraping
25-07-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cybersecurity odbrana
31-07-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Python - Web development
01-08-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Tehno veče
07-08-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Linux ricing
08-08-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Lambda račun
14-08-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Linux distro diskusija
15-08-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Pirati 777 mora
21-08-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Python vežbe
22-08-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Autentifikacija na internetu
28-08-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Podešavanje Mail servera
29-08-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Prevođenje wiki-a
04-09-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hakaton
05-09-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cybersecurity - phishing
11-09-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Radionica kreativnog pisanja
12-09-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Tehno veče
18-09-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cybersecurity - kako početi?
19-09-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Stop reklamama - diskusija
25-09-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Email server E02
26-09-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Lambda račun E02
02-10-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Šamirov algoritam za deljenje tajni
03-10-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hackathon
09-10-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Lighting talks
14-10-2023, 12:00, Matematički Fakultet (učionica 821) https://www.openstreetmap.org/node/4705189523, Linux install day
16-10-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Audio radionica
17-10-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Libreboot
23-10-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Tor
24-10-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Proslava rođendana Decentrale
30-10-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Rešavanje Rubikove kocke
31-10-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Vim
06-11-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Lightning talks
07-11-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cybersecurity card game
13-11-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hackathon
14-11-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u elektroniku EP01
20-11-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Git
21-11-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u elektroniku EP02
27-11-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Kviz veče
28-11-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u elektroniku EP03
04-12-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Lighting talks
05-12-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Idejno-politička diskusija
10-12-2023, 16:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hackathon u 16h
11-12-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Home made portable IDS
12-12-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u elektroniku E04
18-12-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Arduino
19-12-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, NetHack video igra
25-12-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Degoogled phone
26-12-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u elektroniku E05
08-01-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Druzenje
09-01-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Decentrala sysadmin (obuka)
15-01-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hackathon (Task manager)
16-01-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Lighting talks (kratka predavanja)
22-01-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Nadzorni Kapitalizam (predavanje i diskusija)
23-01-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, The Art of Code (projekcija predavanja)
29-01-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, samizdat-izrada zinova,knjiga,slikovnica
30-01-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, intro to 3d printing (predavanje)
05-02-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hackathon (radna akcija)
06-02-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Kratka predavanja (Lightning talks)
12-02-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Kompajleri i trojanci (predavanje)
13-02-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, AI diskusija
19-02-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Godot game engine (predavanje)
20-02-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Svet van Linuxa (predavanje)
26-02-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Veče Video igara (Krovđendan)
27-02-2024, 21:00, DC Krov https://www.openstreetmap.org/node/10594728522, Šifrožur (Krovđendan)
04-03-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hakaton
05-03-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Kratka Predavanja/Lightning talks
09-03-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Sysadmin Decentrala obuka
11-03-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Arduino radionica
12-03-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Home made SOC build
18-03-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Regex
19-03-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Uvod u PCB
25-03-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Arduino radionica
26-03-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, (La)TeX
01-04-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, La Jetée
02-04-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Kratka predavanja / Lightning talks
08-04-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Teorija čvorova
09-04-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Arduino radionica
15-04-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hakaton / Radna akcija
16-04-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, HomeMade SoC #2
22-04-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Stencil radionica - sabloni za grafite
23-04-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Arduino radionica
29-04-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Chat aplikacije - Disksija
30-04-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Mesecna revizija Decentrale
Can't render this file because it has a wrong number of fields in line 105.

132
image_poster.py Executable file
View File

@@ -0,0 +1,132 @@
#! /usr/bin/env python3
import argparse
import freetype
import io
from PIL import Image, ImageDraw, ImageFont
import csv
import datetime as dt
from dateutil import relativedelta
CURRENT_TIME = dt.date.today()
NEXT_MONTH = CURRENT_TIME + relativedelta.relativedelta(months=1, day=1)
DAYS_OF_WEEK_SR = ("PON", "UTO", "SRE", "ČET", "PET", "SUB", "NED")
MONTHS_SR = ("Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust",\
"Septembar", "Oktobar", "Novembar", "Decembar")
def parseArgs(parser):
"""
Parse all arguments and return the list of argument values
"""
parser.add_argument("month", metavar = "MM", help = "two digit number representing the month for which to generate poster", default = "empty", nargs = "?")
return parser.parse_args()
def load_events(csv_path:str, month:int) -> list[dict]:
events = []
with open(csv_path) as csv_file:
csv_reader = csv.reader(csv_file)
next(csv_reader, None)
for event in csv_reader:
event_date = event[0]
event_date_parsed = dt.datetime.strptime(event_date, "%d-%m-%Y").date()
event_time = event[1]
event_title = event[3]
current_event = {"date":event_date_parsed,
"time":event_time,
"title":event_title.strip()}
if event_date_parsed >= month:
events.append(current_event)
return events
def drawPoster(events, bg, fg, month:int):
fontFacade = ImageFont.truetype('./site/font/Facade-Sud.woff', size=110)
fontIosevka = ImageFont.truetype('./site/font/iosevka-regular.woff', size=60)
fontIosevkaSmall = ImageFont.truetype('./site/font/iosevka-regular.woff', size=45)
W = 1200
H = 1500
img = Image.new('RGB', (W, H), bg)
draw = ImageDraw.Draw(img)
header = "DECENTRALA"
_, _, w, _ = draw.textbbox((0, 0), header, font=fontFacade)
draw.text(((W-w)/2, 120), header, font=fontFacade, fill=fg)
subheader = f"Plan za {MONTHS_SR[month.month - 1]}"
_, _, w, _ = draw.textbbox((0, 0), subheader, font=fontIosevka)
draw.text(((W-w)/2, 240), subheader, font=fontIosevka, fill=fg)
height = 370
draw.text((120, height), "Radionice pocinju u 19h u DC Krovu", font=fontIosevkaSmall, fill=fg)
height += 60
draw.text((120, height), "Svi dogadjaji su uvek besplatni", font=fontIosevkaSmall, fill=fg)
height += 90
# Write list of events to sperate text file as well
textfile=open("poster.txt","w")
textfile.write(f"Plan za {MONTHS_SR[month.month - 1]}\n\n")
textfile.write("Radionice pocinju u 19h u DC Krovu\n")
textfile.write("Svi dogadjaji su uvek besplatni\n\n")
# Loop to write events both to poster image and text file
for event in events:
# Add event to image poster
date = DAYS_OF_WEEK_SR[event["date"].weekday()]
day = event["date"].day
title = event["title"]
pad = " " if event["date"].day < 10 else ""
eventText = f"{date} {day}. {pad} {title}"
draw.text((120, height), eventText, font=fontIosevkaSmall, fill=fg)
height += 70
# Add event to textfile
textfile.write(eventText + "\n")
textfile.close()
def drawCircle(x, y):
r = 10
draw.ellipse((x - r, y - r, x + r, y+r), fill=fg, outline=(0, 0, 0), width=0)
LCX = 950 # logo center x
LCY = 1200 # logo center y
d = 50 # delta
drawCircle(LCX - d, LCY)
drawCircle(LCX, LCY)
drawCircle(LCX, LCY - d)
drawCircle(LCX, LCY + d)
drawCircle(LCX + d, LCY)
draw.line([(LCX - d, LCY), (LCX + d, LCY)], fill=fg, width=5, joint=None)
draw.line([(LCX, LCY), (LCX, LCY + d), (LCX + d, LCY), (LCX, LCY - d)], fill=fg, width=5, joint=None)
draw.text((LCX - 1.7*d, LCY + 1.5*d), "dmz.rs", font=fontIosevka, fill=fg)
return img
def main():
# Parse arguments
parser = argparse.ArgumentParser(description="Generate images of the poster")
args = parseArgs(parser)
# Set month based on user input
month = NEXT_MONTH
if args.month.isdigit():
month = dt.date(CURRENT_TIME.year, int(args.month), 1)
elif args.month != "empty":
print("Month has to be specified as a number. I will use next month as the default")
# Load events and draw a poseter
events = load_events("dogadjaji.csv", month)
img = drawPoster(events, (0, 0, 0), (20, 250, 50), month)
img.save('poster_dark.png')
img = drawPoster(events, (255, 255, 255), (0, 0, 0), month)
img.save('poster_light.png')
if __name__ == "__main__":
main()

8
pages/en/account.html Normal file
View File

@@ -0,0 +1,8 @@
<h1>Account</h1>
<p>If you have created an account on dmz.rs, you can use our XMPP and e-mail server, as well as other services that support LDAP login.<p>
<p>For more on XMPP see <a href="https://wiki.dmz.rs/en/tutorial/conversations">this tutorial</a>. <p>
<p>You can see settings for the <a href="https://www.thunderbird.net">Thundebird</a> mail client on this <a href="/img/mailsettings.png">image</a>.<p>
<p><a href="/account/register/">Register</a><p>
<p><a href="/account/unregister/">Delete account</a><p>
<p><a href="/account/changepassword/">Change password</a><p>

5
pages/en/contact.html Normal file
View File

@@ -0,0 +1,5 @@
<h1>Contact</h1>
<p>You can send mail to <a href="mailto:dmz@dmz.rs">dmz@dmz.rs</a> or you can register on <a href="https://forum.dmz.rs">our Forum</a>.</p>
<p>Also, we are available on the <a href="https://balkan.fedive.rs/@decentrala">Fediverse!</a></p>
<br>
<p>If you find a bug on the site, please do tell us. We would be very grateful.</p>

3
pages/en/events.html Normal file
View File

@@ -0,0 +1,3 @@
<h1>Events</h1>
<p>Following list contains all forthcoming events. Held events are listed in <a href="/en/events_archive">archive</a></p><br>
<p>Link for ical calendar file is <a href="https://dmz.rs/events.ical">https://dmz.rs/events.ical</a></p><br>

View File

@@ -0,0 +1,2 @@
<h1>Events archive</h1>
<p>All events that we organized so far.</p><br>

31
pages/en/index.html Normal file
View File

@@ -0,0 +1,31 @@
<h1>Welcome!</h1>
<p>
We are <em>Decentrala</em> - a group of enthusiasts gathered around the idea of decentralization and knowledge sharing.
Here are some more facts about us:
</p>
<dl>
<dt>Knowledge:</dt>
<dd>
All our workshops are free and open to everyone.
Also, if you have something to share, feel free to announce the event on the <a href="https://forum.dmz.rs"></a>Forum</a>.
</dd>
<dt>Actions:</dt>
<dd>From time to time we organize actions, hackathons, crypto parties, exhibitions, etc.</dd>
<dt>Services:</dt>
<dd>Our servers run various services (like e-mail, git, wiki, etc...) that are open to everyone.</dd>
<dt>Donations:</dt>
<dd>
Decentrala accepts donations exclusively from persons and without any obligations.
We are independent and we try to keep it that way.
You can donate old hardware (laptops, phones, PC components) to us, and we will find a use for it in Decentrala or give it to people who need it.
Also, you can donate bitcoin and monero by sending to the following addresses:
<p>Bitcoin: bc1qjhsfgq79wuzzv32yml9zglwzf9qcwfj3atuy74</p>
<p>Monero: 8BESz45LnxrgCwZP32KieiN1D4LinCfsS1YjdFHfGXrVCmPs35167QsW1gd7qbff4UAtBbT6oWrkbfZnJm71HornVRiRZFS</p>
</dd>
</dl>
<p>
If you are still interested, you can create an <a href="/en/account">account</a>
on our server which will enable the use of all our <a href="/en/services">services</a>.
If you want to see first how it all looks, you can come to one of our
<a href="/en/events">event</a>, and meet us there!
</p>

54
pages/en/services.html Normal file
View File

@@ -0,0 +1,54 @@
<h1>Services</h1>
<table>
<tr>
<th>Service</th>
<th>Description</th>
</tr>
<tr>
<td><a href="/account">E-mail</a></td>
<td>E-mail account that you can use with any e-mail client (for example, with the <a href="https://www.thunderbird.net/">Thunderbird</a>).</td>
</tr>
<tr>
<td><a href="https://forum.dmz.rs/">Forum</a></td>
<td>Forum for general discussion and <a href="/events">event</a> organization.</td>
</tr>
<tr>
<td><a href="/account">Chat</a></td>
<td>
We have our XMPP server, on which you can make an account.
If you already have an account, you can find us at group <a href="decentrala@conference.dmz.rs">decentrala@conference.dmz.rs</a>.
</td>
</tr>
<tr>
<td><a href="https://gitea.dmz.rs/">Git</a></td>
<td><a href="https://gitea.io/en-us/">Gitea</a> instance on which we host our code and resources (including the code for this site).
</td>
</tr>
<tr>
<td><a href="https://wiki.dmz.rs/">Wiki</a></td>
<td><a href="https://js.wiki/">Wiki.js</a> instance on which we publish documentation for our projects,
<a href="/events">events</a> resources, and tutorials.
</td>
</tr>
<tr>
<td><a href="https://search.dmz.rs/">Search</a></td>
<td><a href="https://github.com/hnhx/librex/">LibreX</a> instance used for Web searching.</td>
</tr>
<tr>
<td><a href="https://pastebin.dmz.rs/">Pastebin</a></td>
<td><a href="https://privatebin.info/">PrivateBin</a> instance we use for sharing text files</td>
</tr>
<tr>
<td><a href="ssh://soft.dmz.rs:2222/">Soft Serve</a></td>
<td>
<a href="https://github.com/charmbracelet/soft-serve">Soft Serve</a> instance that we use as a replacement for the Gitea service.
Soft Serve works entirely from the terminal.
</td>
</tr>
</table>
<p>
These are some of the services we currently maintain on our servers.
To use these services, you can register for each service separately,
or you can create a unique <a href="/en/account">account</a>
on our server and use all services with the same account.
</p>

5
pages/en/webring.html Normal file
View File

@@ -0,0 +1,5 @@
<h1>Webring</h1>
<ul>
<li><a href="https://pionir.org">Pionir school</a></li>
<li><a href="https://tilda.center">Tilda Center</a></li>
</ul>

View File

@@ -1,7 +1,8 @@
<p> Ako ste napravili nalog na dmz.rs mozete koristi nas xmpp i email server i ostale servise koji podrzavaju LDAP login. <p>
<p> Za vise o XMPP pogledajte <a href="https://wiki.dmz.rs/en/tutorial/conversations">tutorial</a>. <p>
<p> Za primer podesavanja na <a href="https://thunderbird.org">Thundebird</a> mail klijentu mozete pogledati <a href="/img/mailsettings.png">sliku</a>. <p>
<h1>Nalog</h1>
<p>Ako si napravio nalog na dmz.rs možeš koristiti naš XMPP i e-mail server, kao i ostale servise koji podržavaju LDAP login.<p>
<p>Za više o XMPP-u pogledaj <a href="https://wiki.dmz.rs/en/tutorial/conversations-srpski">tutorial</a>. <p>
<p>Podešavanja za <a href="https://www.thunderbird.net">Thundebird</a> mail klijent možeš pogledati na <a href="/img/mailsettings.png">slici</a>.<p>
<p><a href="/account/register/">Registruj se</a><p>
<p><a href="/account/unregister/">Izbrisi nalog</a><p>
<p><a href="/account/unregister/">Izbriši nalog</a><p>
<p><a href="/account/changepassword/">Promeni lozinku</a><p>

View File

@@ -2,4 +2,4 @@
<p>Možeš nam poslati mejl na adresu <a href="mailto:dmz@dmz.rs">dmz@dmz.rs</a> ili se možeš pridružiti našem <a href="https://forum.dmz.rs">Forumu</a>.</p>
<p>Takođe smo dostupni i na <a href="https://balkan.fedive.rs/@decentrala">Fediversu!</a></p>
<br>
<p>U slučaju da si pronašao <em>bug</em> na sajtu, bili bismo ti jako zahvalni ako bi nam ga prijavio/prijalvila.</p>
<p>U slučaju da pronađeš <em>bug</em> na sajtu, bili bismo ti jako zahvalni ako nam ga prijaviš.</p>

View File

@@ -1,59 +1,3 @@
<h1>Događaji</h1>
<table>
<tbody>
<tr>
<th>Datum</th>
<th>Vreme</th>
<th>Mesto</th>
<th>Tema</th>
</tr>
<tr>
<td> Ponedeljak, 7. Avgust 2023. </td>
<td> 19:00h </td>
<td> DC Krov </td>
<td> Linux ricing </td>
</tr>
<tr>
<td> Utorak, 8. Avgust 2023. </td>
<td> 19:00h </td>
<td> DC Krov </td>
<td> Lambda račun </td>
</tr>
<tr>
<td> Ponedeljak, 14. Avgust 2023. </td>
<td> 19:00h </td>
<td> DC Krov </td>
<td> Linux distro diskusija </td>
</tr>
<tr>
<td> Utorak, 15. Avgust 2023. </td>
<td> 19:00h </td>
<td> DC Krov </td>
<td> Pirati 777 mora </td>
</tr>
<tr>
<td> Ponedeljak, 21. Avgust 2023. </td>
<td> 19:00h </td>
<td> DC Krov </td>
<td> Python vežbe </td>
</tr>
<tr>
<td> Utorak, 22. Avgust 2023. </td>
<td> 19:00h </td>
<td> DC Krov </td>
<td> Autentifikacija na internetu </td>
</tr>
<tr>
<td> Ponedeljak, 28. Avgust 2023. </td>
<td> 19:00h </td>
<td> DC Krov </td>
<td> Podesavanje Mail servera </td>
</tr>
<tr>
<td> Utorak, 29. Avgust 2023. </td>
<td> 19:00h </td>
<td> DC Krov </td>
<td> Prevodjenje wiki-a </td>
</tr>
</tbody>
</table>
<p>Naredna lista sadrži sve predstojeće događaje. Za listu održanih događaja pogledajte <a href="/events_archive">arhivu</a></p><br>
<p>Link za ical kalendar je <a href="https://dmz.rs/events.ical">https://dmz.rs/events.ical</a></p><br>

View File

@@ -0,0 +1,2 @@
<h1>Arhiva događaja</h1>
<p>Svi događaji koje smo do sada organzivali.</p><br>

View File

@@ -14,10 +14,19 @@
<dt>Servisi:</dt>
<dd>Na našim serverima pokrećemo razne servise (email, git, wiki i druge) koji su otvoreni za sve i koji se mogu
koristiti sa ili bez našeg naloga.</dd>
<dt>Donacije:</dt>
<dd>
Decentrala prihvata donacije isključivo od fizičkih lica i bez obaveza.
Nezavisni smo i trudimo se da to održimo.
Možeš nam donirati stari hardver (laptopove, telefone, PC komponente), a mi ćemo mu naći upotrebu u Decentrali ili dati ljudima kojima je potreban.
Takođe možeš donirati bitcoin i monero, slanjem na naredne adrese:
<p>Bitcoin: bc1qjhsfgq79wuzzv32yml9zglwzf9qcwfj3atuy74</p>
<p>Monero: 8BESz45LnxrgCwZP32KieiN1D4LinCfsS1YjdFHfGXrVCmPs35167QsW1gd7qbff4UAtBbT6oWrkbfZnJm71HornVRiRZFS</p>
</dd>
</dl>
<p>
Ako si i dalje zainteresovan, možeš napraviti <a href="/pages/account.html">nalog</a> na našem serveru koji će ti
omogućiti korišćenje svih naših <a href="/pages/services.html">servisa</a>.
Ako si i dalje zainteresovan, možeš napraviti <a href="/account">nalog</a> na našem serveru koji će ti
omogućiti korišćenje svih naših <a href="/services">servisa</a>.
Ako želiš prvo da vidiš kako to sve izgleda u realnosti, možeš doći na neki od naših <a
href="/pages/events.html">događaja</a>, i tu nas upoznati!
</p>
href="/events">događaja</a>, i tu nas upoznati!
</p>

View File

@@ -5,26 +5,26 @@
<th>Opis</th>
</tr>
<tr>
<td><a href="/account.html">Email</a></td>
<td>Email nalog koji možeš koristiti sa bilo kojim email
klijentom generalne namene (na primer <a href="https://www.thunderbird.net/">Thunderbird-u</a>).</td>
<td><a href="/account">E-mail</a></td>
<td>E-mail nalog koji možeš da koristiš sa bilo kojim email
klijentom generalne namene (na primer <a href="https://www.thunderbird.net/">Thunderbird</a>-om).</td>
</tr>
<tr>
<td><a href="https://forum.dmz.rs/">Forum</a></td>
<td>Forum na kom obično organizujemo naše <a href="/pages/events.html">događaje</a>.
<td>Forum na kom obično organizujemo naše <a href="/events">događaje</a>.
</td>
</tr>
<tr>
<td>Chat</td>
<td>Održavamo sopstveni XMPP server, na kojem možeš napraviti nalog.
Ako već poseduješ nalog možeš nas naći u grupi <a
<td><a href="/account">Chat</a></td>
<td>Održavamo sopstveni XMPP server, na kojem možeš da napraviš nalog.
Ako već poseduješ nalog možeš da nas nađeš u grupi <a
href="decentrala@conference.dmz.rs">decentrala@conference.dmz.rs</a>.
</td>
</tr>
<tr>
<td><a href="https://gitea.dmz.rs/">Git</a></td>
<td><a href="https://gitea.io/en-us/">Gitea</a> instanca na kojoj držimo kod kao i ostale resurse za naše
<a href="/pages/projects.html">projekte</a>, <a href="/pages/events.html">dogadjaje</a>, kao i projekte naših
<td><a href="https://gitea.io/en-us/">Gitea</a> instanca na kojoj držimo kôd kao i ostale resurse za naše
<a href="/projects">projekte</a>, <a href="/events">događaje</a>, kao i projekte naših
prijatelja.
Ovo može biti dom tvog sledećeg projekta. Bolji od Github-a.
</td>
@@ -32,8 +32,7 @@
<tr>
<td><a href="https://wiki.dmz.rs/">Wiki</a></td>
<td><a href="https://js.wiki/">Wiki.js</a> instanca koju koristimo da dokumentujemo naše
<a href="/pages/projects.html">projekte</a> kao i
ostale <a href="/pages/events.html">događaje</a>.
<a href="/projects">projekte</a> kao i ostale <a href="/events">događaje</a>.
</td>
</tr>
<tr>
@@ -49,12 +48,11 @@
</tr>
<tr>
<td><a href="ssh://soft.dmz.rs:2222/">Soft Serve</a></td>
<td><a href="https://github.com/charmbracelet/soft-serve">Soft Serve</a> instanca koju koristimo kao zamenu za Gitea
servis.
<td><a href="https://github.com/charmbracelet/soft-serve">Soft Serve</a> instanca koju koristimo kao zamenu za Gitea servis.
Soft Serve radi potpuno iz terminala
</td>
</tr>
</table>
<p>Ovo su neki od servisa koje trenutno održavamo na našim serverima. Da bi koristio ove servise, <em>možes</em> se
registovati na svaki servis posebno, a možeš i napraviti jedinstveni <a href="/pages/account.html">nalog</a> na nasem
serveru i koristiti sve servise sa istim nalogom.</p>
<p>Ovo su neki od servisa koje trenutno održavamo na našim serverima. Da bi koristio ove servise, <em>možeš</em> da se
registuješ na svaki servis posebno, a možeš i da napraviš jedinstveni <a href="/account">nalog</a> na našem
serveru i da koristiš sve servise sa istim nalogom.</p>

View File

@@ -1,3 +1,5 @@
<h1>Webring</h1>
<ul>
<li><a href="https://tilde.zone/explore">Tilde Zone</a></li>
</ul>
<li><a href="https://pionir.org">Slobodna škola Pionir</a></li>
<li><a href="https://tilda.center">Tilda Centar</a></li>
</ul>

1
poster.py Normal file → Executable file
View File

@@ -1,3 +1,4 @@
#! /usr/bin/env python3
import csv
import datetime as dt
from dateutil import relativedelta

203
prep.py Normal file → Executable file
View File

@@ -1,101 +1,128 @@
#! /usr/bin/env python
#! /usr/bin/env python3
import csv
from datetime import datetime
from functools import cmp_to_key
days = [
"Ponedeljak",
"Utorak",
"Sreda",
"Četvrtak",
"Petak",
"Subota",
"Nedelja",
]
DAYS_SR = ["PON", "UTO", "SRE", "ČET", "PET", "SUB", "NED"]
DAYS_EN = ["MON ", "TUE", "WED", "THU", "FRI", "SAT", "SUN"]
months = [
"Januar",
"Februar",
"Mart",
"April",
"Maj",
"Jun",
"Jul",
"Avgust",
"Septembar",
"Oktobar",
"Novembar",
"Decembar",
]
def load_events(csv_path:str) -> list[dict]:
events = []
with open(csv_path) as csv_file:
csv_reader = csv.reader(csv_file, skipinitialspace=True)
next(csv_reader, None)
for event in csv_reader:
event_date = event[0]
event_date_parsed = datetime.strptime(event_date, "%d-%m-%Y").date()
event_time = event[1]
event_location = event[2]
event_title = event[3]
current_event = {"date":event_date_parsed,
"time":event_time,
"location": event_location,
"title":event_title.strip()}
events.append(current_event)
return events
def build_html(events: list[dict], dayNames: list[str]) -> str:
events_html = []
for event in events:
title = event["title"]
location = event["location"]
date = event["date"]
date = dayNames[date.weekday()]+", "+str(date.day)+". "+str(date.month)+". "+str(date.year)+", "
time = event["time"]+"h"
event_html = []
event_html.append(f"<div class='date'>{date} {time}</div>")
event_html.append(f"<div class='title'>{title}</div>")
if "https://" in location:
place,link = location.split("https://")
event_html.append(f"<div class='place'><a href=\"https://{link}\">@{place.strip()}</a></div>")
else:
event_html.append(f"<div class='place'>@{location.strip()}</div>")
event_html = "".join(event_html)
events_html.append(f"\n<div class='event'>{event_html}</div>")
return events_html
def build_ical(events: list[dict]) -> str:
today = datetime.today().now()
# Header
events_ical = ""
with open("template/head.ical", "r") as file:
events_ical += file.read()
# Events
for event in events:
title = event["title"]
location = event["location"]
date = event["date"]
time = event["time"]
uid = str(date.month).zfill(2) + str(date.day).zfill(2) + time[:2]
date = str(date.year) + str(date.month).zfill(2) + str(date.day).zfill(2)
created = str(today.year) + str(today.month).zfill(2) + str(today.day).zfill(2) + "T" + str(today.hour).zfill(2) + str(today.minute).zfill(2) + str(today.second).zfill(2) + "Z"
date = date + "T" + time.replace(":", "") + "00"
event_template = ""
with open("template/event.ical", "r") as file:
event_template += file.read()
event_template = event_template.replace("<!--UID-->", uid)
event_template = event_template.replace("<!--CREATED-->", created)
event_template = event_template.replace("<!--DATE-->", date)
event_template = event_template.replace("<!--TITLE-->", title)
events_ical += event_template
# Footer
with open("template/end.ical", "r") as file:
events_ical += file.read()
return events_ical
events = sorted(load_events("dogadjaji.csv"), key=lambda e: e["date"])
today = datetime.today().date()
def parse_date(date):
return datetime.strptime(date,"%d-%m-%Y").date()
def compare_events(one, two):
one = parse_date(one.split(", ")[0])
two = parse_date(two.split(", ")[0])
if one>two:
return 1
elif one==two:
return 0
else:
return -1
def is_past_event(event):
return event < today
def load_events():
events = []
with open("dogadjaji.csv", "rt") as file:
file.readline()
for event in file.readlines():
event = event.strip()
if event != "":
events.append(event)
return events
def write_events(events):
with open("dogadjaji.csv", "wt") as file:
file.write("datum, vreme, lokacija, tema\n")
for event in events:
file.write(event+"\n")
def sort_events(events):
return sorted(events, key = cmp_to_key(compare_events))
past_events = list(filter(lambda e: e["date"] <= today, events))
past_events.reverse()
new_events = list(filter(lambda e: e["date"] >= today, events))
events = load_events()
events = sort_events(events)
write_events(events)
page_template = ""
events = []
# Build Serbian Events page
new_events_html = build_html(new_events, DAYS_SR)
with open("pages/sr/events.html", "r") as file:
page_template = ([line for line in file])
for event in events:
date, time, location, title = event.split(", ")
date = parse_date(date)
if is_past_event(date):
continue
date = days[date.weekday()]+", "+str(date.day)+". "+months[date.month-1]+" "+str(date.year)+"."
time = time+"h"
future_event = []
future_event.append("<td> "+date+" </td>")
future_event.append("<td> "+time+" </td>")
if "https://" in location:
place,link = location.split("https://")
future_event.append("<td> <a href=\"https://"+link+"\""+"> "+place.strip()+" </a> </td>")
else:
future_event.append("<td> "+location.strip()+" </td>")
future_event.append("<td> "+title+" </td>")
events.append("<tr>\n"+"\n".join(future_event)+"\n</tr>")
with open("pages/sr/events.html", "w") as file:
file.writelines(page_template + new_events_html)
with open("pages/sr/events.html","wt") as file:
file.writelines(["<h1>Događaji</h1>\n", "<table>\n", "<tr><th>Datum</th><th>Vreme</th><th>Mesto</th><th>Tema</th></tr>\n"])
file.writelines(events)
file.writelines(["</table>"])
# Build English Events page
new_events_html = build_html(new_events, DAYS_EN)
with open("pages/en/events.html", "r") as file:
page_template = ([line for line in file])
with open("pages/en/events.html", "w") as file:
file.writelines(page_template + new_events_html)
# Build Serbian Archive page
past_events_html = build_html(past_events, DAYS_SR)
with open("pages/sr/events_archive.html", "r") as file:
page_template = ([line for line in file])
with open("pages/sr/events_archive.html", "w") as file:
file.writelines(page_template + past_events_html)
# Build English Archive page
past_events_html = build_html(past_events, DAYS_EN)
with open("pages/en/events_archive.html", "r") as file:
page_template = ([line for line in file])
with open("pages/en/events_archive.html", "w") as file:
file.writelines(page_template + past_events_html)
new_events_ical = build_ical(new_events)
# Build ical
with open("site/events.ical", "w") as file:
file.write(build_ical(new_events))
#with open("pages/en/events.html","wt") as file:
# file.writelines(["<h1>Events</h1>", "<table>", "<tr>\n<th>Date</th>\n<th>Time</th>\n<th>Place</th>\n<th>Theme</th>\n</tr>"])
# file.writelines(events)
# file.writelines(["</table>"])

View File

@@ -1,36 +0,0 @@
<!doctype html>
<meta charset="UTF-8">
<html>
<head>
<link rel="icon" type="image/x-icon" href="/static/d.png">
<link rel="stylesheet" href="./static/reset.css">
<link rel="stylesheet" href="./static/main.css">
<title>Decentrala</title>
</head>
<body>
<div class="container">
<div class="header">
<h1 class="logo">DECENTRALA</h1>
</div>
<main>
<h2>Servisi</h2>
<p><a href="https://forum.dmz.rs">FORUM</a><p>
<p><a href="../chat.html">XMPP</a><p>
<p><a href="https://gitea.dmz.rs">GITEA</a><p>
<p><a href="https://wiki.dmz.rs">WIKI</a><p>
<p><a href="../nalog.html">EMAIL</a><p>
<p><a href="ssh://soft.dmz.rs:2222">SOFT SERVE</a><p>
<p><a href="https://search.dmz.rs">LibreX</a><p>
<p><a href="https://git.dmz.rs">CGIT</a><p>
<p><a href="https://pastebin.dmz.rs">PrivateBin</a><p>
<p><a href="https://cryptpad.dmz.rs">CryptPad</a><p>
<div class="back">
<ul class="nav">
<a href="../"><li>Nazad</li></a>
</ul>
</div>
</main>
</div>
</body>
</html>

View File

@@ -1,4 +0,0 @@
h1 {
margin-bottom: 2rem;
font-weight: normal;
}

View File

@@ -1,4 +0,0 @@
h1 {
margin-bottom: 2rem;
font-weight: normal;
}

View File

@@ -1,30 +1,65 @@
table {
table-layout: fixed;
border-spacing: 0;
.event {
display: flex;
flex-direction: row;
}
th,
td {
padding: 0 1rem 0 1rem;
text-align: left;
border-left: 2px solid var(--border);
.event:hover {
border-bottom: 5px var(--hightlight) solid;
}
th {
padding: 1rem 1rem 0 1rem;
border-bottom: 2px solid var(--border);
.event:hover>div {
padding-bottom: calc(0.5rem - 5px);
}
td:nth-child(odd) {
.event>div {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
white-space: nowrap;
}
td {
padding: 0 1rem 1rem 1rem;
vertical-align: top;
.date {
width: 250px;
font-size: 0.9em;
overflow-x: hidden;
white-space: nowrap;
}
h1 {
margin-bottom: 2rem;
font-weight: normal;
}
.title {
border-left: 2px solid var(--border);
font-weight: bold;
padding-left: 1rem;
padding-right: 0.5em;
}
.place {
font-size: 0.9em;
}
@media screen and (max-width: 1160px) {
.event {
flex-direction: column;
margin-bottom: 1rem;
border-left: 3px solid var(--border);
}
.event > div {
padding: 0 0.5rem;
white-space: normal;
}
.event:hover {
border-bottom: none;
}
.event:hover> div {
padding-bottom: 0;
}
.date {
width: 100%;
}
.title {
border-left: none;
}
}

View File

@@ -1,8 +1,3 @@
h1 {
margin-bottom: 2rem;
font-weight: normal;
}
dl {
padding: 1rem 0;
}

View File

@@ -20,8 +20,3 @@ td {
padding: 0 1rem 1rem 1rem;
vertical-align: top;
}
h1 {
margin-bottom: 2rem;
font-weight: normal;
}

View File

@@ -68,6 +68,13 @@ main {
overflow: auto;
}
main h1 {
margin-bottom: 2rem;
font-weight: normal;
font-size: 1.5em;
font-variant-caps: small-caps;
}
a,
a:visited {
text-decoration: none;
@@ -75,8 +82,7 @@ a:visited {
}
main a {
position: relative;
top: 0.2rem;
text-decoration: underline;
}
a:hover,
@@ -112,7 +118,7 @@ a:focus {
background: linear-gradient(90deg, var(--hightlight) 0%, var(--hightlight) 50%, var(--bg) 51%, var(--bg) 100%);
}
.account {
.lang {
font-size: 2rem;
}
@@ -211,8 +217,4 @@ screen and (max-width: 1500px) {
#theme-switcher {
margin-right: 1rem;
}
.account {
font-size: 1rem;
}
}

1
template/end.ical Normal file
View File

@@ -0,0 +1 @@
END:VCALENDAR

13
template/event.ical Normal file
View File

@@ -0,0 +1,13 @@
BEGIN:VEVENT
UID:calendar.<!--UID-->.field_date_time.0@radar.squat.net
DTSTAMP:<!--CREATED-->
CREATED:<!--CREATED-->
DTSTART;TZID=Europe/Belgrade:<!--DATE-->
DTEND;TZID=Europe/Belgrade:<!--DATE-->
GEO:+44.805613;+20.479234
LAST-MODIFIED:<!--CREATED-->
LOCATION:DC Krov\, Kraljice Marije 47\, 6\, Beograd\, Serbia
STATUS:CONFIRMED
SUMMARY:<!--TITLE-->
URL;TYPE=URI:https://dmz.rs/events
END:VEVENT

20
template/head.ical Normal file
View File

@@ -0,0 +1,20 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Date iCal v3.8//NONSGML kigkonsult.se iCalcreator 2.20.2//
METHOD:PUBLISH
X-WR-CALNAME;VALUE=TEXT:Decentrala events
BEGIN:VTIMEZONE
TZID:Europe/Belgrade
BEGIN:STANDARD
DTSTART:20231029T030000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20240331T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
END:DAYLIGHT
END:VTIMEZONE

View File

@@ -9,12 +9,13 @@
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
<script src="/scripts/main.js" defer></script>
<title><!--TITLE--> Decentrala</title>
<link rel="alternate" hreflang="sr" href="/PAGE_NAME" />
</head>
<body>
<header>
<a id="logo" href="/"><img src="/img/logo-light.svg" alt="Logo"> Decentrala</a>
<a id="logo" href="/en/index"><img src="/img/logo-light.svg" alt="Logo"> Decentrala</a>
<button id="theme-switcher"></button>
<a class="account" href="/en/account">Account</a>
<a class="lang" hreflang="sr" href="/PAGE_NAME">SR</a>
</header>
<main>
<!--MAIN-->
@@ -22,9 +23,10 @@
<footer>
<button id="sections-button" opened="false"><img src="/img/strelica-closed-light.svg" alt="OpenMenu"></button>
<nav>
<a href="/en/events">Događaji</a>
<a href="/en/services">Servisi</a>
<a href="/en/contact">Kontakt</a>
<a href="/en/events">Events</a>
<a href="/en/services">Services</a>
<a href="/en/contact">Contact</a>
<a href="/en/account">Account</a>
</nav>
<span class="links">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img src="/img/cc-light.svg" alt="CreativeCommons"></a>

View File

@@ -9,12 +9,13 @@
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
<script src="/scripts/main.js" defer></script>
<title><!--TITLE--> Decentrala</title>
<link rel="alternate" hreflang="en" href="/en/PAGE_NAME" />
</head>
<body>
<header>
<a id="logo" href="/"><img src="/img/logo-light.svg" alt="Logo"> Decentrala</a>
<button id="theme-switcher"></button>
<a class="account" href="/account">Nalog</a>
<a class="lang" hreflang="en" href="/en/PAGE_NAME">EN</a>
</header>
<main>
<!--MAIN-->
@@ -25,6 +26,7 @@
<a href="/events">Događaji</a>
<a href="/services">Servisi</a>
<a href="/contact">Kontakt</a>
<a class="account" href="/account">Nalog</a>
</nav>
<span class="links">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img src="/img/cc-light.svg" alt="CreativeCommons"></a>