38 lines
924 B
Python
38 lines
924 B
Python
#!/usr/bin/env python3
|
|
|
|
import json
|
|
|
|
|
|
def generate_div(data):
|
|
return """
|
|
<div class="container">
|
|
<div class="row justify-content-center border-0">
|
|
<div class="col-xl-12 mt-5">
|
|
<a href="{}">
|
|
<div class="inherit_height mask rgba-gradient align-items-center border border-secondary rounded">
|
|
<social class="white">
|
|
<div class="form-group">
|
|
<div class="col-md-12 pt-3">
|
|
<h5>{}</h5>
|
|
<h6>Author*Innen: {}</h6>
|
|
<small><i>Tags: {}</i></small>
|
|
<br>
|
|
<br>
|
|
<i>{}</i>
|
|
</div>
|
|
</div>
|
|
</social>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
""".format(data["link"], data["title"], data["author"], data["tags"], data["description"])
|
|
|
|
|
|
f = open('data.json',)
|
|
data = json.load(f)
|
|
|
|
for element in data["links"]:
|
|
print(generate_div(element))
|