本文主要包括PT的各类辅种发种的shell命令,电影种的截图制种,音乐种的抓流、转码、发种频谱图等等。
首先推荐两个优秀的脚本
星大Inexistence
bash <(wget --no-check-certificate -qO- https://github.com/Aniverse/inexistence/raw/master/inexistence.sh)
Jerry048
bash <(wget -qO- https://raw.githubusercontent.com/jerry048/Dedicated-Seedbox/main/Install.sh)
brew install mosh#mac 客户端
sudo apt-get install mosh
mosh-server new -c 256 -s -l LANG=en_US.UTF-8 -p 60000
mosh [email protected] -p 6000
其他脚本参考
wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash
推荐的tr为快检版
version: "3.2"
services:
transmission:
image: chisbread/transmission
container_name: transmission
environment:
- PUID=0
- PGID=0
- TZ=Asia/Shanghai
- USER=
- PASS=
- PEERPORT=10413
volumes:
- /tr/config:/config
- /tr/downloads:/downloads
- /tr/watch:/watch
ports:
- 9091:9091
- 10413:10413
- 10413:10413/udp
restart: unless-stopped
version: "3.2"
services:
qbittorrent:
image: linuxserver/qbittorrent
container_name: qbittorrent
environment:
- PUID=0
- PGID=0
- TZ=Asia/Shanghai
- UMASK_SET=022
- WEBUI_PORT=8081
volumes:
- /qb/config:/config
- /tr/downloads:/downloads
ports:
- 10681:10681
- 10681:10681/udp
- 8081:8081
restart: unless-stopped
配置好yml文件后需要下载docker-compose命令
在对应的目录输入docker-compose up
具体参考这篇文章
docker inspect 容器名称 | grep Mounts -A 20
#实测不太好用,还是装星大的版本比较快
docker run -d \
--name=deluge \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/London \
-e DELUGE_LOGLEVEL=error `#optional` \
-p 8002:8002 \
-p 6881:6881 \
-p 6881:6881/udp \
-v /home/gawain/deluge2/config:/config \
-v /home/gawain/deluge2/downloads:/downloads \
--restart unless-stopped \
lscr.io/linuxserver/deluge
Chrome
Edge
主要是针对ptpp不支持的站点
console.clear()
var trs = document.querySelectorAll("form[action]")
var pk ="passkey"
var dl =''
href=''
ct=0
for (var tr of trs){
a=tr.action
if (a.match(/zip/))
{
continue
}
tid=a.match(/id=(\d+)&*sign=(\d+)/)
console.log(tr)
if(tid)
href="https://***./download.php?id="+tid[1]+"&passkey="+pk+"&https=1"
dl=dl+href+"\r\n"
ct=ct+1
}
console.log(dl,ct)
copy(dl)
docker create --name=jackett \
--restart=always \
-v /root/jackett/config:/config \
-v /root/jackett/downloads:/downloads \
-e PGID=0 -e PUID=0 \
-p 9117:9117 \
linuxserver/jackett
docker start
mkdir /root/plus -p
docker run -d --name IYUUPlus -v /root/plus:/IYUU/db -v /etc/qbit/config/qBittorrent/BT_backup:/qb -v /etc/transmission/config/torrents:/tr -p 8787:8787 --restart=always iyuucn/iyuuplus:latest
辅种外站神器,不过还没成熟有辅错的可能,它的原理是用你下载器的种子通过jackett搜索匹配。
github链接
docker run -d --name seedcross -v /somedir/in/host:/code/seedcross/db -p 8019:8019 ccf2012/seedcross:latest
打开8787端口
密码为空,第一次输入时你可以自由设置你的密码;以后密码与第一次相同才能登录
荒野无灯FBE的安装脚,作为网盘可直接做种截图,非常方便
mkdir -p ~/docker/fb/config ~/docker/fb/myfiles
docker run -d --name fb \
--restart=unless-stopped \
-e PUID=$UID \
-e PGID=$GID \
-e WEB_PORT=8082 \
-e FB_AUTH_SERVER_ADDR="127.0.0.1" \
-p 8082:8082 \
-v ~/docker/fb/config:/config \
-v /:/myfiles \
--mount type=tmpfs,destination=/tmp \
80x86/filebrowser:2.9.4-amd64
ffmpeg -i [视频路径] -r 1 -vframes 4 -q:v 2 -f image2 image-%d.jpeg
盒子文件同步到云盘,主要是我盒子拉本地非常慢,所以用云盘做中转。
可以是Onedrive、Google drive
我这里说阿里云盘
docker run -d \
--name=aliyundrive-webdav \
--restart=always \
-p 8080:8080 \
-v $PWD/docker/aliyundrive-webdav/:/etc/aliyundrive-webdav/ \
-e REFRESH_TOKEN='your refreshToken' \
-e WEBDAV_AUTH_USER=admin \
-e WEBDAV_AUTH_PASSWORD=admin \
messense/aliyundrive-webdav
可以点开ip:8080访问,密码账号如上,需要注意的是,换成其他端口可能会服务不了,如果冲突的话先把另一个关了。
curl https://rclone.org/install.sh | sudo bash
#安装完成后,运行rclone连接webdav完成配置
rclone config
配置教程参考,需要注意最新版可能编号不一样,要自己选择webdav
rsync -avz --progress /root/client/ [email protected]:/home/work/
#将本机的/root/client/拷贝至远程的202.112.23.12:/home/work/目录,--progress可以查看拷贝的过程
挂在到nas上的thelounge客户端
wget -P /root https://github.com/thelounge/thelounge/releases/download/v4.2.0/thelounge_4.2.0_all.deb
dpkg -i /root/thelounge_4.2.0_all.deb
systemctl stop thelounge.service
sed -i 's/9000,/11111,/g' /etc/thelounge/config.js
# 以上命令替换端口号,9000端口号挺常见容易产生冲突
# 比如 docker 的 portainer 镜像默认映射端口号就用的是 9000
# 该命令将 9000 端口号替换成 11111,这个可以自定义(1-65535 任选一个没重复的当端口号)
systemctl start thelounge.service
systemctl enable thelounge.service
#配置的时候记得在命令里面加上以下三句命令
/msg NickServ RECOVER 昵称
/msg NickServ IDENTIFY 昵称 密码#避免被挤掉
/msg Vertigo ENTER 昵称 irc密码
Flac2Mp3该工具会将你所有flac文件转为mp3,且按相同的名字文件结构保存。
下载链接download.tar.gz
tar zxvf flac2mp3-0.3.0.tar.gz
apt install flac
apt install lame
#找到解压文件内的flac2mp3.pl文件,善用软连接,默认v2,自己修改为v0或320
ln -s 文件所在路径 f2m
./f2m --preset=V0 /path/to/lossless /path/to/lossy
sox input.flac -G -b 16 output.flac rate -v -L 48000 dither
for flac in *.flac; do sox -S "${flac}" -r 44100 -b 16 new/"${flac}"; done
https://github.com/theirix/ptpimg-uploader
pip install ptpimg_uploader
export PTPIMG_API_KEY=<your hex key>
ptpimg_uploader ~/seed/mytorrent/folder.jpg
#!/zsh/bin
dir=/home/download/
filename=$1
cd "$filename"
ls -d */ | grep -o '[a-Z]*\ *[0-9]/' >temp.log
sed -i 's/$/*flac/' temp.log
mapfile acmd <temp.log
echo ${acmd[@]}
fdir=''
if test -z "$acmd"
then
echo "No subfolder~"
sox *flac -n spectrogram -o $dir/spectrograms/"$filename".png
else
l=${#acmd[@]}
case "$l" in
2)
echo "There 2 discs"
a1=`cat temp.log | sed -n '1p'`
a2=`cat temp.log | sed -n '2p'`
sox "$a1" "$a2" -n spectrogram -o $dir/spectrograms/"$filename".png
;;
*)
echo "There more than 3 discs, only take first 3"
a1=`cat temp.log | sed -n '1p'`
a2=`cat temp.log | sed -n '2p'`
a3=`cat temp.log | sed -n '3p'`
sox "$a1" "$a2" "$a3" -n spectrogram -o $dir/spectrograms/"$filename".png
;;
esac
vim sp-up.sh
#复制以下内容
n=$1
cd "$n"
sox *flac -n spectrogram -o ../spectrograms/"$n".png
sp=$(ptpimg_uploader -k your-ptpimg-key --bbcode
spec=[hide=spectrogram]$sp[/hide]
echo "PTPIMGurl: $spec"
#具体使用
sh sp-up.sh 专辑目录
cd spsox
chmod +x spsox
cp spsox /usr/local/bin/
spsox
spsox -r /home/ewol/Music/music/'Chuck Prophet - Bobby Fuller Died For Your Sins (2017) [FLAC]'/
spsox -r /home/ewol/Music/music
https://github.com/nathom/streamrip
#需要python>3.8
pip3 install streamrip --upgrade
rip config --open
#填上arl之类的信息
rip 专辑url
flac命令行文档
flac -8 专辑名字/* -f
#!/bin/zsh
l=($*)
#num=$1
for num in ${l[*]};do
echo https://www.xxx.com/album/$num
ripb=`rip url line https://www.deezer.com/album/$num`
echo "$ripb"
fullname=/home/download
if [[ $ripb =~ "Unable to stream" ]] || [[ $ripb =~ "already downloaded" ]]
then
echo $num "$ripb">>$fullname/fail.log#抓流失败或者重复跳过循环
continue
fi
dirname=$(ls -At $fullname | sed -n "1p")
mktorrent -v -p -l 22 -o $fullname/torrents/"$dirname".torrent $fullname/"$dirname"
cd $fullname/"$dirname"
ls -d */ | grep -o '[a-Z]*\ *[0-9]/' >temp.log
sed -i 's/$/*flac/' temp.log
mapfile acmd <temp.log
fdir=''
if test -z "$acmd"
then
echo "No subfolder~"
sox *flac -n spectrogram -o $fullname/spectrograms/"$dirname".png
else
l=${#acmd[@]}
case "$l" in
2)
echo "There 2 discs"
a1=`cat temp.log | sed -n '1p'`
a2=`cat temp.log | sed -n '2p'`
sox "$a1" "$a2" -n spectrogram -o $fullname/spectrograms/"$dirname".png
;;
3)
echo "There 3 discs"
a1=`cat temp.log | sed -n '1p'`
a2=`cat temp.log | sed -n '2p'`
a3=`cat temp.log | sed -n '3p'`
sox "$a1" "$a2" "$a3" -n spectrogram -o $fullname/spectrograms/"$dirname".png
;;
4)
echo "There 4 discs"
a1=`cat temp.log | sed -n '1p'`
a2=`cat temp.log | sed -n '2p'`
a3=`cat temp.log | sed -n '3p'`
a4=`cat temp.log | sed -n '4p'`
sox "$a1" "$a2" "$a3" "$a4" -n spectrogram -o $fullname/spectrograms/"$dirname".png
;;
5)
echo "There 5 discs"
a1=`cat temp.log | sed -n '1p'`
a2=`cat temp.log | sed -n '2p'`
a3=`cat temp.log | sed -n '3p'
a4=`cat temp.log | sed -n '4p'`
a5=`cat temp.log | sed -n '5p'`
sox "$a1" "$a2" "$a3" "$a4" "$a5" -n spectrogram -o $fullname/spectrograms/"$dirname".png
;;
*)
echo "There more than 5 discs, only take first 6"
a1=`cat temp.log | sed -n '1p'`
a2=`cat temp.log | sed -n '2p'`
a3=`cat temp.log | sed -n '3p'`
a4=`cat temp.log | sed -n '4p'`
a5=`cat temp.log | sed -n '5p'`
a6=`cat temp.log | sed -n '6p'`
sox "$a1" "$a2" "$a3" "$a4" "$a5" "$a6" -n spectrogram -o $fullname/spectrograms/"$dirname".png
;;
esac
fi
#sox $fullname/"$dirname"/*flac -n spectrogram -o $fullname/spectrograms/"$dirname".png
sp=$(ptpimg_uploader --bbcode $fullname/spectrograms/"$dirname".png)
spec=[hide=spectrogram]$sp[/hide]
echo "$spec $dirname $num" >>"$fullname"/torrents/PtpimgUrl.txt
echo "PTPIMGurl: $spec"
sleep $[($RANDOM % 10)+3]
要apt install imagemagick
大佬博客
只要提供给差速器一个需要发布的文件夹和豆瓣信息页面,差速器会自动帮你
#Linux一键安装,其他平台和docker参考以上文章
curl -Lso- https://raw.githubusercontent.com/LeiShi1313/Differential/main/install.sh | bash
vim config.ini
#写入以下内容
[DEFAULT]
; 是否制种
make_torrent = true
; 生成截图的数量
screenshot_count = 6
; 图床,差速器支持PTPIMG、自建imgurl、自建Chevereto(z4a、imgbb、猫柠的图床等)、SM.MS和BYR作为图床
image_hosting = CHEVERETO
; 自建Chevereto的地址
chevereto_hosting_url = https://XXX.com
; 自建Chevereto的用户名
chevereto_username = XXXX
; 自建Chevereto的密码
chevereto_password = YYYY
; 自动填充使用的脚本,这里使用树大的脚本
easy_upload = true
; 也可以使用明日大的脚本来进行自动填充
; auto_feed = true
; 使用差速器自带的短网址服务
use_short_url = true
; 差速器自带一个自建的PTGen,如果无法访问,可以提供自定义PTGen地址
;ptgen_url = https://XXXXX.com
[NexusPHP]
; 发种页面的链接
upload_url = https://XXXXX.com/upload.php
#发布格式
dft ne -f [种子文件夹] -u [豆瓣链接]
需要注意的是需要自己配置config,和视频文件同一文件夹,可能需要科学使用默认ptgen。
Debian10安装Wine32有很多坑,wine是为了eac3to
apt-get install libgnutls30:i386 libldap-2.4-2:i386 libgpg-error0:i386 libxml2:i386 libasound2-plugins:i386 libsdl2-2.0-0:i386 libfreetype6:i386 libdbus-1-3:i386 libsqlite3-0:i386
Remux必须有eac3to的解码日志,而eac3to又只支持windows,所以需要wine32
https://unixsheikh.com/tutorials/remuxing-iso-dvd-or-bluray-using-cat-and-ffmpeg-on-linux.html
ffmpeg -i tmp.m2ts -map 0:0 -vcodec copy -map 0:1 -acodec copy -map 0:9 -scodec copy Star-Wars-The-Phantom-Menace-1999-Bluray-DTS-AVC-REMUX.mkv
i is the name of the input file.
-map is used to map each track to a specific command option.
0:0 is the first track, i.e. the video, which is then mapped to the -vcodec option, i.e. video codec option, which simply copies the video track into the new mkv container.
0:1 is the first audio track, i.e. the English audio, which is then mapped to the -acodec option, i.e. audio codec option, which simply copies the English audio track into the new mkv container.
0:9 is the first subtitle track, i.e. the English subtitle, which is then mapped to the -scodec option, i.e. subtitle codec option, which simply copies the English subtitle into the new mkv container.
mkvmerge