diff --git a/cgi-bin/uebung07/posts/2019-06-23-19-16-45 b/cgi-bin/uebung07/posts/2019-06-23-19-16-45 deleted file mode 100644 index b695945..0000000 --- a/cgi-bin/uebung07/posts/2019-06-23-19-16-45 +++ /dev/null @@ -1 +0,0 @@ -{"tags": [" kekse ", " kekese ", " ekskeks"], "published": [2019, 6, 23, 19, 16, 45, 6, 174, 1], "title": "Ih mag kekse", "content": "kesek sindd toll"} \ No newline at end of file diff --git a/cgi-bin/uebung07/tags-show.py b/cgi-bin/uebung07/tags-show.py index f23a06e..65976b5 100755 --- a/cgi-bin/uebung07/tags-show.py +++ b/cgi-bin/uebung07/tags-show.py @@ -16,9 +16,9 @@ except: # Zeug zeigen print("Content-type: text/html\n") print("") -print("""

ALLE TAGS

""") +print("""

Tags

""") file_names= [f for f in os.listdir('posts') if os.path.isfile(os.path.join('posts', f))] tag_set = [] if tag: @@ -27,8 +27,8 @@ if tag: data = open(f, "r") data = json.load(data) if tag in data['tags']: - print('
') - print(str(data['title']) + '
Datum: ' + str(data['prettytime'])) + print('
') + print(str(data['title']) + '
Datum: ' + str(data['published'])) print('
') print(str(data['content']) + '

') for i in data['tags']: @@ -45,7 +45,6 @@ else: print('#' + str(i) + '
') print('

') - print() print('Alle Posts!
') print('Alle Tags anzeigen.
')