summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generatesite.py36
-rw-r--r--settings.cfg11
-rwxr-xr-xsetup.sh4
-rw-r--r--template.txt3
-rw-r--r--templates/template_dark.txt3
-rw-r--r--templates/template_kawaii.txt4
-rw-r--r--templates/template_light.txt3
-rw-r--r--templates/template_nocss.txt3
-rw-r--r--templates/template_solarized.txt3
9 files changed, 60 insertions, 10 deletions
diff --git a/generatesite.py b/generatesite.py
index 8c640c0..e127ed8 100644
--- a/generatesite.py
+++ b/generatesite.py
@@ -220,17 +220,45 @@ def generateinteresting(special):
outdir = specialoutput;
else:
outdir = cfg.get("output", "dir");
- portfoliosrc = cfg.get("interesting", "src");
- print("generating {}/interesting.html from {}".format(outdir, portfoliosrc));
+ interestingsrc = cfg.get("interesting", "src");
+ print("generating {}/interesting.html from {}".format(outdir, interestingsrc));
copyfile(template, outdir + "/interesting.html");
- with open(portfoliosrc, "r") as contentfile:
+ with open(interestingsrc, "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()));
+def generatelikes(special):
+ if special:
+ outdir = specialoutput;
+ else:
+ outdir = cfg.get("output", "dir");
+ likesrc = cfg.get("like", "src");
+ print("generating {}/like.html from {}".format(outdir, likesrc));
+ copyfile(template, outdir + "/like.html");
+ with open(likesrc, "r") as contentfile:
+ content = contentfile.read();
+ replace(outdir + "/like.html", "{TITLE}", cfg.get("like", "title"));
+ replace(outdir + "/like.html", "{INFO}", cfg.get("like", "header"));
+ replace(outdir + "/like.html", "{CONTENT}", content);
+ replace(outdir + "/like.html", "{TIME}", strftime("%Y-%m-%d %H:%M:%S", gmtime()));
+
+def generatedislikes(special):
+ if special:
+ outdir = specialoutput;
+ else:
+ outdir = cfg.get("output", "dir");
+ dislikesrc = cfg.get("dislike", "src");
+ print("generating {}/dislike.html from {}".format(outdir, dislikesrc));
+ copyfile(template, outdir + "/dislike.html");
+ with open(dislikesrc, "r") as contentfile:
+ content = contentfile.read();
+ replace(outdir + "/dislike.html", "{TITLE}", cfg.get("dislike", "title"));
+ replace(outdir + "/dislike.html", "{INFO}", cfg.get("dislike", "header"));
+ replace(outdir + "/dislike.html", "{CONTENT}", content);
if __name__ == "__main__":
cfg = configparser.ConfigParser();
@@ -250,3 +278,5 @@ if __name__ == "__main__":
generateopinions(special); # opinions/anime
generatewaifus(special); # my waifus
generateinteresting(special); # interesting stuff
+ generatelikes(special); # likes
+ generatedislikes(special); #dislikes
diff --git a/settings.cfg b/settings.cfg
index 2958113..b3c1812 100644
--- a/settings.cfg
+++ b/settings.cfg
@@ -37,7 +37,7 @@ 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.<br><br>
dir = waifus
src = content/waifus/index.txt
@@ -46,3 +46,12 @@ title = interesting
header = <h1>Interesting</h1> Things that are interesting or entertaining to me.<br><br>
src = content/interesting.txt
+[like]
+title = things I like
+header = <h1>Things that I like</h1> These are my opinions.<br>You can send angry messages to junk <b>at</b> danieljon <b>period</b> es<br><br>
+src = content/like.txt
+
+[dislike]
+title = things I dislike
+header = <h1>Things that I dislike</h1> These are my opinions.<br>You can send angry messages to junk <b>at</b> danieljon <b>period</b> es<br><br>
+src = content/dislike.txt
diff --git a/setup.sh b/setup.sh
index 79fd1bd..fd510f4 100755
--- a/setup.sh
+++ b/setup.sh
@@ -29,3 +29,7 @@ echo "Opinions on things. <br><br> <a href='anime.html'>anime</a> & <a href='eve
echo "Put your own stuff here." > content/opinions/everything.txt
#make content/interesting.txt
echo "interesting things on this page." > content/interesting.txt
+#make content/like.txt
+echo "things I like here." > content/like.txt
+#make content/dislike.txt
+echo "things I dislike here." > content/dislike.txt
diff --git a/template.txt b/template.txt
index 5508123..d2dca2b 100644
--- a/template.txt
+++ b/template.txt
@@ -26,7 +26,8 @@ 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://solarized.danieljon.es">solarized</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="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</a>
+<a href="/">index</a> <a href="/blog">blog</a> <a href="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</a> <br>
+<a href="/like.html">likes</a> <a href="/dislike.html">dislikes</a>
{INFO}
</div>
<div class="content">
diff --git a/templates/template_dark.txt b/templates/template_dark.txt
index c763dff..6b0b1cd 100644
--- a/templates/template_dark.txt
+++ b/templates/template_dark.txt
@@ -30,7 +30,8 @@ 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://solarized.danieljon.es">solarized</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="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</a>
+<a href="/">index</a> <a href="/blog">blog</a> <a href="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</a> <br>
+<a href="/like.html">likes</a> <a href="/dislike.html">dislikes</a>
{INFO}
</div>
<div class="content">
diff --git a/templates/template_kawaii.txt b/templates/template_kawaii.txt
index c83d826..853c4fc 100644
--- a/templates/template_kawaii.txt
+++ b/templates/template_kawaii.txt
@@ -26,7 +26,9 @@ 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://solarized.danieljon.es">solarized</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="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</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="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</a> <br>
+<a href="/like.html">likes</a> <a href="/dislike.html">dislikes</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 acfa466..5b1922a 100644
--- a/templates/template_light.txt
+++ b/templates/template_light.txt
@@ -26,7 +26,8 @@ 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://solarized.danieljon.es">solarized</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="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</a>
+<a href="/">index</a> <a href="/blog">blog</a> <a href="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</a> <br>
+<a href="/like.html">likes</a> <a href="/dislike.html">dislikes</a>
{INFO}
</div>
<div class="content">
diff --git a/templates/template_nocss.txt b/templates/template_nocss.txt
index 7a51127..a888ff2 100644
--- a/templates/template_nocss.txt
+++ b/templates/template_nocss.txt
@@ -13,7 +13,8 @@
<body>
<h1>danieljon.es</h1>
<a href="https://danieljon.es">normal</a> <a href="https://solarized.danieljon.es">solarized</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="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</a>
+<a href="/">index</a> <a href="/blog">blog</a> <a href="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</a> <br>
+<a href="/like.html">likes</a> <a href="/dislike.html">dislikes</a>
{INFO}
{CONTENT}
<br> <br> page generated {TIME} using <a href="https://git.danieljon.es/website/">sitegenerator</a>
diff --git a/templates/template_solarized.txt b/templates/template_solarized.txt
index dbe7733..ad41c57 100644
--- a/templates/template_solarized.txt
+++ b/templates/template_solarized.txt
@@ -31,7 +31,8 @@ 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://solarized.danieljon.es">solarized</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="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</a>
+<a href="/">index</a> <a href="/blog">blog</a> <a href="/opinions">opinions</a> <a href="/interesting.html">interesting</a> <a href="https://git.danieljon.es">cgit</a> <br>
+<a href="/like.html">likes</a> <a href="/dislike.html">dislikes</a>
{INFO}
</div>
<div class="content">