a subtitle file format converter
Project description
swapsub
这是一个字幕文件格式转换器
支持LRC,SRT,TXT三者互转
安装
推荐使用pip包管理器进行安装
pip install swapsub
使用方法
导入swapsub
import swapsub
load()函数
load函数用于加载并预处理字幕文件
swapsub.load(path)
#path:文件路径
load()函数将返回一个列表,里面包含里经预处理后的数据
convert()函数
convert函数用于转换并将转换后的文件储存到指定位置
swapsub.convert(data,path)
#data:load()函数返回的值
#path:文件路径
示例
sub = swapsub.load("a.lrc")
swapsub.convert(sub,"/home/cybytess/b.srt")
注意,路径须包含文件名及扩展名
许可证
GPL-3.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
swapsub-2.0.2b.tar.gz
(14.7 kB
view details)
File details
Details for the file swapsub-2.0.2b.tar.gz
.
File metadata
- Download URL: swapsub-2.0.2b.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83eedf7a140d4c69487ae842e501dc40d57b133617bb32a7e2e1d45c45b4e8bd |
|
MD5 | f6951466fbfb82a55808fa7a822c3ea1 |
|
BLAKE2b-256 | 8d5285d08c75d1bd5393e2c55a11423fd7368794e7384de4125dd22dd64cc5fc |