-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f289531
Showing
8 changed files
with
430 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Check | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- example/** | ||
- "**/*.md" | ||
- "**/*.yaml" | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
- name: 🧹 Lint | ||
uses: golangci/golangci-lint-action@v4 | ||
- name: Install dependencies | ||
run: go install gotest.tools/gotestsum@latest | ||
- name: 🧪 Test | ||
run: gotestsum --junitfile junit.xml --format testdox -- -race -coverprofile=coverage.out -covermode=atomic | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
name: release-please | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: googleapis/release-please-action@v4 | ||
id: release | ||
with: | ||
token: ${{ secrets.RELEASE_PLEASE_PAT }} | ||
release-type: simple | ||
- uses: actions/checkout@v4 | ||
if: ${{ steps.release.outputs.release_created }} | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v5 | ||
if: ${{ steps.release.outputs.release_created }} | ||
with: | ||
go-version: '1.20' | ||
- uses: goreleaser/goreleaser-action@v6 | ||
if: ${{ steps.release.outputs.release_created }} | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
# 'latest', 'nightly', or a semver | ||
version: '~> v2' | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
dist/ | ||
*.mp4 | ||
*.m3u8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
|
||
# The lines below are called `modelines`. See `:help modeline` | ||
# Feel free to remove those if you don't want/need to use them. | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
|
||
version: 2 | ||
|
||
builds: | ||
- ldflags: > | ||
-s -w | ||
- -X main.AppName={{.ProjectName}} | ||
- -X main.AppVersion={{.Version}} | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
archives: | ||
- format: tar.gz | ||
# this name template makes the OS and Arch compatible with the results of `uname`. | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
# use zip for windows archives | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright 2024 Ryan Schumacher | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# m3u8-downloader - download m3u8 files and convert to mp4 | ||
|
||
This project downloads a m3u8 file and converts it to mp4. It uses ffmpeg to convert the file. | ||
|
||
## Installation | ||
|
||
```bash | ||
go install github.com/jrschumacher/m3u8-downloader@latest | ||
``` | ||
|
||
## Usage | ||
|
||
```bash | ||
NAME | ||
m3u8-downloader - is a tool to download videos from m3u8 manifest files. | ||
|
||
SYNOPSIS | ||
m3u8-downloader [OPTIONS] <m3u8_manifest_url> | ||
|
||
OPTIONS | ||
-download | ||
Set to true to download the video | ||
-ffmpeg string | ||
Path to ffmpeg executable | ||
-filename string | ||
Filename of the downloaded video | ||
-help | ||
Show usage | ||
-version | ||
Show version | ||
|
||
EXAMPLES | ||
To extact the manifest file from a URL: | ||
m3u8-downloader https://example.com/video.m3u8 | ||
|
||
To download a video from a m3u8 manifest file: | ||
m3u8-downloader -download https://example.com/video.m3u8 | ||
|
||
To download a video from a m3u8 manifest file with a custom filename: | ||
m3u8-downloader -download -filename my_video https://example.com/video.m3u8 | ||
|
||
To download a video from a m3u8 manifest file with a custom ffmpeg path: | ||
m3u8-downloader -download -ffmpeg /usr/local/bin/ffmpeg https://example.com/video.m3u8 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module lit-download | ||
|
||
go 1.23.0 |
Oops, something went wrong.