mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-12 17:02:36 +12:00
Fix
This commit is contained in:
parent
00c9c9afce
commit
6f3d7b520f
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
"Don't say it was “delightful”; make us say “delightful” when we’ve 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
|
||||
"Don’t use words too big for the subject. Don’t say “infinitely” when you mean “very”; otherwise you’ll have no word left when you want to talk about something really infinite" -– C.S. Lewis\END
|
||||
“I’m 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, you’ll 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 we’ve 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
|
||||
"Don’t use words too big for the subject. Don’t say “infinitely” when you mean “very”; otherwise you’ll have no word left when you want to talk about something really infinite" -– C.S. Lewis
|
||||
“I’m 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, you’ll 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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue