lecture-manager 2.3.2__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.
@@ -0,0 +1,6 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Udaya Raj Joshi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ ...
@@ -0,0 +1,58 @@
1
+ Metadata-Version: 2.4
2
+ Name: lecture-manager
3
+ Version: 2.3.2
4
+ Summary: Unified media manager for YouTube lectures and Facebook content with terminal and web interface
5
+ Home-page: https://github.com/blee-design/lecture-manager
6
+ Author: Udaya Raj Joshi
7
+ Author-email: udayarajjoshi@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Requires-Python: >=3.6
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: mysql-connector-python>=8.0.0
16
+ Requires-Dist: yt-dlp>=2023.0.0
17
+ Requires-Dist: flask>=2.0.0
18
+ Requires-Dist: browser-cookie3
19
+ Requires-Dist: bgutil-ytdlp-pot-provider
20
+ Requires-Dist: requests>=2.25.0
21
+ Requires-Dist: gallery-dl>=1.20.0
22
+ Requires-Dist: ffmpeg-python>=0.2.0
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest; extra == "dev"
25
+ Requires-Dist: black; extra == "dev"
26
+ Requires-Dist: flake8; extra == "dev"
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: description-content-type
32
+ Dynamic: home-page
33
+ Dynamic: license-file
34
+ Dynamic: provides-extra
35
+ Dynamic: requires-dist
36
+ Dynamic: requires-python
37
+ Dynamic: summary
38
+
39
+ # YouTube Lecture Manager
40
+
41
+ Manage your YouTube lectures with a terminal interface, web UI, and local playback.
42
+
43
+ ## Features
44
+
45
+ - Add lectures via YouTube URL
46
+ - Auto‑detect title, lecturer, date, time
47
+ - Organise files into a structured folder tree
48
+ - Facebook video/photo support
49
+ - Web interface with dashboard
50
+ - Export/Import CSV & JSON
51
+ - File compression, sharing, and trash management
52
+
53
+ ## Installation
54
+
55
+ ```bash
56
+ git clone https://github.com/yourusername/lecture-manager.git
57
+ cd lecture-manager
58
+ pip install -e .
@@ -0,0 +1,20 @@
1
+ # YouTube Lecture Manager
2
+
3
+ Manage your YouTube lectures with a terminal interface, web UI, and local playback.
4
+
5
+ ## Features
6
+
7
+ - Add lectures via YouTube URL
8
+ - Auto‑detect title, lecturer, date, time
9
+ - Organise files into a structured folder tree
10
+ - Facebook video/photo support
11
+ - Web interface with dashboard
12
+ - Export/Import CSV & JSON
13
+ - File compression, sharing, and trash management
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ git clone https://github.com/yourusername/lecture-manager.git
19
+ cd lecture-manager
20
+ pip install -e .
@@ -0,0 +1,9 @@
1
+ # File __init__.py
2
+
3
+ """
4
+ YouTube Lecture Manager package.
5
+ """
6
+
7
+ from .facebook_manager import add_facebook_entry, get_facebook_entry_by_id, list_facebook_entries, delete_facebook_entry
8
+
9
+ __version__ = "2.3.2"
@@ -0,0 +1,85 @@
1
+ # File config.py
2
+
3
+ import os
4
+ import json
5
+ from .utils import color_text, print_colored, COLORS
6
+
7
+ CONFIG_FILE = os.path.expanduser("~/.lecture_manager_config.json")
8
+ db_config = None
9
+
10
+ def load_or_create_config():
11
+ global db_config
12
+ if os.path.exists(CONFIG_FILE):
13
+ try:
14
+ with open(CONFIG_FILE, 'r') as f:
15
+ db_config = json.load(f)
16
+ print_colored("[✓] Loaded database configuration.", COLORS.GREEN)
17
+ return
18
+ except Exception as e:
19
+ print_colored(f"[!] Error reading config: {e}. Will create new one.", COLORS.YELLOW)
20
+
21
+ print("\n" + "═" * 50)
22
+ print_colored(" DATABASE CONFIGURATION", COLORS.CYAN, bold=True)
23
+ print("═" * 50)
24
+ print("Please enter your MariaDB/MySQL connection details.")
25
+ host = input(color_text("Host (default: localhost): ", COLORS.MAGENTA)).strip() or "localhost"
26
+ database = input(color_text("Database name: ", COLORS.MAGENTA)).strip()
27
+ user = input(color_text("Username: ", COLORS.MAGENTA)).strip()
28
+ password = input(color_text("Password: ", COLORS.MAGENTA)).strip()
29
+ port = input(color_text("Port (default: 3306): ", COLORS.MAGENTA)).strip() or "3306"
30
+
31
+ if not database or not user:
32
+ print_colored("[!] Database name and username are required.", COLORS.RED)
33
+ exit(1)
34
+
35
+ db_config = {
36
+ 'host': host,
37
+ 'database': database,
38
+ 'user': user,
39
+ 'password': password,
40
+ 'port': int(port)
41
+ }
42
+
43
+ try:
44
+ with open(CONFIG_FILE, 'w') as f:
45
+ json.dump(db_config, f, indent=2)
46
+ print_colored(f"[✓] Configuration saved to {CONFIG_FILE}", COLORS.GREEN)
47
+ except Exception as e:
48
+ print_colored(f"[!] Failed to save config: {e}", COLORS.RED)
49
+
50
+ def edit_config():
51
+ global db_config
52
+ print("\n" + "═" * 50)
53
+ print_colored(" EDIT DATABASE CONFIGURATION", COLORS.CYAN, bold=True)
54
+ print("═" * 50)
55
+ print("Current settings:")
56
+ print(f" Host : {db_config.get('host', '')}")
57
+ print(f" Database : {db_config.get('database', '')}")
58
+ print(f" User : {db_config.get('user', '')}")
59
+ print(f" Port : {db_config.get('port', 3306)}")
60
+ print("(Leave blank to keep current value)")
61
+
62
+ host = input(color_text(f"Host [{db_config.get('host', 'localhost')}]: ", COLORS.MAGENTA)).strip() or db_config.get('host', 'localhost')
63
+ database = input(color_text(f"Database [{db_config.get('database', '')}]: ", COLORS.MAGENTA)).strip() or db_config.get('database', '')
64
+ user = input(color_text(f"Username [{db_config.get('user', '')}]: ", COLORS.MAGENTA)).strip() or db_config.get('user', '')
65
+ password = input(color_text(f"Password [{db_config.get('password', '')}]: ", COLORS.MAGENTA)).strip() or db_config.get('password', '')
66
+ port = input(color_text(f"Port [{db_config.get('port', 3306)}]: ", COLORS.MAGENTA)).strip() or db_config.get('port', 3306)
67
+
68
+ if not database or not user:
69
+ print_colored("[!] Database name and username are required. Aborting.", COLORS.RED)
70
+ return
71
+
72
+ new_config = {
73
+ 'host': host,
74
+ 'database': database,
75
+ 'user': user,
76
+ 'password': password,
77
+ 'port': int(port)
78
+ }
79
+ try:
80
+ with open(CONFIG_FILE, 'w') as f:
81
+ json.dump(new_config, f, indent=2)
82
+ db_config = new_config
83
+ print_colored("[✓] Configuration updated and saved.", COLORS.GREEN)
84
+ except Exception as e:
85
+ print_colored(f"[!] Failed to save config: {e}", COLORS.RED)