2019-03-23 17:52:19 +00:00
|
|
|
import json
|
|
|
|
|
2019-07-14 03:50:04 +00:00
|
|
|
with open('json/proxies.json') as f:
|
2019-03-23 17:52:19 +00:00
|
|
|
x = json.load(f)
|
|
|
|
|
|
|
|
text = ""
|
|
|
|
for i in x["cards"]:
|
|
|
|
text += f"""
|
|
|
|
<div class="card">
|
|
|
|
<h1>{i["name"]}</h1>
|
|
|
|
<p>{i["description"]}</p>
|
|
|
|
<a href="{i["link"]}"><button class="button">{i["button_text"]}</button></a>
|
|
|
|
"""
|
|
|
|
if i["tor"] != "#":
|
|
|
|
text += f'<a href="{i["tor"]}"><button class="tor">Tor</button></a>'
|
|
|
|
|
|
|
|
text += "</div>"
|
|
|
|
|
2019-07-14 03:50:04 +00:00
|
|
|
with open('_site/proxies/index.html') as f:
|
2019-03-23 17:52:19 +00:00
|
|
|
y = f.read()
|
|
|
|
|
2019-03-23 18:05:23 +00:00
|
|
|
y = y.replace('<!-- Static cards -->', text)
|
2019-07-14 03:50:04 +00:00
|
|
|
with open('_site/proxies/index.html', 'w') as f:
|
2019-03-23 17:52:19 +00:00
|
|
|
f.write(y)
|