demotape 0.0.2 → 0.0.3

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.
Files changed (548) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +6 -0
  3. data/CHANGELOG.md +9 -0
  4. data/Makefile +4 -2
  5. data/README.md +101 -10
  6. data/demotape.gemspec +1 -1
  7. data/demotape.y +224 -505
  8. data/demotape_new.y.backup +160 -0
  9. data/demotape_simple_test.y +32 -0
  10. data/editors/sublime-text/DemoTape.sublime-completions +4 -0
  11. data/editors/sublime-text/DemoTape.sublime-syntax +24 -2
  12. data/editors/vim/syntax/demotape.vim +16 -2
  13. data/editors/vscode/demotape.tmLanguage.json +31 -3
  14. data/lib/demo_tape/cli.rb +36 -0
  15. data/lib/demo_tape/command.rb +63 -103
  16. data/lib/demo_tape/exporter.rb +3 -0
  17. data/lib/demo_tape/formatter.rb +142 -0
  18. data/lib/demo_tape/lexer.rb +118 -34
  19. data/lib/demo_tape/parser/helpers.rb +363 -0
  20. data/lib/demo_tape/parser/rules.rb +396 -0
  21. data/lib/demo_tape/parser.rb +381 -592
  22. data/lib/demo_tape/runner.rb +82 -27
  23. data/lib/demo_tape/token.rb +86 -0
  24. data/lib/demo_tape/version.rb +1 -1
  25. data/lib/demo_tape.rb +5 -2
  26. metadata +10 -527
  27. data/examples/alt.mp4 +0 -0
  28. data/examples/alt.png +0 -0
  29. data/examples/alt.tape +0 -9
  30. data/examples/arrow.mp4 +0 -0
  31. data/examples/arrow.png +0 -0
  32. data/examples/arrow.tape +0 -7
  33. data/examples/backspace.mp4 +0 -0
  34. data/examples/backspace.png +0 -0
  35. data/examples/backspace.tape +0 -4
  36. data/examples/bash.mp4 +0 -0
  37. data/examples/bash.png +0 -0
  38. data/examples/bash.tape +0 -4
  39. data/examples/bg.jpg +0 -0
  40. data/examples/clear.mp4 +0 -0
  41. data/examples/clear.png +0 -0
  42. data/examples/clear.tape +0 -6
  43. data/examples/cli_ui_interactive_prompt.mp4 +0 -0
  44. data/examples/cli_ui_interactive_prompt.png +0 -0
  45. data/examples/cli_ui_interactive_prompt.tape +0 -16
  46. data/examples/cli_ui_nested_frames.mp4 +0 -0
  47. data/examples/cli_ui_nested_frames.png +0 -0
  48. data/examples/cli_ui_nested_frames.tape +0 -15
  49. data/examples/cli_ui_progress.mp4 +0 -0
  50. data/examples/cli_ui_progress.png +0 -0
  51. data/examples/cli_ui_progress.tape +0 -6
  52. data/examples/cli_ui_spinner.mp4 +0 -0
  53. data/examples/cli_ui_spinner.png +0 -0
  54. data/examples/cli_ui_spinner.tape +0 -6
  55. data/examples/cli_ui_status_widget.mp4 +0 -0
  56. data/examples/cli_ui_status_widget.png +0 -0
  57. data/examples/cli_ui_status_widget.tape +0 -6
  58. data/examples/cli_ui_symbols.mp4 +0 -0
  59. data/examples/cli_ui_symbols.png +0 -0
  60. data/examples/cli_ui_symbols.tape +0 -6
  61. data/examples/cli_ui_text_prompt.mp4 +0 -0
  62. data/examples/cli_ui_text_prompt.png +0 -0
  63. data/examples/cli_ui_text_prompt.tape +0 -10
  64. data/examples/clipboard.mp4 +0 -0
  65. data/examples/clipboard.png +0 -0
  66. data/examples/clipboard.tape +0 -5
  67. data/examples/ctrl.mp4 +0 -0
  68. data/examples/ctrl.png +0 -0
  69. data/examples/ctrl.tape +0 -5
  70. data/examples/ctrl_arrows.mp4 +0 -0
  71. data/examples/ctrl_arrows.png +0 -0
  72. data/examples/ctrl_arrows.tape +0 -14
  73. data/examples/demotape.mp4 +0 -0
  74. data/examples/demotape.png +0 -0
  75. data/examples/demotape.tape +0 -6
  76. data/examples/demotape.txt +0 -13
  77. data/examples/enter.mp4 +0 -0
  78. data/examples/enter.png +0 -0
  79. data/examples/enter.tape +0 -3
  80. data/examples/errors/include_itself.tape +0 -1
  81. data/examples/fastfetch.gif +0 -0
  82. data/examples/fastfetch.mp4 +0 -0
  83. data/examples/fastfetch.png +0 -0
  84. data/examples/fastfetch.tape +0 -11
  85. data/examples/fish.mp4 +0 -0
  86. data/examples/fish.png +0 -0
  87. data/examples/fish.tape +0 -4
  88. data/examples/format.mp4 +0 -0
  89. data/examples/format.png +0 -0
  90. data/examples/format.tape +0 -15
  91. data/examples/gh-cli.mp4 +0 -0
  92. data/examples/gh-cli.png +0 -0
  93. data/examples/gh-cli.tape +0 -13
  94. data/examples/gif_loop.gif +0 -0
  95. data/examples/gif_loop.png +0 -0
  96. data/examples/gif_loop.tape +0 -5
  97. data/examples/include.mp4 +0 -0
  98. data/examples/include.png +0 -0
  99. data/examples/include.tape +0 -1
  100. data/examples/include_with_set.mp4 +0 -0
  101. data/examples/include_with_set.png +0 -0
  102. data/examples/include_with_set.tape +0 -2
  103. data/examples/meta/cli.tape +0 -10
  104. data/examples/nerdfonts.mp4 +0 -0
  105. data/examples/nerdfonts.png +0 -0
  106. data/examples/nerdfonts.tape +0 -9
  107. data/examples/output.avi +0 -0
  108. data/examples/output.gif +0 -0
  109. data/examples/output.mov +0 -0
  110. data/examples/output.mp4 +0 -0
  111. data/examples/output.png +0 -0
  112. data/examples/output.tape +0 -9
  113. data/examples/output.webm +0 -0
  114. data/examples/products.json +0 -1803
  115. data/examples/screenshot.mp4 +0 -0
  116. data/examples/screenshot.png +0 -0
  117. data/examples/screenshot.tape +0 -9
  118. data/examples/script.rb +0 -3
  119. data/examples/set_cursor_bar.mp4 +0 -0
  120. data/examples/set_cursor_bar.png +0 -0
  121. data/examples/set_cursor_bar.tape +0 -5
  122. data/examples/set_cursor_blink.mp4 +0 -0
  123. data/examples/set_cursor_blink.png +0 -0
  124. data/examples/set_cursor_blink.tape +0 -4
  125. data/examples/set_cursor_underline.mp4 +0 -0
  126. data/examples/set_cursor_underline.png +0 -0
  127. data/examples/set_cursor_underline.tape +0 -5
  128. data/examples/set_dimensions.mp4 +0 -0
  129. data/examples/set_dimensions.png +0 -0
  130. data/examples/set_dimensions.tape +0 -5
  131. data/examples/set_font_family.mp4 +0 -0
  132. data/examples/set_font_family.png +0 -0
  133. data/examples/set_font_family.tape +0 -4
  134. data/examples/set_font_size.mp4 +0 -0
  135. data/examples/set_font_size.png +0 -0
  136. data/examples/set_font_size.tape +0 -4
  137. data/examples/set_line_height.mp4 +0 -0
  138. data/examples/set_line_height.png +0 -0
  139. data/examples/set_line_height.tape +0 -8
  140. data/examples/set_margin.mp4 +0 -0
  141. data/examples/set_margin.png +0 -0
  142. data/examples/set_margin.tape +0 -7
  143. data/examples/set_margin_with_border_radius.mp4 +0 -0
  144. data/examples/set_margin_with_border_radius.png +0 -0
  145. data/examples/set_margin_with_border_radius.tape +0 -8
  146. data/examples/set_margin_with_image.mp4 +0 -0
  147. data/examples/set_margin_with_image.png +0 -0
  148. data/examples/set_margin_with_image.tape +0 -7
  149. data/examples/set_padding.mp4 +0 -0
  150. data/examples/set_padding.png +0 -0
  151. data/examples/set_padding.tape +0 -7
  152. data/examples/set_theme.mp4 +0 -0
  153. data/examples/set_theme.png +0 -0
  154. data/examples/set_theme.tape +0 -9
  155. data/examples/set_theme_property.mp4 +0 -0
  156. data/examples/set_theme_property.png +0 -0
  157. data/examples/set_theme_property.tape +0 -10
  158. data/examples/set_typing_speed.mp4 +0 -0
  159. data/examples/set_typing_speed.png +0 -0
  160. data/examples/set_typing_speed.tape +0 -6
  161. data/examples/slides.mp4 +0 -0
  162. data/examples/slides.png +0 -0
  163. data/examples/slides.tape +0 -14
  164. data/examples/space.mp4 +0 -0
  165. data/examples/space.png +0 -0
  166. data/examples/space.tape +0 -3
  167. data/examples/stdin.mp4 +0 -0
  168. data/examples/stdin.png +0 -0
  169. data/examples/stdin.tape +0 -7
  170. data/examples/tab.mp4 +0 -0
  171. data/examples/tab.png +0 -0
  172. data/examples/tab.tape +0 -5
  173. data/examples/themes/3024_day.png +0 -0
  174. data/examples/themes/3024_night.png +0 -0
  175. data/examples/themes/aardvark_blue.png +0 -0
  176. data/examples/themes/abernathy.png +0 -0
  177. data/examples/themes/adventure.png +0 -0
  178. data/examples/themes/adventure_time.png +0 -0
  179. data/examples/themes/afterglow.png +0 -0
  180. data/examples/themes/alabaster.png +0 -0
  181. data/examples/themes/alien_blood.png +0 -0
  182. data/examples/themes/andromeda.png +0 -0
  183. data/examples/themes/apple_classic.png +0 -0
  184. data/examples/themes/apple_system_colors.png +0 -0
  185. data/examples/themes/arcoiris.png +0 -0
  186. data/examples/themes/argonaut.png +0 -0
  187. data/examples/themes/arthur.png +0 -0
  188. data/examples/themes/atelier_sulphurpool.png +0 -0
  189. data/examples/themes/atom.png +0 -0
  190. data/examples/themes/atom_one_light.png +0 -0
  191. data/examples/themes/aurora.png +0 -0
  192. data/examples/themes/ayu.png +0 -0
  193. data/examples/themes/ayu_light.png +0 -0
  194. data/examples/themes/ayu_mirage.png +0 -0
  195. data/examples/themes/banana_blueberry.png +0 -0
  196. data/examples/themes/batman.png +0 -0
  197. data/examples/themes/belafonte_day.png +0 -0
  198. data/examples/themes/belafonte_night.png +0 -0
  199. data/examples/themes/birds_of_paradise.png +0 -0
  200. data/examples/themes/blazer.png +0 -0
  201. data/examples/themes/blue_berry_pie.png +0 -0
  202. data/examples/themes/blue_dolphin.png +0 -0
  203. data/examples/themes/blue_matrix.png +0 -0
  204. data/examples/themes/bluloco_dark.png +0 -0
  205. data/examples/themes/bluloco_light.png +0 -0
  206. data/examples/themes/borland.png +0 -0
  207. data/examples/themes/breeze.png +0 -0
  208. data/examples/themes/bright_lights.png +0 -0
  209. data/examples/themes/broadcast.png +0 -0
  210. data/examples/themes/brogrammer.png +0 -0
  211. data/examples/themes/bubbles.png +0 -0
  212. data/examples/themes/builtin_dark.png +0 -0
  213. data/examples/themes/builtin_light.png +0 -0
  214. data/examples/themes/builtin_pastel_dark.png +0 -0
  215. data/examples/themes/builtin_solarized_dark.png +0 -0
  216. data/examples/themes/builtin_solarized_light.png +0 -0
  217. data/examples/themes/builtin_tango_dark.png +0 -0
  218. data/examples/themes/builtin_tango_light.png +0 -0
  219. data/examples/themes/c64.png +0 -0
  220. data/examples/themes/calamity.png +0 -0
  221. data/examples/themes/catppuccin_frappe.png +0 -0
  222. data/examples/themes/catppuccin_latte.png +0 -0
  223. data/examples/themes/catppuccin_macchiato.png +0 -0
  224. data/examples/themes/catppuccin_mocha.png +0 -0
  225. data/examples/themes/cga.png +0 -0
  226. data/examples/themes/chalk.png +0 -0
  227. data/examples/themes/chalkboard.png +0 -0
  228. data/examples/themes/challenger_deep.png +0 -0
  229. data/examples/themes/chester.png +0 -0
  230. data/examples/themes/ciapre.png +0 -0
  231. data/examples/themes/clrs.png +0 -0
  232. data/examples/themes/cobalt2.png +0 -0
  233. data/examples/themes/cobalt_neon.png +0 -0
  234. data/examples/themes/coffee_theme.png +0 -0
  235. data/examples/themes/contrast_light.png +0 -0
  236. data/examples/themes/coolnight.png +0 -0
  237. data/examples/themes/crayon_pony_fish.png +0 -0
  238. data/examples/themes/crystal_violet.png +0 -0
  239. data/examples/themes/cutie_pro.png +0 -0
  240. data/examples/themes/cyber_cube.png +0 -0
  241. data/examples/themes/cyber_punk2077.png +0 -0
  242. data/examples/themes/cyberdyne.png +0 -0
  243. data/examples/themes/cyberpunk.png +0 -0
  244. data/examples/themes/dark_pastel.png +0 -0
  245. data/examples/themes/dark_plus.png +0 -0
  246. data/examples/themes/darkermatrix.png +0 -0
  247. data/examples/themes/darkmatrix.png +0 -0
  248. data/examples/themes/darkside.png +0 -0
  249. data/examples/themes/dayfox.png +0 -0
  250. data/examples/themes/deep.png +0 -0
  251. data/examples/themes/desert.png +0 -0
  252. data/examples/themes/dimmed_monokai.png +0 -0
  253. data/examples/themes/django.png +0 -0
  254. data/examples/themes/django_reborn_again.png +0 -0
  255. data/examples/themes/django_smooth.png +0 -0
  256. data/examples/themes/doom_one.png +0 -0
  257. data/examples/themes/doom_peacock.png +0 -0
  258. data/examples/themes/dot_gov.png +0 -0
  259. data/examples/themes/dracula.png +0 -0
  260. data/examples/themes/dracula_plus.png +0 -0
  261. data/examples/themes/duckbones.png +0 -0
  262. data/examples/themes/duotone_dark.png +0 -0
  263. data/examples/themes/earthsong.png +0 -0
  264. data/examples/themes/elemental.png +0 -0
  265. data/examples/themes/elementary.png +0 -0
  266. data/examples/themes/encom.png +0 -0
  267. data/examples/themes/espresso.png +0 -0
  268. data/examples/themes/espresso_libre.png +0 -0
  269. data/examples/themes/everblush.png +0 -0
  270. data/examples/themes/fahrenheit.png +0 -0
  271. data/examples/themes/fairyfloss.png +0 -0
  272. data/examples/themes/farmhouse_dark.png +0 -0
  273. data/examples/themes/farmhouse_light.png +0 -0
  274. data/examples/themes/fideloper.png +0 -0
  275. data/examples/themes/firefly_traditional.png +0 -0
  276. data/examples/themes/firefox_dev.png +0 -0
  277. data/examples/themes/firewatch.png +0 -0
  278. data/examples/themes/fish_tank.png +0 -0
  279. data/examples/themes/flat.png +0 -0
  280. data/examples/themes/flatland.png +0 -0
  281. data/examples/themes/flexoki_dark.png +0 -0
  282. data/examples/themes/flexoki_light.png +0 -0
  283. data/examples/themes/floraverse.png +0 -0
  284. data/examples/themes/forest_blue.png +0 -0
  285. data/examples/themes/framer.png +0 -0
  286. data/examples/themes/front_end_delight.png +0 -0
  287. data/examples/themes/fun_forrest.png +0 -0
  288. data/examples/themes/galaxy.png +0 -0
  289. data/examples/themes/galizur.png +0 -0
  290. data/examples/themes/ganyu.png +0 -0
  291. data/examples/themes/git_hub_dark.png +0 -0
  292. data/examples/themes/github.png +0 -0
  293. data/examples/themes/glacier.png +0 -0
  294. data/examples/themes/glorious.png +0 -0
  295. data/examples/themes/grape.png +0 -0
  296. data/examples/themes/grass.png +0 -0
  297. data/examples/themes/grey_green.png +0 -0
  298. data/examples/themes/gruvbox_dark.png +0 -0
  299. data/examples/themes/gruvbox_dark_hard.png +0 -0
  300. data/examples/themes/gruvbox_light.png +0 -0
  301. data/examples/themes/guezwhoz.png +0 -0
  302. data/examples/themes/h4rithd.png +0 -0
  303. data/examples/themes/h4rithd_com.png +0 -0
  304. data/examples/themes/ha_x0_r_blue.png +0 -0
  305. data/examples/themes/ha_x0_r_gr33_n.png +0 -0
  306. data/examples/themes/ha_x0_r_r3_d.png +0 -0
  307. data/examples/themes/hacktober.png +0 -0
  308. data/examples/themes/hardcore.png +0 -0
  309. data/examples/themes/harper.png +0 -0
  310. data/examples/themes/highway.png +0 -0
  311. data/examples/themes/hipster_green.png +0 -0
  312. data/examples/themes/hivacruz.png +0 -0
  313. data/examples/themes/homebrew.png +0 -0
  314. data/examples/themes/hopscotch.png +0 -0
  315. data/examples/themes/hopscotch_256.png +0 -0
  316. data/examples/themes/horizon.png +0 -0
  317. data/examples/themes/hurtado.png +0 -0
  318. data/examples/themes/hybrid.png +0 -0
  319. data/examples/themes/hyper.png +0 -0
  320. data/examples/themes/ic_green_ppl.png +0 -0
  321. data/examples/themes/ic_orange_ppl.png +0 -0
  322. data/examples/themes/iceberg_dark.png +0 -0
  323. data/examples/themes/iceberg_light.png +0 -0
  324. data/examples/themes/idea.png +0 -0
  325. data/examples/themes/idle_toes.png +0 -0
  326. data/examples/themes/ir_black.png +0 -0
  327. data/examples/themes/iterm2_dark_background.png +0 -0
  328. data/examples/themes/iterm2_default.png +0 -0
  329. data/examples/themes/iterm2_light_background.png +0 -0
  330. data/examples/themes/iterm2_pastel_dark_background.png +0 -0
  331. data/examples/themes/iterm2_smoooooth.png +0 -0
  332. data/examples/themes/iterm2_solarized_dark.png +0 -0
  333. data/examples/themes/iterm2_solarized_light.png +0 -0
  334. data/examples/themes/iterm2_tango_dark.png +0 -0
  335. data/examples/themes/iterm2_tango_light.png +0 -0
  336. data/examples/themes/jackie_brown.png +0 -0
  337. data/examples/themes/japanesque.png +0 -0
  338. data/examples/themes/jellybeans.png +0 -0
  339. data/examples/themes/jet_brains_darcula.png +0 -0
  340. data/examples/themes/jubi.png +0 -0
  341. data/examples/themes/juicy_colors.png +0 -0
  342. data/examples/themes/kanagawa.png +0 -0
  343. data/examples/themes/kanagawabones.png +0 -0
  344. data/examples/themes/kibble.png +0 -0
  345. data/examples/themes/kolorit.png +0 -0
  346. data/examples/themes/konsolas.png +0 -0
  347. data/examples/themes/lab_fox.png +0 -0
  348. data/examples/themes/laser.png +0 -0
  349. data/examples/themes/later_this_evening.png +0 -0
  350. data/examples/themes/lavandula.png +0 -0
  351. data/examples/themes/liquid_carbon.png +0 -0
  352. data/examples/themes/liquid_carbon_transparent.png +0 -0
  353. data/examples/themes/liquid_carbon_transparent_inverse.png +0 -0
  354. data/examples/themes/lovelace.png +0 -0
  355. data/examples/themes/man_page.png +0 -0
  356. data/examples/themes/mariana.png +0 -0
  357. data/examples/themes/material.png +0 -0
  358. data/examples/themes/material_dark.png +0 -0
  359. data/examples/themes/material_darker.png +0 -0
  360. data/examples/themes/material_design_colors.png +0 -0
  361. data/examples/themes/material_ocean.png +0 -0
  362. data/examples/themes/mathias.png +0 -0
  363. data/examples/themes/matrix.png +0 -0
  364. data/examples/themes/medallion.png +0 -0
  365. data/examples/themes/mellifluous.png +0 -0
  366. data/examples/themes/midnight_in_mojave.png +0 -0
  367. data/examples/themes/mirage.png +0 -0
  368. data/examples/themes/misterioso.png +0 -0
  369. data/examples/themes/molokai.png +0 -0
  370. data/examples/themes/mona_lisa.png +0 -0
  371. data/examples/themes/monokai_cmder.png +0 -0
  372. data/examples/themes/monokai_pro.png +0 -0
  373. data/examples/themes/monokai_pro_filter_octagon.png +0 -0
  374. data/examples/themes/monokai_pro_filter_ristretto.png +0 -0
  375. data/examples/themes/monokai_remastered.png +0 -0
  376. data/examples/themes/monokai_soda.png +0 -0
  377. data/examples/themes/monokai_vivid.png +0 -0
  378. data/examples/themes/moonlight_ii.png +0 -0
  379. data/examples/themes/n0tch2k.png +0 -0
  380. data/examples/themes/neobones_dark.png +0 -0
  381. data/examples/themes/neobones_light.png +0 -0
  382. data/examples/themes/neon.png +0 -0
  383. data/examples/themes/neopolitan.png +0 -0
  384. data/examples/themes/neutron.png +0 -0
  385. data/examples/themes/night_city.png +0 -0
  386. data/examples/themes/night_lion_v1.png +0 -0
  387. data/examples/themes/night_lion_v2.png +0 -0
  388. data/examples/themes/night_owlish_light.png +0 -0
  389. data/examples/themes/nightfox.png +0 -0
  390. data/examples/themes/niji.png +0 -0
  391. data/examples/themes/nocturnal_winter.png +0 -0
  392. data/examples/themes/nord.png +0 -0
  393. data/examples/themes/nord_light.png +0 -0
  394. data/examples/themes/novel.png +0 -0
  395. data/examples/themes/nvim_dark.png +0 -0
  396. data/examples/themes/nvim_light.png +0 -0
  397. data/examples/themes/obsidian.png +0 -0
  398. data/examples/themes/ocean.png +0 -0
  399. data/examples/themes/oceanic_material.png +0 -0
  400. data/examples/themes/oceanic_next.png +0 -0
  401. data/examples/themes/ollie.png +0 -0
  402. data/examples/themes/one_dark.png +0 -0
  403. data/examples/themes/one_half_dark.png +0 -0
  404. data/examples/themes/one_half_light.png +0 -0
  405. data/examples/themes/one_star.png +0 -0
  406. data/examples/themes/operator_mono_dark.png +0 -0
  407. data/examples/themes/overnight_slumber.png +0 -0
  408. data/examples/themes/pale_night_hc.png +0 -0
  409. data/examples/themes/pandora.png +0 -0
  410. data/examples/themes/paraiso_dark.png +0 -0
  411. data/examples/themes/paul_millr.png +0 -0
  412. data/examples/themes/pencil_dark.png +0 -0
  413. data/examples/themes/pencil_light.png +0 -0
  414. data/examples/themes/peppermint.png +0 -0
  415. data/examples/themes/piatto_light.png +0 -0
  416. data/examples/themes/pnevma.png +0 -0
  417. data/examples/themes/popping_and_locking.png +0 -0
  418. data/examples/themes/primary.png +0 -0
  419. data/examples/themes/primer.png +0 -0
  420. data/examples/themes/pro.png +0 -0
  421. data/examples/themes/pro_light.png +0 -0
  422. data/examples/themes/purple_rain.png +0 -0
  423. data/examples/themes/purplepeter.png +0 -0
  424. data/examples/themes/qb64_super_dark_blue.png +0 -0
  425. data/examples/themes/rapture.png +0 -0
  426. data/examples/themes/raycast_dark.png +0 -0
  427. data/examples/themes/raycast_light.png +0 -0
  428. data/examples/themes/rebecca.png +0 -0
  429. data/examples/themes/red_alert.png +0 -0
  430. data/examples/themes/red_planet.png +0 -0
  431. data/examples/themes/red_sands.png +0 -0
  432. data/examples/themes/relaxed.png +0 -0
  433. data/examples/themes/retro.png +0 -0
  434. data/examples/themes/retrowave.png +0 -0
  435. data/examples/themes/rippedcasts.png +0 -0
  436. data/examples/themes/rose_pine.png +0 -0
  437. data/examples/themes/rose_pine_dawn.png +0 -0
  438. data/examples/themes/rose_pine_moon.png +0 -0
  439. data/examples/themes/rouge_2.png +0 -0
  440. data/examples/themes/royal.png +0 -0
  441. data/examples/themes/ryuuko.png +0 -0
  442. data/examples/themes/sakura.png +0 -0
  443. data/examples/themes/scarlet_protocol.png +0 -0
  444. data/examples/themes/sea_shells.png +0 -0
  445. data/examples/themes/seafoam_pastel.png +0 -0
  446. data/examples/themes/seoulbones_dark.png +0 -0
  447. data/examples/themes/seoulbones_light.png +0 -0
  448. data/examples/themes/serendipity_midnight.png +0 -0
  449. data/examples/themes/serendipity_morning.png +0 -0
  450. data/examples/themes/serendipity_sunset.png +0 -0
  451. data/examples/themes/seti.png +0 -0
  452. data/examples/themes/shades_of_purple.png +0 -0
  453. data/examples/themes/shaman.png +0 -0
  454. data/examples/themes/slate.png +0 -0
  455. data/examples/themes/sleepy_hollow.png +0 -0
  456. data/examples/themes/smyck.png +0 -0
  457. data/examples/themes/snazzy.png +0 -0
  458. data/examples/themes/soft_server.png +0 -0
  459. data/examples/themes/solarized_darcula.png +0 -0
  460. data/examples/themes/solarized_dark_higher_contrast.png +0 -0
  461. data/examples/themes/solarized_dark_patched.png +0 -0
  462. data/examples/themes/sonoran_gothic.png +0 -0
  463. data/examples/themes/sonoran_sunrise.png +0 -0
  464. data/examples/themes/space_gray.png +0 -0
  465. data/examples/themes/space_gray_eighties.png +0 -0
  466. data/examples/themes/space_gray_eighties_dull.png +0 -0
  467. data/examples/themes/spacedust.png +0 -0
  468. data/examples/themes/spiderman.png +0 -0
  469. data/examples/themes/spring.png +0 -0
  470. data/examples/themes/square.png +0 -0
  471. data/examples/themes/sublette.png +0 -0
  472. data/examples/themes/subliminal.png +0 -0
  473. data/examples/themes/sundried.png +0 -0
  474. data/examples/themes/symfonic.png +0 -0
  475. data/examples/themes/synthwave.png +0 -0
  476. data/examples/themes/synthwave_alpha.png +0 -0
  477. data/examples/themes/synthwave_everything.png +0 -0
  478. data/examples/themes/tango_adapted.png +0 -0
  479. data/examples/themes/tango_half_adapted.png +0 -0
  480. data/examples/themes/teerb.png +0 -0
  481. data/examples/themes/terafox.png +0 -0
  482. data/examples/themes/terminal_basic.png +0 -0
  483. data/examples/themes/thayer_bright.png +0 -0
  484. data/examples/themes/the_hulk.png +0 -0
  485. data/examples/themes/theme.tape +0 -13
  486. data/examples/themes/tinacious_design_dark.png +0 -0
  487. data/examples/themes/tinacious_design_light.png +0 -0
  488. data/examples/themes/tokyo_night.png +0 -0
  489. data/examples/themes/tokyo_night_light.png +0 -0
  490. data/examples/themes/tokyo_night_storm.png +0 -0
  491. data/examples/themes/tokyonight.png +0 -0
  492. data/examples/themes/tokyonight_day.png +0 -0
  493. data/examples/themes/tokyonight_storm.png +0 -0
  494. data/examples/themes/tomorrow.png +0 -0
  495. data/examples/themes/tomorrow_night.png +0 -0
  496. data/examples/themes/tomorrow_night_blue.png +0 -0
  497. data/examples/themes/tomorrow_night_bright.png +0 -0
  498. data/examples/themes/tomorrow_night_burns.png +0 -0
  499. data/examples/themes/tomorrow_night_eighties.png +0 -0
  500. data/examples/themes/toy_chest.png +0 -0
  501. data/examples/themes/treehouse.png +0 -0
  502. data/examples/themes/twilight.png +0 -0
  503. data/examples/themes/ubuntu.png +0 -0
  504. data/examples/themes/ultra_dark.png +0 -0
  505. data/examples/themes/ultra_violent.png +0 -0
  506. data/examples/themes/under_the_sea.png +0 -0
  507. data/examples/themes/unholy.png +0 -0
  508. data/examples/themes/unikitty.png +0 -0
  509. data/examples/themes/urple.png +0 -0
  510. data/examples/themes/vaughn.png +0 -0
  511. data/examples/themes/vesper.png +0 -0
  512. data/examples/themes/vibrant_ink.png +0 -0
  513. data/examples/themes/vimbones.png +0 -0
  514. data/examples/themes/violet_dark.png +0 -0
  515. data/examples/themes/violet_light.png +0 -0
  516. data/examples/themes/warm_neon.png +0 -0
  517. data/examples/themes/wez.png +0 -0
  518. data/examples/themes/whimsy.png +0 -0
  519. data/examples/themes/wild_cherry.png +0 -0
  520. data/examples/themes/wilmersdorf.png +0 -0
  521. data/examples/themes/wombat.png +0 -0
  522. data/examples/themes/wryan.png +0 -0
  523. data/examples/themes/zenbones.png +0 -0
  524. data/examples/themes/zenbones_dark.png +0 -0
  525. data/examples/themes/zenbones_light.png +0 -0
  526. data/examples/themes/zenburn.png +0 -0
  527. data/examples/themes/zenburned.png +0 -0
  528. data/examples/themes/zenwritten_dark.png +0 -0
  529. data/examples/themes/zenwritten_light.png +0 -0
  530. data/examples/themes/zeonica.png +0 -0
  531. data/examples/tmux.mp4 +0 -0
  532. data/examples/tmux.png +0 -0
  533. data/examples/tmux.tape +0 -28
  534. data/examples/type.mp4 +0 -0
  535. data/examples/type.png +0 -0
  536. data/examples/type.tape +0 -11
  537. data/examples/type_file.mp4 +0 -0
  538. data/examples/type_file.png +0 -0
  539. data/examples/type_file.tape +0 -23
  540. data/examples/variable_typing.mp4 +0 -0
  541. data/examples/variable_typing.png +0 -0
  542. data/examples/variable_typing.tape +0 -41
  543. data/examples/wait_until.mp4 +0 -0
  544. data/examples/wait_until.png +0 -0
  545. data/examples/wait_until.tape +0 -8
  546. data/examples/zsh.mp4 +0 -0
  547. data/examples/zsh.png +0 -0
  548. data/examples/zsh.tape +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b0985a34fe71c2491c771469f2916afadef6cc023438b95998a999d616652b6
4
- data.tar.gz: b8346fc6f3638eb3555decd5e49bb45c27a5ee100e33102ab1d236f722bef951
3
+ metadata.gz: 793dee695198e8d635ab95172a62cd5d33e9d9b8bd78fa8f3d47bce6e603d883
4
+ data.tar.gz: 6e093f2323f214a496ce865433be0ef1424ecbdbe7fe82ca616f3c616e330dd6
5
5
  SHA512:
6
- metadata.gz: 14518b42357259a40987158bf934a8fa515dfb2db7b94875f6ea9c912c8d8a781ffd905d76e12e3ca29f6a0cac48a422e998cd4726c26b1a81ede966049e8300
7
- data.tar.gz: 071a3decb011adf8fcac3d53a1efc734b6345f4c9df7bc3f49f9f2b7513d4b6e4de126e89b501110de7eabe44f73a8d7a51971f03c8428c8acbf16bd4bd95978
6
+ metadata.gz: 4e82b9896b78c5deaea1dc9bb30c8f5128523fb0b92f7a455cd83faa1f267f82767dc35c120b9d8b5a318ee1f80133d18005d7fcd9582ea5b9f14d78668a27fc
7
+ data.tar.gz: 497ab24e25dda78d06aea04aa0349f6cfb3cf83d56b97608c011cc79953ab83b3bb53ff995e797514bc4845db2b5d2e8a5620786b68e7d0254178c281b961688
data/.rubocop.yml CHANGED
@@ -16,3 +16,9 @@ Gemspec/AttributeAssignment:
16
16
 
17
17
  Style/IdenticalConditionalBranches:
18
18
  Enabled: false
19
+
20
+ Layout/LineContinuationLeadingSpace:
21
+ Enabled: false
22
+
23
+ Minitest/EmptyLineBeforeAssertionMethods:
24
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -11,6 +11,15 @@ Prefix your message with one of the following:
11
11
  - [Security] in case of vulnerabilities.
12
12
  -->
13
13
 
14
+ ## v0.0.3
15
+
16
+ - [Changed] Re-implemented parser.
17
+ - [Added] Add `Group` command to group multiple commands together.
18
+ - [Added] Add `Run` command to execute shell commands (combines Type, Sleep,
19
+ Enter, Sleep).
20
+ - [Added] Add `Set run_enter_delay` configuration option (default: 300ms).
21
+ - [Added] Add `Set run_sleep` configuration option (default: 1s).
22
+
14
23
  ## v0.0.2
15
24
 
16
25
  - [Added] Add `demotape completion` command to generate shell completions.
data/Makefile CHANGED
@@ -14,6 +14,8 @@ examples:
14
14
  optipng -quiet -o2 examples/*.png
15
15
 
16
16
  theme-examples:
17
+ @rm -rf .sw*
18
+
17
19
  @for file in $$(ls lib/demo_tape/themes/*.json); do \
18
20
  name=$$(basename $${file%.*}); \
19
21
  output_base_path="examples/themes/$${name}"; \
@@ -24,6 +26,6 @@ theme-examples:
24
26
  --theme $${name} \
25
27
  --output-path $${output_base_path}.mp4 \
26
28
  --screenshot_only; \
29
+ optipng -quiet -o2 examples/themes/$${name}.png; \
27
30
  fi; \
28
- done; \
29
- optipng -quiet -o2 examples/themes/*.png
31
+ done;
data/README.md CHANGED
@@ -26,6 +26,51 @@ Or add the following line to your project's Gemfile:
26
26
  gem "demotape"
27
27
  ```
28
28
 
29
+ ### Shell Completion
30
+
31
+ DemoTape supports shell completion for Bash, Zsh, Fish, and PowerShell. To set
32
+ up completion for your shell:
33
+
34
+ **Bash:**
35
+
36
+ ```bash
37
+ demotape completion --shell=bash > /usr/local/etc/bash_completion.d/demotape
38
+ ```
39
+
40
+ Or add this to your `~/.bashrc`:
41
+
42
+ ```bash
43
+ source <(demotape completion --shell=bash)
44
+ ```
45
+
46
+ **Zsh:**
47
+
48
+ Add this to your `~/.zshrc`:
49
+
50
+ ```zsh
51
+ source <(demotape completion --shell=zsh)
52
+ ```
53
+
54
+ Or generate the completion script to a file in your `$fpath`:
55
+
56
+ ```zsh
57
+ demotape completion --shell=zsh > /usr/local/share/zsh/site-functions/_demotape
58
+ ```
59
+
60
+ **Fish:**
61
+
62
+ ```fish
63
+ demotape completion --shell=fish > ~/.config/fish/completions/demotape.fish
64
+ ```
65
+
66
+ **PowerShell:**
67
+
68
+ Add this to your PowerShell profile:
69
+
70
+ ```powershell
71
+ demotape completion --shell=powershell | Out-String | Invoke-Expression
72
+ ```
73
+
29
74
  ## Usage
30
75
 
31
76
  Run a DemoTape script:
@@ -126,6 +171,37 @@ for typing multiple commands or complex text that spans several lines.
126
171
  TypeFile "path/to/file"
127
172
  ```
128
173
 
174
+ **Run** - Type a command, wait, press Enter, and wait for output
175
+
176
+ ```demotape
177
+ Run "clear"
178
+ Run "ls -la"
179
+ Run@5s "npm install"
180
+ ```
181
+
182
+ The `Run` command is a convenience that combines typing text, waiting briefly,
183
+ pressing Enter, and waiting for the command to complete. It's equivalent to:
184
+
185
+ ```demotape
186
+ Type "command"
187
+ Sleep 300ms
188
+ Enter
189
+ Sleep 1s
190
+ ```
191
+
192
+ You can customize the timing behavior:
193
+
194
+ ```demotape
195
+ Set run_enter_delay 300ms # Time to wait before pressing Enter (default: 300ms)
196
+ Set run_sleep 1s # Time to wait after pressing Enter (default: 1s)
197
+ ```
198
+
199
+ The `@` modifier overrides the post-Enter sleep duration:
200
+
201
+ ```demotape
202
+ Run@5s "long-running-command" # Waits 5s after Enter instead of 1s
203
+ ```
204
+
129
205
  #### Keys and Key Combinations
130
206
 
131
207
  - **Special keys:** `Backspace`, `Delete`, `End`, `Enter`, `Escape`, `Home`,
@@ -378,6 +454,24 @@ Require "git"
378
454
  Require "ll"
379
455
  ```
380
456
 
457
+ **Group** - Define reusable command groups
458
+
459
+ Groups allow you to define a set of commands that can be called multiple times:
460
+
461
+ ```demotape
462
+ Group hello do
463
+ Run "echo 'Hello, World!'"
464
+ Run "echo 'Goodbye, World!'"
465
+ end
466
+
467
+ hello
468
+ Run "echo 'In between groups'"
469
+ hello
470
+ ```
471
+
472
+ In this example, the `hello` group is defined with two commands and then called
473
+ twice. Groups help organize and reuse common command sequences in your scripts.
474
+
381
475
  ### Data Types
382
476
 
383
477
  #### Strings
@@ -451,22 +545,19 @@ Set loop false
451
545
 
452
546
  ### Modifiers
453
547
 
454
- #### Speed Modifier (@)
548
+ #### Duration Modifier (@)
455
549
 
456
- Controls typing speed for Type commands and key presses:
550
+ Controls duration for various commands. For Type commands and key presses, it
551
+ sets the typing speed. For WaitUntil commands, it sets the timeout:
457
552
 
458
553
  ```demotape
554
+ # Typing speed
459
555
  Type@100ms "text"
460
556
  Enter@500ms
461
557
  Ctrl+C@1s
462
558
  Backspace@50ms 5
463
- ```
464
559
 
465
- #### Timeout Modifier (@)
466
-
467
- Sets timeout for WaitUntil commands:
468
-
469
- ```demotape
560
+ # Timeout for WaitUntil
470
561
  WaitUntil@5s /pattern/
471
562
  WaitUntil@30s /ready/
472
563
  ```
@@ -518,7 +609,7 @@ Sleep 1s
518
609
 
519
610
  ### Valid Commands Reference
520
611
 
521
- - **Typing**: `Type`, `TypeFile`
612
+ - **Typing**: `Type`, `TypeFile`, `Run`
522
613
  - **Special Keys**: `Enter`, `Space`, `Tab`, `Backspace`, `Escape`, `Delete`,
523
614
  `Insert`, `Home`, `End`, `PageUp`, `PageDown`, `Up`, `Down`, `Left`, `Right`,
524
615
  `F1-F12`
@@ -528,7 +619,7 @@ Sleep 1s
528
619
  - **Recording**: `Output`, `Screenshot`, `Pause`, `Resume`
529
620
  - **Screen**: `Clear`, `Send`
530
621
  - **Configuration**: `Set`
531
- - **Organization**: `Include`, `Require`
622
+ - **Organization**: `Include`, `Require`, `Group`
532
623
 
533
624
  ### Notes
534
625
 
data/demotape.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
29
29
  `git ls-files -z`
30
30
  .split("\x0")
31
- .reject {|f| f.match(%r{^(test|spec|features)/}) }
31
+ .reject {|f| f.match(%r{^(test|spec|features|examples)/}) }
32
32
  end
33
33
 
34
34
  spec.bindir = "exe"