Code Monkey home page Code Monkey logo

docker-subfinder's Introduction

Docker SubFinder 自动刮削字幕器 -定时运行版

修改 SuperNG6/docker-subfinder 的docker版本,改成用于定时运行的方式.

  • 60m 运行一次

以下是原版说明

Docker SubFinder 自动刮削字幕器

Docker Hub:https://hub.docker.com/r/superng6/subfinder

GitHub:https://www.github.com/SuperNG6/docker-subfinder

博客:https://sleele.com

本镜像根据:ausaki的 https://github.com/ausaki/subfinder 字幕查找器制作 具体的参数请参照subfinder的readme进行修改修改

1、配置文件subfinder.json位于/config/subfinder.json,请根据的你情况自行修改

 exec \
	s6-setuidgid abc \
	subfinder /libraries \
	-c /config/subfinder.json

官方说明文档

官方说明文档
参数 含义 必需
-l, --languages 指定字幕语言,可同时指定多个。每个字幕查找器支持的语言不相同。具体支持的语言请看下文。 否,subfinder 默认会下载字幕查找器找到的所有字幕。
-e, --exts 指定字幕文件格式,可同时指定多个。每个字幕查找器支持的文件格式不相同。具体支持的文件格式请看下文。 否,subfinder 默认会下载字幕查找器找到的所有字幕。
-m,--method 指定字幕查找器,可同时指定多个。 否,subfinder 默认使用 shooter 查找字幕。
--video_exts 视频文件的后缀名(包括.,例如.mp4)
--repeat 重复查找字幕,即使本地字幕已存在,默认False。
--exclude 排除匹配模式的文件或目录,类似于shell的文件匹配模式。详情见下文
--api_urls 指定字幕搜索器的API URL。详情见下文
-c,--conf 配置文件 否,SubFinder默认从~/.subfinder.json读取。
-s,--silence 静默运行,不输出日志
--debug 调试模式,输出调试日志
-h,--help 显示帮助信息
  • --exclude, 支持的匹配模式类似于shell,* 匹配任意长度的字符串,? 匹配一个字符,[CHARS]匹配CHARS中的任一字符。例如:

    • 排除包含abc的目录:--exclude '*abc*/'。注意添加单引号,防止shell对其进行扩展。

    • 排除包含abc的文件:--exclude '*abc*'。注意和上个例子的区别,匹配目录时结尾有/目录分隔符,匹配文件则没有。

  • --api_urls

    字幕库的链接不太稳定,有时候会更换域名,因此提供--api_urls选项自定义API URL,以防域名或链接变动。

    --api_urls只接收JSON格式的字符串。

    获取正确的API URL的方法:

    配置示例:

    {
       // 设置字幕库的API
       "zimuku": "http://www.zimuku.la/search",
       // 设置字幕组的API
       "zimuzu": "http://www.zmz2019.com/search",
       // 设置字幕组获取字幕下载链接的API
       "zimuzu_subtitle_api_url": "http://got001.com/api/v1/static/subtitle/detail"
    }
    

支持的语言和文件格式:

字幕查找器 语言 文件格式
shooter ['zh', 'en'] ['ass', 'srt']
zimuku ['zh_chs', 'zh_cht', 'en', 'zh_en'] ['ass', 'srt']
zimuzu ['zh_chs', 'zh_cht', 'en', 'zh_en'] ['ass', 'srt']

语言代码:

代码 含义
zh 中文,简体或者繁体
en 英文
zh_chs 简体中文
zh_cht 繁体中文
zh_en 双语

配置文件

配置文件是JSON格式的,支持命令行中的所有选项。命令行中指定的选项优先级高于配置文件的。

配置文件中的key一一对应于命令行选项,例如-m,--method对应的key为method

示例:

{
   "languages": ["zh", "en", "zh_chs"],
   "exts": ["ass", "srt"],
   "method": ["shooter", "zimuzu", "zimuku"],
   "video_exts": [".mp4", ".mkv", ".iso"],
   "exclude": ["excluded_path/", "*abc.mp4"],
   "api_urls": {
      // 设置字幕库的API
      "zimuku": "http://www.zimuku.la/search",
      // 设置字幕组的API
      "zimuzu": "http://www.zmz2019.com/search",
      // 设置字幕组获取字幕下载链接的API
      "zimuzu_subtitle_api_url": "http://got001.com/api/v1/static/subtitle/detail"
   }
}

本镜像的一些特点

  • 做了usermapping,使用你自己的账户权限来运行,这点对于群辉来说尤其重要
  • 支持选择执行检查完全部文件后是否后退出容器(默下载完成全部字幕后自动退出容器)
  • 镜像体积巨大200M,无法继续压缩镜像体积
  • base images使用ubuntu cloud (仅20M),alpine下缺少部分库

Architecture

只有x86-64版,arm64版编译失败,可能有些库没有

Architecture Tag
x86-64 latest

Changelogs

2020/03/05

  1、first commit

Document

挂载路径

/config /libraries

关于群晖

群晖DSM权限设置

群晖用户请使用你当前的用户SSH进系统,输入 id 你的用户id 获取到你的UID和GID并输入进去

nwmkxT 1d5oD8 JiGtJA

权限管理设置

对你的docker配置文件夹的根目录进行如图操作,你的下载文件夹的根目录进行相似操作,去掉管理这个权限,只给写入,读取权限 r4dsfV

Linux

输入 id 你的用户id 获取到你的UID和GID,替换命令中的PUID、PGID

执行命令

docker create \
  --name=subfinder \
  -e PUID=1026 \
  -e PGID=100 \
  -e TZ=Asia/Shanghai \
  -v /path/to/appdata/config:/config \
  -v /path/to/libraries:/libraries \
  superng6/subfinder

docker-compose

version: "2"
services:
aria2:
  image: superng6/subfinder
  container_name: subfinder
  environment:
    - PUID=1026
    - PGID=100
    - TZ=Asia/Shanghai
  volumes:
    - /path/to/appdata/config:/config
    - /path/to/libraries:/libraries

docker-subfinder's People

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.