yttools 0.1.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 (55) hide show
  1. yttools-0.1.0/.gitignore +256 -0
  2. yttools-0.1.0/CHANGELOG.md +50 -0
  3. yttools-0.1.0/LICENSE +661 -0
  4. yttools-0.1.0/PKG-INFO +117 -0
  5. yttools-0.1.0/README.md +75 -0
  6. yttools-0.1.0/pyproject.toml +109 -0
  7. yttools-0.1.0/src/yttools/__init__.py +7 -0
  8. yttools-0.1.0/src/yttools/__main__.py +26 -0
  9. yttools-0.1.0/src/yttools/cli.py +237 -0
  10. yttools-0.1.0/src/yttools/config.py +216 -0
  11. yttools-0.1.0/src/yttools/core/__init__.py +3 -0
  12. yttools-0.1.0/src/yttools/core/db.py +584 -0
  13. yttools-0.1.0/src/yttools/core/embeddings.py +90 -0
  14. yttools-0.1.0/src/yttools/core/exports.py +108 -0
  15. yttools-0.1.0/src/yttools/core/llm.py +307 -0
  16. yttools-0.1.0/src/yttools/core/migrations/0001_initial.sql +150 -0
  17. yttools-0.1.0/src/yttools/core/migrations/__init__.py +3 -0
  18. yttools-0.1.0/src/yttools/core/models.py +216 -0
  19. yttools-0.1.0/src/yttools/core/progress.py +85 -0
  20. yttools-0.1.0/src/yttools/core/transcripts.py +150 -0
  21. yttools-0.1.0/src/yttools/core/urls.py +139 -0
  22. yttools-0.1.0/src/yttools/core/youtube.py +232 -0
  23. yttools-0.1.0/src/yttools/tools/__init__.py +3 -0
  24. yttools-0.1.0/src/yttools/tools/fetch.py +289 -0
  25. yttools-0.1.0/src/yttools/tools/search.py +187 -0
  26. yttools-0.1.0/src/yttools/version.py +5 -0
  27. yttools-0.1.0/src/yttools/web/__init__.py +3 -0
  28. yttools-0.1.0/src/yttools/web/app.py +83 -0
  29. yttools-0.1.0/src/yttools/web/routes/__init__.py +3 -0
  30. yttools-0.1.0/src/yttools/web/routes/api.py +239 -0
  31. yttools-0.1.0/src/yttools/web/routes/pages.py +74 -0
  32. yttools-0.1.0/src/yttools/web/routes/sse.py +28 -0
  33. yttools-0.1.0/src/yttools/web/static/app.js +244 -0
  34. yttools-0.1.0/src/yttools/web/static/styles.css +21 -0
  35. yttools-0.1.0/src/yttools/web/templates/base.html +87 -0
  36. yttools-0.1.0/src/yttools/web/templates/fetch.html +94 -0
  37. yttools-0.1.0/src/yttools/web/templates/search.html +108 -0
  38. yttools-0.1.0/src/yttools/web/templates/settings.html +84 -0
  39. yttools-0.1.0/tests/conftest.py +47 -0
  40. yttools-0.1.0/tests/fixtures/channel_listing.jsonl +3 -0
  41. yttools-0.1.0/tests/fixtures/sample.vtt +23 -0
  42. yttools-0.1.0/tests/fixtures/video_metadata.json +18 -0
  43. yttools-0.1.0/tests/test_config.py +94 -0
  44. yttools-0.1.0/tests/test_db.py +176 -0
  45. yttools-0.1.0/tests/test_embeddings.py +84 -0
  46. yttools-0.1.0/tests/test_exports.py +95 -0
  47. yttools-0.1.0/tests/test_fetch.py +227 -0
  48. yttools-0.1.0/tests/test_llm.py +136 -0
  49. yttools-0.1.0/tests/test_models.py +66 -0
  50. yttools-0.1.0/tests/test_progress.py +56 -0
  51. yttools-0.1.0/tests/test_search.py +157 -0
  52. yttools-0.1.0/tests/test_transcripts.py +83 -0
  53. yttools-0.1.0/tests/test_urls.py +107 -0
  54. yttools-0.1.0/tests/test_web.py +148 -0
  55. yttools-0.1.0/tests/test_youtube.py +125 -0
@@ -0,0 +1,256 @@
1
+ # =============================================================================
2
+ # Python
3
+ # =============================================================================
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+ *.so
8
+ .Python
9
+
10
+ # Distribution / packaging
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib64/
18
+ parts/
19
+ sdist/
20
+ var/
21
+ wheels/
22
+ share/python-wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ MANIFEST
27
+
28
+ # PyInstaller
29
+ *.manifest
30
+ *.spec
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+
36
+ # =============================================================================
37
+ # Virtual environments
38
+ # =============================================================================
39
+ .venv/
40
+ venv/
41
+ ENV/
42
+ env/
43
+ .python-version
44
+ .tool-versions
45
+
46
+ # =============================================================================
47
+ # Testing and quality tools
48
+ # =============================================================================
49
+ .pytest_cache/
50
+ .coverage
51
+ .coverage.*
52
+ htmlcov/
53
+ .tox/
54
+ .nox/
55
+ coverage.xml
56
+ *.cover
57
+ *.py,cover
58
+ .hypothesis/
59
+ nosetests.xml
60
+ .cache
61
+
62
+ # Type checkers
63
+ .mypy_cache/
64
+ .dmypy.json
65
+ dmypy.json
66
+ .pyre/
67
+ .pytype/
68
+
69
+ # Linters and formatters
70
+ .ruff_cache/
71
+ .pylint.d/
72
+
73
+ # =============================================================================
74
+ # Editors and IDEs
75
+ # =============================================================================
76
+ .idea/
77
+ .vscode/
78
+ *.swp
79
+ *.swo
80
+ *~
81
+ *.sublime-project
82
+ *.sublime-workspace
83
+ .project
84
+ .pydevproject
85
+ .spyderproject
86
+ .spyproject
87
+ .ropeproject
88
+
89
+ # Local editor and agent working directories
90
+ .history/
91
+ .local/
92
+ .assistant/
93
+ .agent/
94
+ .agents/
95
+
96
+ # =============================================================================
97
+ # Operating systems
98
+ # =============================================================================
99
+ # macOS
100
+ .DS_Store
101
+ .AppleDouble
102
+ .LSOverride
103
+ Icon
104
+ ._*
105
+ .DocumentRevisions-V100
106
+ .fseventsd
107
+ .Spotlight-V100
108
+ .TemporaryItems
109
+ .Trashes
110
+ .VolumeIcon.icns
111
+ .com.apple.timemachine.donotpresent
112
+
113
+ # Linux
114
+ *~
115
+ .directory
116
+ .fuse_hidden*
117
+ .nfs*
118
+
119
+ # Windows
120
+ Thumbs.db
121
+ Thumbs.db:encryptable
122
+ ehthumbs.db
123
+ ehthumbs_vista.db
124
+ *.stackdump
125
+ [Dd]esktop.ini
126
+ $RECYCLE.BIN/
127
+ *.lnk
128
+
129
+ # =============================================================================
130
+ # Secrets and local config
131
+ # =============================================================================
132
+ .env
133
+ .env.*
134
+ !.env.example
135
+ *.local
136
+ *.local.toml
137
+ *.local.yml
138
+ *.local.yaml
139
+ *.local.json
140
+ secrets/
141
+ .secrets/
142
+ credentials.json
143
+ client_secrets.json
144
+ token.json
145
+ service-account*.json
146
+
147
+ # =============================================================================
148
+ # YTtools runtime state
149
+ # =============================================================================
150
+ # Local data directories (when YTTOOLS_HOME is set to a project path)
151
+ .yttools/
152
+ data/
153
+ runtime/
154
+
155
+ # SQLite database files (database lives at ~/.yttools/ by default;
156
+ # this catches any project-local development databases)
157
+ yttools.db
158
+ yttools.db-wal
159
+ yttools.db-shm
160
+ yttools.db-journal
161
+ *.sqlite
162
+ *.sqlite3
163
+ *.db-wal
164
+ *.db-shm
165
+
166
+ # Transcript artifacts and exports
167
+ transcripts/
168
+ exports/
169
+ *.vtt
170
+ *.srt
171
+
172
+ # Test fixtures are committed even though they share the extensions above.
173
+ !tests/fixtures/*.vtt
174
+ !tests/fixtures/*.srt
175
+
176
+ # Ollama model cache (when configured to a project-local path)
177
+ .ollama/
178
+
179
+ # Job and progress state
180
+ jobs/
181
+ .progress/
182
+
183
+ # =============================================================================
184
+ # Private project files
185
+ # =============================================================================
186
+ # Operator playbook (commercial pricing, LLC notes, internal strategy)
187
+ OPERATOR_NOTES.md
188
+ OPERATOR_NOTES.*
189
+
190
+ # Any file marked private by naming convention
191
+ *_PRIVATE.md
192
+ *.private
193
+ *.private.*
194
+ PRIVATE/
195
+ private/
196
+
197
+ # Signed CLA records (if mirrored locally instead of via CLA Assistant)
198
+ signed_clas/
199
+ contributor_records/
200
+
201
+ # Commercial license agreements (executed contracts, customer data)
202
+ commercial_licenses/
203
+ customer_contracts/
204
+
205
+ # =============================================================================
206
+ # Build and deployment artifacts
207
+ # =============================================================================
208
+ node_modules/
209
+ .npm
210
+ .yarn-integrity
211
+ package-lock.json
212
+ yarn.lock
213
+
214
+ # Generated documentation
215
+ site/
216
+ _site/
217
+ docs/_build/
218
+ docs/.doctrees/
219
+
220
+ # Profiling
221
+ *.prof
222
+ *.lprof
223
+ profile_*.txt
224
+
225
+ # Logs
226
+ *.log
227
+ logs/
228
+ *.log.*
229
+
230
+ # =============================================================================
231
+ # Miscellaneous
232
+ # =============================================================================
233
+ # Backup files
234
+ *.bak
235
+ *.backup
236
+ *.old
237
+ *.orig
238
+ *.rej
239
+
240
+ # Archive files (unless intentionally committed)
241
+ *.zip
242
+ *.tar
243
+ *.tar.gz
244
+ *.tgz
245
+ *.rar
246
+ *.7z
247
+
248
+ # Temporary files
249
+ tmp/
250
+ temp/
251
+ .tmp/
252
+ *.tmp
253
+
254
+ # Generated files
255
+ *.generated.*
256
+ generated/
@@ -0,0 +1,50 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project aims to
5
+ follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.0] - 2026-05-24
10
+
11
+ First public release: the storage layer, the Fetch tool, and the Search tool.
12
+
13
+ ### Added
14
+
15
+ - Project scaffolding: AGPL-3.0 license, code of conduct, contribution guide,
16
+ Contributor License Agreements, issue and Pull Request templates.
17
+ - `pyproject.toml` with hatchling builds, ruff, mypy (strict on `src/`), and
18
+ pytest configuration.
19
+ - Core infrastructure:
20
+ - SQLite storage layer with a numbered migration runner, WAL journaling, and
21
+ foreign keys enforced. Full-text search via FTS5; an optional sqlite-vec
22
+ vector table is created when the extension is available.
23
+ - Pydantic v2 domain models for channels, playlists, videos, transcripts,
24
+ quotes, summaries, topics, and jobs.
25
+ - YouTube URL parsing for channel, playlist, and video forms plus bare
26
+ identifiers.
27
+ - Async yt-dlp wrappers for listing, metadata, and caption downloads, with
28
+ typed errors for unavailable, members-only, and live videos.
29
+ - WebVTT parsing that strips tags and speaker labels and collapses rolling
30
+ caption duplication into timestamped segments.
31
+ - Transcript exporters for `.txt`, `.md` (with timestamp links), `.srt`, and
32
+ `.json`, plus a zip bundler.
33
+ - An in-process publish/subscribe progress bus for server-sent events.
34
+ - An LLM provider abstraction with a fully wired local Ollama provider and
35
+ config-aware stubs for the three hosted providers (completion arrives in a
36
+ later release).
37
+ - Fetch tool: a worker-pool job that downloads metadata and transcripts, skips
38
+ already-fetched videos unless forced or stale, and reports per-video progress.
39
+ - Search tool: BM25-ranked full-text search with snippet highlighting,
40
+ timestamp deep-links, and channel, date, and duration filters.
41
+ - Web UI: a FastAPI application serving Fetch, Search, and Settings pages with a
42
+ server-sent-events progress feed; built with Jinja2, Tailwind, and Alpine.
43
+ - Command-line interface: `fetch`, `search`, `list`, `serve`, `config`, `db`,
44
+ and `version`.
45
+ - Continuous integration across Linux, macOS, and Windows on Python 3.11 to
46
+ 3.13, and a tag-triggered release workflow that publishes to PyPI via trusted
47
+ publishing.
48
+
49
+ [Unreleased]: https://github.com/nicholsbill/YTtools/compare/v0.1.0...HEAD
50
+ [0.1.0]: https://github.com/nicholsbill/YTtools/releases/tag/v0.1.0