Improve demo GIF
- Tweak timing - Increase scale to 4x - Use local copy of asciicast2gif avoid missing characters type: documentation
This commit is contained in:
parent
685883f026
commit
4f8b6a212e
|
@ -2,9 +2,14 @@ Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
|
||||||
|
UNRELEASED - 2020-04-08
|
||||||
|
-----------------------
|
||||||
|
- :books: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Improve demo GIF - _Casey Rodarmor <casey@rodarmor.com>_
|
||||||
|
|
||||||
|
|
||||||
[v0.1.2](https://github.com/casey/intermodal/releases/tag/v0.1.2) - 2020-04-08
|
[v0.1.2](https://github.com/casey/intermodal/releases/tag/v0.1.2) - 2020-04-08
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
- :bookmark: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Release v0.1.2 - _Casey Rodarmor <casey@rodarmor.com>_
|
- :bookmark: [`685883f02698`](https://github.com/casey/intermodal/commit/685883f02698733e5c8270d52ddf53837b146b0d) Release v0.1.2 - _Casey Rodarmor <casey@rodarmor.com>_
|
||||||
- :wrench: [`03a993516481`](https://github.com/casey/intermodal/commit/03a99351648173aa12def1a8f9b9d9ddfe45bbc9) Skip fixup commits in changelog - _Casey Rodarmor <casey@rodarmor.com>_
|
- :wrench: [`03a993516481`](https://github.com/casey/intermodal/commit/03a99351648173aa12def1a8f9b9d9ddfe45bbc9) Skip fixup commits in changelog - _Casey Rodarmor <casey@rodarmor.com>_
|
||||||
- :art: [`a395052f7c22`](https://github.com/casey/intermodal/commit/a395052f7c226a934cf1b0d75294b1a3146cbeae) Deduplicate progress style string - _Casey Rodarmor <casey@rodarmor.com>_
|
- :art: [`a395052f7c22`](https://github.com/casey/intermodal/commit/a395052f7c226a934cf1b0d75294b1a3146cbeae) Deduplicate progress style string - _Casey Rodarmor <casey@rodarmor.com>_
|
||||||
- :wrench: [`db2a2ac4f556`](https://github.com/casey/intermodal/commit/db2a2ac4f556e7a1a450f9a18d212f082d18fb9d) Refactor demo recipe in justfile into multiple recipes - _Casey Rodarmor <casey@rodarmor.com>_
|
- :wrench: [`db2a2ac4f556`](https://github.com/casey/intermodal/commit/db2a2ac4f556e7a1a450f9a18d212f082d18fb9d) Refactor demo recipe in justfile into multiple recipes - _Casey Rodarmor <casey@rodarmor.com>_
|
||||||
|
|
|
@ -19,7 +19,7 @@ const SCRIPT: &str = "
|
||||||
|
|
||||||
const PROMPT: &str = "\x1b[0;34m$\x1b[0m ";
|
const PROMPT: &str = "\x1b[0;34m$\x1b[0m ";
|
||||||
|
|
||||||
const CPM: u64 = 600;
|
const CPM: u64 = 1000;
|
||||||
|
|
||||||
fn commands() -> Vec<Vec<&'static str>> {
|
fn commands() -> Vec<Vec<&'static str>> {
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
@ -55,6 +55,7 @@ fn run(command: &[&str]) -> Result<()> {
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
let char_delay = Duration::from_millis(1000 * 60 / CPM);
|
let char_delay = Duration::from_millis(1000 * 60 / CPM);
|
||||||
let line_delay = char_delay * 7;
|
let line_delay = char_delay * 7;
|
||||||
|
let enter_delay = char_delay * 5;
|
||||||
|
|
||||||
for (i, command) in commands().iter().enumerate() {
|
for (i, command) in commands().iter().enumerate() {
|
||||||
print(PROMPT)?;
|
print(PROMPT)?;
|
||||||
|
@ -63,14 +64,16 @@ fn main() -> Result<()> {
|
||||||
sleep(line_delay);
|
sleep(line_delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut line = command.join(" ");
|
let line = command.join(" ");
|
||||||
line.push('\n');
|
|
||||||
|
|
||||||
for c in line.chars() {
|
for c in line.chars() {
|
||||||
sleep(char_delay);
|
sleep(char_delay);
|
||||||
print(&c.to_string())?;
|
print(&c.to_string())?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sleep(enter_delay);
|
||||||
|
print("\n")?;
|
||||||
|
|
||||||
run(&command)?;
|
run(&command)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
justfile
2
justfile
|
@ -148,7 +148,7 @@ demo-upload:
|
||||||
asciinema upload tmp/demo.json
|
asciinema upload tmp/demo.json
|
||||||
|
|
||||||
demo-render:
|
demo-render:
|
||||||
asciicast2gif tmp/demo.json www/demo.gif
|
../asciicast2gif/asciicast2gif -S4 tmp/demo.json www/demo.gif
|
||||||
|
|
||||||
# open site index
|
# open site index
|
||||||
www:
|
www:
|
||||||
|
|
BIN
www/demo.gif
BIN
www/demo.gif
Binary file not shown.
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 372 KiB |
Loading…
Reference in New Issue
Block a user