This commit is contained in:
TheShadowOfHassen 2023-08-08 16:53:35 -04:00
parent 00c9c9afce
commit 6f3d7b520f
4 changed files with 18 additions and 18 deletions

View file

@ -1,21 +1,21 @@
import random
import datetime
# Get seed
today = datetime.date.today()
split_date = str(today).split("-")
seed = split_date[0]+split_date[1]+split_date[2]
int(seed)
random.seed(seed)
quote_file = "./resources/quotes/Quotes_English.txt" # TODO translations
def load_quotes():
file = open(quote_file, "r")
text = file.read()
quotes = text.split("\END")
return quotes
with open(quote_file, "r") as file:
quotes = file.readlines()
return quotes
quotes = load_quotes()
def get_quote():
return random.choice(quotes)
# Get seed
today = datetime.date.today()
split_date = str(today).split("-")
seed = split_date[0]+split_date[1]+split_date[2]
int(seed)
random.seed(seed)
return random.choice(quotes)

View file

@ -29,7 +29,7 @@ class GeneralView:
self.nameBuffer = builder.get_object("name")
self.emailBuffer = builder.get_object("email")
self.quoteLabel = builder.get_object("quote-label")
self.quoteLabel = builder.get_object("quote_label")
self.titleBuffer.set_text(validString(self.info.title), -1)
self.subtitleBuffer.set_text(validString(self.info.subtitle), -1)

View file

@ -1,5 +1,5 @@
"Don't say it was “delightful”; make us say “delightful” when weve read the description. You see all those words (horrifying, wonderful, hideous, exquisite) are only like saying to your readers, “Please will you give my job for me?”" -- C.S. Lewis\END
"Dont use words too big for the subject. Dont say “infinitely” when you mean “very”; otherwise youll have no word left when you want to talk about something really infinite" - C.S. Lewis\END
“Im not in a mood for writing; I must write on until I am.” -- Jane Austen\END
"Show Don't Tell" -- Pretty much everyone\END
"In descriptions of Nature one must seize on small details, grouping them so that when the reader closes his eyes he gets a picture. For instance, youll have a moonlit night if you write that on the mill dam a piece of glass from a broken bottle glittered like a bright little star, and that the black shadow of a dog or a wolf rolled past like a ball." -- Anton Pavlovich Chekhov\END
"Don't say it was “delightful”; make us say “delightful” when weve read the description. You see all those words (horrifying, wonderful, hideous, exquisite) are only like saying to your readers, “Please will you give my job for me?”" -- C.S. Lewis
"Dont use words too big for the subject. Dont say “infinitely” when you mean “very”; otherwise youll have no word left when you want to talk about something really infinite" - C.S. Lewis
“Im not in a mood for writing; I must write on until I am.” -- Jane Austen
"Show Don't Tell" -- Pretty much everyone
"In descriptions of Nature one must seize on small details, grouping them so that when the reader closes his eyes he gets a picture. For instance, youll have a moonlit night if you write that on the mill dam a piece of glass from a broken bottle glittered like a bright little star, and that the black shadow of a dog or a wolf rolled past like a ball." -- Anton Pavlovich Chekhov

View file

@ -451,7 +451,7 @@ along with Manuskript. If not, see <http://www.gnu.org/licenses/>.
</packing>
</child>
<child>
<object class="GtkLabel" id="quote-label">
<object class="GtkLabel" id="quote_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="wrap">True</property>