text-summarizer-aweebtaku 1.2.7__tar.gz → 1.2.8.post1__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.
Files changed (21) hide show
  1. {text_summarizer_aweebtaku-1.2.7/text_summarizer_aweebtaku.egg-info → text_summarizer_aweebtaku-1.2.8.post1}/PKG-INFO +1 -1
  2. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/setup.py +1 -1
  3. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer/__init__.py +1 -1
  4. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer/ui.py +121 -18
  5. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1/text_summarizer_aweebtaku.egg-info}/PKG-INFO +1 -1
  6. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/LICENSE +0 -0
  7. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/MANIFEST.in +0 -0
  8. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/README.md +0 -0
  9. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/create_shortcuts.bat +0 -0
  10. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/requirements.txt +0 -0
  11. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/setup.cfg +0 -0
  12. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer/cli.py +0 -0
  13. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer/create_shortcuts.py +0 -0
  14. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer/data/__init__.py +0 -0
  15. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer/data/tennis.csv +0 -0
  16. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer/summarizer.py +0 -0
  17. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer_aweebtaku.egg-info/SOURCES.txt +0 -0
  18. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer_aweebtaku.egg-info/dependency_links.txt +0 -0
  19. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer_aweebtaku.egg-info/entry_points.txt +0 -0
  20. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer_aweebtaku.egg-info/requires.txt +0 -0
  21. {text_summarizer_aweebtaku-1.2.7 → text_summarizer_aweebtaku-1.2.8.post1}/text_summarizer_aweebtaku.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: text-summarizer-aweebtaku
3
- Version: 1.2.7
3
+ Version: 1.2.8.post1
4
4
  Summary: A text summarization tool using GloVe embeddings and PageRank algorithm
5
5
  Home-page: https://github.com/AWeebTaku/Summarizer
6
6
  Author: Aditya Chaurasiya
@@ -15,7 +15,7 @@ requirements = [
15
15
 
16
16
  setup(
17
17
  name="text-summarizer-aweebtaku",
18
- version="1.2.7",
18
+ version="1.2.8.post1",
19
19
  author="Aditya Chaurasiya",
20
20
  author_email="adityachaurasiya57527@gmail.com",
21
21
  description="A text summarization tool using GloVe embeddings and PageRank algorithm",
@@ -1,3 +1,3 @@
1
1
  from .summarizer import TextSummarizer
2
2
 
3
- __version__ = "1.2.7"
3
+ __version__ = "1.2.8.post1"
@@ -13,13 +13,10 @@ class TextSummarizerUI:
13
13
  self.root.title("Text Summarizer")
14
14
  self.root.geometry("1000x700")
15
15
  self.root.resizable(True, True)
16
- self.root.configure(bg='#f0f0f0')
17
16
 
18
- # Configure styles
19
- style = ttk.Style()
20
- style.configure('TButton', font=('Arial', 10))
21
- style.configure('TLabel', font=('Arial', 10))
22
- style.configure('TFrame', background='#f0f0f0')
17
+ # Theme management
18
+ self.dark_mode = False
19
+ self.apply_theme()
23
20
 
24
21
  self.summarizer = None
25
22
  self.df = None
@@ -28,15 +25,63 @@ class TextSummarizerUI:
28
25
 
29
26
  self.create_widgets()
30
27
 
28
+ def apply_theme(self):
29
+ """Apply the current theme (light or dark) to the application."""
30
+ if self.dark_mode:
31
+ # Dark theme colors
32
+ bg_color = '#2b2b2b'
33
+ fg_color = '#ffffff'
34
+ text_bg = '#3c3c3c'
35
+ text_fg = '#ffffff'
36
+ button_bg = '#404040'
37
+ frame_bg = '#2b2b2b'
38
+ else:
39
+ # Light theme colors
40
+ bg_color = '#f0f0f0'
41
+ fg_color = '#000000'
42
+ text_bg = '#ffffff'
43
+ text_fg = '#000000'
44
+ button_bg = '#e1e1e1'
45
+ frame_bg = '#f0f0f0'
46
+
47
+ # Configure root window
48
+ self.root.configure(bg=bg_color)
49
+
50
+ # Configure styles
51
+ style = ttk.Style()
52
+ style.configure('TButton', font=('Arial', 10), background=button_bg)
53
+ style.configure('TLabel', font=('Arial', 10), background=frame_bg, foreground=fg_color)
54
+ style.configure('TFrame', background=frame_bg)
55
+ style.configure('TLabelframe', background=frame_bg, foreground=fg_color)
56
+ style.configure('TLabelframe.Label', background=frame_bg, foreground=fg_color)
57
+
58
+ # Update text widget colors if they exist
59
+ if hasattr(self, 'original_text'):
60
+ self.original_text.configure(bg=text_bg, fg=text_fg, insertbackground=fg_color)
61
+ if hasattr(self, 'summary_text'):
62
+ self.summary_text.configure(bg=text_bg, fg=text_fg, insertbackground=fg_color)
63
+
64
+ def toggle_theme(self):
65
+ """Toggle between light and dark themes."""
66
+ self.dark_mode = not self.dark_mode
67
+ self.apply_theme()
68
+
31
69
  def create_widgets(self):
32
70
  """Create and layout all UI widgets."""
33
71
  # Main frame
34
72
  main_frame = ttk.Frame(self.root, padding="10")
35
73
  main_frame.pack(fill=tk.BOTH, expand=True)
36
74
 
37
- # Title
38
- title_label = ttk.Label(main_frame, text="Text Summarizer", font=("Arial", 16, "bold"))
39
- title_label.pack(pady=10)
75
+ # Title and theme toggle
76
+ title_frame = ttk.Frame(main_frame)
77
+ title_frame.pack(fill=tk.X, pady=10)
78
+
79
+ title_label = ttk.Label(title_frame, text="Text Summarizer", font=("Arial", 16, "bold"))
80
+ title_label.pack(side=tk.LEFT)
81
+
82
+ theme_button = ttk.Button(title_frame, text="🌙 Dark Mode" if not self.dark_mode else "☀️ Light Mode",
83
+ command=self.toggle_theme)
84
+ theme_button.pack(side=tk.RIGHT)
40
85
 
41
86
  # Data loading section
42
87
  load_frame = ttk.LabelFrame(main_frame, text="Load Data", padding="10")
@@ -149,7 +194,7 @@ class TextSummarizerUI:
149
194
 
150
195
  def paste_single(self):
151
196
  """Open dialog to paste a single document."""
152
- dialog = PasteDialog(self.root)
197
+ dialog = PasteDialog(self.root, self.dark_mode)
153
198
  self.root.wait_window(dialog.top)
154
199
  if dialog.result:
155
200
  self.df = pd.DataFrame([{'article_id': 1, 'article_text': dialog.result}])
@@ -173,7 +218,7 @@ class TextSummarizerUI:
173
218
 
174
219
  def create_csv(self):
175
220
  """Open dialog to create a new CSV with multiple documents."""
176
- dialog = CreateCSVDialog(self.root)
221
+ dialog = CreateCSVDialog(self.root, self.dark_mode)
177
222
  self.root.wait_window(dialog.top)
178
223
  if dialog.result:
179
224
  self.df = pd.DataFrame(dialog.result)
@@ -249,7 +294,21 @@ class TextSummarizerUI:
249
294
  top.title("Original Document - Full View")
250
295
  top.geometry("900x700")
251
296
  top.resizable(True, True)
252
- text = scrolledtext.ScrolledText(top, wrap=tk.WORD)
297
+
298
+ # Apply theme to popup window
299
+ if self.dark_mode:
300
+ bg_color = '#2b2b2b'
301
+ fg_color = '#ffffff'
302
+ text_bg = '#3c3c3c'
303
+ text_fg = '#ffffff'
304
+ else:
305
+ bg_color = '#f0f0f0'
306
+ fg_color = '#000000'
307
+ text_bg = '#ffffff'
308
+ text_fg = '#000000'
309
+
310
+ top.configure(bg=bg_color)
311
+ text = scrolledtext.ScrolledText(top, wrap=tk.WORD, bg=text_bg, fg=text_fg, insertbackground=fg_color)
253
312
  text.pack(fill=tk.BOTH, expand=True, padx=10, pady=10)
254
313
  text.insert(tk.END, self.original_text.get(1.0, tk.END))
255
314
  text.config(state=tk.DISABLED) # Make it read-only
@@ -260,7 +319,21 @@ class TextSummarizerUI:
260
319
  top.title("Summary - Full View")
261
320
  top.geometry("900x700")
262
321
  top.resizable(True, True)
263
- text = scrolledtext.ScrolledText(top, wrap=tk.WORD)
322
+
323
+ # Apply theme to popup window
324
+ if self.dark_mode:
325
+ bg_color = '#2b2b2b'
326
+ fg_color = '#ffffff'
327
+ text_bg = '#3c3c3c'
328
+ text_fg = '#ffffff'
329
+ else:
330
+ bg_color = '#f0f0f0'
331
+ fg_color = '#000000'
332
+ text_bg = '#ffffff'
333
+ text_fg = '#000000'
334
+
335
+ top.configure(bg=bg_color)
336
+ text = scrolledtext.ScrolledText(top, wrap=tk.WORD, bg=text_bg, fg=text_fg, insertbackground=fg_color)
264
337
  text.pack(fill=tk.BOTH, expand=True, padx=10, pady=10)
265
338
  text.insert(tk.END, self.summary_text.get(1.0, tk.END))
266
339
  text.config(state=tk.DISABLED) # Make it read-only
@@ -269,16 +342,31 @@ class TextSummarizerUI:
269
342
  class PasteDialog:
270
343
  """Dialog for pasting a single document."""
271
344
 
272
- def __init__(self, parent):
345
+ def __init__(self, parent, dark_mode=False):
273
346
  self.top = tk.Toplevel(parent)
274
347
  self.top.title("Paste Document")
275
348
  self.top.geometry("700x600")
276
349
  self.top.transient(parent)
277
350
  self.top.grab_set()
278
351
  self.result = None
352
+ self.dark_mode = dark_mode
353
+
354
+ # Apply theme
355
+ if self.dark_mode:
356
+ bg_color = '#2b2b2b'
357
+ fg_color = '#ffffff'
358
+ text_bg = '#3c3c3c'
359
+ text_fg = '#ffffff'
360
+ else:
361
+ bg_color = '#f0f0f0'
362
+ fg_color = '#000000'
363
+ text_bg = '#ffffff'
364
+ text_fg = '#000000'
365
+
366
+ self.top.configure(bg=bg_color)
279
367
 
280
368
  ttk.Label(self.top, text="Paste your document:").pack(pady=5)
281
- self.text = scrolledtext.ScrolledText(self.top, wrap=tk.WORD)
369
+ self.text = scrolledtext.ScrolledText(self.top, wrap=tk.WORD, bg=text_bg, fg=text_fg, insertbackground=fg_color)
282
370
  self.text.pack(fill=tk.BOTH, expand=True, padx=10, pady=5)
283
371
 
284
372
  button_frame = ttk.Frame(self.top)
@@ -297,13 +385,28 @@ class PasteDialog:
297
385
  class CreateCSVDialog:
298
386
  """Dialog for creating a CSV with multiple documents."""
299
387
 
300
- def __init__(self, parent):
388
+ def __init__(self, parent, dark_mode=False):
301
389
  self.top = tk.Toplevel(parent)
302
390
  self.top.title("Create CSV")
303
391
  self.top.geometry("700x600")
304
392
  self.top.transient(parent)
305
393
  self.top.grab_set()
306
394
  self.result = []
395
+ self.dark_mode = dark_mode
396
+
397
+ # Apply theme
398
+ if self.dark_mode:
399
+ bg_color = '#2b2b2b'
400
+ fg_color = '#ffffff'
401
+ text_bg = '#3c3c3c'
402
+ text_fg = '#ffffff'
403
+ else:
404
+ bg_color = '#f0f0f0'
405
+ fg_color = '#000000'
406
+ text_bg = '#ffffff'
407
+ text_fg = '#000000'
408
+
409
+ self.top.configure(bg=bg_color)
307
410
 
308
411
  self.articles = []
309
412
  self.counter = 1
@@ -318,7 +421,7 @@ class CreateCSVDialog:
318
421
  self.id_entry.grid(row=0, column=1, padx=5)
319
422
 
320
423
  ttk.Label(input_frame, text="Document Text:").grid(row=1, column=0, sticky=tk.W)
321
- self.text_entry = scrolledtext.ScrolledText(input_frame, wrap=tk.WORD, height=5)
424
+ self.text_entry = scrolledtext.ScrolledText(input_frame, wrap=tk.WORD, height=5, bg=text_bg, fg=text_fg, insertbackground=fg_color)
322
425
  self.text_entry.grid(row=1, column=1, padx=5, pady=5)
323
426
 
324
427
  button_frame = ttk.Frame(self.top)
@@ -328,7 +431,7 @@ class CreateCSVDialog:
328
431
  ttk.Button(button_frame, text="Done", command=self.done).pack(side=tk.LEFT, padx=5)
329
432
  ttk.Button(button_frame, text="Cancel", command=self.cancel).pack(side=tk.RIGHT, padx=5)
330
433
 
331
- self.listbox = tk.Listbox(self.top, height=10)
434
+ self.listbox = tk.Listbox(self.top, height=10, bg=text_bg, fg=text_fg)
332
435
  self.listbox.pack(fill=tk.BOTH, expand=True, padx=10, pady=5)
333
436
 
334
437
  def add_article(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: text-summarizer-aweebtaku
3
- Version: 1.2.7
3
+ Version: 1.2.8.post1
4
4
  Summary: A text summarization tool using GloVe embeddings and PageRank algorithm
5
5
  Home-page: https://github.com/AWeebTaku/Summarizer
6
6
  Author: Aditya Chaurasiya