자막 파일에서 광고를 제거하는 강력한 CLI 도구 및 노드 모듈. Bazarr와 같은 자동화 도구를 완전히 지원하는 개인 미디어 서버 용으로 제작되었습니다. 사용하기 쉽고 새 필터로 자주 업데이트됩니다.
Windows, Linux 및 Mac 용 다운로드는 릴리스 페이지에서 찾을 수 있습니다.
또는 Nodejs를 사용하여 설치할 수 있습니다.
npm install -g subclean 또는 직접 구축 할 수 있습니다 : npm install && npm run build
이것을 노드 모듈로 사용하는 경우 노드 모듈/npm 섹션으로 스크롤하십시오.
Bazarr를 사용하는 경우 Wiki 페이지를 참조하십시오.
Usage: subclean [options]
Example: subclean subtitle.srt -w
Bulk: subclean --sweep "path/to/media"
Options:
-i, --input The file you want to clean
-o, --output Where to write the cleaned file (defaults to input)
-w, --overwrite Overwrite the output file if it already exists
-c, --clean Delete the input file before writing the output
-v, --version Display current version
-n, --no-check Don't check for a new package version
-s, --silent Silent mode. Nothing logged to console
--update Download the latest filters from GitHub
This will not update subclean, only the filters!
--sweep Bulk subtitle cleaning. Searches for subtitles
in multiple directories (and sub-directories)
This will enable --overwrite!
--nochains Attempt to match and remove chained nodes. Experimental.
--depth How many sub-directories to look when sweep cleaning
--debug Display extra debugging information
--help Show the text you're reading now
--ne No Empty (nodes). Deletes empty nodes after cleaning.
--testing Testing mode. Will not modify files.
--uf Use Filter: internal or appdata
자막 파일을 스캔하고 하나씩 정리합니다.
깊이는 선택 사항입니다. 어떤 깊이를 사용할 것인지에 대한 시각적 가이드를 위해 깊이 맵을 살펴보십시오.
subclean --sweep " path/to/media " --depth 5
// or
subclean --sweep subclean --update 실행하면 새 필터가 Github에서 다운로드됩니다. 이 파일의 위치는 사용중인 OS에 따라 다를 수 있습니다. 다운로드 된 필터가 존재하지 않거나 액세스 할 수없는 경우 대신 내부 필터가 사용됩니다.
다운로드 된 필터와 함께 custom.json 만들 수 있습니다. 서브 클레인은 자동으로 이것을로드하고 청소할 때 적용합니다. subclean --debug 실행하여로드되는지 확인할 수 있습니다. Loaded n filters from custom 와 유사한 메시지가 표시됩니다.
1.6.2 이상 기준으로 이제 노드 모듈로 사용할 수 있으므로 cleanRaw 기능을 통해 원시 텍스트를 전달할 수 있습니다. 사용량은 다음과 같습니다.
npm install subclean --save
import { subclean } from 'subclean' ;
const testdata = `1
00:00:06,000 --> 00:00:12,074
Watch Movies, TV Series and Live Sports
Signup Here -> WWW.ADMITME.APP
2
00:00:27,319 --> 00:00:28,820
Or you can remove that annoying ad using subclean!
3
00:00:28,903 --> 00:00:30,447
Now with support for node modules.` ;
subclean . cleanRaw ( testdata ) . then ( console . log ) ;결과:
1
00:00:27,319 --> 00:00:28,820
Or you can remove that annoying ad using subclean!
2
00:00:28,903 --> 00:00:30,447
Now with support for node modules.
프로세스를 사용자 정의하기 위해 여전히 인수를 전달할 수 있습니다.
const config = { nochains : true , ne : true } ;
subclean . cleanRaw ( testdata , config ) . then ( console . log ) ;데이터가 유효하지 않으면 오류가 수신됩니다.
const testdata = `this is invalid data` ;
subclean . cleanRaw ( testdata ) . then ( console . log ) . catch ( console . log ) ;
// Error: Unable to parse subtitles 이 프로젝트는 Kain (ksir.pw) 에 의해 만들어졌습니다.
기부금, 문제 및 기능 요청을 환영하며 대단히 감사합니다.
문제 페이지를 확인하십시오.
이 프로젝트가 도움이된다면 ️를주세요!
Copyright © 2021 Kain (ksir.pw). 이 프로젝트는 MIT 라이센스가 부여되었습니다.