sakuga 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -14
- package/bin/sakuga +1 -1
- package/dist/index.js +560 -211
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
## Requirements
|
|
12
12
|
|
|
13
13
|
- [Node.js](https://nodejs.org/) (v18 or higher)
|
|
14
|
-
- [ffmpeg](https://ffmpeg.org/)
|
|
14
|
+
- [ffmpeg](https://ffmpeg.org/) (v4.3+ in your PATH)
|
|
15
15
|
|
|
16
16
|
## How To Use
|
|
17
17
|
|
|
@@ -21,30 +21,54 @@ Create a Markdown file with fenced code blocks:
|
|
|
21
21
|
bunx sakuga render examples/demo.md
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
To render git history for a file:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
bunx sakuga git README.md
|
|
28
|
+
```
|
|
29
|
+
|
|
24
30
|
To specify an output path, pass `--output` or `-o`:
|
|
25
31
|
|
|
26
32
|
```bash
|
|
27
|
-
bunx sakuga render examples/demo.
|
|
33
|
+
bunx sakuga render --output examples/demo.mp4 examples/demo.md
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
To limit commits for git history:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
bunx sakuga git --commits 5 README.md
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
To render newest → oldest instead:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
bunx sakuga git --reverse README.md
|
|
28
46
|
```
|
|
29
47
|
|
|
30
48
|
### Options
|
|
31
49
|
|
|
50
|
+
Note: With `@effect/cli@0.73.0`, options must appear before positional args.
|
|
51
|
+
|
|
32
52
|
- `--format`, `-f`: Output container (`mp4` or `webm`, default: `mp4`).
|
|
33
53
|
- `--output`, `-o`: Output path (defaults to the input name + format extension).
|
|
54
|
+
- `--verbose`, `-v`: Show FFmpeg output and detailed logging.
|
|
55
|
+
- `--commits`, `-c`: Number of commits to render for `sakuga git` (default: `10`).
|
|
56
|
+
- `--reverse`: Render newest to oldest for `sakuga git`.
|
|
57
|
+
- `--language`, `-l`: Override the syntax highlighting language for `sakuga git`.
|
|
34
58
|
- `--theme`, `-t`: Shiki theme for syntax highlighting (default: `github-dark`).
|
|
35
|
-
- `--background`: Fallback background color (default: `#0b0b0b`).
|
|
36
|
-
- `--foreground`: Fallback foreground color (default: `#e6e6e6`).
|
|
37
|
-
- `--font-family`: Font family for rendering (default: `SFMono-Regular` stack).
|
|
38
|
-
- `--font-size`: Font size in pixels (default: `24`).
|
|
39
|
-
- `--line-height`: Line height in pixels (default: `34`).
|
|
40
|
-
- `--padding`: Padding around the code block in pixels (default: `64`).
|
|
41
|
-
- `--width`: Minimum width of the rendered video in pixels (default: `0` for auto).
|
|
42
|
-
- `--height`: Minimum height of the rendered video in pixels (default: `0` for auto).
|
|
43
|
-
- `--fps`: Frames per second (default: `60`).
|
|
44
|
-
- `--block-duration`: Duration of each code block in seconds (default: `2`).
|
|
59
|
+
- `--background`, `-bg`: Fallback background color (default: `#0b0b0b`).
|
|
60
|
+
- `--foreground`, `-fg`: Fallback foreground color (default: `#e6e6e6`).
|
|
61
|
+
- `--font-family`, `-ff`: Font family for rendering (default: `SFMono-Regular` stack).
|
|
62
|
+
- `--font-size`, `-fs`: Font size in pixels (default: `24`).
|
|
63
|
+
- `--line-height`, `-lh`: Line height in pixels (default: `34`).
|
|
64
|
+
- `--padding`, `-p`: Padding around the code block in pixels (default: `64`).
|
|
65
|
+
- `--width`, `-w`: Minimum width of the rendered video in pixels (default: `0` for auto).
|
|
66
|
+
- `--height`, `-h`: Minimum height of the rendered video in pixels (default: `0` for auto).
|
|
67
|
+
- `--fps`, `-r`: Frames per second (default: `60`).
|
|
68
|
+
- `--block-duration`, `-bd`: Duration of each code block in seconds (default: `2`).
|
|
45
69
|
- `--transition`, `-tr`: Transition duration between slides in milliseconds (default: `800`).
|
|
46
|
-
- `--transition-drift`: Pixel drift applied during transitions (default: `8`).
|
|
47
|
-
- `--tab-replacement`: String used to replace tabs (default: `" "`).
|
|
70
|
+
- `--transition-drift`, `-td`: Pixel drift applied during transitions (default: `8`).
|
|
71
|
+
- `--tab-replacement`, `-tb`: String used to replace tabs (default: `" "`).
|
|
48
72
|
|
|
49
73
|
## Performance
|
|
50
74
|
|
package/bin/sakuga
CHANGED