Skip to content

Commit 2a88c4f

Browse files
committed
In the "Stories" module, I greatly improved the sub-class "Post".
I created a root dictionary containing all the data the sub-class will utilize. I improved the definition of the chapter to be posted, improving its chapter dictionary. I renamed the "Create_Cover" method to "Create_The_Covers". I greatly improved it, and separated its function of creating covers into a new method called "Create_Cover". The root method only has the job of asking if the user wants to skip the cover creation process. The new "Create_Cover" method lists the chapters for which their covers will be created. This allows the sub-class to be executed as a module, by the "Update_Chapter_Covers" sub-class. The method does what its old method did, but with checks of the execution mode as a module. I fixed the "Update_Websites" method, which was using the "Code" module instead of the "PHP" module. Before the transfer of the sub-class to the "PHP" module. I have also greatly improved the sub-class documentation and comments, making them more descriptive and easier to understand.
1 parent 257aed1 commit 2a88c4f

File tree

14 files changed

+521
-407
lines changed

14 files changed

+521
-407
lines changed

Module Files/Food_Time/Times.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"Will be hungry": 3
1111
},
1212
"Ate": {
13-
"Object": "2024-04-25 22:58:19-03:00",
13+
"Object": "2024-04-29 19:48:03-03:00",
1414
"Time": 0,
15-
"Time text": "22:58",
15+
"Time text": "19:48",
1616
"Unit": {
1717
"en": "hours",
1818
"pt": "horas"
@@ -23,9 +23,9 @@
2323
}
2424
},
2525
"Can drink water": {
26-
"Object": "2024-04-25 23:38:19-03:00",
26+
"Object": "2024-04-29 20:28:03-03:00",
2727
"Time": 40,
28-
"Time text": "23:38",
28+
"Time text": "20:28",
2929
"Unit": {
3030
"en": "minutes",
3131
"pt": "minutos"
@@ -36,9 +36,9 @@
3636
}
3737
},
3838
"Will be hungry": {
39-
"Object": "2024-04-26 01:58:19-03:00",
39+
"Object": "2024-04-29 22:48:03-03:00",
4040
"Time": 3,
41-
"Time text": "01:58",
41+
"Time text": "22:48",
4242
"Unit": {
4343
"en": "hours",
4444
"pt": "horas"

Module Files/Stories/Texts.json

+11-7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"en": "Chapters",
1212
"pt": "Capítulos"
1313
},
14+
"chapter_title": {
15+
"en": "Chapter title",
16+
"pt": "Título do capítulo"
17+
},
1418
"chapter_number": {
1519
"en": "Chapter number",
1620
"pt": "Número do capítulo"
@@ -68,8 +72,8 @@
6872
"pt": "Cole a segunda parte do card do {} na caixa de texto da postagem"
6973
},
7074
"copying_the_cover_to_the_{}_folder": {
71-
"en": "Copying the cover to the {} folder",
72-
"pt": "Copiando a capa para a pasta {}"
75+
"en": "Copying the cover to the [{}] folder",
76+
"pt": "Copiando a capa para a pasta de [{}]"
7377
},
7478
"press_enter_when_you_finish_rendering_the_cover": {
7579
"en": "Press Enter when you finish rendering the cover",
@@ -81,11 +85,11 @@
8185
},
8286
"mega_stories": {
8387
"en": "Mega Stories",
84-
"pt": "de Histórias do Mega"
88+
"pt": "Histórias do Mega"
8589
},
8690
"website_story_covers": {
8791
"en": "website story covers",
88-
"pt": "de capas de histórias do site"
92+
"pt": "capas de histórias do site"
8993
},
9094
"paste_the_wattpad_chapter_link": {
9195
"en": "Paste the Wattpad chapter link",
@@ -337,9 +341,9 @@
337341
"en": "You finished updating the chapter covers of this story",
338342
"pt": "Você terminou de atualizar as capas de capítulo desta história"
339343
},
340-
"i_published_the_chapter_{}_of_my_story_{}_on_wattpad_and_stake2_website": {
341-
"en": "I published the chapter {} of my story \"{}\" on Wattpad and Stake2 Website",
342-
"pt": "Eu publiquei o capítulo {} da minha história \"{}\" no Wattpad e no Site Stake2"
344+
"i_published_the_chapter_number_{}_of_my_story_{}_on_the_story_website_and_on_wattpad_with_the_title": {
345+
"en": "I published the chapter number {} ({}) of my story \"{}\" on the story website and on Wattpad, with the title",
346+
"pt": "Eu publiquei o capítulo número {} ({}) da minha história \"{}\" no site da história e no Wattpad, com o título"
343347
},
344348
"you_finished_copying_the_chapter_titles_of_this_story": {
345349
"en": "You finished copying the chapter titles of this story",

Module Files/Utility/Language/Texts.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -1723,13 +1723,16 @@
17231723
"skip_the": {
17241724
"en": "Skip the",
17251725
"pt": {
1726-
"masculine": "Pular a",
1727-
"feminine": "Pular o"
1726+
"masculine": "Pular o",
1727+
"feminine": "Pular a"
17281728
}
17291729
},
17301730
"you_skipped_the": {
17311731
"en": "You skipped the",
1732-
"pt": "Você pulou a"
1732+
"pt": {
1733+
"masculine": "Você pulou o",
1734+
"feminine": "Você pulou a"
1735+
}
17331736
},
17341737
"join": {
17351738
"en": "join",

Modules/PHP/PHP/__init__.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ def Define_Basic_Variables(self):
1919

2020
self.JSON = JSON()
2121

22+
# Define the "Language" class as the same class inside the "JSON" class
23+
self.Language = self.JSON.Language
24+
2225
# Get the modules list
2326
self.modules = self.JSON.To_Python(self.folders["apps"]["modules"]["modules"])
2427

@@ -27,7 +30,8 @@ def Define_Basic_Variables(self):
2730
# Create a list of the modules that will not be imported
2831
remove_list = [
2932
"Define_Folders",
30-
"Language"
33+
"Language",
34+
"JSON"
3135
]
3236

3337
# Iterate through the Utility modules
@@ -73,7 +77,7 @@ def Define_Basic_Variables(self):
7377
self.date = self.Date.date
7478

7579
def Define_Texts(self):
76-
# Define the "Texts" dictionary
80+
# Define the "Texts" dictionary
7781
self.texts = self.JSON.To_Python(self.folders["apps"]["module_files"][self.module["key"]]["texts"])
7882

7983
# Define the "Language texts" dictionary

Modules/PHP/Update_Websites/__init__.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,12 @@ def Select_Website(self):
136136
# If the module website is a string or an integer, find the number of that website
137137
if type(self.module_website) in [str, int]:
138138
number = 0
139+
139140
for website in self.websites["List"]["en"]:
140-
if self.module_website == website or self.module_website == number:
141+
if (
142+
self.module_website == website or
143+
self.module_website == number
144+
):
141145
self.websites["Numbers"].append(number)
142146

143147
number += 1
@@ -244,9 +248,7 @@ def Update_Website(self, open = True, close = True):
244248
if len(self.websites["Update"]) > 1:
245249
text = self.language_texts["updating_these_websites"]
246250

247-
# Show website info
248-
print()
249-
print(self.separators["5"])
251+
# Show information about the websites that are going to be updated
250252
print()
251253
print(text + ":")
252254

Modules/PHP/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ def __init__(self):
1111
self.Input = Input()
1212
self.JSON = JSON()
1313

14+
# Define the "Language" class as the same class inside the "JSON" class
15+
self.Language = self.JSON.Language
16+
1417
self.current_folder = os.path.split(__file__)[0] + "\\"
1518

1619
self.descriptions_file = self.current_folder + "Descriptions.json"

Modules/Social_Networks/Open_Social_Network/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ def Open_Social_Networks(self):
135135
self.dictionary["Social Networks"]["Numbers"]["Iteration"] += 1
136136

137137
def Show_Information(self):
138-
print()
138+
if self.dictionary["Spaces"]["First"] == True:
139+
print()
139140

140141
# If there is only one Social Network to open
141142
# Or there are more than one Social Network to open

0 commit comments

Comments
 (0)