Skip to content

Commit 420f0ab

Browse files
committed
In the "Stories" module, I made the following changes:
I moved all the code that creates the story folders and files to a new root method called "Create_Story_Sub_Folders". I have also improved the way folders and files are created significantly. I created a dictionary called "Directories", with each sub-folder of stories, containing the lists of folders and files in each sub-folder. This dictionary is similar to the directory dictionary of the "Years" module. With this dictionary, I could translate all the names of the story folders and files into Portuguese, my native language. I renamed the "Readers and reads" folder to just "Readers". I added the language folders to the chapter cover folders, in the folder dictionaries of each story. And I also added the "Photoshop" key for the story cover file on Photoshop, in each cover type (Landscape or Portrait), and each language. This way it is easier for the "Post" sub-class to open the Photoshop files for story covers. I also made several optimizations on the generation of the story dictionaries.
1 parent 592f531 commit 420f0ab

File tree

58 files changed

+815
-665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+815
-665
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-11 22:27:23-03:00",
13+
"Object": "2024-04-12 23:59:28-03:00",
1414
"Time": 0,
15-
"Time text": "22:27",
15+
"Time text": "23:59",
1616
"Unit": {
1717
"en": "hours",
1818
"pt": "horas"
@@ -23,9 +23,9 @@
2323
}
2424
},
2525
"Can drink water": {
26-
"Object": "2024-04-11 23:07:23-03:00",
26+
"Object": "2024-04-13 00:39:28-03:00",
2727
"Time": 40,
28-
"Time text": "23:07",
28+
"Time text": "00:39",
2929
"Unit": {
3030
"en": "minutes",
3131
"pt": "minutos"
@@ -36,9 +36,9 @@
3636
}
3737
},
3838
"Will be hungry": {
39-
"Object": "2024-04-12 01:27:23-03:00",
39+
"Object": "2024-04-13 02:59:28-03:00",
4040
"Time": 3,
41-
"Time text": "01:27",
41+
"Time text": "02:59",
4242
"Unit": {
4343
"en": "hours",
4444
"pt": "horas"

Module Files/Python/Main class code template.txt

+22-5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ class [module_name](object):
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

@@ -60,11 +63,11 @@ class [module_name](object):
6063
self.switches = self.Global_Switches.switches["Global"]
6164

6265
# Get the Languages dictionary
63-
self.languages = self.JSON.Language.languages
66+
self.languages = self.Language.languages
6467

6568
# Get the user language and full user language
66-
self.user_language = self.JSON.Language.user_language
67-
self.full_user_language = self.JSON.Language.full_user_language
69+
self.user_language = self.Language.user_language
70+
self.full_user_language = self.Language.full_user_language
6871

6972
# Get the Sanitize method of the File class
7073
self.Sanitize = self.File.Sanitize
@@ -73,9 +76,23 @@ class [module_name](object):
7376
self.date = self.Date.date
7477

7578
def Define_Texts(self):
79+
# Define the "Texts" dictionary
7680
self.texts = self.JSON.To_Python(self.folders["apps"]["module_files"][self.module["key"]]["texts"])
7781

82+
# Define the "Language texts" dictionary
7883
self.language_texts = self.JSON.Language.Item(self.texts)
7984

80-
self.large_bar = "-----"
81-
self.dash_space = "-"
85+
# Define the "Separators" dictionary
86+
self.separators = {}
87+
88+
# Create separators from one to ten characters
89+
for number in range(1, 11):
90+
# Define the empty string
91+
string = ""
92+
93+
# Add separators to it
94+
while len(string) != number:
95+
string += "-"
96+
97+
# Add the string to the Separators dictionary
98+
self.separators[str(number)] = string

Module Files/Python/Root code template.txt

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class Run():
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"

Module Files/Stories/Texts.json

+4-84
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,8 @@
11
{
2-
"story": {
3-
"en": "story",
4-
"pt": "história"
5-
},
6-
"story, title()": {
7-
"en": "Story",
8-
"pt": "História"
9-
},
10-
"stories": {
11-
"en": "stories",
12-
"pt": "histórias"
13-
},
14-
"stories, title()": {
15-
"en": "Stories",
16-
"pt": "Histórias"
17-
},
18-
"stories_list": {
19-
"en": "Stories list",
20-
"pt": "Lista de Histórias"
21-
},
22-
"story_title": {
23-
"en": "Story title",
24-
"pt": "Título da história"
25-
},
26-
"story_titles": {
27-
"en": "Story titles",
28-
"pt": "Títulos de história"
29-
},
30-
"story_information": {
31-
"en": "Story information",
32-
"pt": "Informações da história"
33-
},
34-
"website_image_folder": {
35-
"en": "Website image folder",
36-
"pt": "Pasta de imagens do site"
37-
},
38-
"chapter": {
39-
"en": "chapter",
40-
"pt": "capítulo"
41-
},
422
"chapter, title()": {
433
"en": "Chapter",
444
"pt": "Capítulo"
455
},
46-
"chapters": {
47-
"en": "chapters",
48-
"pt": "capítulos"
49-
},
506
"chapters, title()": {
517
"en": "Chapters",
528
"pt": "Capítulos"
@@ -63,30 +19,10 @@
6319
"en": "Select a story to",
6420
"pt": "Selecione uma história para"
6521
},
66-
"select_a_chapter_to": {
67-
"en": "Select a chapter to",
68-
"pt": "Selecione um capítulo para"
69-
},
70-
"you_skipped_the": {
71-
"en": "You skipped the",
72-
"pt": "Você pulou a"
73-
},
74-
"cover, title()": {
75-
"en": "Cover",
76-
"pt": "Capa"
77-
},
78-
"covers, title()": {
79-
"en": "Covers",
80-
"pt": "Capas"
81-
},
8222
"cover_creation": {
8323
"en": "cover creation",
8424
"pt": "criação de capa"
8525
},
86-
"covers_creation": {
87-
"en": "covers creation",
88-
"pt": "criação de capas"
89-
},
9026
"websites_update": {
9127
"en": "websites update",
9228
"pt": "atualização de sites"
@@ -139,26 +75,18 @@
13975
"en": "Press Enter when you finish rendering the covers",
14076
"pt": "Pressione Enter quando você terminar de renderizar as capas"
14177
},
142-
"now_render_the_covers_in": {
143-
"en": "Now render the covers in",
144-
"pt": "Agora renderize as capas em"
145-
},
14678
"mega_stories": {
14779
"en": "Mega Stories",
14880
"pt": "de Histórias do Mega"
14981
},
15082
"website_story_covers": {
151-
"en": "Website story covers",
83+
"en": "website story covers",
15284
"pt": "de capas de histórias do site"
15385
},
15486
"paste_the_wattpad_chapter_link": {
15587
"en": "Paste the Wattpad chapter link",
15688
"pt": "Cole o link do capítulo no Wattpad"
15789
},
158-
"the_{}_part_of_the": {
159-
"en": "the {} of the",
160-
"pt": "a {} parte do"
161-
},
16290
"one_more_chapter": {
16391
"en": "One more chapter",
16492
"pt": "Mais um capítulo"
@@ -377,14 +305,6 @@
377305
"en": "Disable junction mode",
378306
"pt": "Desabilitar o modo de junção"
379307
},
380-
"join": {
381-
"en": "join",
382-
"pt": "juntar"
383-
},
384-
"joined, title()": {
385-
"en": "Joined",
386-
"pt": "Juntado"
387-
},
388308
"filler_formatted": {
389309
"en": "[ ] (Filler)",
390310
"pt": "[ ] (Preenchedor)"
@@ -417,9 +337,9 @@
417337
"en": "Updating the chapter covers of this story",
418338
"pt": "Atualizando as capas de capítulo desta história"
419339
},
420-
"finished_updating_the_chapter_covers": {
421-
"en": "Finished updating the chapter covers",
422-
"pt": "Terminou de atualizar as capas de capítulo"
340+
"you_finished_updating_the_chapter_covers_of_this_story": {
341+
"en": "You finished updating the chapter covers of this story",
342+
"pt": "Você terminou de atualizar as capas de capítulo desta história"
423343
},
424344
"i_published_the_chapter_{}_of_my_story_{}_on_wattpad_and_stake2_website": {
425345
"en": "I published the chapter {} of my story \"{}\" on Wattpad and Stake2 Website",

Module Files/Utility/Language/Texts.json

+91-23
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,14 @@
10811081
"en": "{} website link",
10821082
"pt": "Link do site {}"
10831083
},
1084+
"website_link": {
1085+
"en": "Website link",
1086+
"pt": "Link do site"
1087+
},
1088+
"website_image_folder": {
1089+
"en": "Website image folder",
1090+
"pt": "Pasta de imagens do site"
1091+
},
10841092
"official_website": {
10851093
"en": "Official website",
10861094
"pt": "Site oficial"
@@ -1683,9 +1691,89 @@
16831691
"feminine": "Pular o"
16841692
}
16851693
},
1686-
"website_link": {
1687-
"en": "Website link",
1688-
"pt": "Link do site"
1694+
"you_skipped_the": {
1695+
"en": "You skipped the",
1696+
"pt": "Você pulou a"
1697+
},
1698+
"join": {
1699+
"en": "join",
1700+
"pt": "juntar"
1701+
},
1702+
"story": {
1703+
"en": "story",
1704+
"pt": "história"
1705+
},
1706+
"story, title()": {
1707+
"en": "Story",
1708+
"pt": "História"
1709+
},
1710+
"stories": {
1711+
"en": "stories",
1712+
"pt": "histórias"
1713+
},
1714+
"stories, title()": {
1715+
"en": "Stories",
1716+
"pt": "Histórias"
1717+
},
1718+
"story_title": {
1719+
"en": "Story title",
1720+
"pt": "Título da história"
1721+
},
1722+
"story_titles": {
1723+
"en": "Story titles",
1724+
"pt": "Títulos de história"
1725+
},
1726+
"stories_list": {
1727+
"en": "Stories list",
1728+
"pt": "Lista de Histórias"
1729+
},
1730+
"story_information": {
1731+
"en": "Story information",
1732+
"pt": "Informações da história"
1733+
},
1734+
"story_covers": {
1735+
"en": "Story Covers",
1736+
"pt": "Capas de Histórias"
1737+
},
1738+
"reader, title()": {
1739+
"en": "Reader",
1740+
"pt": "Leitor"
1741+
},
1742+
"readers, title()": {
1743+
"en": "Readers",
1744+
"pt": "Leitores"
1745+
},
1746+
"read, title()": {
1747+
"en": "Read",
1748+
"pt": "Leitura"
1749+
},
1750+
"reads, title()": {
1751+
"en": "Reads",
1752+
"pt": "Leituras"
1753+
},
1754+
"lore, title()": {
1755+
"en": "Lore",
1756+
"pt": "Lore"
1757+
},
1758+
"visual, title()": {
1759+
"en": "Visual",
1760+
"pt": "Visual"
1761+
},
1762+
"chapter": {
1763+
"en": "chapter",
1764+
"pt": "capítulo"
1765+
},
1766+
"chapter, title()": {
1767+
"en": "Chapter",
1768+
"pt": "Capítulo"
1769+
},
1770+
"chapters": {
1771+
"en": "chapters",
1772+
"pt": "capítulos"
1773+
},
1774+
"chapters, title()": {
1775+
"en": "Chapters",
1776+
"pt": "Capítulos"
16891777
},
16901778
"portrait, title()": {
16911779
"en": "Portrait",
@@ -1842,22 +1930,6 @@
18421930
"pt": "Datas",
18431931
"en": "Dates"
18441932
},
1845-
"story": {
1846-
"en": "story",
1847-
"pt": "história"
1848-
},
1849-
"story, title()": {
1850-
"en": "Story",
1851-
"pt": "História"
1852-
},
1853-
"stories": {
1854-
"en": "stories",
1855-
"pt": "histórias"
1856-
},
1857-
"stories, title()": {
1858-
"en": "Stories",
1859-
"pt": "Histórias"
1860-
},
18611933
"operational_system": {
18621934
"en": "Operational System",
18631935
"pt": "Sistema Operacional"
@@ -1866,10 +1938,6 @@
18661938
"en": "Render",
18671939
"pt": "Renderização"
18681940
},
1869-
"story_covers": {
1870-
"en": "Story Covers",
1871-
"pt": "Capas de Histórias"
1872-
},
18731941
"covers, title()": {
18741942
"en": "Covers",
18751943
"pt": "Capas"

Modules/Block_Websites/Block_Websites/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ def Define_Basic_Variables(self):
4343

4444
self.JSON = JSON()
4545

46+
# Define the "Language" class as the same class inside the "JSON" class
47+
self.Language = self.JSON.Language
48+
4649
# Get the modules list
4750
self.modules = self.JSON.To_Python(self.folders["apps"]["modules"]["modules"])
4851

0 commit comments

Comments
 (0)