Skip to content

Commit 1085bc0

Browse files
committed
clean up scripts, tweak subtitles
1 parent c42b85c commit 1085bc0

File tree

7 files changed

+25
-1035
lines changed

7 files changed

+25
-1035
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ poetry install --no-root
1414
poetry self add poetry-plugin-shell
1515
poetry shell
1616

17+
# Set up pre-commit hooks
18+
poetry run pre-commit install
19+
20+
# Verify pre-commit hooks are working
21+
poetry run pre-commit run --all-files
22+
23+
# See notebook_precommit.md for more details on how notebook outputs are automatically stripped
24+
1725
# Install Jupyter kernel for this environment (needed for Jupyter notebooks)
1826
python -m ipykernel install --user --name=tgov-scraper --display-name="TGOV Scraper"
1927
```
@@ -44,7 +52,7 @@ pytest -v
4452
- 'scripts`: one off scripts for downloading, conversions, etc
4553
- `tests/`: Test files
4654
- `notebooks/`: Jupyter notebooks for analysis and exploration
47-
- `data/`: output from notebooks
55+
- `data/`: output from notebooks
4856

4957

5058
## Running the transcription scripts
File renamed without changes.

notebooks/vtt_subtitles.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@
7070
"\n",
7171
"# Import from the new subtitles module\n",
7272
"from src.subtitles import create_track, load_transcript\n",
73-
"from src.models.subtitles import TrackFormat\n",
73+
"from src.models.subtitles import SubtitleTrack\n",
7474
"\n",
7575
"# Path to the transcript file\n",
7676
"transcript_file = Path(\n",
7777
" \"../data/transcripts/regular_council_meeting___2025_02_26.diarized.json\"\n",
7878
")\n",
7979
"\n",
8080
"# Create VTT track\n",
81-
"vtt_track = create_track(\n",
81+
"vtt_track: SubtitleTrack = create_track(\n",
8282
" transcript_data=transcript_file,\n",
83-
" track_format='vtt',\n",
83+
" format='vtt',\n",
8484
" max_duration=5.0,\n",
8585
" include_speaker_prefix=False,\n",
8686
")\n",

scripts/download_m3u8.py

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
 (0)