diff options
-rw-r--r-- | cgi-bin/display.py | 8 | ||||
-rw-r--r-- | cgi-bin/link.py | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/cgi-bin/display.py b/cgi-bin/display.py index 51dc540..262a523 100644 --- a/cgi-bin/display.py +++ b/cgi-bin/display.py @@ -29,15 +29,15 @@ class Body: print ("</header>") print ("<article id=\"prev\">") print (self.a.imglink(self.a.delta('+m'),'prev')) - print ("<p>"+self.a.caption(self.a.delta('+m'))+"</p>") + print ("<p>"+self.a.timestamp(self.a.delta('+m'))+"</p>") print ("</article>") print ("<article id=\"now\">") print (self.a.imglink(self.a.img, 'now')) - print ("<p>"+self.a.caption(self.a.img)+"</p>") + print ("<p>"+self.a.timestamp(self.a.img)+"</p>") print ("</article>") print ("<article id=\"next\">") print (self.a.imglink(self.a.delta('-m'), 'next')) - print ("<p>"+self.a.caption(self.a.delta('-m'))+"</p>") + print ("<p>"+self.a.timestamp(self.a.delta('-m'))+"</p>") print ("</article>") print ("<footer>") print ("<a href=\"?f=index\" title=\"všechny fotky\">vše</a>") @@ -54,7 +54,7 @@ class Body: print ("<ul>") for f in index: print("<li>") - print(self.a.link(f, self.a.caption(f))) + print(self.a.link(f, self.a.timestamp(f))) print("</li>") print ("</ul>") diff --git a/cgi-bin/link.py b/cgi-bin/link.py index d6f3251..5cb6b2d 100644 --- a/cgi-bin/link.py +++ b/cgi-bin/link.py @@ -28,8 +28,8 @@ class Link: else: return "<img src=\""+self.src(target)+"\" class=\""+order+"\"/>" - def caption(self, figure): - if self.detect(figure): + def timestamp(self, date): + if self.detect(date): date=datetime.datetime.strftime(datetime.datetime.strptime(figure[:12], "%Y%m%d%H%M"), "%Y-%m-%d %H:%M") return date else: |