forked from Decentrala/website
		
	Compare commits
	
		
			5 Commits
		
	
	
		
			webring
			...
			c62983d977
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| c62983d977 | |||
| 
						 | 
					150223ae58 | ||
| 775245c3b4 | |||
| 8b55a17040 | |||
| 0a8f3167a6 | 
							
								
								
									
										45
									
								
								atom_gen.py
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										45
									
								
								atom_gen.py
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
#! /usr/bin/python3
 | 
			
		||||
 | 
			
		||||
# needs lowdown and feegden installed
 | 
			
		||||
# feedgen can be installed with pip
 | 
			
		||||
# also expects that *.md files are in blog/ directory
 | 
			
		||||
 | 
			
		||||
from feedgen.feed import FeedGenerator
 | 
			
		||||
import subprocess
 | 
			
		||||
import os
 | 
			
		||||
 | 
			
		||||
blogs_dir = os.fsencode("blog")
 | 
			
		||||
 | 
			
		||||
def blogposts_list_gen():
 | 
			
		||||
    output_list = []
 | 
			
		||||
    for file in os.listdir(blogs_dir):
 | 
			
		||||
        filename = os.fsdecode(file)
 | 
			
		||||
        if filename.endswith(".md"):
 | 
			
		||||
            full_path = "blog/" + filename
 | 
			
		||||
 | 
			
		||||
            author = subprocess.run("lowdown -X author " + full_path, capture_output=True, shell=True, text=True).stdout.strip()
 | 
			
		||||
            title = subprocess.run("lowdown -X title " + full_path, capture_output=True, shell=True, text=True).stdout.strip()
 | 
			
		||||
            time = subprocess.run("lowdown -X time " + full_path, capture_output=True, shell=True, text=True).stdout.strip()
 | 
			
		||||
            content_html = subprocess.run("lowdown " + full_path, capture_output=True, shell=True, text=True).stdout.strip()
 | 
			
		||||
 | 
			
		||||
            output_list.append([author, title, time, content_html, full_path])
 | 
			
		||||
    return output_list
 | 
			
		||||
 | 
			
		||||
def feedgen(blogs):
 | 
			
		||||
    fg = FeedGenerator()
 | 
			
		||||
    fg.id('http://dmz.rs/')
 | 
			
		||||
    fg.title('Decentrala Blog')
 | 
			
		||||
    fg.author( {'name':'Decentrala','email':'dmz@dmz.rs'} )
 | 
			
		||||
    fg.link( href='https://dmz.rs/atom.xml', rel='self' )
 | 
			
		||||
 | 
			
		||||
    for post in blogs:
 | 
			
		||||
        fe = fg.add_entry()
 | 
			
		||||
        fe.id("https://dmz.rs/" + post[4][:-3] + ".html")
 | 
			
		||||
        fe.author({'name': post[0]})
 | 
			
		||||
        fe.title(post[1])
 | 
			
		||||
        fe.updated(post[2])
 | 
			
		||||
        fe.content(content=post[3], type='html')
 | 
			
		||||
 | 
			
		||||
    fg.atom_file('atom.xml')
 | 
			
		||||
 | 
			
		||||
feedgen(blogposts_list_gen())
 | 
			
		||||
@@ -1,43 +0,0 @@
 | 
			
		||||
<h1>Nulla possent lacrimas huius</h1>
 | 
			
		||||
<h2>Fratres quoque</h2>
 | 
			
		||||
<p>Lorem markdownum pariter: lata per tuae quo salus rorant septemfluus mecum
 | 
			
		||||
  summisque feres potes Ulixes. Aeacus Tritonida reicere non convocat pariter
 | 
			
		||||
  neque arma refovet quoque stabunt in. Velamina inrita, silvestribus, ut sarcina
 | 
			
		||||
  memori, bellaque dummodo.</p>
 | 
			
		||||
<p>Factis dixit macies coissent! Nactasque molliter quam in memorant velamine;
 | 
			
		||||
  praemia mundi <em>illo</em> Achille <strong>de</strong>.</p>
 | 
			
		||||
<h2>Velut Procrin</h2>
 | 
			
		||||
<p>Vobis <a href="http://www.palmae.net/aquis-inmota.html">grave</a> fessos ita Belides; poena
 | 
			
		||||
  hora oculis celebrandaque audita guttur ad custodia exprobravit. Pacis monuere
 | 
			
		||||
  et crimen loquor <em>contigit quae</em>! Nondum iudex, auro moratur rogaberis manet.
 | 
			
		||||
  Faciem in dolor adusque, sum soror pectoris in reppulit superest caesis, Hebrum
 | 
			
		||||
  e natura sonabunt. Incensaque An monitae, in animoque vulnerat terra cavo
 | 
			
		||||
  torquet qui humili perque, cristis alii fruitur adacto.</p>
 | 
			
		||||
<ul>
 | 
			
		||||
  <li>Est velavit idem</li>
 | 
			
		||||
  <li>Naupliades tenebant instanti ense iactura ut nutantem</li>
 | 
			
		||||
  <li>Miserarum corpore habet</li>
 | 
			
		||||
</ul>
 | 
			
		||||
<h2>Ad utque sic Charybdis iamque sequenti genitore</h2>
 | 
			
		||||
<p>Hesperien arida. Tibi caelo clavigeram saxoque capillos doleamne faveas testes
 | 
			
		||||
  senex <strong>rudente lacrimis</strong> insula Cnosiacaeque? Dant ablato adulterium gemino,
 | 
			
		||||
  pluvialibus una, dependent iactura illum redit atque dixi pondera. Eumque
 | 
			
		||||
  sanguis errare, formasque parabat volubilibus satis creaverat dextera Iuppiter
 | 
			
		||||
  te sero, est. Opem duceret quam tum pollentibus ramumque tauri; at Saturnia
 | 
			
		||||
  erigitur imitamine ferens adunca delapsaque viminis, terras.</p>
 | 
			
		||||
<h2>Denique ostendit femina tamen</h2>
 | 
			
		||||
<p>Telum in ab utque ut et mihi <strong>auras Midan</strong> meo genus membra comites ne. Orbis
 | 
			
		||||
  via necis. Romana deus, sub frangunt furor crepuscula equorum Teleboasque templa
 | 
			
		||||
  virgineumque belua obsita est. Fragorem Somnus; ducebas placido oscula.</p>
 | 
			
		||||
<blockquote>
 | 
			
		||||
  <p>Inmota manifesta producit, inquit verbisque fluctus iamque, quo fuerat ipse
 | 
			
		||||
    nostra, iussit <strong>nec tenebat</strong>. Pars procul, pietate crinales meus <em>totiens</em>
 | 
			
		||||
    haustus frondes, per sedebat. Domum vincite.</p>
 | 
			
		||||
</blockquote>
 | 
			
		||||
<h2>De curaque quoque reddat numina quae veniam</h2>
 | 
			
		||||
<p>Fessus iacit tantum elimat a medios vinoque finita adspergine liquerat munere
 | 
			
		||||
  vultibus Atridae pecus positoque reluxit. Veniebat videtur laesae quod vacca,
 | 
			
		||||
  lolium neu Perseus fraude nominibus contraria.</p>
 | 
			
		||||
<p>Parat <strong>ferus</strong> in actis terebrata animaeque <strong>quoque</strong>, deos et morte agitantem
 | 
			
		||||
  ore. Proelia casus Gryneus. Quis mihi <em>ille cur</em> Assyrius per siquis, ille
 | 
			
		||||
  Hecabe Arethusa, erigite perfectis.</p>
 | 
			
		||||
@@ -1,53 +0,0 @@
 | 
			
		||||
# Nulla possent lacrimas huius
 | 
			
		||||
 | 
			
		||||
## Fratres quoque
 | 
			
		||||
 | 
			
		||||
Lorem markdownum pariter: lata per tuae quo salus rorant septemfluus mecum
 | 
			
		||||
summisque feres potes Ulixes. Aeacus Tritonida reicere non convocat pariter
 | 
			
		||||
neque arma refovet quoque stabunt in. Velamina inrita, silvestribus, ut sarcina
 | 
			
		||||
memori, bellaque dummodo.
 | 
			
		||||
 | 
			
		||||
Factis dixit macies coissent! Nactasque molliter quam in memorant velamine;
 | 
			
		||||
praemia mundi *illo* Achille **de**.
 | 
			
		||||
 | 
			
		||||
## Velut Procrin
 | 
			
		||||
 | 
			
		||||
Vobis [grave](http://www.palmae.net/aquis-inmota.html) fessos ita Belides; poena
 | 
			
		||||
hora oculis celebrandaque audita guttur ad custodia exprobravit. Pacis monuere
 | 
			
		||||
et crimen loquor *contigit quae*! Nondum iudex, auro moratur rogaberis manet.
 | 
			
		||||
Faciem in dolor adusque, sum soror pectoris in reppulit superest caesis, Hebrum
 | 
			
		||||
e natura sonabunt. Incensaque An monitae, in animoque vulnerat terra cavo
 | 
			
		||||
torquet qui humili perque, cristis alii fruitur adacto.
 | 
			
		||||
 | 
			
		||||
- Est velavit idem
 | 
			
		||||
- Naupliades tenebant instanti ense iactura ut nutantem
 | 
			
		||||
- Miserarum corpore habet
 | 
			
		||||
 | 
			
		||||
## Ad utque sic Charybdis iamque sequenti genitore
 | 
			
		||||
 | 
			
		||||
Hesperien arida. Tibi caelo clavigeram saxoque capillos doleamne faveas testes
 | 
			
		||||
senex **rudente lacrimis** insula Cnosiacaeque? Dant ablato adulterium gemino,
 | 
			
		||||
pluvialibus una, dependent iactura illum redit atque dixi pondera. Eumque
 | 
			
		||||
sanguis errare, formasque parabat volubilibus satis creaverat dextera Iuppiter
 | 
			
		||||
te sero, est. Opem duceret quam tum pollentibus ramumque tauri; at Saturnia
 | 
			
		||||
erigitur imitamine ferens adunca delapsaque viminis, terras.
 | 
			
		||||
 | 
			
		||||
## Denique ostendit femina tamen
 | 
			
		||||
 | 
			
		||||
Telum in ab utque ut et mihi **auras Midan** meo genus membra comites ne. Orbis
 | 
			
		||||
via necis. Romana deus, sub frangunt furor crepuscula equorum Teleboasque templa
 | 
			
		||||
virgineumque belua obsita est. Fragorem Somnus; ducebas placido oscula.
 | 
			
		||||
 | 
			
		||||
> Inmota manifesta producit, inquit verbisque fluctus iamque, quo fuerat ipse
 | 
			
		||||
> nostra, iussit **nec tenebat**. Pars procul, pietate crinales meus *totiens*
 | 
			
		||||
> haustus frondes, per sedebat. Domum vincite.
 | 
			
		||||
 | 
			
		||||
## De curaque quoque reddat numina quae veniam
 | 
			
		||||
 | 
			
		||||
Fessus iacit tantum elimat a medios vinoque finita adspergine liquerat munere
 | 
			
		||||
vultibus Atridae pecus positoque reluxit. Veniebat videtur laesae quod vacca,
 | 
			
		||||
lolium neu Perseus fraude nominibus contraria.
 | 
			
		||||
 | 
			
		||||
Parat **ferus** in actis terebrata animaeque **quoque**, deos et morte agitantem
 | 
			
		||||
ore. Proelia casus Gryneus. Quis mihi *ille cur* Assyrius per siquis, ille
 | 
			
		||||
Hecabe Arethusa, erigite perfectis.
 | 
			
		||||
							
								
								
									
										33
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								index.html
									
									
									
									
									
								
							@@ -21,36 +21,29 @@
 | 
			
		||||
    </span>
 | 
			
		||||
  </header>
 | 
			
		||||
  <div id="main">
 | 
			
		||||
    <h1>Dobrodosli!</h1>
 | 
			
		||||
    <h1>Dobrodošao!</h1>
 | 
			
		||||
    <p>
 | 
			
		||||
      Mi smo <em>Decentrala</em> - grupa entuzijasta okupljena oko ideja decentralizacije i slobodnog sirenja znanja.
 | 
			
		||||
      Zvuci interesantno? Evo jos nekih stvari o nama:
 | 
			
		||||
      Mi smo <em>Decentrala</em> - grupa entuzijasta okupljena oko ideja decentralizacije i slobodnog širenja znanja.
 | 
			
		||||
      Zvuči interesantno? Evo još nekih stvari o nama:
 | 
			
		||||
    </p>
 | 
			
		||||
    <dl>
 | 
			
		||||
      <dt>Znanje:</dt>
 | 
			
		||||
      <dd>Sve nase radionice su besplatne i otvorene za sve zainteresovane, a ako imate nesto sto zelite da
 | 
			
		||||
        podelite, najavite se na nasem <a href="https://forum.dmz.rs">Forumu</a> i odrzite radionicu kod nas!</dd>
 | 
			
		||||
      <dd>Sve naše radionice su besplatne i otvorene za sve zainteresovane.
 | 
			
		||||
        Ako želiš nešto da podeliš najavi se na našem <a href="https://forum.dmz.rs">Forumu</a> i održi radionicu kod nas!</dd>
 | 
			
		||||
      <dt>Akcije:</dt>
 | 
			
		||||
      <dd>Povremeno organizujemo razlicite akcije, hakatone, crypto-partije, izlozbe i slicne dogadjaje otvorene za sve
 | 
			
		||||
        zainteresovane. </dd>
 | 
			
		||||
      <dd>Povremeno organizujemo različite akcije, hakatone, crypto-partije, izložbe i slične događaje otvorene za sve zainteresovane. </dd>
 | 
			
		||||
      <dt>Servisi:</dt>
 | 
			
		||||
      <dd>Na nasim serverima pokrecemo neke servise (email, git, wiki i druge) koji su otvoreni za sve i koje mozes
 | 
			
		||||
        koristiti sa ili bez naseg naloga.</dd>
 | 
			
		||||
      <dt>Ljudi:</dt>
 | 
			
		||||
      <dd>Lorem ipsum dolor sit amet.</dd>
 | 
			
		||||
      <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>
 | 
			
		||||
    </dl>
 | 
			
		||||
    <p>
 | 
			
		||||
      Ako si procitao sve i i dalje si zainteresovan, mozes da napravis <a href="/pages/account.html">nalog</a> na nasem
 | 
			
		||||
      serveru koji ce
 | 
			
		||||
      ti omoguciti da koristis sve nase <a href="/pages/services.html">servise</a>, a ako prvo hoces da vidis kako to
 | 
			
		||||
      sve izgleda u realnosti, mozes da dodjes na neki od nasih <a href="/pages/events.html">dogadjaja</a>, i tamo nas
 | 
			
		||||
      upoznas!
 | 
			
		||||
      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 ž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>
 | 
			
		||||
    <img id="mesh" src="/img/mesh-light.svg">
 | 
			
		||||
  </div>
 | 
			
		||||
  <footer>
 | 
			
		||||
    <div id="sections-menu">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
@@ -58,7 +51,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
    <button id="sections-button" opened="false"><img src="/img/strelica-closed-light.svg" alt="OpenMenu"></button>
 | 
			
		||||
    <span class="sections">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
@@ -68,7 +61,7 @@
 | 
			
		||||
      <span class="links">
 | 
			
		||||
        <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img src="/img/cc-light.svg"
 | 
			
		||||
            alt="CreativeCommons"></a>
 | 
			
		||||
        <a href="/pages/webring.html"><img src="/img/w-light.svg" alt="Webring"></a>
 | 
			
		||||
        <a href=""><img src="/img/w-light.svg" alt="Webring"></a>
 | 
			
		||||
        <a href="https://gitea.dmz.rs/eline/decentrala-website-static-new"><img src="/img/git-light.svg"
 | 
			
		||||
            alt="SourceCode"></a>
 | 
			
		||||
        <a href="https://balkan.fedive.rs/@decentrala"><img src="/img/mastodon-light.svg" alt="Mastodon"></a>
 | 
			
		||||
@@ -78,4 +71,4 @@
 | 
			
		||||
  </footer>
 | 
			
		||||
</body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
</html>
 | 
			
		||||
@@ -25,7 +25,7 @@
 | 
			
		||||
  </div>
 | 
			
		||||
  <footer>
 | 
			
		||||
    <div id="sections-menu">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
@@ -33,7 +33,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
    <button id="sections-button" opened="false"><img src="/img/strelica-closed-light.svg" alt="OpenMenu"></button>
 | 
			
		||||
    <span class="sections">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@
 | 
			
		||||
  </div>
 | 
			
		||||
  <footer>
 | 
			
		||||
    <div id="sections-menu">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
@@ -33,7 +33,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
    <button id="sections-button" opened="false"><img src="/img/strelica-closed-light.svg" alt="OpenMenu"></button>
 | 
			
		||||
    <span class="sections">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
 
 | 
			
		||||
@@ -21,16 +21,16 @@
 | 
			
		||||
  </header>
 | 
			
		||||
  <div id="main">
 | 
			
		||||
    <h1>Kontakt</h1>
 | 
			
		||||
    <p>Mozes nam poslati mail na <a href="mailto:dmz@dmz.rs">dmz@dmz.rs</a> ili se mozes pridruziti nasem <a
 | 
			
		||||
    <p>Možeš nam poslati mail na <a href="mailto:dmz@dmz.rs">dmz@dmz.rs</a> ili se mozes pridružiti našem <a
 | 
			
		||||
        href="https://forum.dmz.rs">Forumu</a>.</p>
 | 
			
		||||
    <p>Takodje smo i na <a href="https://balkan.fedive.rs/@decentrala">Fediversu!</a></p>
 | 
			
		||||
    <p>Takođe smo i na <a href="https://balkan.fedive.rs/@decentrala">Fediversu!</a></p>
 | 
			
		||||
    <p style="position: relative; top: 5rem;">U slucaju da nadjete <em>bug</em> na sajtu, bili bismo jako zahvalni
 | 
			
		||||
      ako bi mogli da nam ga prijavite (npr. putem emaila).</p>
 | 
			
		||||
    <img id="mesh" src="/img/mesh-light.svg">
 | 
			
		||||
  </div>
 | 
			
		||||
  <footer>
 | 
			
		||||
    <div id="sections-menu">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
@@ -38,7 +38,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
    <button id="sections-button" opened="false"><img src="/img/strelica-closed-light.svg" alt="OpenMenu"></button>
 | 
			
		||||
    <span class="sections">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@
 | 
			
		||||
  </div>
 | 
			
		||||
  <footer>
 | 
			
		||||
    <div id="sections-menu">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
@@ -33,7 +33,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
    <button id="sections-button" opened="false"><img src="/img/strelica-closed-light.svg" alt="OpenMenu"></button>
 | 
			
		||||
    <span class="sections">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
 
 | 
			
		||||
@@ -66,7 +66,7 @@
 | 
			
		||||
  </div>
 | 
			
		||||
  <footer>
 | 
			
		||||
    <div id="sections-menu">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
@@ -74,7 +74,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
    <button id="sections-button" opened="false"><img src="/img/strelica-closed-light.svg" alt="OpenMenu"></button>
 | 
			
		||||
    <span class="sections">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/events.html">Događaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,56 +0,0 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
  <meta charset="UTF-8">
 | 
			
		||||
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
			
		||||
  <link rel="stylesheet" href="/styles/style.css">
 | 
			
		||||
  <link rel="stylesheet" href="/styles/blog.css">
 | 
			
		||||
  <link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
 | 
			
		||||
  <script src="/scripts/main.js" defer></script>
 | 
			
		||||
  <title>Decentrala - Blog</title>
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  <header>
 | 
			
		||||
    <a class="logo" href="/index.html">Decentrala</a>
 | 
			
		||||
    <span>
 | 
			
		||||
      <button id="theme-switcher">turn the lights off</button>
 | 
			
		||||
      <a class="account" href="/pages/account.html">Nalog</a>
 | 
			
		||||
    </span>
 | 
			
		||||
  </header>
 | 
			
		||||
  <div id="main">
 | 
			
		||||
    <list>
 | 
			
		||||
    <li> <a href="https://tilde.zone/explore">Tilde Zone</a> </li>
 | 
			
		||||
    </list>
 | 
			
		||||
    <img id="mesh" src="/img/mesh-light.svg">
 | 
			
		||||
  </div>
 | 
			
		||||
  <footer>
 | 
			
		||||
    <div id="sections-menu">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
      <a href="/pages/contact.html">Kontakt</a>
 | 
			
		||||
    </div>
 | 
			
		||||
    <button id="sections-button" opened="false"><img src="/img/strelica-closed-light.svg" alt="OpenMenu"></button>
 | 
			
		||||
    <span class="sections">
 | 
			
		||||
      <a href="/pages/events.html">Dogadjaji</a>
 | 
			
		||||
      <a href="/pages/projects.html">Projekti</a>
 | 
			
		||||
      <a href="/pages/blog.html">Blog</a>
 | 
			
		||||
      <a href="/pages/services.html">Servisi</a>
 | 
			
		||||
      <a href="/pages/contact.html">Kontakt</a>
 | 
			
		||||
    </span>
 | 
			
		||||
    <span class="copyleft">
 | 
			
		||||
      <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img src="/img/cc-light.svg"
 | 
			
		||||
          alt="CreativeCommons"></a>
 | 
			
		||||
      <a href=""><img src="/img/w-light.svg" alt="Webring"></a>
 | 
			
		||||
      <a href="https://gitea.dmz.rs/eline/decentrala-website-static-new"><img src="/img/git-light.svg"
 | 
			
		||||
          alt="SourceCode"></a>
 | 
			
		||||
      <a href="https://balkan.fedive.rs/@decentrala"><img src="/img/mastodon-light.svg" alt="Mastodon"></a>
 | 
			
		||||
      <span>Decentrala © 2023</span>
 | 
			
		||||
    </span>
 | 
			
		||||
  </footer>
 | 
			
		||||
</body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										27
									
								
								poster.py
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								poster.py
									
									
									
									
									
								
							@@ -5,8 +5,9 @@ from dateutil import relativedelta
 | 
			
		||||
EVENTS_CSV_PATH = "dogadjaji.csv"
 | 
			
		||||
CURRENT_TIME = dt.date.today()
 | 
			
		||||
NEXT_MONTH = CURRENT_TIME + relativedelta.relativedelta(months=1, day=1)
 | 
			
		||||
DAYS_OF_WEEK_SR = ("PON", "UTO", "SRE", "CET", "PET", "SUB", "NED")
 | 
			
		||||
MONTHS_SR = ("Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar")
 | 
			
		||||
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 load_events(csv_path:str) -> list[dict]:
 | 
			
		||||
    events = []
 | 
			
		||||
@@ -20,11 +21,9 @@ def load_events(csv_path:str) -> list[dict]:
 | 
			
		||||
            event_title = event[3]
 | 
			
		||||
            current_event = {"date":event_date_parsed,
 | 
			
		||||
                             "time":event_time,
 | 
			
		||||
                             "title":event_title}
 | 
			
		||||
            
 | 
			
		||||
                             "title":event_title.strip()}
 | 
			
		||||
            if event_date_parsed >= NEXT_MONTH:
 | 
			
		||||
                events.append(current_event)
 | 
			
		||||
        
 | 
			
		||||
        return events
 | 
			
		||||
 | 
			
		||||
def render_table(events:list[dict])-> str:
 | 
			
		||||
@@ -33,18 +32,23 @@ def render_table(events:list[dict])-> str:
 | 
			
		||||
        date = DAYS_OF_WEEK_SR[event["date"].weekday()]
 | 
			
		||||
        day = event["date"].day
 | 
			
		||||
        title = event["title"]
 | 
			
		||||
        html += f"<tr><td>{date}</td><td>{day}.</td><td>{title}</td></tr>\n"
 | 
			
		||||
        html += f"\t\t\t<tr> <td>{date}</td> <td>{day}.</td> <td>{title}</td> </tr>\n"
 | 
			
		||||
    return html
 | 
			
		||||
 | 
			
		||||
def render_page(table: str) -> str:
 | 
			
		||||
    head = "<head><link rel=\"stylesheet\" href=\"styles/poster.css\"><head>"
 | 
			
		||||
    head = "<head>\n\t<meta charset=\"UTF-8\">\n\t<link rel=\"stylesheet\"\
 | 
			
		||||
href=\"styles/poster.css\">\n<head>"
 | 
			
		||||
    header = "<h1>DECENTRALA</h1>"
 | 
			
		||||
    subheader = f"<h2>Plan za {MONTHS_SR[NEXT_MONTH.month - 1]}</h2>"
 | 
			
		||||
    link = "<div id=link>dmz.rs</div>"
 | 
			
		||||
    p1 = "<p>Radionice počinju u <strong>19h</strong> u Društvenom centru Krov u <strong>Kraljice Marije 47</strong>.</p>"
 | 
			
		||||
    p2 = "<p>Ulaz u zgradu je u prolazu pored Štark prodavnice slatkiša, odmah pored menjačnice. DC Krov je na poslednjem spratu.</p>"
 | 
			
		||||
    return f"<html>{head}<body><main>{header}{subheader}<table>{table}</table>{p1}{p2}{link}</main></body></html>"
 | 
			
		||||
 | 
			
		||||
    p1 = "<p>Radionice počinju u <strong>19h</strong> u Društvenom centru Krov\
 | 
			
		||||
u <strong>Kraljice Marije 47</strong>.</p>"
 | 
			
		||||
    p2 = "<p>Ulaz u zgradu je u prolazu pored Štark prodavnice slatkiša, odmah\
 | 
			
		||||
pored menjačnice. DC Krov je na poslednjem spratu.</p>"
 | 
			
		||||
    return f"<html>\n{head}\n<body>\n\t<main>\n\t\t{header}\n\t\t{subheader}\
 | 
			
		||||
\n\t\t<table>\n{table}\t\t</table>\n\t\t{p1}\n\t\t{p2}\n\t\t{link}\n\t</main>\
 | 
			
		||||
\n</body>\n</html>"
 | 
			
		||||
    
 | 
			
		||||
def main():
 | 
			
		||||
    events = load_events(EVENTS_CSV_PATH)
 | 
			
		||||
    table = render_table(events)
 | 
			
		||||
@@ -53,6 +57,5 @@ def main():
 | 
			
		||||
    f.write(page)
 | 
			
		||||
    f.close()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if __name__ == "__main__":
 | 
			
		||||
    main()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user