summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generatesite.py18
-rw-r--r--settings.cfg7
-rw-r--r--template.txt2
-rw-r--r--templates/template_dark.txt2
-rw-r--r--templates/template_kawaii.txt2
-rw-r--r--templates/template_light.txt3
-rw-r--r--templates/template_nocss.txt2
7 files changed, 29 insertions, 7 deletions
diff --git a/generatesite.py b/generatesite.py
index 919570e..0ee35f4 100644
--- a/generatesite.py
+++ b/generatesite.py
@@ -201,6 +201,23 @@ def generatewaifus(special):
replace(outdir + "/" + waifusdir + "/index.html", "{CONTENT}", content);
replace(outdir + "/" + waifusdir + "/index.html", "{TIME}", strftime("%Y-%m-%d %H:%M:%S", gmtime()));
+def generateinteresting(special):
+ if special:
+ outdir = specialoutput;
+ else:
+ outdir = cfg.get("output", "dir");
+ portfoliosrc = cfg.get("interesting", "src");
+ print("generating {}/interesting.html from {}".format(outdir, portfoliosrc));
+ copyfile(template, outdir + "/interesting.html");
+ with open(portfoliosrc, "r") as contentfile:
+ content = contentfile.read();
+ replace(outdir + "/interesting.html", "{TITLE}", cfg.get("interesting", "title"));
+ replace(outdir + "/interesting.html", "{INFO}", cfg.get("interesting", "header"));
+ replace(outdir + "/interesting.html", "{CONTENT}", content);
+ replace(outdir + "/interesting.html", "{TIME}", strftime("%Y-%m-%d %H:%M:%S", gmtime()));
+
+
+
if __name__ == "__main__":
cfg = configparser.ConfigParser();
cfg.read("settings.cfg");
@@ -218,3 +235,4 @@ if __name__ == "__main__":
generateportfolio(special); # portfolio
generateopinions(special); # opinions/anime
generatewaifus(special); # my waifus
+ generateinteresting(special); # interesting stuff
diff --git a/settings.cfg b/settings.cfg
index 128e8cb..35733c0 100644
--- a/settings.cfg
+++ b/settings.cfg
@@ -37,7 +37,12 @@ src = content/opinions/everything.txt
[waifus]
title = waifus
-header = <h1>My waifus, not yours</h1>All other waifus are literal trash
+header = <h1>My waifus, not yours</h1>All other waifus are literal trash.
dir = waifus
src = content/waifus/index.txt
+[interesting]
+title = interesting
+header = <h1>interesting</h1> Things I have found online that are interesting or entertaining to me.
+src = content/interesting.txt
+
diff --git a/template.txt b/template.txt
index 8532db4..0095a94 100644
--- a/template.txt
+++ b/template.txt
@@ -31,7 +31,7 @@ div.cover{display:inline-block; vertical-align: top; padding-top: 28px; padding-
<h1>danieljon.es</h1>
<a href="https://danieljon.es">normal</a> <a href="https://light.danieljon.es">light</a> <a href="https://dark.danieljon.es">dark</a> <a href="https://nocss.danieljon.es">no css</a> <br>
-<a href="/">index</a> <a href="/blog">blog</a> <a href="/portfolio.html">projects</a> <a href="/opinions">opinions</a> <a href="https://git.danieljon.es">git</a>
+<a href="/">index</a> <a href="/blog">blog</a> <a href="/portfolio.html">projects</a> <a href="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">git</a>
{INFO}
</div>
<div class="content">
diff --git a/templates/template_dark.txt b/templates/template_dark.txt
index ad3d37c..a8d44bf 100644
--- a/templates/template_dark.txt
+++ b/templates/template_dark.txt
@@ -30,7 +30,7 @@ div.cover{display:inline-block; vertical-align: top; padding-top: 28px; padding-
<div class="middle">
<h1>danieljon.es</h1>
<a href="https://danieljon.es">normal</a> <a href="https://light.danieljon.es">light</a> <a href="https://dark.danieljon.es">dark</a> <a href="https://nocss.danieljon.es">no css</a> <br>
-<a href="/">index</a> <a href="/blog">blog</a> <a href="/portfolio.html">projects</a> <a href="/opinions">opinions</a> <a href="https://git.danieljon.es">git</a>
+<a href="/">index</a> <a href="/blog">blog</a> <a href="/portfolio.html">projects</a> <a href="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">git</a>
{INFO}
</div>
<div class="content">
diff --git a/templates/template_kawaii.txt b/templates/template_kawaii.txt
index 0a31f5e..8c063a3 100644
--- a/templates/template_kawaii.txt
+++ b/templates/template_kawaii.txt
@@ -26,7 +26,7 @@ div.cover{display:inline-block; vertical-align: top; padding-top: 28px; padding-
<div class="middle">
<h1>danieljon.es</h1>
<a href="https://danieljon.es">normal</a> <a href="https://light.danieljon.es">light</a> <a href="https://dark.danieljon.es">dark</a> <a href="https://nocss.danieljon.es">no css</a> <br>
-<a href="/">index</a> <a href="/blog">blog</a> <a href="/portfolio.html">projects</a> <a href="/opinions">opinions</a> <a href="https://git.danieljon.es">git</a> <img src="https://kawaii.danieljon.es/media/dance2.gif" style="position: absolute; top: 10px; float: left;">
+<a href="/">index</a> <a href="/blog">blog</a> <a href="/portfolio.html">projects</a> <a href="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">git</a> <img src="https://kawaii.danieljon.es/media/dance2.gif" style="position: absolute; top: 10px; float: left;">
{INFO}
</div>
<div class="content">
diff --git a/templates/template_light.txt b/templates/template_light.txt
index 96ba4a2..8b7808b 100644
--- a/templates/template_light.txt
+++ b/templates/template_light.txt
@@ -26,8 +26,7 @@ div.cover{display:inline-block; vertical-align: top; padding-top: 28px; padding-
<div class="middle">
<h1>danieljon.es</h1>
<a href="https://danieljon.es">normal</a> <a href="https://light.danieljon.es">light</a> <a href="https://dark.danieljon.es">dark</a> <a href="https://nocss.danieljon.es">no css</a> <br>
-
-<a href="/">index</a> <a href="/blog">blog</a> <a href="/portfolio.html">projects</a> <a href="/opinions">opinions</a> <a href="https://git.danieljon.es">git</a>
+<a href="/">index</a> <a href="/blog">blog</a> <a href="/portfolio.html">projects</a> <a href="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">git</a>
{INFO}
</div>
<div class="content">
diff --git a/templates/template_nocss.txt b/templates/template_nocss.txt
index 1454ce7..cd0be76 100644
--- a/templates/template_nocss.txt
+++ b/templates/template_nocss.txt
@@ -13,7 +13,7 @@
<body>
<h1>danieljon.es</h1>
<a href="https://danieljon.es">normal</a> <a href="https://light.danieljon.es">light</a> <a href="https://dark.danieljon.es">dark</a> <a href="https://nocss.danieljon.es">no css</a> <br>
-<a href="/">index</a> <a href="/blog">blog</a> <a href="/portfolio.html">projects</a> <a href="/opinions">opinions</a> <a href="https://git.danieljon.es">git</a>
+<a href="/">index</a> <a href="/blog">blog</a> <a href="/portfolio.html">projects</a> <a href="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">git</a>
{INFO}
{CONTENT}
<br> <br> page generated {TIME} using <a href="https://git.danieljon.es/website/">sitegenerator</a>