Skip to content

Commit 1ba2ff7

Browse files
committed
docs(images/shortcut): add shortcut_default and shortcut_custom demo tapes
1 parent 01a2780 commit 1ba2ff7

File tree

4 files changed

+297
-0
lines changed

4 files changed

+297
-0
lines changed
83.2 KB
Loading
188 KB
Loading

docs/images/shortcut_custom.tape

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
Output cli_interactive/shortcut_custom.gif
2+
3+
Require cz
4+
5+
# Use bash for cross-platform compatibility (macOS, Linux, Windows)
6+
Set Shell bash
7+
8+
Set FontSize 16
9+
Set Width 878
10+
Set Height 568
11+
Set Padding 20
12+
Set TypingSpeed 50ms
13+
14+
Set Theme {
15+
"name": "Commitizen",
16+
"black": "#232628",
17+
"red": "#fc4384",
18+
"green": "#b3e33b",
19+
"yellow": "#ffa727",
20+
"blue": "#75dff2",
21+
"magenta": "#ae89fe",
22+
"cyan": "#708387",
23+
"white": "#d5d5d0",
24+
"brightBlack": "#626566",
25+
"brightRed": "#ff7fac",
26+
"brightGreen": "#c8ed71",
27+
"brightYellow": "#ebdf86",
28+
"brightBlue": "#75dff2",
29+
"brightMagenta": "#ae89fe",
30+
"brightCyan": "#b1c6ca",
31+
"brightWhite": "#f9f9f4",
32+
"background": "#1e1e2e",
33+
"foreground": "#afafaf",
34+
"cursor": "#c7c7c7"
35+
}
36+
37+
# Hide initial shell prompt
38+
Hide
39+
40+
# Wait for terminal to be ready
41+
Sleep 1s
42+
43+
# Set a clean, simple prompt (while hidden)
44+
Type "PS1='$ '"
45+
Enter
46+
Sleep 300ms
47+
48+
# Create a clean temporary directory for recording
49+
Type "rm -rf /tmp/commitizen-example && mkdir -p /tmp/commitizen-example && cd /tmp/commitizen-example"
50+
Enter
51+
Sleep 500ms
52+
53+
# Initialize git repository
54+
Type "git init"
55+
Enter
56+
Type "git config user.email 'you@example.com'"
57+
Enter
58+
Type "git config user.name 'Your Name'"
59+
Enter
60+
Sleep 500ms
61+
62+
Type "git checkout -b awesome-docs"
63+
Enter
64+
Sleep 500ms
65+
66+
Type `cat > pyproject.toml << 'EOF'`
67+
Enter
68+
Type `[tool.commitizen]`
69+
Enter
70+
Type `name = "cz_customize"`
71+
Enter
72+
Type `use_shortcuts = true`
73+
Enter
74+
Type ``
75+
Enter
76+
Type `[tool.commitizen.customize]`
77+
Enter
78+
Type `message_template = "{{prefix}}: {{message}}"`
79+
Enter
80+
Type `schema = "<type>: <body>"`
81+
Enter
82+
Type `schema_pattern = "(feat|fix|docs|test):(\\s.*)"`
83+
Enter
84+
Type ``
85+
Enter
86+
Type `[[tool.commitizen.customize.questions]]`
87+
Enter
88+
Type `type = "list"`
89+
Enter
90+
Type `name = "prefix"`
91+
Enter
92+
Type `message = "Select the type of change you are committing"`
93+
Enter
94+
Type `choices = [`
95+
Enter
96+
Type ` { value = "feat", name = "feat: A new feature.", key = "f" },`
97+
Enter
98+
Type ` { value = "fix", name = "fix: A bug fix.", key = "x" },`
99+
Enter
100+
Type ` { value = "docs", name = "docs: Documentation only changes", key = "d" },`
101+
Enter
102+
Type ` { value = "test", name = "test: Adding or correcting tests", key = "t" },`
103+
Enter
104+
Type `]`
105+
Enter
106+
Type ``
107+
Enter
108+
Type `[[tool.commitizen.customize.questions]]`
109+
Enter
110+
Type `type = "input"`
111+
Enter
112+
Type `name = "message"`
113+
Enter
114+
Type `message = "Commit body: "`
115+
Enter
116+
Type "EOF"
117+
Enter
118+
Sleep 300ms
119+
120+
# Create a dummy file to commit
121+
Type "echo 'test content' > README.md"
122+
Enter
123+
Sleep 300ms
124+
125+
Type "git add README.md"
126+
Enter
127+
Sleep 300ms
128+
129+
# Clear the screen to start fresh
130+
Type "clear"
131+
Enter
132+
Sleep 500ms
133+
134+
# Show commands from here
135+
Show
136+
137+
# Now run cz commit
138+
Type "cz commit"
139+
Sleep 500ms
140+
Enter
141+
142+
# Wait for first prompt to appear
143+
Sleep 2s
144+
145+
# Question 1: Select the type of change (press d to "docs")
146+
Sleep 1s
147+
Type "d"
148+
Sleep 2s
149+
Enter
150+
Sleep 1s
151+
152+
# Question 2: Commit body
153+
Type "demo with custom keys"
154+
Sleep 500ms
155+
Enter
156+
Sleep 500ms
157+
158+
# Wait for commit success message
159+
Sleep 1s

docs/images/shortcut_default.tape

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
Output cli_interactive/shortcut_default.gif
2+
3+
Require cz
4+
5+
# Use bash for cross-platform compatibility (macOS, Linux, Windows)
6+
Set Shell bash
7+
8+
Set FontSize 16
9+
Set Width 878
10+
Set Height 568
11+
Set Padding 20
12+
Set TypingSpeed 50ms
13+
14+
Set Theme {
15+
"name": "Commitizen",
16+
"black": "#232628",
17+
"red": "#fc4384",
18+
"green": "#b3e33b",
19+
"yellow": "#ffa727",
20+
"blue": "#75dff2",
21+
"magenta": "#ae89fe",
22+
"cyan": "#708387",
23+
"white": "#d5d5d0",
24+
"brightBlack": "#626566",
25+
"brightRed": "#ff7fac",
26+
"brightGreen": "#c8ed71",
27+
"brightYellow": "#ebdf86",
28+
"brightBlue": "#75dff2",
29+
"brightMagenta": "#ae89fe",
30+
"brightCyan": "#b1c6ca",
31+
"brightWhite": "#f9f9f4",
32+
"background": "#1e1e2e",
33+
"foreground": "#afafaf",
34+
"cursor": "#c7c7c7"
35+
}
36+
37+
# Hide initial shell prompt
38+
Hide
39+
40+
# Wait for terminal to be ready
41+
Sleep 1s
42+
43+
# Set a clean, simple prompt (while hidden)
44+
Type "PS1='$ '"
45+
Enter
46+
Sleep 300ms
47+
48+
# Create a clean temporary directory for recording
49+
Type "rm -rf /tmp/commitizen-example && mkdir -p /tmp/commitizen-example && cd /tmp/commitizen-example"
50+
Enter
51+
Sleep 500ms
52+
53+
# Initialize git repository
54+
Type "git init"
55+
Enter
56+
Type "git config user.email 'you@example.com'"
57+
Enter
58+
Type "git config user.name 'Your Name'"
59+
Enter
60+
Sleep 500ms
61+
62+
Type "git checkout -b awesome-docs"
63+
Enter
64+
Sleep 500ms
65+
66+
# Initialize commitizen config with shortcuts enabled
67+
Type `cat > pyproject.toml << 'EOF'`
68+
Enter
69+
Sleep 100ms
70+
Type `[tool.commitizen]`
71+
Enter
72+
Sleep 100ms
73+
Type `name = "cz_conventional_commits"`
74+
Enter
75+
Sleep 100ms
76+
Type `use_shortcuts = true`
77+
Enter
78+
Sleep 100ms
79+
Type "EOF"
80+
Enter
81+
Sleep 300ms
82+
83+
# Create a dummy file to commit
84+
Type "echo 'test content' > README.md"
85+
Enter
86+
Sleep 300ms
87+
88+
Type "git add README.md"
89+
Enter
90+
Sleep 300ms
91+
92+
# Clear the screen to start fresh
93+
Type "clear"
94+
Enter
95+
Sleep 500ms
96+
97+
# Show commands from here
98+
Show
99+
100+
# Now run cz commit
101+
Type "cz commit"
102+
Sleep 500ms
103+
Enter
104+
105+
# Wait for first prompt to appear
106+
Sleep 2s
107+
108+
# Question 1: Select the type of change (press d to "docs")
109+
Sleep 1s
110+
Type "d"
111+
Sleep 2s
112+
Enter
113+
Sleep 1s
114+
115+
# Question 2: Scope (optional, skip)
116+
Enter
117+
Sleep 1s
118+
119+
# Question 3: Subject
120+
Type "demo with custom keys"
121+
Sleep 500ms
122+
Enter
123+
Sleep 500ms
124+
125+
# Question 4: Is this a BREAKING CHANGE? (No)
126+
Enter
127+
Sleep 500ms
128+
129+
# Question 5: Body (optional, skip)
130+
Enter
131+
Sleep 500ms
132+
133+
# Question 6: Footer (optional, skip)
134+
Enter
135+
Sleep 500ms
136+
137+
# Wait for commit success message
138+
Sleep 1s

0 commit comments

Comments
 (0)