Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install package
run: python -m pip install .

- name: Run unit tests
run: python -m unittest discover -s tests -v

- name: Smoke test console entry point
run: ccastplayer --help
43 changes: 30 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,54 @@ Subtitles can be supplied using a separate VTT file.
By default the first Chromecast device discovered on the local
network is used.

## Setup
## Installation

Install the dependency with:
Install from PyPI with `pip`:
```sh
pip install ccastplayer
```
pip install -r requirements.txt

Install from PyPI with `pipx`:
```sh
pipx install ccastplayer
```

Example usage with a local video file:
Install from PyPI with `uv`:
```sh
uv tool install ccastplayer
```
ccastplayer.py myvideo.mp4

Install directly from the GitHub repository:
```sh
pip install "ccastplayer @ git+https://github.com/snabb/ccastplayer.git"
pipx install git+https://github.com/snabb/ccastplayer.git
uv tool install git+https://github.com/snabb/ccastplayer.git
```

Example usage with a local video and subtitles file:
Example usage with a local video file:
```sh
ccastplayer myvideo.mp4
```
ccastplayer.py myvideo.mp4 --subs mysubs.vtt

Example usage with a local video and subtitles file:
```sh
ccastplayer myvideo.mp4 --subs mysubs.vtt
```

Example usage with a remote video file:
```
ccastplayer.py http://example.org/videos/myvideo.mp4
```sh
ccastplayer http://example.org/videos/myvideo.mp4
```

If the script is unable to auto-discover the device in your local network,
you can supply the IP address with the `--chromecast-ip` option:
```
ccastplayer.py --chromecast-ip 192.0.2.123 example.mkv
```sh
ccastplayer --chromecast-ip 192.0.2.123 example.mkv
```

More help on command line options:
```
ccastplayer.py --help
```sh
ccastplayer --help
```

Run the test suite with:
Expand Down
33 changes: 33 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "ccastplayer"
version = "1.0.0"
dependencies = ["PyChromecast"]
requires-python = ">=3.9"
authors = [
{name = "Janne Snabb"},
]
description = "CLI tool for streaming video file to Chromecast"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3",
"Environment :: Console",
"Topic :: Multimedia :: Video :: Display"
]

[project.urls]
Homepage = "https://github.com/snabb/ccastplayer/"
Repository = "https://github.com/snabb/ccastplayer.git"

[project.scripts]
ccastplayer = "ccastplayer:main"

[tool.hatch.build.targets.wheel]
sources = ["."]
include = ["ccastplayer.py"]
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

Loading