-
Notifications
You must be signed in to change notification settings - Fork 0
retimeData
Subhajit Sahu edited this page Feb 3, 2021
·
8 revisions
Updates time in asciicast data. ๐ฆ ๐บ ๐ ๐ผ ๐ ๐ ๐ฐ ๐
Alternatives: retime, retimeSync, retimeData.
asciinema.retimeData(d, [o]);
// d: asciicast data
// o: options
// .input: input text
// .inputRate: input rate (0.1s)
// .inputDelay: input delay (1s)
// .outputRate: output rate (0.1s)
// .outputDelay: output delay (0.1s)
// .delay: initial delay (0s)
// โ updated asciicast data
const asciinema = require("extra-asciinema");
const fs = require("fs");
var d = fs.readFileSync("saved.cast", "utf8");
d = asciinema.retimeData(d, {inputDelay: 2});
fs.writeFileSync("saved.cast", d);
// "saved.cast" is updated