yt-dlp.rb 0.3.1 → 0.4.0
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.
- checksums.yaml +4 -4
- data/.github/workflows/auto_update.yml +102 -0
- data/.github/workflows/ci.yml +2 -33
- data/.github/workflows/publish_gem.yml +1 -1
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/1.0_RELEASE_GOALS.md +1 -1
- data/CHANGELOG.md +0 -4
- data/Gemfile +0 -1
- data/Rakefile +15 -0
- data/lib/yt-dlp/version.rb +1 -1
- data/lib/yt-dlp.rb +0 -7
- data/vendor/bin/yt-dlp +0 -0
- data/vendor/bin/yt-dlp.exe +0 -0
- data/yt-dlp.rb.gemspec +4 -5
- metadata +14 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de6281ff8d16272f5519a4e33001a3895ce4cb38152edb44e81abd34277abb39
|
|
4
|
+
data.tar.gz: 814ce6a781aad8cf1cbcc368ebc108603ba7f0aeca4f7a68de54741c9b309705
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dce11e9f0536bbeaeeed31980a7053a49feeeb808a7b4977864c3164e6c15dd5ad44f347b6eb7d89f85b15611caba61731b93647fe32b5b00f6a62e04b1d886f
|
|
7
|
+
data.tar.gz: ac14aa209880b47f2bc210f54ef577833f13a149ebd3e1ec4e34b8133b7b8512a96bacc00de11c0f1a0d2ad84b11a726d9c2d36f6194dd50df04b3cec06219b1
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
name: Auto Update yt-dlp
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
# Run daily at 23:00 UTC
|
|
6
|
+
- cron: '0 23 * * *'
|
|
7
|
+
workflow_dispatch: # Allow manual trigger
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
check-and-release:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout code
|
|
17
|
+
uses: actions/checkout@v5
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- name: Setup Ruby
|
|
22
|
+
uses: ruby/setup-ruby@v1
|
|
23
|
+
with:
|
|
24
|
+
bundler-cache: true
|
|
25
|
+
|
|
26
|
+
- name: Get current yt-dlp version
|
|
27
|
+
id: current_version
|
|
28
|
+
run: |
|
|
29
|
+
CURRENT_VERSION=$(vendor/bin/yt-dlp --version)
|
|
30
|
+
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
|
31
|
+
echo "Current yt-dlp version: $CURRENT_VERSION"
|
|
32
|
+
|
|
33
|
+
- name: Download latest yt-dlp binaries
|
|
34
|
+
run: bundle exec rake binaries:latest
|
|
35
|
+
|
|
36
|
+
- name: Get new yt-dlp version
|
|
37
|
+
id: new_version
|
|
38
|
+
run: |
|
|
39
|
+
chmod +x vendor/bin/yt-dlp
|
|
40
|
+
NEW_VERSION=$(vendor/bin/yt-dlp --version)
|
|
41
|
+
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
|
42
|
+
echo "New yt-dlp version: $NEW_VERSION"
|
|
43
|
+
|
|
44
|
+
- name: Check if version changed
|
|
45
|
+
id: version_check
|
|
46
|
+
run: |
|
|
47
|
+
if [ "${{ steps.current_version.outputs.version }}" != "${{ steps.new_version.outputs.version }}" ]; then
|
|
48
|
+
echo "changed=true" >> $GITHUB_OUTPUT
|
|
49
|
+
echo "Version changed from ${{ steps.current_version.outputs.version }} to ${{ steps.new_version.outputs.version }}"
|
|
50
|
+
else
|
|
51
|
+
echo "changed=false" >> $GITHUB_OUTPUT
|
|
52
|
+
echo "No version change detected"
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
- name: Increment gem version
|
|
56
|
+
if: steps.version_check.outputs.changed == 'true'
|
|
57
|
+
id: increment_version
|
|
58
|
+
run: |
|
|
59
|
+
CURRENT_GEM_VERSION=$(grep "VERSION = " lib/yt-dlp/version.rb | cut -d"'" -f2)
|
|
60
|
+
echo "Current gem version: $CURRENT_GEM_VERSION"
|
|
61
|
+
|
|
62
|
+
# Parse version components
|
|
63
|
+
IFS='.' read -r major minor patch <<< "$CURRENT_GEM_VERSION"
|
|
64
|
+
|
|
65
|
+
# Increment minor version and reset patch to 0
|
|
66
|
+
minor=$((minor + 1))
|
|
67
|
+
NEW_GEM_VERSION="${major}.${minor}.0"
|
|
68
|
+
|
|
69
|
+
echo "New gem version: $NEW_GEM_VERSION"
|
|
70
|
+
echo "version=$NEW_GEM_VERSION" >> $GITHUB_OUTPUT
|
|
71
|
+
|
|
72
|
+
# Update version.rb
|
|
73
|
+
sed -i "s/VERSION = '${CURRENT_GEM_VERSION}'/VERSION = '${NEW_GEM_VERSION}'/" lib/yt-dlp/version.rb
|
|
74
|
+
|
|
75
|
+
- name: Update CHANGELOG
|
|
76
|
+
if: steps.version_check.outputs.changed == 'true'
|
|
77
|
+
run: |
|
|
78
|
+
DATE=$(date +%Y-%m-%d)
|
|
79
|
+
NEW_ENTRY="## [${{ steps.increment_version.outputs.version }}] - ${DATE}\n### Added\n- Upgraded yt-dlp binary to version \"${{ steps.new_version.outputs.version }}\"\n"
|
|
80
|
+
|
|
81
|
+
# Insert new entry after the "# Changelog" header
|
|
82
|
+
sed -i "2i\\${NEW_ENTRY}" CHANGELOG.md
|
|
83
|
+
|
|
84
|
+
- name: Configure Git
|
|
85
|
+
if: steps.version_check.outputs.changed == 'true'
|
|
86
|
+
run: |
|
|
87
|
+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
88
|
+
git config --local user.name "github-actions[bot]"
|
|
89
|
+
|
|
90
|
+
- name: Commit and tag changes
|
|
91
|
+
if: steps.version_check.outputs.changed == 'true'
|
|
92
|
+
run: |
|
|
93
|
+
git add lib/yt-dlp/version.rb CHANGELOG.md vendor/bin/yt-dlp vendor/bin/yt-dlp.exe
|
|
94
|
+
git commit -m "Release v${{ steps.increment_version.outputs.version }}: Update yt-dlp to ${{ steps.new_version.outputs.version }}"
|
|
95
|
+
git tag "v${{ steps.increment_version.outputs.version }}"
|
|
96
|
+
git push origin HEAD:master
|
|
97
|
+
git push origin "v${{ steps.increment_version.outputs.version }}"
|
|
98
|
+
|
|
99
|
+
- name: No update needed
|
|
100
|
+
if: steps.version_check.outputs.changed == 'false'
|
|
101
|
+
run: echo "yt-dlp is already at the latest version"
|
|
102
|
+
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -4,51 +4,20 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
branches: [ master ]
|
|
6
6
|
pull_request:
|
|
7
|
-
branches: [ master ]
|
|
8
7
|
|
|
9
8
|
jobs:
|
|
10
|
-
ruby_dependencies:
|
|
11
|
-
name: Ruby - download and cache dependencies
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- name: Checkout code
|
|
16
|
-
uses: actions/checkout@v2
|
|
17
|
-
|
|
18
|
-
- name: Setup Ruby
|
|
19
|
-
uses: ruby/setup-ruby@v1
|
|
20
|
-
|
|
21
|
-
- name: Ruby gem cache
|
|
22
|
-
uses: actions/cache@v1
|
|
23
|
-
with:
|
|
24
|
-
path: vendor/bundle
|
|
25
|
-
key: gems-${{ hashFiles('**/Gemfile.lock') }}
|
|
26
|
-
restore-keys: gems-
|
|
27
|
-
|
|
28
|
-
- name: Install gems
|
|
29
|
-
run: bundle install --jobs 4 --retry 3 --path vendor/bundle
|
|
30
|
-
|
|
31
9
|
tests:
|
|
32
10
|
name: Run tests
|
|
33
11
|
runs-on: ubuntu-latest
|
|
34
|
-
needs: ruby_dependencies
|
|
35
12
|
|
|
36
13
|
steps:
|
|
37
14
|
- name: Checkout code
|
|
38
|
-
uses: actions/checkout@
|
|
15
|
+
uses: actions/checkout@v5
|
|
39
16
|
|
|
40
17
|
- name: Setup Ruby
|
|
41
18
|
uses: ruby/setup-ruby@v1
|
|
42
|
-
|
|
43
|
-
- name: Ruby gem cache
|
|
44
|
-
uses: actions/cache@v1
|
|
45
19
|
with:
|
|
46
|
-
|
|
47
|
-
key: gems-${{ hashFiles('**/Gemfile.lock') }}
|
|
48
|
-
restore-keys: gems-
|
|
49
|
-
|
|
50
|
-
- name: Install gems
|
|
51
|
-
run: bundle install --jobs 4 --retry 3 --path vendor/bundle
|
|
20
|
+
bundler-cache: true
|
|
52
21
|
|
|
53
22
|
- name: Run tests
|
|
54
23
|
run: bundle exec rake test
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3.3.8
|
data/1.0_RELEASE_GOALS.md
CHANGED
|
@@ -4,4 +4,4 @@ yt-dlp.rb hits 1.0 when:
|
|
|
4
4
|
* [x] It works on Windows
|
|
5
5
|
* [ ] It fully supports all features of yt-dlp in a Ruby-friendly way
|
|
6
6
|
* [ ] It supports logging
|
|
7
|
-
* [
|
|
7
|
+
* [x] [It uses v1.0 Terrapin](https://github.com/thoughtbot/terrapin/blob/master/GOALS)
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
|
@@ -10,6 +10,11 @@ end
|
|
|
10
10
|
|
|
11
11
|
task default: [:test]
|
|
12
12
|
|
|
13
|
+
desc 'Start an interactive console with the gem loaded'
|
|
14
|
+
task :console do
|
|
15
|
+
exec 'irb', '-Ilib', '-ryt-dlp'
|
|
16
|
+
end
|
|
17
|
+
|
|
13
18
|
namespace :binaries do
|
|
14
19
|
def get_binaries(version)
|
|
15
20
|
puts 'Updating python script'
|
|
@@ -22,6 +27,16 @@ namespace :binaries do
|
|
|
22
27
|
task :version, [:ver] do |_t, a|
|
|
23
28
|
get_binaries(a[:ver])
|
|
24
29
|
end
|
|
30
|
+
|
|
31
|
+
desc 'Get latest version'
|
|
32
|
+
task :latest do
|
|
33
|
+
# title = "Release yt-dlp 2025.10.22 · yt-dlp/yt-dlp"
|
|
34
|
+
title = `curl -sL https://github.com/yt-dlp/yt-dlp/releases/latest | grep -oE '<title>[^<]+</title>' | sed 's/<title>//;s/<\\/title>//'`.strip
|
|
35
|
+
puts "Title: #{title}"
|
|
36
|
+
latest_version = title.match(/yt-dlp (\d+\.\d+\.\d+)/)[1]
|
|
37
|
+
puts "Latest version: #{latest_version}"
|
|
38
|
+
get_binaries(latest_version)
|
|
39
|
+
end
|
|
25
40
|
end
|
|
26
41
|
|
|
27
42
|
__END__
|
data/lib/yt-dlp/version.rb
CHANGED
data/lib/yt-dlp.rb
CHANGED
|
@@ -51,11 +51,4 @@ module YtDlp
|
|
|
51
51
|
def binary_version
|
|
52
52
|
@binary_version ||= terrapin_line('--version').run.strip
|
|
53
53
|
end
|
|
54
|
-
|
|
55
|
-
# Returns user agent
|
|
56
|
-
#
|
|
57
|
-
# @return [String] user agent
|
|
58
|
-
def user_agent
|
|
59
|
-
@user_agent ||= terrapin_line('--dump-user-agent').run.strip
|
|
60
|
-
end
|
|
61
54
|
end
|
data/vendor/bin/yt-dlp
CHANGED
|
Binary file
|
data/vendor/bin/yt-dlp.exe
CHANGED
|
Binary file
|
data/yt-dlp.rb.gemspec
CHANGED
|
@@ -20,11 +20,10 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
spec.require_paths = ['lib']
|
|
21
21
|
spec.required_ruby_version = '>= 2.6'
|
|
22
22
|
|
|
23
|
-
spec.add_dependency 'terrapin', '
|
|
23
|
+
spec.add_dependency 'terrapin', '~> 1.1'
|
|
24
24
|
|
|
25
25
|
spec.add_development_dependency 'bundler', '>= 1.6'
|
|
26
|
-
spec.add_development_dependency '
|
|
27
|
-
spec.add_development_dependency '
|
|
28
|
-
spec.add_development_dependency '
|
|
29
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
|
26
|
+
spec.add_development_dependency 'minitest'
|
|
27
|
+
spec.add_development_dependency 'nicetest'
|
|
28
|
+
spec.add_development_dependency 'rake'
|
|
30
29
|
end
|
metadata
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yt-dlp.rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- andrepcg
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: terrapin
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- - "
|
|
16
|
+
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
18
|
+
version: '1.1'
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
|
-
- - "
|
|
23
|
+
- - "~>"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
25
|
+
version: '1.1'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: bundler
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -39,7 +38,7 @@ dependencies:
|
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
39
|
version: '1.6'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
41
|
+
name: minitest
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
44
43
|
requirements:
|
|
45
44
|
- - ">="
|
|
@@ -53,21 +52,7 @@ dependencies:
|
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
53
|
version: '0'
|
|
55
54
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: 5.14.3
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "~>"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: 5.14.3
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: purdytest
|
|
55
|
+
name: nicetest
|
|
71
56
|
requirement: !ruby/object:Gem::Requirement
|
|
72
57
|
requirements:
|
|
73
58
|
- - ">="
|
|
@@ -84,16 +69,16 @@ dependencies:
|
|
|
84
69
|
name: rake
|
|
85
70
|
requirement: !ruby/object:Gem::Requirement
|
|
86
71
|
requirements:
|
|
87
|
-
- - "
|
|
72
|
+
- - ">="
|
|
88
73
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
74
|
+
version: '0'
|
|
90
75
|
type: :development
|
|
91
76
|
prerelease: false
|
|
92
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
78
|
requirements:
|
|
94
|
-
- - "
|
|
79
|
+
- - ">="
|
|
95
80
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
81
|
+
version: '0'
|
|
97
82
|
description: yt-dlp.rb is a command line wrapper for the python script yt-dlp
|
|
98
83
|
email:
|
|
99
84
|
- andrepcg@gmail.com
|
|
@@ -101,6 +86,7 @@ executables: []
|
|
|
101
86
|
extensions: []
|
|
102
87
|
extra_rdoc_files: []
|
|
103
88
|
files:
|
|
89
|
+
- ".github/workflows/auto_update.yml"
|
|
104
90
|
- ".github/workflows/ci.yml"
|
|
105
91
|
- ".github/workflows/publish_gem.yml"
|
|
106
92
|
- ".gitignore"
|
|
@@ -126,7 +112,6 @@ homepage: https://github.com/andrepcg/yt-dlp.rb
|
|
|
126
112
|
licenses:
|
|
127
113
|
- MIT
|
|
128
114
|
metadata: {}
|
|
129
|
-
post_install_message:
|
|
130
115
|
rdoc_options: []
|
|
131
116
|
require_paths:
|
|
132
117
|
- lib
|
|
@@ -141,8 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
141
126
|
- !ruby/object:Gem::Version
|
|
142
127
|
version: '0'
|
|
143
128
|
requirements: []
|
|
144
|
-
rubygems_version: 3.
|
|
145
|
-
signing_key:
|
|
129
|
+
rubygems_version: 3.6.9
|
|
146
130
|
specification_version: 4
|
|
147
131
|
summary: yt-dlp wrapper for Ruby
|
|
148
132
|
test_files: []
|