Skip to content

Commit fe9967b

Browse files
authored
Initial commit
0 parents  commit fe9967b

10 files changed

Lines changed: 772 additions & 0 deletions

.github/dependabot.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
time: '11:07'
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: dottorrent-cli
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
name:
6+
description: Name of the torrent file
7+
required: true
8+
default: Firefox Setup 122.0.1
9+
comment:
10+
description: Comment
11+
required: true
12+
default: Firefox Setup 122.0.1 win64 en-US by torrent-webseed-creator
13+
url:
14+
description: URL of the file
15+
required: true
16+
default: https://download-installer.cdn.mozilla.net/pub/firefox/releases/122.0.1/win64/en-US/Firefox%20Setup%20122.0.1.exe
17+
file_name:
18+
description: File name of the file in the torrent
19+
required: true
20+
default: Firefox Setup 122.0.1.exe
21+
maximize_disk_space:
22+
description: Maximize disk space. Check if getting out of disk space error
23+
type: boolean
24+
25+
jobs:
26+
create_torrent:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Maximize disk space
30+
if: inputs.maximize_disk_space
31+
uses: easimon/maximize-build-space@v10
32+
with:
33+
remove-dotnet: true
34+
remove-android: true
35+
remove-haskell: true
36+
remove-codeql: true
37+
remove-docker-images: true
38+
39+
- name: Install dottorrent-cli
40+
run: pipx install dottorrent-cli
41+
42+
- name: Download file
43+
run: aria2c -x 16 -o "${{ inputs.file_name }}" "${{ inputs.url }}"
44+
45+
- name: Create torrent using dottorrent-cli
46+
run: dottorrent --web_seed "${{ inputs.url }}" --source "torrent-webseed-creator" --comment "${{ inputs.comment }}" "${{ inputs.file_name }}" "${{ inputs.name }}.torrent"
47+
48+
- name: Upload torrent file
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: ${{ inputs.name }}
52+
path: ${{ inputs.name }}.torrent
53+
compression-level: 0

.github/workflows/mktorrent.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: mktorrent
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
name:
6+
description: Name of the torrent file
7+
required: true
8+
default: Firefox Setup 122.0.1
9+
comment:
10+
description: Comment
11+
required: true
12+
default: Firefox Setup 122.0.1 win64 en-US by torrent-webseed-creator
13+
url:
14+
description: URL of the file
15+
required: true
16+
default: https://download-installer.cdn.mozilla.net/pub/firefox/releases/122.0.1/win64/en-US/Firefox%20Setup%20122.0.1.exe
17+
file_name:
18+
description: File name of the file in the torrent
19+
required: true
20+
default: Firefox Setup 122.0.1.exe
21+
piece_size:
22+
description: Piece Size. Use the recommended piece size on the README.md file. mktorrent does not support automatic calculation
23+
required: true
24+
default: 19
25+
maximize_disk_space:
26+
description: Maximize disk space. Check if getting out of disk space error
27+
type: boolean
28+
29+
jobs:
30+
create_torrent:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Maximize disk space
34+
if: inputs.maximize_disk_space
35+
uses: easimon/maximize-build-space@v10
36+
with:
37+
remove-dotnet: true
38+
remove-android: true
39+
remove-haskell: true
40+
remove-codeql: true
41+
remove-docker-images: true
42+
43+
- name: Install mktorrent
44+
run: sudo apt-get -qq -y install mktorrent
45+
46+
- name: Download file
47+
run: aria2c -x 16 -o "${{ inputs.file_name }}" "${{ inputs.url }}"
48+
49+
- name: Create torrent using mktorrent
50+
run: mktorrent -c "${{ inputs.comment }}" -l "${{ inputs.piece_size }}" -o "${{ inputs.name }}.torrent" -s "torrent-webseed-creator" -w "${{ inputs.url }}" "${{ inputs.file_name }}"
51+
52+
- name: Upload torrent file
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: ${{ inputs.name }}
56+
path: ${{ inputs.name }}.torrent
57+
compression-level: 0
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: py3createtorrent
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
name:
6+
description: Name of the torrent file
7+
required: true
8+
default: Firefox Setup 122.0.1
9+
comment:
10+
description: Comment
11+
required: true
12+
default: Firefox Setup 122.0.1 win64 en-US by torrent-webseed-creator
13+
url:
14+
description: URL of the file
15+
required: true
16+
default: https://download-installer.cdn.mozilla.net/pub/firefox/releases/122.0.1/win64/en-US/Firefox%20Setup%20122.0.1.exe
17+
file_name:
18+
description: File name of the file in the torrent
19+
required: true
20+
default: Firefox Setup 122.0.1.exe
21+
piece_size:
22+
description: Piece Size. Use 0 for automatic calculation, or use the recommended piece size on the README.md file
23+
required: true
24+
default: 0
25+
maximize_disk_space:
26+
description: Maximize disk space. Check if getting out of disk space error
27+
type: boolean
28+
29+
jobs:
30+
create_torrent:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Maximize disk space
34+
if: inputs.maximize_disk_space
35+
uses: easimon/maximize-build-space@v10
36+
with:
37+
remove-dotnet: true
38+
remove-android: true
39+
remove-haskell: true
40+
remove-codeql: true
41+
remove-docker-images: true
42+
43+
- name: Install py3createtorrent
44+
run: pipx install py3createtorrent
45+
46+
- name: Download file
47+
run: aria2c -x 16 -o "${{ inputs.file_name }}" "${{ inputs.url }}"
48+
49+
- name: Create torrent using py3createtorrent
50+
run: py3createtorrent -p "${{ inputs.piece_size }}" -c "${{ inputs.comment }}" -s "torrent-webseed-creator" -o "${{ inputs.name }}.torrent" --webseed "${{ inputs.url }}" "${{ inputs.file_name }}"
51+
52+
- name: Upload torrent file
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: ${{ inputs.name }}
56+
path: ${{ inputs.name }}.torrent
57+
compression-level: 0
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Remove Dependabot on template
2+
on:
3+
create:
4+
5+
concurrency:
6+
group: ${{ github.workflow }}
7+
8+
jobs:
9+
remove:
10+
permissions:
11+
contents: write
12+
if: github.run_number == 1
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Remove Dependabot
19+
run: rm -f .github/dependabot.yaml
20+
21+
- name: Commit changes
22+
uses: stefanzweifel/git-auto-commit-action@v5
23+
with:
24+
commit_message: Remove Dependabot

.github/workflows/torf-cli.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: torf-cli
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
name:
6+
description: Name of the torrent file
7+
required: true
8+
default: Firefox Setup 122.0.1
9+
comment:
10+
description: Comment
11+
required: true
12+
default: Firefox Setup 122.0.1 win64 en-US by torrent-webseed-creator
13+
url:
14+
description: URL of the file
15+
required: true
16+
default: https://download-installer.cdn.mozilla.net/pub/firefox/releases/122.0.1/win64/en-US/Firefox%20Setup%20122.0.1.exe
17+
file_name:
18+
description: File name of the file in the torrent
19+
required: true
20+
default: Firefox Setup 122.0.1.exe
21+
maximize_disk_space:
22+
description: Maximize disk space. Check if getting out of disk space error
23+
type: boolean
24+
25+
jobs:
26+
create_torrent:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Maximize disk space
30+
if: inputs.maximize_disk_space
31+
uses: easimon/maximize-build-space@v10
32+
with:
33+
remove-dotnet: true
34+
remove-android: true
35+
remove-haskell: true
36+
remove-codeql: true
37+
remove-docker-images: true
38+
39+
- name: Install torf-cli
40+
run: pipx install torf-cli
41+
42+
- name: Download file
43+
run: aria2c -x 16 -o "${{ inputs.file_name }}" "${{ inputs.url }}"
44+
45+
- name: Create torrent using torf-cli
46+
run: torf "${{ inputs.file_name }}" -o "${{ inputs.name }}.torrent" -w "${{ inputs.url }}" -c "${{ inputs.comment }}" -s "torrent-webseed-creator"
47+
48+
- name: Upload torrent file
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: ${{ inputs.name }}
52+
path: ${{ inputs.name }}.torrent
53+
compression-level: 0
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: torrenttools
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
name:
6+
description: Name of the torrent file
7+
required: true
8+
default: Firefox Setup 122.0.1
9+
comment:
10+
description: Comment
11+
required: true
12+
default: Firefox Setup 122.0.1 win64 en-US by torrent-webseed-creator
13+
url:
14+
description: URL of the file
15+
required: true
16+
default: https://download-installer.cdn.mozilla.net/pub/firefox/releases/122.0.1/win64/en-US/Firefox%20Setup%20122.0.1.exe
17+
file_name:
18+
description: File name of the file in the torrent
19+
required: true
20+
default: Firefox Setup 122.0.1.exe
21+
piece_size:
22+
description: Piece Size. Use auto for automatic calculation, or use the recommended piece size on the README.md file
23+
required: true
24+
default: auto
25+
protocol_version:
26+
description: BitTorrent Protocol version 1, 2, or hybrid
27+
required: true
28+
default: 1
29+
type: choice
30+
options: [1, 2, hybrid]
31+
maximize_disk_space:
32+
description: Maximize disk space. Check if getting out of disk space error
33+
type: boolean
34+
35+
jobs:
36+
create_torrent:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Maximize disk space
40+
if: inputs.maximize_disk_space
41+
uses: easimon/maximize-build-space@v10
42+
with:
43+
remove-dotnet: true
44+
remove-android: true
45+
remove-haskell: true
46+
remove-codeql: true
47+
remove-docker-images: true
48+
49+
- name: Setup torrenttools
50+
uses: AnimMouse/setup-appimage@v1
51+
with:
52+
name: torrenttools
53+
url: https://github.com/fbdtemme/torrenttools/releases/download/v0.6.2/torrenttools-0.6.2-linux-x86_64.AppImage
54+
55+
- name: Download file
56+
run: aria2c -x 16 -o "${{ inputs.file_name }}" "${{ inputs.url }}"
57+
58+
- name: Create torrent using torrenttools
59+
run: torrenttools create -v "${{ inputs.protocol_version }}" -o "${{ inputs.name }}.torrent" -w "${{ inputs.url }}" -c "${{ inputs.comment }}" -l "${{ inputs.piece_size }}" -s "torrent-webseed-creator" "${{ inputs.file_name }}"
60+
61+
- name: Upload torrent file
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: ${{ inputs.name }}
65+
path: ${{ inputs.name }}.torrent
66+
compression-level: 0

0 commit comments

Comments
 (0)