เครื่องมือ 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 ตำแหน่งของไฟล์เหล่านี้อาจแตกต่างกันไปขึ้นอยู่กับว่าคุณใช้ระบบปฏิบัติการอะไร หากไม่มีตัวกรองที่ดาวน์โหลดมาหรือไม่สามารถเข้าถึงได้จะใช้ตัวกรองภายในแทนแทน
คุณสามารถสร้าง custom.json ควบคู่ไปกับตัวกรองที่ดาวน์โหลด Subclean จะโหลดสิ่งนี้โดยอัตโนมัติและนำไปใช้เมื่อทำความสะอาด คุณสามารถตรวจสอบว่าสิ่งนี้กำลังโหลดโดยเรียกใช้ 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)
ยินดีต้อนรับการมีส่วนร่วมปัญหาและคำขอคุณสมบัติและชื่นชมอย่างมาก
อย่าลังเลที่จะตรวจสอบหน้าปัญหา
ให้️ถ้าโครงการนี้ช่วยคุณได้!
ลิขสิทธิ์© 2021 KAIN (KSIR.PW) โครงการนี้ได้รับใบอนุญาต MIT