kash-media 0.3.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 (49) hide show
  1. kash_media-0.3.0/.copier-answers.yml +9 -0
  2. kash_media-0.3.0/.github/workflows/ci.yml +66 -0
  3. kash_media-0.3.0/.github/workflows/publish.yml +47 -0
  4. kash_media-0.3.0/.gitignore +179 -0
  5. kash_media-0.3.0/LICENSE +664 -0
  6. kash_media-0.3.0/Makefile +34 -0
  7. kash_media-0.3.0/PKG-INFO +67 -0
  8. kash_media-0.3.0/README.md +49 -0
  9. kash_media-0.3.0/development.md +88 -0
  10. kash_media-0.3.0/devtools/lint.py +46 -0
  11. kash_media-0.3.0/examples/deep_transcribe.py +102 -0
  12. kash_media-0.3.0/pyproject.toml +184 -0
  13. kash_media-0.3.0/src/kash/__init__.py +2 -0
  14. kash_media-0.3.0/src/kash/kits/__init__.py +2 -0
  15. kash_media-0.3.0/src/kash/kits/media/__init__.py +6 -0
  16. kash_media-0.3.0/src/kash/kits/media/__main__.py +4 -0
  17. kash_media-0.3.0/src/kash/kits/media/actions/__init__.py +0 -0
  18. kash_media-0.3.0/src/kash/kits/media/actions/add_description.py +44 -0
  19. kash_media-0.3.0/src/kash/kits/media/actions/add_summary_bullets.py +43 -0
  20. kash_media-0.3.0/src/kash/kits/media/actions/backfill_timestamps.py +167 -0
  21. kash_media-0.3.0/src/kash/kits/media/actions/break_into_paragraphs.py +84 -0
  22. kash_media-0.3.0/src/kash/kits/media/actions/caption_paras.py +119 -0
  23. kash_media-0.3.0/src/kash/kits/media/actions/create_pdf.py +55 -0
  24. kash_media-0.3.0/src/kash/kits/media/actions/describe_briefly.py +43 -0
  25. kash_media-0.3.0/src/kash/kits/media/actions/identify_speakers.py +80 -0
  26. kash_media-0.3.0/src/kash/kits/media/actions/insert_frame_captures.py +138 -0
  27. kash_media-0.3.0/src/kash/kits/media/actions/insert_section_headings.py +58 -0
  28. kash_media-0.3.0/src/kash/kits/media/actions/list_channel.py +38 -0
  29. kash_media-0.3.0/src/kash/kits/media/actions/remove_speaker_labels.py +38 -0
  30. kash_media-0.3.0/src/kash/kits/media/actions/transcribe.py +44 -0
  31. kash_media-0.3.0/src/kash/kits/media/actions/transcribe_annotate_summarize.py +36 -0
  32. kash_media-0.3.0/src/kash/kits/media/actions/transcribe_format.py +35 -0
  33. kash_media-0.3.0/src/kash/kits/media/libs/__init__.py +17 -0
  34. kash_media-0.3.0/src/kash/kits/media/libs/image_similarity.py +44 -0
  35. kash_media-0.3.0/src/kash/kits/media/libs/media_preconditions.py +16 -0
  36. kash_media-0.3.0/src/kash/kits/media/libs/pdf_output.py +103 -0
  37. kash_media-0.3.0/src/kash/kits/media/libs/services/__init__.py +0 -0
  38. kash_media-0.3.0/src/kash/kits/media/libs/services/apple_podcasts.py +193 -0
  39. kash_media-0.3.0/src/kash/kits/media/libs/services/vimeo.py +130 -0
  40. kash_media-0.3.0/src/kash/kits/media/libs/services/youtube.py +252 -0
  41. kash_media-0.3.0/src/kash/kits/media/libs/speaker_labels.py +53 -0
  42. kash_media-0.3.0/src/kash/kits/media/libs/templates/pdf_styles.css.jinja +39 -0
  43. kash_media-0.3.0/src/kash/kits/media/libs/templates/youtube_gallery.html.jinja +15 -0
  44. kash_media-0.3.0/src/kash/kits/media/libs/video_frames.py +77 -0
  45. kash_media-0.3.0/src/kash/kits/media/libs/video_gallery.py +87 -0
  46. kash_media-0.3.0/src/kash/kits/media/libs/yt_dlp_tools.py +119 -0
  47. kash_media-0.3.0/tests/empty.py +0 -0
  48. kash_media-0.3.0/tests/test_example.py +3 -0
  49. kash_media-0.3.0/uv.lock +3020 -0
@@ -0,0 +1,9 @@
1
+ # Changes here will be overwritten by Copier. Do not edit manually.
2
+ _commit: v0.1.0-6-g36d4517
3
+ _src_path: gh:jlevy/simple-modern-uv
4
+ package_author_email: joshua@cal.berkeley.edu
5
+ package_author_name: Joshua Levy
6
+ package_description: The knowledge agent shell (media kit)
7
+ package_github_org: jlevy
8
+ package_module: kash
9
+ package_name: kash-media
@@ -0,0 +1,66 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: CI
5
+
6
+ on:
7
+ push:
8
+ # Use ["main", "master"] for CI only on the default branch.
9
+ # Use ["**"] for CI on all branches.
10
+ branches: ["main", "master"]
11
+ pull_request:
12
+ branches: ["main", "master"]
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ build:
19
+ strategy:
20
+ matrix:
21
+ # Update this as needed:
22
+ # Common platforms: ["ubuntu-latest", "macos-latest", "windows-latest"]
23
+ os: ["ubuntu-latest"]
24
+ python-version: ["3.11", "3.12", "3.13"]
25
+
26
+ # Linux only by default. Use ${{ matrix.os }} for other OSes.
27
+ runs-on: ${{ matrix.os }}
28
+
29
+ environment: CI Env
30
+
31
+ steps:
32
+ # Generally following uv docs:
33
+ # https://docs.astral.sh/uv/guides/integration/github/
34
+
35
+ - name: Checkout (official GitHub action)
36
+ uses: actions/checkout@v4
37
+ with:
38
+ # Important for versioning plugins:
39
+ fetch-depth: 0
40
+
41
+ - name: Install uv (official Astral action)
42
+ uses: astral-sh/setup-uv@v5
43
+ with:
44
+ version: "0.6.5"
45
+ enable-cache: true
46
+ python-version: ${{ matrix.python-version }}
47
+
48
+ - name: Set up Python (using uv)
49
+ run: uv python install
50
+
51
+ # Alternately can use the official Python action:
52
+ # - name: Set up Python (using actions/setup-python)
53
+ # uses: actions/setup-python@v5
54
+ # with:
55
+ # python-version: ${{ matrix.python-version }}
56
+
57
+ - name: Install all dependencies
58
+ run: uv sync --all-extras --dev
59
+
60
+ - name: Run linting
61
+ run: uv run python devtools/lint.py
62
+
63
+ - name: Run tests
64
+ run: uv run pytest
65
+ env:
66
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -0,0 +1,47 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch: # Enable manual trigger.
7
+
8
+ jobs:
9
+ build-and-publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ environment: CI Env
13
+
14
+ permissions:
15
+ id-token: write # Mandatory for OIDC.
16
+ contents: read
17
+
18
+ steps:
19
+ - name: Checkout (official GitHub action)
20
+ uses: actions/checkout@v4
21
+ with:
22
+ # Important for versioning plugins:
23
+ fetch-depth: 0
24
+
25
+ - name: Install uv (official Astral action)
26
+ uses: astral-sh/setup-uv@v5
27
+ with:
28
+ version: "0.6.5"
29
+ enable-cache: true
30
+ python-version: "3.12"
31
+
32
+ - name: Set up Python (using uv)
33
+ run: uv python install
34
+
35
+ - name: Install all dependencies
36
+ run: uv sync --all-extras --dev
37
+
38
+ - name: Run tests
39
+ run: uv run pytest
40
+ env:
41
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
42
+
43
+ - name: Build package
44
+ run: uv build
45
+
46
+ - name: Publish to PyPI (using uv)
47
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,179 @@
1
+ # Additions to standard GitHub .gitignore:
2
+ *.bak
3
+ *.orig
4
+ tmp/
5
+ trash/
6
+ attic/
7
+ .kash/
8
+
9
+ # Byte-compiled / optimized / DLL files
10
+ __pycache__/
11
+ *.py[cod]
12
+ *$py.class
13
+
14
+ # C extensions
15
+ *.so
16
+
17
+ # Distribution / packaging
18
+ .Python
19
+ build/
20
+ develop-eggs/
21
+ dist/
22
+ downloads/
23
+ eggs/
24
+ .eggs/
25
+ lib/
26
+ lib64/
27
+ parts/
28
+ sdist/
29
+ var/
30
+ wheels/
31
+ share/python-wheels/
32
+ *.egg-info/
33
+ .installed.cfg
34
+ *.egg
35
+ MANIFEST
36
+
37
+ # PyInstaller
38
+ # Usually these files are written by a python script from a template
39
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
40
+ *.manifest
41
+ *.spec
42
+
43
+ # Installer logs
44
+ pip-log.txt
45
+ pip-delete-this-directory.txt
46
+
47
+ # Unit test / coverage reports
48
+ htmlcov/
49
+ .tox/
50
+ .nox/
51
+ .coverage
52
+ .coverage.*
53
+ .cache
54
+ nosetests.xml
55
+ coverage.xml
56
+ *.cover
57
+ *.py,cover
58
+ .hypothesis/
59
+ .pytest_cache/
60
+ cover/
61
+
62
+ # Translations
63
+ *.mo
64
+ *.pot
65
+
66
+ # Django stuff:
67
+ *.log
68
+ local_settings.py
69
+ db.sqlite3
70
+ db.sqlite3-journal
71
+
72
+ # Flask stuff:
73
+ instance/
74
+ .webassets-cache
75
+
76
+ # Scrapy stuff:
77
+ .scrapy
78
+
79
+ # Sphinx documentation
80
+ docs/_build/
81
+
82
+ # PyBuilder
83
+ .pybuilder/
84
+ target/
85
+
86
+ # Jupyter Notebook
87
+ .ipynb_checkpoints
88
+
89
+ # IPython
90
+ profile_default/
91
+ ipython_config.py
92
+
93
+ # pyenv
94
+ # For a library or package, you might want to ignore these files since the code is
95
+ # intended to run in multiple environments; otherwise, check them in:
96
+ # .python-version
97
+
98
+ # pipenv
99
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
100
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
101
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
102
+ # install all needed dependencies.
103
+ #Pipfile.lock
104
+
105
+ # UV
106
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
107
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
108
+ # commonly ignored for libraries.
109
+ #uv.lock
110
+
111
+ # poetry
112
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
113
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
114
+ # commonly ignored for libraries.
115
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
116
+ #poetry.lock
117
+
118
+ # pdm
119
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
120
+ #pdm.lock
121
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
122
+ # in version control.
123
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
124
+ .pdm.toml
125
+ .pdm-python
126
+ .pdm-build/
127
+
128
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
129
+ __pypackages__/
130
+
131
+ # Celery stuff
132
+ celerybeat-schedule
133
+ celerybeat.pid
134
+
135
+ # SageMath parsed files
136
+ *.sage.py
137
+
138
+ # Environments
139
+ .env
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ #.idea/
177
+
178
+ # PyPI configuration file
179
+ .pypirc