diff options
author | Ctibor <ctibor@brancik.cz> | 2017-03-23 09:16:45 +0100 |
---|---|---|
committer | Ctibor <ctibor@brancik.cz> | 2017-03-23 09:16:45 +0100 |
commit | 96f370b0cac68a763a7871519e0ddd06673cf050 (patch) | |
tree | ff65c21a13c1190a014303c0414baa9615f72a43 /cgi-bin | |
parent | 11ad1a5f14b82932aa275c3c71af80afb367c11a (diff) | |
download | hnizdo-96f370b0cac68a763a7871519e0ddd06673cf050.tar.gz hnizdo-96f370b0cac68a763a7871519e0ddd06673cf050.tar.bz2 |
rename Link.caption to Link.timestamp
Diffstat (limited to 'cgi-bin')
-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: |