docs: init docs
All checks were successful
Build and Release / Build (darwin-arm64) (push) Successful in 19s
Build and Release / Build (darwin-amd64) (push) Successful in 20s
Build and Release / Build (linux-arm64) (push) Successful in 17s
Build and Release / Build (linux-amd64) (push) Successful in 20s
Build and Release / Build (windows-arm64) (push) Successful in 16s
Build and Release / Build (windows-amd64) (push) Successful in 19s
Build and Release / Create Release (push) Has been skipped
Deploy docs / deploy (push) Successful in 45s
All checks were successful
Build and Release / Build (darwin-arm64) (push) Successful in 19s
Build and Release / Build (darwin-amd64) (push) Successful in 20s
Build and Release / Build (linux-arm64) (push) Successful in 17s
Build and Release / Build (linux-amd64) (push) Successful in 20s
Build and Release / Build (windows-arm64) (push) Successful in 16s
Build and Release / Build (windows-amd64) (push) Successful in 19s
Build and Release / Create Release (push) Has been skipped
Deploy docs / deploy (push) Successful in 45s
This commit is contained in:
parent
ba66894e42
commit
deae4a6272
20 changed files with 2887 additions and 1 deletions
63
docs/examples.md
Normal file
63
docs/examples.md
Normal file
|
@ -0,0 +1,63 @@
|
|||
---
|
||||
title: Command Examples
|
||||
description: Practical examples of Sub-CLI commands in action
|
||||
---
|
||||
|
||||
# Command Examples
|
||||
|
||||
This page provides practical examples of Sub-CLI commands for common subtitle manipulation tasks.
|
||||
|
||||
## Format Conversion Examples
|
||||
|
||||
Convert between various subtitle formats:
|
||||
|
||||
```bash
|
||||
# Convert from SRT to WebVTT
|
||||
sub-cli convert subtitles.srt subtitles.vtt
|
||||
|
||||
# Convert from LRC to SRT
|
||||
sub-cli convert lyrics.lrc subtitles.srt
|
||||
|
||||
# Convert from WebVTT to plain text (stripping timestamps)
|
||||
sub-cli convert subtitles.vtt plain_text.txt
|
||||
|
||||
# Convert from SRT to LRC
|
||||
sub-cli convert subtitles.srt lyrics.lrc
|
||||
```
|
||||
|
||||
## Synchronization Examples
|
||||
|
||||
Synchronize timelines between subtitle files:
|
||||
|
||||
```bash
|
||||
# Synchronize an SRT file using another SRT file as reference
|
||||
sub-cli sync reference.srt target.srt
|
||||
|
||||
# Synchronize an LRC file using another LRC file as reference
|
||||
sub-cli sync reference.lrc target.lrc
|
||||
```
|
||||
|
||||
Note: Synchronization works between files of the same format. If the number of entries differs between source and target files, Sub-CLI will display a warning and scale the timeline appropriately.
|
||||
|
||||
## Formatting Examples
|
||||
|
||||
Format subtitle files for consistent styling:
|
||||
|
||||
```bash
|
||||
# Format an SRT file
|
||||
sub-cli fmt subtitles.srt
|
||||
|
||||
# Format an LRC file
|
||||
sub-cli fmt lyrics.lrc
|
||||
|
||||
# Format a WebVTT file
|
||||
sub-cli fmt subtitles.vtt
|
||||
```
|
||||
|
||||
Formatting ensures:
|
||||
- Sequential entry numbering
|
||||
- Consistent timestamp formatting
|
||||
- Proper spacing and line breaks
|
||||
- Format-specific standard compliance
|
||||
|
||||
These examples demonstrate the versatility of Sub-CLI for handling various subtitle manipulation tasks. For detailed information on each command and all available options, see the [Command Reference](/commands) page.
|
Loading…
Add table
Add a link
Reference in a new issue