old-homepage/article.py
Morten Delenk 5f1836ae2a anime.py!
2016-06-14 18:07:17 +02:00

9 lines
351 B
Python
Executable file

#!/usr/bin/env python3
import storage, sys, time
name = input("Name: ")
title = input("Title: ")
tags = input("Tags: ").split(' ')
article = '\n'.join(sys.stdin.readlines())
timestamp = int(time.time())
data={"name":title,"markdown":article,"author":name,"date":timestamp, "tags":tags, "aid":storage.count("articles")}
storage.append("articles",data)