martino-summarize 0.2.0__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 (43) hide show
  1. martino_summarize-0.2.0/LICENSE +21 -0
  2. martino_summarize-0.2.0/PKG-INFO +174 -0
  3. martino_summarize-0.2.0/README.md +118 -0
  4. martino_summarize-0.2.0/martino_summarize.egg-info/PKG-INFO +174 -0
  5. martino_summarize-0.2.0/martino_summarize.egg-info/SOURCES.txt +41 -0
  6. martino_summarize-0.2.0/martino_summarize.egg-info/dependency_links.txt +1 -0
  7. martino_summarize-0.2.0/martino_summarize.egg-info/entry_points.txt +2 -0
  8. martino_summarize-0.2.0/martino_summarize.egg-info/requires.txt +33 -0
  9. martino_summarize-0.2.0/martino_summarize.egg-info/top_level.txt +1 -0
  10. martino_summarize-0.2.0/pyproject.toml +75 -0
  11. martino_summarize-0.2.0/setup.cfg +4 -0
  12. martino_summarize-0.2.0/setup.py +3 -0
  13. martino_summarize-0.2.0/summarizer/__init__.py +9 -0
  14. martino_summarize-0.2.0/summarizer/__main__.py +422 -0
  15. martino_summarize-0.2.0/summarizer/api.py +423 -0
  16. martino_summarize-0.2.0/summarizer/api_utils.py +200 -0
  17. martino_summarize-0.2.0/summarizer/config.py +202 -0
  18. martino_summarize-0.2.0/summarizer/config_file.py +254 -0
  19. martino_summarize-0.2.0/summarizer/core.py +230 -0
  20. martino_summarize-0.2.0/summarizer/downloaders/__init__.py +15 -0
  21. martino_summarize-0.2.0/summarizer/downloaders/base.py +30 -0
  22. martino_summarize-0.2.0/summarizer/downloaders/cobalt.py +168 -0
  23. martino_summarize-0.2.0/summarizer/downloaders/manager.py +121 -0
  24. martino_summarize-0.2.0/summarizer/downloaders/youtube.py +163 -0
  25. martino_summarize-0.2.0/summarizer/downloaders/ytdlp.py +284 -0
  26. martino_summarize-0.2.0/summarizer/exceptions.py +51 -0
  27. martino_summarize-0.2.0/summarizer/handlers.py +425 -0
  28. martino_summarize-0.2.0/summarizer/progress.py +155 -0
  29. martino_summarize-0.2.0/summarizer/prompts.json +13 -0
  30. martino_summarize-0.2.0/summarizer/prompts.py +66 -0
  31. martino_summarize-0.2.0/summarizer/proxy.py +103 -0
  32. martino_summarize-0.2.0/summarizer/server.py +554 -0
  33. martino_summarize-0.2.0/summarizer/transcript_cache.py +59 -0
  34. martino_summarize-0.2.0/summarizer/transcription.py +402 -0
  35. martino_summarize-0.2.0/summarizer/visual.py +634 -0
  36. martino_summarize-0.2.0/summarizer/visual_api.py +282 -0
  37. martino_summarize-0.2.0/tests/test_api_key_lookup.py +56 -0
  38. martino_summarize-0.2.0/tests/test_litellm_provider.py +262 -0
  39. martino_summarize-0.2.0/tests/test_server.py +910 -0
  40. martino_summarize-0.2.0/tests/test_streamlit_config_helpers.py +45 -0
  41. martino_summarize-0.2.0/tests/test_tinypaste.py +81 -0
  42. martino_summarize-0.2.0/tests/test_video_downloaders.py +93 -0
  43. martino_summarize-0.2.0/tests/test_visual_mode.py +801 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Martino Piaggi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,174 @@
1
+ Metadata-Version: 2.4
2
+ Name: martino-summarize
3
+ Version: 0.2.0
4
+ Summary: Local-first multi-source video summarization with any OpenAI-compatible LLM
5
+ Author: Martino Piaggi
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/martinopiaggi/summarize
8
+ Project-URL: Documentation, https://summarize.martino.im
9
+ Project-URL: Repository, https://github.com/martinopiaggi/summarize
10
+ Project-URL: Issues, https://github.com/martinopiaggi/summarize/issues
11
+ Project-URL: Changelog, https://github.com/martinopiaggi/summarize/blob/main/CHANGELOG.md
12
+ Keywords: video,summarization,youtube,transcription,llm,notebooklm
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.7
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Multimedia :: Video
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Requires-Python: >=3.7
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: python-dotenv>=1.0.0
27
+ Requires-Dist: youtube-transcript-api>=1.2.3
28
+ Requires-Dist: pytubefix>=1.6.3
29
+ Requires-Dist: groq>=0.4.2
30
+ Requires-Dist: openai>=1.3.7
31
+ Requires-Dist: yt-dlp>=2025.4.30
32
+ Requires-Dist: aiohttp>=3.9.0
33
+ Requires-Dist: requests>=2.31.0
34
+ Requires-Dist: wget>=3.2
35
+ Requires-Dist: google-api-python-client>=2.0.0
36
+ Requires-Dist: google-auth-httplib2>=0.1.0
37
+ Requires-Dist: google-auth-oauthlib>=0.4.1
38
+ Requires-Dist: dropbox>=11.36.2
39
+ Requires-Dist: ffmpeg-python>=0.2.0
40
+ Requires-Dist: pyyaml>=6.0
41
+ Provides-Extra: whisper
42
+ Requires-Dist: openai-whisper; extra == "whisper"
43
+ Provides-Extra: litellm
44
+ Requires-Dist: litellm<1.87,>=1.80.0; extra == "litellm"
45
+ Provides-Extra: server
46
+ Requires-Dist: fastapi>=0.100.0; extra == "server"
47
+ Requires-Dist: uvicorn[standard]>=0.23.0; extra == "server"
48
+ Requires-Dist: python-multipart>=0.0.6; extra == "server"
49
+ Provides-Extra: all
50
+ Requires-Dist: openai-whisper; extra == "all"
51
+ Requires-Dist: litellm<1.87,>=1.80.0; extra == "all"
52
+ Requires-Dist: fastapi>=0.100.0; extra == "all"
53
+ Requires-Dist: uvicorn[standard]>=0.23.0; extra == "all"
54
+ Requires-Dist: python-multipart>=0.0.6; extra == "all"
55
+ Dynamic: license-file
56
+
57
+ # Video Summarizer
58
+
59
+ <p align="center">
60
+ <img alt="sample" src="./summarize_sample.gif">
61
+ </p>
62
+
63
+ Transcribe and summarize videos from YouTube, Instagram, TikTok, Twitter, Reddit, Facebook, Google Drive, Dropbox, and local files.
64
+
65
+ Works with any OpenAI-compatible LLM provider, including locally hosted endpoints.
66
+
67
+
68
+ ## Interfaces
69
+
70
+ Pick your poison:
71
+
72
+ | Interface | Command |
73
+ |-----------|---------|
74
+ | **CLI** | `python -m summarizer --source <source>` |
75
+ | **HTTP API** | `python -m summarizer serve` → `http://localhost:8000/docs` |
76
+ | **Streamlit GUI** | `python -m streamlit run app.py` |
77
+ | **Docker** | `docker compose up -d` → `http://localhost:8501` |
78
+ | **Agent Skill** | [`.agent/skills/summarize/SKILL.md`](./.agent/skills/summarize/SKILL.md) |
79
+
80
+
81
+ ## Quick Start
82
+
83
+ ```bash
84
+ git clone https://github.com/martinopiaggi/summarize.git
85
+ cd summarize
86
+ pip install -e .
87
+ python -m summarizer --source "https://youtube.com/watch?v=VIDEO_ID"
88
+ ```
89
+
90
+ The summary is saved to `summaries/watch_YYYYMMDD_HHMMSS.md`.
91
+
92
+ ## How It Works
93
+
94
+ ```text
95
+ +--------------------+
96
+ | Video URL/Path |
97
+ +---------+----------+
98
+ |
99
+ v
100
+ +---------+----------+
101
+ | Source Type? |
102
+ +---------+----------+
103
+ |
104
+ +----------------+--------------------+
105
+ | visual flag |
106
+ v v
107
+ +-------+--------+ +---------+----------+
108
+ | Visual Mode | | Transcript Cache |-------------> HIT ---+
109
+ | base64 / url | +---------+----------+ |
110
+ +-------+--------+ | MISS |
111
+ | | |
112
+ | v |
113
+ | +-------+ +-------+ +-------+ +-------+ |
114
+ | |YouTube| |yt-dlp | | Local | |Dropbox| |
115
+ | | | |X.com | | File | |G.Drive| |
116
+ | | | |TikTok | | | | | |
117
+ | | | |etc. | | | | | |
118
+ | +---+---+ +---+---+ +---+---+ +---+---+ |
119
+ | | | | | |
120
+ | v v | | |
121
+ | +----+---+ +--+---+ | | |
122
+ | |Captions| |Cobalt| | | |
123
+ | | Exist? | +--+---+ | | |
124
+ | +---+----+ | | | |
125
+ | Yes No | | | |
126
+ | +----+ | +--------+--------------+ |
127
+ | | | | |
128
+ | +-------------->| v |
129
+ | | +--------+--------+ |
130
+ | | | Whisper | |
131
+ | | | endpoint? | |
132
+ | | +--------+--------+ |
133
+ | | | |
134
+ | | +-----------+-----------+ |
135
+ | | | | |
136
+ | | | Cloud Whisper Local | |
137
+ | | | | |
138
+ | | +----------+------------+ |
139
+ | | | |
140
+ | +------------------------|--+ |
141
+ | v |
142
+ | store in cache |
143
+ | | |
144
+ | +-----------------+
145
+ | |
146
+ | | Transcript
147
+ | |
148
+ | v
149
+ | summarizer.yaml -> +------------+----------+
150
+ | prompts.json -> | Prompt + LLM |
151
+ | | Merge |
152
+ | +------------+----------+
153
+ | |
154
+ | v
155
+ v +------------+----------+
156
+ +-------+--------+ | |
157
+ | Vision-capable | | Output |
158
+ | model |----------------------------------------->+ |
159
+ +-------+--------+ +-----------------------+
160
+ ^
161
+ |
162
+ +----- prompts.json
163
+ ```
164
+
165
+ - **Transcript path** (default): downloads audio/video, transcribes with Whisper or captions, caches the transcript, then summarizes with an LLM.
166
+ - **Visual path** (`--visual`): sends the video directly to a vision-capable model, skipping transcription. Uses the same prompts, provider config, and `.env` keys as the transcript path. Supports `base64` chunks (default) and `url` passthrough for YouTube.
167
+
168
+ ## Documentation
169
+
170
+ Full docs live at [summarize.martino.im](https://summarize.martino.im).
171
+
172
+ ## License
173
+
174
+ [MIT](LICENSE)
@@ -0,0 +1,118 @@
1
+ # Video Summarizer
2
+
3
+ <p align="center">
4
+ <img alt="sample" src="./summarize_sample.gif">
5
+ </p>
6
+
7
+ Transcribe and summarize videos from YouTube, Instagram, TikTok, Twitter, Reddit, Facebook, Google Drive, Dropbox, and local files.
8
+
9
+ Works with any OpenAI-compatible LLM provider, including locally hosted endpoints.
10
+
11
+
12
+ ## Interfaces
13
+
14
+ Pick your poison:
15
+
16
+ | Interface | Command |
17
+ |-----------|---------|
18
+ | **CLI** | `python -m summarizer --source <source>` |
19
+ | **HTTP API** | `python -m summarizer serve` → `http://localhost:8000/docs` |
20
+ | **Streamlit GUI** | `python -m streamlit run app.py` |
21
+ | **Docker** | `docker compose up -d` → `http://localhost:8501` |
22
+ | **Agent Skill** | [`.agent/skills/summarize/SKILL.md`](./.agent/skills/summarize/SKILL.md) |
23
+
24
+
25
+ ## Quick Start
26
+
27
+ ```bash
28
+ git clone https://github.com/martinopiaggi/summarize.git
29
+ cd summarize
30
+ pip install -e .
31
+ python -m summarizer --source "https://youtube.com/watch?v=VIDEO_ID"
32
+ ```
33
+
34
+ The summary is saved to `summaries/watch_YYYYMMDD_HHMMSS.md`.
35
+
36
+ ## How It Works
37
+
38
+ ```text
39
+ +--------------------+
40
+ | Video URL/Path |
41
+ +---------+----------+
42
+ |
43
+ v
44
+ +---------+----------+
45
+ | Source Type? |
46
+ +---------+----------+
47
+ |
48
+ +----------------+--------------------+
49
+ | visual flag |
50
+ v v
51
+ +-------+--------+ +---------+----------+
52
+ | Visual Mode | | Transcript Cache |-------------> HIT ---+
53
+ | base64 / url | +---------+----------+ |
54
+ +-------+--------+ | MISS |
55
+ | | |
56
+ | v |
57
+ | +-------+ +-------+ +-------+ +-------+ |
58
+ | |YouTube| |yt-dlp | | Local | |Dropbox| |
59
+ | | | |X.com | | File | |G.Drive| |
60
+ | | | |TikTok | | | | | |
61
+ | | | |etc. | | | | | |
62
+ | +---+---+ +---+---+ +---+---+ +---+---+ |
63
+ | | | | | |
64
+ | v v | | |
65
+ | +----+---+ +--+---+ | | |
66
+ | |Captions| |Cobalt| | | |
67
+ | | Exist? | +--+---+ | | |
68
+ | +---+----+ | | | |
69
+ | Yes No | | | |
70
+ | +----+ | +--------+--------------+ |
71
+ | | | | |
72
+ | +-------------->| v |
73
+ | | +--------+--------+ |
74
+ | | | Whisper | |
75
+ | | | endpoint? | |
76
+ | | +--------+--------+ |
77
+ | | | |
78
+ | | +-----------+-----------+ |
79
+ | | | | |
80
+ | | | Cloud Whisper Local | |
81
+ | | | | |
82
+ | | +----------+------------+ |
83
+ | | | |
84
+ | +------------------------|--+ |
85
+ | v |
86
+ | store in cache |
87
+ | | |
88
+ | +-----------------+
89
+ | |
90
+ | | Transcript
91
+ | |
92
+ | v
93
+ | summarizer.yaml -> +------------+----------+
94
+ | prompts.json -> | Prompt + LLM |
95
+ | | Merge |
96
+ | +------------+----------+
97
+ | |
98
+ | v
99
+ v +------------+----------+
100
+ +-------+--------+ | |
101
+ | Vision-capable | | Output |
102
+ | model |----------------------------------------->+ |
103
+ +-------+--------+ +-----------------------+
104
+ ^
105
+ |
106
+ +----- prompts.json
107
+ ```
108
+
109
+ - **Transcript path** (default): downloads audio/video, transcribes with Whisper or captions, caches the transcript, then summarizes with an LLM.
110
+ - **Visual path** (`--visual`): sends the video directly to a vision-capable model, skipping transcription. Uses the same prompts, provider config, and `.env` keys as the transcript path. Supports `base64` chunks (default) and `url` passthrough for YouTube.
111
+
112
+ ## Documentation
113
+
114
+ Full docs live at [summarize.martino.im](https://summarize.martino.im).
115
+
116
+ ## License
117
+
118
+ [MIT](LICENSE)
@@ -0,0 +1,174 @@
1
+ Metadata-Version: 2.4
2
+ Name: martino-summarize
3
+ Version: 0.2.0
4
+ Summary: Local-first multi-source video summarization with any OpenAI-compatible LLM
5
+ Author: Martino Piaggi
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/martinopiaggi/summarize
8
+ Project-URL: Documentation, https://summarize.martino.im
9
+ Project-URL: Repository, https://github.com/martinopiaggi/summarize
10
+ Project-URL: Issues, https://github.com/martinopiaggi/summarize/issues
11
+ Project-URL: Changelog, https://github.com/martinopiaggi/summarize/blob/main/CHANGELOG.md
12
+ Keywords: video,summarization,youtube,transcription,llm,notebooklm
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.7
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Multimedia :: Video
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Requires-Python: >=3.7
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: python-dotenv>=1.0.0
27
+ Requires-Dist: youtube-transcript-api>=1.2.3
28
+ Requires-Dist: pytubefix>=1.6.3
29
+ Requires-Dist: groq>=0.4.2
30
+ Requires-Dist: openai>=1.3.7
31
+ Requires-Dist: yt-dlp>=2025.4.30
32
+ Requires-Dist: aiohttp>=3.9.0
33
+ Requires-Dist: requests>=2.31.0
34
+ Requires-Dist: wget>=3.2
35
+ Requires-Dist: google-api-python-client>=2.0.0
36
+ Requires-Dist: google-auth-httplib2>=0.1.0
37
+ Requires-Dist: google-auth-oauthlib>=0.4.1
38
+ Requires-Dist: dropbox>=11.36.2
39
+ Requires-Dist: ffmpeg-python>=0.2.0
40
+ Requires-Dist: pyyaml>=6.0
41
+ Provides-Extra: whisper
42
+ Requires-Dist: openai-whisper; extra == "whisper"
43
+ Provides-Extra: litellm
44
+ Requires-Dist: litellm<1.87,>=1.80.0; extra == "litellm"
45
+ Provides-Extra: server
46
+ Requires-Dist: fastapi>=0.100.0; extra == "server"
47
+ Requires-Dist: uvicorn[standard]>=0.23.0; extra == "server"
48
+ Requires-Dist: python-multipart>=0.0.6; extra == "server"
49
+ Provides-Extra: all
50
+ Requires-Dist: openai-whisper; extra == "all"
51
+ Requires-Dist: litellm<1.87,>=1.80.0; extra == "all"
52
+ Requires-Dist: fastapi>=0.100.0; extra == "all"
53
+ Requires-Dist: uvicorn[standard]>=0.23.0; extra == "all"
54
+ Requires-Dist: python-multipart>=0.0.6; extra == "all"
55
+ Dynamic: license-file
56
+
57
+ # Video Summarizer
58
+
59
+ <p align="center">
60
+ <img alt="sample" src="./summarize_sample.gif">
61
+ </p>
62
+
63
+ Transcribe and summarize videos from YouTube, Instagram, TikTok, Twitter, Reddit, Facebook, Google Drive, Dropbox, and local files.
64
+
65
+ Works with any OpenAI-compatible LLM provider, including locally hosted endpoints.
66
+
67
+
68
+ ## Interfaces
69
+
70
+ Pick your poison:
71
+
72
+ | Interface | Command |
73
+ |-----------|---------|
74
+ | **CLI** | `python -m summarizer --source <source>` |
75
+ | **HTTP API** | `python -m summarizer serve` → `http://localhost:8000/docs` |
76
+ | **Streamlit GUI** | `python -m streamlit run app.py` |
77
+ | **Docker** | `docker compose up -d` → `http://localhost:8501` |
78
+ | **Agent Skill** | [`.agent/skills/summarize/SKILL.md`](./.agent/skills/summarize/SKILL.md) |
79
+
80
+
81
+ ## Quick Start
82
+
83
+ ```bash
84
+ git clone https://github.com/martinopiaggi/summarize.git
85
+ cd summarize
86
+ pip install -e .
87
+ python -m summarizer --source "https://youtube.com/watch?v=VIDEO_ID"
88
+ ```
89
+
90
+ The summary is saved to `summaries/watch_YYYYMMDD_HHMMSS.md`.
91
+
92
+ ## How It Works
93
+
94
+ ```text
95
+ +--------------------+
96
+ | Video URL/Path |
97
+ +---------+----------+
98
+ |
99
+ v
100
+ +---------+----------+
101
+ | Source Type? |
102
+ +---------+----------+
103
+ |
104
+ +----------------+--------------------+
105
+ | visual flag |
106
+ v v
107
+ +-------+--------+ +---------+----------+
108
+ | Visual Mode | | Transcript Cache |-------------> HIT ---+
109
+ | base64 / url | +---------+----------+ |
110
+ +-------+--------+ | MISS |
111
+ | | |
112
+ | v |
113
+ | +-------+ +-------+ +-------+ +-------+ |
114
+ | |YouTube| |yt-dlp | | Local | |Dropbox| |
115
+ | | | |X.com | | File | |G.Drive| |
116
+ | | | |TikTok | | | | | |
117
+ | | | |etc. | | | | | |
118
+ | +---+---+ +---+---+ +---+---+ +---+---+ |
119
+ | | | | | |
120
+ | v v | | |
121
+ | +----+---+ +--+---+ | | |
122
+ | |Captions| |Cobalt| | | |
123
+ | | Exist? | +--+---+ | | |
124
+ | +---+----+ | | | |
125
+ | Yes No | | | |
126
+ | +----+ | +--------+--------------+ |
127
+ | | | | |
128
+ | +-------------->| v |
129
+ | | +--------+--------+ |
130
+ | | | Whisper | |
131
+ | | | endpoint? | |
132
+ | | +--------+--------+ |
133
+ | | | |
134
+ | | +-----------+-----------+ |
135
+ | | | | |
136
+ | | | Cloud Whisper Local | |
137
+ | | | | |
138
+ | | +----------+------------+ |
139
+ | | | |
140
+ | +------------------------|--+ |
141
+ | v |
142
+ | store in cache |
143
+ | | |
144
+ | +-----------------+
145
+ | |
146
+ | | Transcript
147
+ | |
148
+ | v
149
+ | summarizer.yaml -> +------------+----------+
150
+ | prompts.json -> | Prompt + LLM |
151
+ | | Merge |
152
+ | +------------+----------+
153
+ | |
154
+ | v
155
+ v +------------+----------+
156
+ +-------+--------+ | |
157
+ | Vision-capable | | Output |
158
+ | model |----------------------------------------->+ |
159
+ +-------+--------+ +-----------------------+
160
+ ^
161
+ |
162
+ +----- prompts.json
163
+ ```
164
+
165
+ - **Transcript path** (default): downloads audio/video, transcribes with Whisper or captions, caches the transcript, then summarizes with an LLM.
166
+ - **Visual path** (`--visual`): sends the video directly to a vision-capable model, skipping transcription. Uses the same prompts, provider config, and `.env` keys as the transcript path. Supports `base64` chunks (default) and `url` passthrough for YouTube.
167
+
168
+ ## Documentation
169
+
170
+ Full docs live at [summarize.martino.im](https://summarize.martino.im).
171
+
172
+ ## License
173
+
174
+ [MIT](LICENSE)
@@ -0,0 +1,41 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ martino_summarize.egg-info/PKG-INFO
6
+ martino_summarize.egg-info/SOURCES.txt
7
+ martino_summarize.egg-info/dependency_links.txt
8
+ martino_summarize.egg-info/entry_points.txt
9
+ martino_summarize.egg-info/requires.txt
10
+ martino_summarize.egg-info/top_level.txt
11
+ summarizer/__init__.py
12
+ summarizer/__main__.py
13
+ summarizer/api.py
14
+ summarizer/api_utils.py
15
+ summarizer/config.py
16
+ summarizer/config_file.py
17
+ summarizer/core.py
18
+ summarizer/exceptions.py
19
+ summarizer/handlers.py
20
+ summarizer/progress.py
21
+ summarizer/prompts.json
22
+ summarizer/prompts.py
23
+ summarizer/proxy.py
24
+ summarizer/server.py
25
+ summarizer/transcript_cache.py
26
+ summarizer/transcription.py
27
+ summarizer/visual.py
28
+ summarizer/visual_api.py
29
+ summarizer/downloaders/__init__.py
30
+ summarizer/downloaders/base.py
31
+ summarizer/downloaders/cobalt.py
32
+ summarizer/downloaders/manager.py
33
+ summarizer/downloaders/youtube.py
34
+ summarizer/downloaders/ytdlp.py
35
+ tests/test_api_key_lookup.py
36
+ tests/test_litellm_provider.py
37
+ tests/test_server.py
38
+ tests/test_streamlit_config_helpers.py
39
+ tests/test_tinypaste.py
40
+ tests/test_video_downloaders.py
41
+ tests/test_visual_mode.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ summarizer = summarizer.__main__:cli
@@ -0,0 +1,33 @@
1
+ python-dotenv>=1.0.0
2
+ youtube-transcript-api>=1.2.3
3
+ pytubefix>=1.6.3
4
+ groq>=0.4.2
5
+ openai>=1.3.7
6
+ yt-dlp>=2025.4.30
7
+ aiohttp>=3.9.0
8
+ requests>=2.31.0
9
+ wget>=3.2
10
+ google-api-python-client>=2.0.0
11
+ google-auth-httplib2>=0.1.0
12
+ google-auth-oauthlib>=0.4.1
13
+ dropbox>=11.36.2
14
+ ffmpeg-python>=0.2.0
15
+ pyyaml>=6.0
16
+
17
+ [all]
18
+ openai-whisper
19
+ litellm<1.87,>=1.80.0
20
+ fastapi>=0.100.0
21
+ uvicorn[standard]>=0.23.0
22
+ python-multipart>=0.0.6
23
+
24
+ [litellm]
25
+ litellm<1.87,>=1.80.0
26
+
27
+ [server]
28
+ fastapi>=0.100.0
29
+ uvicorn[standard]>=0.23.0
30
+ python-multipart>=0.0.6
31
+
32
+ [whisper]
33
+ openai-whisper
@@ -0,0 +1,75 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "martino-summarize"
7
+ version = "0.2.0"
8
+ description = "Local-first multi-source video summarization with any OpenAI-compatible LLM"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.7"
12
+ authors = [{ name = "Martino Piaggi" }]
13
+ keywords = ["video", "summarization", "youtube", "transcription", "llm", "notebooklm"]
14
+ classifiers = [
15
+ "License :: OSI Approved :: MIT License",
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3.7",
18
+ "Programming Language :: Python :: 3.8",
19
+ "Programming Language :: Python :: 3.9",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Topic :: Multimedia :: Video",
24
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
25
+ ]
26
+ dependencies = [
27
+ "python-dotenv>=1.0.0",
28
+ "youtube-transcript-api>=1.2.3",
29
+ "pytubefix>=1.6.3",
30
+ "groq>=0.4.2",
31
+ "openai>=1.3.7",
32
+ "yt-dlp>=2025.4.30",
33
+ "aiohttp>=3.9.0",
34
+ "requests>=2.31.0",
35
+ "wget>=3.2",
36
+ "google-api-python-client>=2.0.0",
37
+ "google-auth-httplib2>=0.1.0",
38
+ "google-auth-oauthlib>=0.4.1",
39
+ "dropbox>=11.36.2",
40
+ "ffmpeg-python>=0.2.0",
41
+ "pyyaml>=6.0",
42
+ ]
43
+
44
+ [project.optional-dependencies]
45
+ whisper = ["openai-whisper"]
46
+ litellm = ["litellm>=1.80.0,<1.87"]
47
+ server = [
48
+ "fastapi>=0.100.0",
49
+ "uvicorn[standard]>=0.23.0",
50
+ "python-multipart>=0.0.6",
51
+ ]
52
+ all = [
53
+ "openai-whisper",
54
+ "litellm>=1.80.0,<1.87",
55
+ "fastapi>=0.100.0",
56
+ "uvicorn[standard]>=0.23.0",
57
+ "python-multipart>=0.0.6",
58
+ ]
59
+
60
+ [project.scripts]
61
+ summarizer = "summarizer.__main__:cli"
62
+
63
+ [project.urls]
64
+ Homepage = "https://github.com/martinopiaggi/summarize"
65
+ Documentation = "https://summarize.martino.im"
66
+ Repository = "https://github.com/martinopiaggi/summarize"
67
+ Issues = "https://github.com/martinopiaggi/summarize/issues"
68
+ Changelog = "https://github.com/martinopiaggi/summarize/blob/main/CHANGELOG.md"
69
+
70
+ [tool.setuptools.packages.find]
71
+ where = ["."]
72
+ include = ["summarizer*"]
73
+
74
+ [tool.setuptools.package-data]
75
+ summarizer = ["prompts.json"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ from setuptools import setup
2
+
3
+ setup()
@@ -0,0 +1,9 @@
1
+ """Video Transcript Summarizer package."""
2
+ from .core import main, CONFIG
3
+ from .exceptions import (
4
+ SummarizerError, TranscriptError, APIError, APIKeyError,
5
+ ConfigurationError, AudioProcessingError, SourceNotFoundError
6
+ )
7
+
8
+ __version__ = "0.2.0"
9
+ __all__ = ["main", "CONFIG", "SummarizerError"]