From da47bf091afc9d21dafa6a62e5b17fd8e761ef06 Mon Sep 17 00:00:00 2001
From: Jim Shepich III <73664586+epicshepich@users.noreply.github.com>
Date: Sat, 29 Jan 2022 02:09:47 -0500
Subject: [PATCH] Improved quotes
---
data/lists.json | 26 +++++++++++++++++++++++---
scripts/lists.js | 21 +++++++++++++++++++--
2 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/data/lists.json b/data/lists.json
index a7b02dd..1af8604 100644
--- a/data/lists.json
+++ b/data/lists.json
@@ -5,7 +5,7 @@
},
"quotes":{
"title":"My Favorite Quotes",
- "description":"This list contains quotes that I think about a lot.",
+ "description":"This list contains quotes that I live by, quotes that have shaped my fundamental understanding of things, and quotes that I otherwise just like.",
"list":[
{
"quote":"You're not going crazy. You're going sane in a crazy world!",
@@ -86,8 +86,8 @@
{
"quote":"Through even our darkest days, we must never cease creating. Each new invention brings value to the world, be it beauty, utility, or both.",
"quotee":"Rashmi, Aether-Seer",
- "source":"Magic: the Gathering",
- "card":"Ornithopter of Paradise"
+ "card":"Ornithopter of Paradise",
+ "multiverseid":"522308"
},
{
"quote":"What senses do we lack that we cannot see or hear another world all around us?",
@@ -116,8 +116,28 @@
{
"quote":"You're in the top half of any group.",
"quotee":"Houston Webb"
+ },
+ {
+ "quote":"A fool knows no fear. A hero shows no fear.",
+ "card":"Intrepid Hero",
+ "multiverseid":"280320"
+ },
+ {
+ "quote":"Only in mirrors do heroes find their equal.",
+ "card":"Mirror Gallery",
+ "multiverseid":"74555"
+ },
+ {
+ "quote":"You can't truly call yourself “peaceful” unless you're capable of great violence. If you're not capable of violence you're not peaceful, you're harmless.",
+ "quotee":"Stefan Grant"
+ },
+ {
+ "quote":"The convoluted wording of legalisms grew up around the necessity to hide from ourselves the violence we intend toward each other. Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. You have done violence to him, consumed his energy. Elaborate euphemisms may conceal your intent to kill, but behind any use of power over another the ultimate assumption remains: \"I feed on your energy.\"",
+ "quotee":"Frank Herbert",
+ "source":"Dune Messiah"
}
+
]
},
"words":{
diff --git a/scripts/lists.js b/scripts/lists.js
index f8c6a64..bc8593a 100644
--- a/scripts/lists.js
+++ b/scripts/lists.js
@@ -44,14 +44,31 @@ switch(list_id){
item += `${quote.title}
`;
//Add a title if the quote has one (e.g. "The Litany Against Fear").
}
- item += `"${quote.quote}"
`;
+ item += `“${quote.quote}”
`;
//Add the text of the quote.
+ if(quote.hasOwnProperty("card") && !quote.hasOwnProperty("quotee")){
+ quote.quotee="";
+ //If a flavor text doesn't have a quotee, then don't write "Unknown".
+ }
+
item += ` — ${quote.hasOwnProperty("quotee") ? quote.quotee : "Unknown"}`;
//Add the quotee's name, or "Unknown" if one is not specified.
if(quote.hasOwnProperty("source")){
- item += `, ${quote.source}`;
+ if(quote.hasOwnProperty("quotee") && quote.quotee!=""){
+ item += ", "
+ //Unless there is no quotee, separate the quotee from the source with ", "
+ }
+ item += quote.source;
//Add the source if the quote has one.
}
+
+ if(quote.hasOwnProperty("card")){
+ if(quote.quotee!=""||quote.hasOwnProperty("source")){
+ item += `, `;
+ //Separate quotee or source from card title with ", "
+ }
+ item += `${quote.card} (Magic: the Gathering)`
+ }
item += "