pytodo-qt 0.2.5__tar.gz → 0.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pytodo-qt might be problematic. Click here for more details.

Files changed (34) hide show
  1. {pytodo-qt-0.2.5/src/pytodo_qt.egg-info → pytodo-qt-0.2.6}/PKG-INFO +1 -1
  2. {pytodo-qt-0.2.5 → pytodo-qt-0.2.6}/pyproject.toml +4 -4
  3. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/__main__.py +9 -7
  4. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/core/Logger.py +6 -6
  5. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/core/TodoDatabase.py +7 -5
  6. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/core/__init__.py +1 -1
  7. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/core/json_helpers.py +5 -4
  8. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/core/settings.py +7 -7
  9. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/gui/MainWindow.py +46 -15
  10. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/net/tcp_client_lib.py +1 -1
  11. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/net/tcp_server_lib.py +5 -6
  12. {pytodo-qt-0.2.5 → pytodo-qt-0.2.6/src/pytodo_qt.egg-info}/PKG-INFO +1 -1
  13. pytodo-qt-0.2.6/src/pytodo_qt.egg-info/SOURCES.txt +29 -0
  14. pytodo-qt-0.2.6/src/pytodo_qt.egg-info/entry_points.txt +2 -0
  15. pytodo-qt-0.2.6/src/pytodo_qt.egg-info/top_level.txt +1 -0
  16. pytodo-qt-0.2.5/src/pytodo_qt.egg-info/SOURCES.txt +0 -29
  17. pytodo-qt-0.2.5/src/pytodo_qt.egg-info/entry_points.txt +0 -2
  18. pytodo-qt-0.2.5/src/pytodo_qt.egg-info/top_level.txt +0 -1
  19. {pytodo-qt-0.2.5 → pytodo-qt-0.2.6}/COPYING +0 -0
  20. {pytodo-qt-0.2.5 → pytodo-qt-0.2.6}/README.md +0 -0
  21. {pytodo-qt-0.2.5 → pytodo-qt-0.2.6}/setup.cfg +0 -0
  22. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/__init__.py +0 -0
  23. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/crypto/AESCipher.py +0 -0
  24. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/crypto/__init__.py +0 -0
  25. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/gui/AddTodoDialog.py +0 -0
  26. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/gui/SyncDialog.py +0 -0
  27. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/gui/__init__.py +0 -0
  28. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/gui/icons/minus.png +0 -0
  29. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/gui/icons/plus.png +0 -0
  30. /pytodo-qt-0.2.5/src/todo/gui/icons/todo.png → /pytodo-qt-0.2.6/src/pytodo_qt/gui/icons/pytodo-qt.png +0 -0
  31. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/net/__init__.py +0 -0
  32. {pytodo-qt-0.2.5/src/todo → pytodo-qt-0.2.6/src/pytodo_qt}/net/sync_operations.py +0 -0
  33. {pytodo-qt-0.2.5 → pytodo-qt-0.2.6}/src/pytodo_qt.egg-info/dependency_links.txt +0 -0
  34. {pytodo-qt-0.2.5 → pytodo-qt-0.2.6}/src/pytodo_qt.egg-info/requires.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytodo-qt
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: A small cross-platform to-do application written in Python 3 and PyQt6
5
5
  Author-email: Michael Berry <trismegustis@gmail.com>
6
6
  License: GPLv3
@@ -6,12 +6,12 @@ build-backend = "setuptools.build_meta"
6
6
  where = ["src"]
7
7
 
8
8
  [tool.setuptools.package-data]
9
- todo = ["*.png"]
10
- "todo.gui.icons" = ["*.png"]
9
+ pytodo_qt = ["*.png"]
10
+ "pytodo_qt.gui.icons" = ["*.png"]
11
11
 
12
12
  [project]
13
13
  name = "pytodo-qt"
14
- version = "0.2.5"
14
+ version = "0.2.6"
15
15
  description = "A small cross-platform to-do application written in Python 3 and PyQt6"
16
16
  readme = "README.md"
17
17
  authors = [
@@ -33,4 +33,4 @@ requires-python = ">=3.8"
33
33
  Homepage = "https://github.com/berrym/pytodo-qt"
34
34
 
35
35
  [project.scripts]
36
- todo = "todo.__main__:main"
36
+ pytodo-qt = "pytodo_qt.__main__:main"
@@ -1,5 +1,7 @@
1
1
  """__main__.py
2
2
 
3
+ pytodo-qt
4
+
3
5
  A to-do list program written in Python using PyQt6
4
6
 
5
7
  Copyright (C) 2024 Michael Berry <trismegustis@gmail.com>
@@ -39,18 +41,18 @@ def main():
39
41
  for i in range(0, len(sys.path)):
40
42
  if sys.path[i].__contains__("site-packages"):
41
43
  location = sys.path[i]
42
- location += "/todo"
44
+ location += "/pytodo_qt"
43
45
  os.chdir(location)
44
46
  break
45
47
 
46
48
  if location == "":
47
49
  logger.log.exception("Unknown installation or invocation, exiting")
48
- sys.exit(0)
50
+ sys.exit(1)
49
51
 
50
52
  # create a command line arg_parser
51
53
  arg_parser = argparse.ArgumentParser(
52
- prog="To-Do",
53
- description="To-Do List Application written in Python with Qt6",
54
+ prog="pytodo-qt",
55
+ description="To-Do List Application written in Python 3 and PyQt6",
54
56
  epilog="Copyright Michael Berry 2024",
55
57
  )
56
58
 
@@ -73,7 +75,7 @@ def main():
73
75
  action="store",
74
76
  type=str,
75
77
  choices=["yes", "no"],
76
- help="allow remote users to grab your lists",
78
+ help="allow remote users to copy your lists",
77
79
  )
78
80
 
79
81
  server_group.add_argument(
@@ -86,14 +88,14 @@ def main():
86
88
  )
87
89
 
88
90
  server_group.add_argument(
89
- "-i", "--ip", type=str, help="set the servers ip addresses."
91
+ "-i", "--ip", type=str, help="set the database server's IP address."
90
92
  )
91
93
 
92
94
  server_group.add_argument(
93
95
  "-p",
94
96
  "--port",
95
97
  type=int,
96
- help="specify which port the network server will bind to",
98
+ help="specify which port the database server will bind to",
97
99
  )
98
100
 
99
101
  arg_parser.add_argument(
@@ -10,25 +10,25 @@ from pathlib import Path
10
10
 
11
11
  home_dir = Path.home()
12
12
  if home_dir is not None:
13
- todo_dir = Path.joinpath(home_dir, ".todo")
13
+ app_dir = Path.joinpath(home_dir, ".pytodo-qt")
14
14
  else:
15
15
  print("Error: unable to get home directory, exiting")
16
16
  sys.exit(1)
17
17
 
18
- if not Path.exists(todo_dir):
18
+ if not Path.exists(app_dir):
19
19
  try:
20
- Path.mkdir(todo_dir)
20
+ Path.mkdir(app_dir)
21
21
  except OSError as e:
22
- print(f"Error create to-do directory {todo_dir}: {e}")
22
+ print(f"Error: failed to create pytodo-qt directory {app_dir}: {e}")
23
23
  sys.exit(1)
24
24
 
25
- log_fn = Path.joinpath(todo_dir, "todo.log")
25
+ log_fn = Path.joinpath(app_dir, "pytodo-qt.log")
26
26
 
27
27
  if not Path.exists(log_fn):
28
28
  try:
29
29
  log_fn.touch()
30
30
  except OSError as e:
31
- print(f"Error creating To-Do log file {log_fn}: {e}")
31
+ print(f"Error: failed to create pytodo-qt log file {log_fn}: {e}")
32
32
  sys.exit(1)
33
33
 
34
34
 
@@ -4,10 +4,11 @@ This module implements the to-do database.
4
4
  """
5
5
 
6
6
  import configparser
7
- import os
8
7
  import sys
9
8
  import threading
10
9
 
10
+ from pathlib import Path
11
+
11
12
  from PyQt6.QtCore import QObject
12
13
 
13
14
  from ..core import settings
@@ -39,7 +40,7 @@ class TodoDatabase(QObject):
39
40
 
40
41
  # create an ini config parser
41
42
  self.config = configparser.ConfigParser()
42
- if not os.path.exists(settings.ini_fn):
43
+ if not Path.exists(settings.ini_fn):
43
44
  self.write_default_config()
44
45
  self.parse_config()
45
46
 
@@ -65,7 +66,7 @@ class TodoDatabase(QObject):
65
66
  self.config["server"] = {}
66
67
  self.config["server"]["key"] = "BewareTheBlackGuardian"
67
68
  self.config["server"]["run"] = "yes"
68
- self.config["server"]["address"] = "127.0.0.1"
69
+ self.config["server"]["address"] = "0.0.0.0"
69
70
  self.config["server"]["port"] = "5364"
70
71
  self.config["server"]["pull"] = "yes"
71
72
  self.config["server"]["push"] = "yes"
@@ -86,6 +87,7 @@ class TodoDatabase(QObject):
86
87
  self.config["database"]["reverse_sort"] = "yes"
87
88
  else:
88
89
  self.config["database"]["reverse_sort"] = "no"
90
+ self.config["server"]["key"] = settings.options["key"]
89
91
  if settings.options["run"]:
90
92
  self.config["server"]["run"] = "yes"
91
93
  else:
@@ -155,14 +157,14 @@ class TodoDatabase(QObject):
155
157
  if fn is None:
156
158
  return
157
159
 
158
- logger.log.info("Writing todo list to file %s", fn)
160
+ logger.log.info("Writing pytodo-qt list to file %s", fn)
159
161
  try:
160
162
  with open(fn, "w", encoding="utf-8") as f:
161
163
  f.write(f"{self.active_list:*^60}\n\n")
162
164
  for todo in self.todo_lists[self.active_list]:
163
165
  f.write(f'{todo["reminder"]}\n')
164
166
  except IOError as e:
165
- logger.log.exception("Unable to write todo list to %s: %s", fn, e)
167
+ logger.log.exception("Unable to write pytodo-qt list to %s: %s", fn, e)
166
168
 
167
169
  def server_running(self):
168
170
  """Determine if the server is running"""
@@ -1,6 +1,6 @@
1
1
  """__init__.py
2
2
 
3
- todo.core: A decorator to make security checks on the to-do database.
3
+ pytodo-qt.core: A decorator to make security checks on the to-do database.
4
4
  """
5
5
 
6
6
  import sys
@@ -1,7 +1,8 @@
1
1
  import json
2
- import os
3
2
  import sys
4
3
 
4
+ from pathlib import Path
5
+
5
6
  from ..core import error_on_none_db, settings
6
7
  from ..core.Logger import Logger
7
8
 
@@ -21,9 +22,9 @@ def merge_todo_lists(*todo_lists):
21
22
 
22
23
 
23
24
  @error_on_none_db
24
- def read_json_data(fn=settings.lists_fn):
25
+ def read_json_data(fn=settings.db_fn):
25
26
  """Read in to-do lists from a JSON file."""
26
- if not os.path.exists(fn):
27
+ if not Path.exists(fn):
27
28
  msg = f"JSON file {fn} does not exist"
28
29
  logger.log.warning(msg)
29
30
  return False, msg
@@ -69,7 +70,7 @@ def read_json_data(fn=settings.lists_fn):
69
70
 
70
71
 
71
72
  @error_on_none_db
72
- def write_json_data(fn=settings.lists_fn):
73
+ def write_json_data(fn=settings.db_fn):
73
74
  """Write to-do lists as a JSON file."""
74
75
  logger.log.info("Writing JSON file %s", fn)
75
76
  try:
@@ -13,25 +13,25 @@ from ..core.Logger import Logger
13
13
  logger = Logger(__name__)
14
14
 
15
15
 
16
- __version__ = "0.2.5"
16
+ __version__ = "0.2.6"
17
17
  options = {}
18
18
  DB = None
19
19
 
20
20
  home_dir = Path.home()
21
21
  if home_dir is not None:
22
- todo_dir = Path.joinpath(home_dir, ".todo")
22
+ app_dir = Path.joinpath(home_dir, ".pytodo-qt")
23
23
  else:
24
24
  logger.log.exception("Unable to get home directory, exiting")
25
25
  sys.exit(1)
26
26
 
27
- if not Path.exists(todo_dir):
27
+ if not Path.exists(app_dir):
28
28
  try:
29
- Path.mkdir(todo_dir)
29
+ Path.mkdir(app_dir)
30
30
  except OSError as e:
31
- logger.log.exception("Error creating To-Do configuration directory: %s", e)
31
+ logger.log.exception("Error creating pytodo-qt configuration directory: %s", e)
32
32
  sys.exit(1)
33
33
 
34
34
 
35
35
  # private files
36
- ini_fn = Path.joinpath(todo_dir, "todo.ini")
37
- lists_fn = Path.joinpath(todo_dir, "todo_lists.json")
36
+ ini_fn = Path.joinpath(app_dir, "pytodo-qt.ini")
37
+ db_fn = Path.joinpath(app_dir, "pytodo-qt-db.json")
@@ -3,7 +3,6 @@
3
3
  This module implements the GUI for To-Do.
4
4
  """
5
5
 
6
- import os
7
6
  import sys
8
7
 
9
8
  from pathlib import Path
@@ -28,6 +27,7 @@ from PyQt6.QtPrintSupport import QPrinter, QPrintDialog
28
27
 
29
28
  from ..core import error_on_none_db, settings, json_helpers
30
29
  from ..core.Logger import Logger
30
+ from ..crypto.AESCipher import AESCipher
31
31
  from ..gui.AddTodoDialog import AddTodoDialog
32
32
  from ..gui.SyncDialog import SyncDialog
33
33
  from ..net.sync_operations import sync_operations
@@ -49,7 +49,7 @@ class MainWindow(QMainWindow):
49
49
 
50
50
  # create the window, set title and tooltip, resize and center window
51
51
  super().__init__()
52
- self.setWindowIcon(QIcon("gui/icons/todo.png"))
52
+ self.setWindowIcon(QIcon("gui/icons/pytodo-qt.png"))
53
53
  self.setWindowTitle("To-Do")
54
54
  self.setToolTip("Python3 + Qt5 = Happy <u>To-Do</u> Programmer!")
55
55
  QToolTip.setFont(QFont("Helvetica", 10))
@@ -83,12 +83,12 @@ class MainWindow(QMainWindow):
83
83
  delete.setShortcut("-")
84
84
  delete.triggered.connect(self.delete_todo)
85
85
 
86
- toggle = QAction(QIcon("gui/icons/todo.png"), "Toggle to-do Status", self)
86
+ toggle = QAction(QIcon("gui/icons/pytodo-qt.png"), "Toggle to-do Status", self)
87
87
  toggle.setShortcut("%")
88
88
  toggle.triggered.connect(self.toggle_todo)
89
89
 
90
90
  # list actions
91
- list_add = QAction(QIcon(), "Add new list", self)
91
+ list_add = QAction(QIcon("gui/icons/plus.png"), "Add new list", self)
92
92
  list_add.setShortcut("Ctrl++")
93
93
  list_add.triggered.connect(self.add_list)
94
94
 
@@ -126,9 +126,12 @@ class MainWindow(QMainWindow):
126
126
  change_bind_address = QAction(QIcon(), "Change network server address", self)
127
127
  change_bind_address.triggered.connect(self.db_server_bind_address)
128
128
 
129
+ change_crypto_key = QAction(QIcon(), "Change network AES cipher", self)
130
+ change_crypto_key.triggered.connect(self.db_change_crypto_key)
131
+
129
132
  # fanfare
130
133
  about = QAction(QIcon(), "About To-Do", self)
131
- about.triggered.connect(self.about_todo)
134
+ about.triggered.connect(self.about_app)
132
135
 
133
136
  about_qt = QAction(QIcon(), "About Qt", self)
134
137
  about_qt.triggered.connect(self.about_qt)
@@ -184,6 +187,7 @@ class MainWindow(QMainWindow):
184
187
  server_menu.addAction(stop_server)
185
188
  server_menu.addAction(change_port)
186
189
  server_menu.addAction(change_bind_address)
190
+ server_menu.addAction(change_crypto_key)
187
191
  else:
188
192
  msg = "Could not populate server menu, exiting"
189
193
  QMessageBox.warning(self, "Creation Error", msg)
@@ -245,10 +249,11 @@ class MainWindow(QMainWindow):
245
249
  QMessageBox.critical(self, "Creation Error", msg)
246
250
  logger.log.exception(msg)
247
251
  sys.exit(1)
252
+ self.update_status_bar()
248
253
 
249
254
  # system tray icon
250
255
  self.tray_icon = QSystemTrayIcon(self)
251
- self.tray_icon.setIcon(QIcon("gui/icons/todo.png"))
256
+ self.tray_icon.setIcon(QIcon("gui/icons/pytodo-qt.png"))
252
257
 
253
258
  # system tray menu actions
254
259
  show_action = QAction("Show", self)
@@ -287,7 +292,7 @@ class MainWindow(QMainWindow):
287
292
 
288
293
  def read_todo_data(self):
289
294
  """Read lists of to-dos from database."""
290
- if os.path.exists(settings.lists_fn):
295
+ if Path.exists(settings.db_fn):
291
296
  self.update_progress_bar(0)
292
297
  self.update_status_bar("Reading in JSON data")
293
298
  result, msg = json_helpers.read_json_data()
@@ -394,7 +399,7 @@ class MainWindow(QMainWindow):
394
399
  def db_server_bind_address(self, *args, **kwargs):
395
400
  """Bind database server to an ip address."""
396
401
  address, ok = QInputDialog.getText(
397
- self, "Change server ip address", "IP Address: "
402
+ self, "Change server IP address", "IP Address: "
398
403
  )
399
404
  if not ok:
400
405
  return
@@ -419,6 +424,33 @@ class MainWindow(QMainWindow):
419
424
  settings.DB.write_config()
420
425
  self.refresh()
421
426
 
427
+ @error_on_none_db
428
+ def db_change_crypto_key(self, *args, **kwargs):
429
+ """Change network AES cipher."""
430
+ key, ok = QInputDialog.getText(self, "Change network AES cipher", "Cipher: ")
431
+ if not ok:
432
+ return
433
+
434
+ if settings.options["key"] == key:
435
+ QMessageBox.information(self, "Info", f"AES cipher is already {key}")
436
+ return
437
+
438
+ settings.options["key"] = key
439
+ settings.DB.db_client.aes_cipher = AESCipher(key)
440
+ settings.DB.db_server.aes_cipher = AESCipher(key)
441
+ if settings.DB.server_running():
442
+ reply = QMessageBox.question(
443
+ self,
444
+ "Restart Database Server?",
445
+ "The server needs to be restarted for changes to take effect, would you like to do that now?",
446
+ QMessageBox.StandardButton.Yes,
447
+ QMessageBox.StandardButton.No,
448
+ )
449
+ if reply == QMessageBox.StandardButton.Yes:
450
+ settings.DB.restart_server()
451
+ settings.DB.write_config()
452
+ self.refresh()
453
+
422
454
  @error_on_none_db
423
455
  def add_list(self, *args, **kwargs):
424
456
  """Add a new list of to-dos."""
@@ -574,7 +606,6 @@ class MainWindow(QMainWindow):
574
606
 
575
607
  if not ok:
576
608
  msg = "Did not finishing exporting list"
577
- QMessageBox.warning(self, "Export List", msg)
578
609
  logger.log.warning(msg)
579
610
  return
580
611
 
@@ -600,7 +631,7 @@ class MainWindow(QMainWindow):
600
631
  self.update_progress_bar()
601
632
  return
602
633
 
603
- tmp_fn = Path.home().joinpath(settings.todo_dir, ".todo_printer.tmp")
634
+ tmp_fn = Path.home().joinpath(settings.app_dir, ".todo_printer.tmp")
604
635
 
605
636
  accept = QPrintDialog(self.printer).exec()
606
637
  if accept:
@@ -627,7 +658,7 @@ class MainWindow(QMainWindow):
627
658
  doc = QTextDocument(string)
628
659
  doc.print(self.printer)
629
660
 
630
- msg = "Finished printing todo list"
661
+ msg = "Finished printing pytodo-qt list"
631
662
  QMessageBox.information(self, "Print List", msg)
632
663
  logger.log.info(msg)
633
664
  self.update_progress_bar()
@@ -752,9 +783,9 @@ class MainWindow(QMainWindow):
752
783
  ] = new_text
753
784
  self.write_todo_data()
754
785
 
755
- def about_todo(self):
786
+ def about_app(self):
756
787
  """Display a message box with Program/Author information."""
757
- text = """<b><u>To-Do v0.2.5</u></b>
788
+ text = """<b><u>pytodo-qt v0.2.6</u></b>
758
789
  <br><br>To-Do list program that works with multiple To-Do
759
790
  lists locally and over a network.
760
791
  <br><br>License: <a href="http://www.fsf.org/licenses/gpl.html">GPLv3</a>
@@ -778,7 +809,7 @@ class MainWindow(QMainWindow):
778
809
  """Update the progress bar.
779
810
 
780
811
  Maximum value should be set to the total to-do count,
781
- while value should be the number of completed todos.
812
+ while value should be the number of completed to-dos.
782
813
  This makes the progress bar show the total percentage
783
814
  of completed to-dos.
784
815
  """
@@ -818,7 +849,7 @@ class MainWindow(QMainWindow):
818
849
  def refresh(self, sync_occurred=0, *args, **kwargs):
819
850
  """Redraw the table and update the progress and status bars."""
820
851
  if sync_occurred:
821
- logger.log.info("Sync operation occurred, refresh todo list")
852
+ logger.log.info("Sync operation occurred, refresh pytodo-qt list")
822
853
 
823
854
  self.update_status_bar("Redrawing table")
824
855
 
@@ -77,7 +77,7 @@ class DatabaseClient(QObject):
77
77
  return False, e
78
78
 
79
79
  # write data to a temporary file, then read it in
80
- tmp = Path.joinpath(settings.todo_dir, ".todo_lists.tmp")
80
+ tmp = Path.joinpath(settings.app_dir, ".todo_lists.tmp")
81
81
  try:
82
82
  with open(tmp, "w", encoding="utf-8") as f:
83
83
  f.write(deserialized)
@@ -4,11 +4,12 @@ This module implements a threaded tcp socket server and request handler for To-D
4
4
  """
5
5
 
6
6
  import json
7
- import os
8
7
  import socketserver
9
8
  import sys
10
9
  import time
11
10
 
11
+ from pathlib import Path
12
+
12
13
  from PyQt6.QtWidgets import QMessageBox
13
14
 
14
15
  from ..core import error_on_none_db, settings
@@ -67,11 +68,9 @@ class TCPRequestHandler(socketserver.StreamRequestHandler):
67
68
  self.request.send(self.encrypted_reply)
68
69
  return
69
70
 
70
- if os.path.exists(settings.lists_fn):
71
- self.data = ""
72
- with open(settings.lists_fn, encoding="utf-8") as f:
73
- for line in f:
74
- self.data += line
71
+ if Path.exists(settings.db_fn):
72
+ with settings.db_fn.open(mode="r", encoding="utf-8") as db_file:
73
+ self.data = db_file.read()
75
74
 
76
75
  if self.data is not None:
77
76
  logger.log.info("PULL_REQUEST ACCEPTED")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytodo-qt
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: A small cross-platform to-do application written in Python 3 and PyQt6
5
5
  Author-email: Michael Berry <trismegustis@gmail.com>
6
6
  License: GPLv3
@@ -0,0 +1,29 @@
1
+ COPYING
2
+ README.md
3
+ pyproject.toml
4
+ src/pytodo_qt/__init__.py
5
+ src/pytodo_qt/__main__.py
6
+ src/pytodo_qt.egg-info/PKG-INFO
7
+ src/pytodo_qt.egg-info/SOURCES.txt
8
+ src/pytodo_qt.egg-info/dependency_links.txt
9
+ src/pytodo_qt.egg-info/entry_points.txt
10
+ src/pytodo_qt.egg-info/requires.txt
11
+ src/pytodo_qt.egg-info/top_level.txt
12
+ src/pytodo_qt/core/Logger.py
13
+ src/pytodo_qt/core/TodoDatabase.py
14
+ src/pytodo_qt/core/__init__.py
15
+ src/pytodo_qt/core/json_helpers.py
16
+ src/pytodo_qt/core/settings.py
17
+ src/pytodo_qt/crypto/AESCipher.py
18
+ src/pytodo_qt/crypto/__init__.py
19
+ src/pytodo_qt/gui/AddTodoDialog.py
20
+ src/pytodo_qt/gui/MainWindow.py
21
+ src/pytodo_qt/gui/SyncDialog.py
22
+ src/pytodo_qt/gui/__init__.py
23
+ src/pytodo_qt/gui/icons/minus.png
24
+ src/pytodo_qt/gui/icons/plus.png
25
+ src/pytodo_qt/gui/icons/pytodo-qt.png
26
+ src/pytodo_qt/net/__init__.py
27
+ src/pytodo_qt/net/sync_operations.py
28
+ src/pytodo_qt/net/tcp_client_lib.py
29
+ src/pytodo_qt/net/tcp_server_lib.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pytodo-qt = pytodo_qt.__main__:main
@@ -0,0 +1 @@
1
+ pytodo_qt
@@ -1,29 +0,0 @@
1
- COPYING
2
- README.md
3
- pyproject.toml
4
- src/pytodo_qt.egg-info/PKG-INFO
5
- src/pytodo_qt.egg-info/SOURCES.txt
6
- src/pytodo_qt.egg-info/dependency_links.txt
7
- src/pytodo_qt.egg-info/entry_points.txt
8
- src/pytodo_qt.egg-info/requires.txt
9
- src/pytodo_qt.egg-info/top_level.txt
10
- src/todo/__init__.py
11
- src/todo/__main__.py
12
- src/todo/core/Logger.py
13
- src/todo/core/TodoDatabase.py
14
- src/todo/core/__init__.py
15
- src/todo/core/json_helpers.py
16
- src/todo/core/settings.py
17
- src/todo/crypto/AESCipher.py
18
- src/todo/crypto/__init__.py
19
- src/todo/gui/AddTodoDialog.py
20
- src/todo/gui/MainWindow.py
21
- src/todo/gui/SyncDialog.py
22
- src/todo/gui/__init__.py
23
- src/todo/gui/icons/minus.png
24
- src/todo/gui/icons/plus.png
25
- src/todo/gui/icons/todo.png
26
- src/todo/net/__init__.py
27
- src/todo/net/sync_operations.py
28
- src/todo/net/tcp_client_lib.py
29
- src/todo/net/tcp_server_lib.py
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- todo = todo.__main__:main
@@ -1 +0,0 @@
1
- todo
File without changes
File without changes
File without changes