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
Metadata
Release files for swapsub 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| swapsub-2.0.2b.tar.gz | 14.7 kB | Without provenance | Details for swapsub-2.0.2b.tar.gz |
Release files / swapsub-2.0.2b.tar.gz
| Download URL | swapsub-2.0.2b.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83eedf7a140d4c69487ae842e501dc40d57b133617bb32a7e2e1d45c45b4e8bd
|
|
BLAKE2b-256 checksum How to use checksums |
8d5285d08c75d1bd5393e2c55a11423fd7368794e7384de4125dd22dd64cc5fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for swapsub 2.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.