Skip to content

Commit dd51f65

Browse files
Merge pull request #27 from WhenLifeHandsYouLemons/v1.6.1
v1.6.1
2 parents da6d895 + 7bacd65 commit dd51f65

4 files changed

Lines changed: 19 additions & 87 deletions

File tree

Encryptext.pyw

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Variables
5858
debug = False
5959
# UPDATE MODE HERE
6060
update = False# UPDATE MODE HERE
61+
version = "1.6.1"
6162

6263
save_location = ""
6364
file_extension = ""
@@ -516,7 +517,7 @@ def openPreferences():
516517
pref_window.mainloop()
517518

518519
def update_menu(Event=None):
519-
messagebox.showinfo("Update Encryptext", "1. Run the updater\n2. When it asks for the old enryption keys, copy and paste the ones shown in the text editor window.\n\nClick 'Ok' to view the keys.\n\nDO NOT SAVE THE DOCUMENT WITH THE KEYS.")
520+
messagebox.showinfo("Update Encryptext", """1. Run the new version's installer\n2. When it asks whether you're installing or updating, choose updating.\n3. When it asks for the old enryption key and other strings, copy and paste the ones shown in the text editor here.\n\nClick 'Ok' to view the keys.\n\nDO NOT SAVE THE DOCUMENT WITH THE KEYS.""")
520521

521522
key = encrypt_key.decode()
522523

@@ -528,7 +529,7 @@ def update_menu(Event=None):
528529
viewingMode()
529530

530531
def about_menu(Event=None):
531-
messagebox.showinfo("About Encryptext", "Encryptext can do what Notepad does, and more. You can edit, format, and encrypt files securely, while also editing regular files with ease.\n\n Free for everyone. Forever. ❤")
532+
messagebox.showinfo("About Encryptext", f"Unlock a new level of security and versatility with Encryptext, the text editor designed for the modern user. Seamlessly blending essential features with modern encryption technology, Encryptext ensures your documents are safeguarded like never before.\n\nFree for everyone. Forever. ❤\n\nVersion {version}")
532533

533534
def documentation(Event=None):
534535
open_new("https://github.com/WhenLifeHandsYouLemons/Encryptext")
@@ -632,17 +633,17 @@ Window Items
632633
"""
633634
title = tk.StringVar()
634635
title.set("Untitled")
635-
title_of_file = tk.Label(textvariable=title, font=("Arial", 18, "bold"), anchor="center")
636+
title_of_file = tk.Label(textvariable=title, font=("Arial", 18, "bold"), anchor="center", background="#D2D2D2")
636637
title_of_file.pack(side=tk.TOP, fill=tk.X)
637638

638-
textbox = tk.Text(root, state=tk.NORMAL, font=(font_type, font_size, "normal"))
639+
textbox = tk.Text(root, state=tk.NORMAL, font=(font_type, font_size, "normal"), cursor="xterm")
639640

640-
scroll_bar_vertical = tk.Scrollbar(root, orient=tk.VERTICAL)
641+
scroll_bar_vertical = tk.Scrollbar(textbox, orient=tk.VERTICAL, cursor="arrow")
641642
scroll_bar_vertical.pack(side=tk.RIGHT, fill=tk.Y)
642643
scroll_bar_vertical.config(command=textbox.yview)
643644

644645
textbox.config(yscrollcommand=scroll_bar_vertical.set)
645-
textbox.pack(side=tk.BOTTOM, fill=tk.BOTH, expand=1)
646+
textbox.pack(side=tk.TOP, fill=tk.BOTH, expand=1)
646647

647648
# To make it more seamless
648649
# The preview window was the focused one before
31.8 MB
Binary file not shown.

installer_creator_windows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from os import system
22
import PyInstaller.__main__
33

4-
version = "1.6.0"
4+
version = "1.6.1"
55

66
# Creates an executable file
77
PyInstaller.__main__.run([

installer_windows.py

Lines changed: 11 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
import sys
33
from subprocess import run
44
from time import sleep
5+
import time
56
from cryptography.fernet import Fernet as F
67
from random import choice, randint
78
from string import ascii_letters, digits
89
import threading as t
910

10-
version = "1.6.0"
11+
version = "1.6.1"
1112

1213
print("\nStarting installer...")
1314
print("Please wait...")
@@ -63,81 +64,6 @@ def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1,
6364
if iteration == total:
6465
print()
6566

66-
# Open the Encryptext.py file and read it into a variable
67-
file = open(getTrueFilename("Encryptext.pyw"), "r", encoding="utf8")
68-
file = file.read()
69-
70-
# Find where the encryption key is stored in the file
71-
file = file.split("# ENCRYPTION KEY HERE")
72-
73-
# Create a key and remove the b'' from the string
74-
key = str(F.generate_key()).split("'")[1]
75-
76-
# Add the key to the file
77-
key_line = file[1]
78-
key_line = key_line.split("'")
79-
key_line[1] = key
80-
key_line = "'".join(key_line)
81-
file[1] = key_line
82-
83-
text = "".join(file)
84-
85-
print("Encryption key created!")
86-
87-
possible_characters = ascii_letters + digits
88-
89-
# Find where the format item separator string is stored in the file
90-
file = text.split("# FORMAT ITEM SEPARATOR HERE")
91-
92-
# Create a format item separator string
93-
format_item_separator = "".join([choice(possible_characters) for i in range(randint(15, 45))])
94-
# Add the format item separator string to the file
95-
key_line = file[1]
96-
key_line = key_line.split("'")
97-
key_line[1] = format_item_separator
98-
key_line = "'".join(key_line)
99-
file[1] = key_line
100-
101-
text = "".join(file)
102-
103-
# Find where the format separator string is stored in the file
104-
file = text.split("# FORMAT SEPARATOR HERE")
105-
106-
# Create a format separator string
107-
format_separator = "".join([choice(possible_characters) for i in range(randint(15, 45))])
108-
109-
# Add the format separator string to the file
110-
key_line = file[1]
111-
key_line = key_line.split("'")
112-
key_line[1] = format_separator
113-
key_line = "'".join(key_line)
114-
file[1] = key_line
115-
116-
text = "".join(file)
117-
118-
# Find where the format string is stored in the file
119-
file = text.split("# FORMAT STRING HERE")
120-
121-
# Create a format string
122-
format_string = "".join([choice(possible_characters) for i in range(randint(15, 45))])
123-
124-
# Add the format string to the file
125-
key_line = file[1]
126-
key_line = key_line.split("'")
127-
key_line[1] = format_string
128-
key_line = "'".join(key_line)
129-
file[1] = key_line
130-
131-
text = "".join(file)
132-
133-
# Write the file back to the Encryptext.py file
134-
file = open(getTrueFilename("Encryptext-User.pyw"), "w", encoding="utf8")
135-
file.write(text)
136-
file.close()
137-
138-
print("Format strings created!")
139-
print("Creating custom program...\n\n")
140-
14167
update = input("\nAre you updating or installing Encryptext? [(u)pdating/(i)nstalling] ")
14268
while update != "u" and update != "i":
14369
update = input("\nAre you updating or installing Encryptext? [(u)pdating/(i)nstalling] ")
@@ -166,6 +92,11 @@ def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1,
16692

16793
print("\nUpdate option set!")
16894

95+
if update == "u":
96+
print("\n\nPlease open the current version of Encryptext you have.")
97+
print("In the menu bar at the top, click on 'Help'. Then click on 'Update Encryptext'.\n")
98+
time.sleep(5)
99+
169100
# Find where the encryption key is stored in the file
170101
file = text.split("# ENCRYPTION KEY HERE")
171102

@@ -175,7 +106,7 @@ def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1,
175106
else:
176107
key = str(input("\nPlease enter the Encryption Key (be careful to not add the spaces, just the text):"))
177108
while len(key) != 44 and key[-1] != "=":
178-
key = str(input("\nYou haven't entered the key correctly. Please enter the Encryption Key (be careful to not add the spaces, just the text):"))
109+
key = str(input("\nYou haven't entered the key correctly. Please enter the 'Encryption Key' (be careful to not add the spaces, just the text):"))
179110
print()
180111

181112
# Add the key to the file
@@ -200,7 +131,7 @@ def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1,
200131
else:
201132
format_item_separator = str(input("\nPlease enter the Format Item Separator (be careful to not add the spaces, just the text):"))
202133
while len(format_item_separator) < 15:
203-
format_item_separator = str(input("\nYou haven't entered the string correctly. Please enter the Format Item Separator (be careful to not add the spaces, just the text):"))
134+
format_item_separator = str(input("\nYou haven't entered the string correctly. Please enter the 'Format Item Separator' (be careful to not add the spaces, just the text):"))
204135

205136
# Add the format item separator string to the file
206137
key_line = file[1]
@@ -220,7 +151,7 @@ def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1,
220151
else:
221152
format_separator = str(input("\nPlease enter the Format Separator String (be careful to not add the spaces, just the text):"))
222153
while len(format_separator) < 15:
223-
format_separator = str(input("\nYou haven't entered the string correctly. Please enter the Format Separator String (be careful to not add the spaces, just the text):"))
154+
format_separator = str(input("\nYou haven't entered the string correctly. Please enter the 'Format Separator String' (be careful to not add the spaces, just the text):"))
224155

225156
# Add the format separator string to the file
226157
key_line = file[1]
@@ -240,7 +171,7 @@ def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1,
240171
else:
241172
format_string = str(input("\nPlease enter the Format String (be careful to not add the spaces, just the text):"))
242173
while len(format_string) < 15:
243-
format_string = str(input("\nYou haven't entered the string correctly. Please enter the Format String (be careful to not add the spaces, just the text):"))
174+
format_string = str(input("\nYou haven't entered the string correctly. Please enter the 'Format String' (be careful to not add the spaces, just the text):"))
244175
print()
245176

246177
# Add the format string to the file

0 commit comments

Comments
 (0)