demotape 0.0.0.pre.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.
- checksums.yaml +7 -0
- data/.github/CODEOWNERS +4 -0
- data/.github/FUNDING.yml +4 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
- data/.github/ISSUE_TEMPLATE/config.yml +5 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +38 -0
- data/.github/dependabot.yml +15 -0
- data/.github/workflows/ruby-tests.yml +53 -0
- data/.gitignore +15 -0
- data/.rubocop.yml +18 -0
- data/CHANGELOG.md +16 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/CONTRIBUTING.md +80 -0
- data/Gemfile +5 -0
- data/LICENSE.md +20 -0
- data/Makefile +29 -0
- data/README.md +574 -0
- data/Rakefile +19 -0
- data/bin/console +16 -0
- data/bin/setup +10 -0
- data/bin/themes +37 -0
- data/demotape.ascii +19 -0
- data/demotape.gemspec +55 -0
- data/demotape.jsonc +59 -0
- data/demotape.y +520 -0
- data/demotape_ascii.rb +29 -0
- data/editors/sublime-text/Comments (DemoTape).tmPreferences +21 -0
- data/editors/sublime-text/DemoTape.sublime-completions +140 -0
- data/editors/sublime-text/DemoTape.sublime-syntax +243 -0
- data/editors/vim/README.md +91 -0
- data/editors/vim/ftdetect/demotape.vim +2 -0
- data/editors/vim/syntax/demotape.vim +81 -0
- data/editors/vscode/README.md +29 -0
- data/editors/vscode/demotape.tmLanguage.json +201 -0
- data/editors/vscode/language-configuration.json +24 -0
- data/editors/vscode/package.json +30 -0
- data/examples/alt.mp4 +0 -0
- data/examples/alt.png +0 -0
- data/examples/alt.tape +9 -0
- data/examples/arrow.mp4 +0 -0
- data/examples/arrow.png +0 -0
- data/examples/arrow.tape +7 -0
- data/examples/backspace.mp4 +0 -0
- data/examples/backspace.png +0 -0
- data/examples/backspace.tape +4 -0
- data/examples/bash.mp4 +0 -0
- data/examples/bash.png +0 -0
- data/examples/bash.tape +4 -0
- data/examples/bg.jpg +0 -0
- data/examples/clear.mp4 +0 -0
- data/examples/clear.png +0 -0
- data/examples/clear.tape +6 -0
- data/examples/cli_ui_interactive_prompt.mp4 +0 -0
- data/examples/cli_ui_interactive_prompt.png +0 -0
- data/examples/cli_ui_interactive_prompt.tape +16 -0
- data/examples/cli_ui_nested_frames.mp4 +0 -0
- data/examples/cli_ui_nested_frames.png +0 -0
- data/examples/cli_ui_nested_frames.tape +15 -0
- data/examples/cli_ui_progress.mp4 +0 -0
- data/examples/cli_ui_progress.png +0 -0
- data/examples/cli_ui_progress.tape +6 -0
- data/examples/cli_ui_spinner.mp4 +0 -0
- data/examples/cli_ui_spinner.png +0 -0
- data/examples/cli_ui_spinner.tape +6 -0
- data/examples/cli_ui_status_widget.mp4 +0 -0
- data/examples/cli_ui_status_widget.png +0 -0
- data/examples/cli_ui_status_widget.tape +6 -0
- data/examples/cli_ui_symbols.mp4 +0 -0
- data/examples/cli_ui_symbols.png +0 -0
- data/examples/cli_ui_symbols.tape +6 -0
- data/examples/cli_ui_text_prompt.mp4 +0 -0
- data/examples/cli_ui_text_prompt.png +0 -0
- data/examples/cli_ui_text_prompt.tape +10 -0
- data/examples/clipboard.mp4 +0 -0
- data/examples/clipboard.png +0 -0
- data/examples/clipboard.tape +5 -0
- data/examples/ctrl.mp4 +0 -0
- data/examples/ctrl.png +0 -0
- data/examples/ctrl.tape +5 -0
- data/examples/ctrl_arrows.mp4 +0 -0
- data/examples/ctrl_arrows.png +0 -0
- data/examples/ctrl_arrows.tape +14 -0
- data/examples/demotape.mp4 +0 -0
- data/examples/demotape.png +0 -0
- data/examples/demotape.tape +6 -0
- data/examples/demotape.txt +13 -0
- data/examples/enter.mp4 +0 -0
- data/examples/enter.png +0 -0
- data/examples/enter.tape +3 -0
- data/examples/errors/include_itself.tape +1 -0
- data/examples/fastfetch.gif +0 -0
- data/examples/fastfetch.mp4 +0 -0
- data/examples/fastfetch.png +0 -0
- data/examples/fastfetch.tape +11 -0
- data/examples/fish.mp4 +0 -0
- data/examples/fish.png +0 -0
- data/examples/fish.tape +4 -0
- data/examples/format.mp4 +0 -0
- data/examples/format.png +0 -0
- data/examples/format.tape +15 -0
- data/examples/gh-cli.mp4 +0 -0
- data/examples/gh-cli.png +0 -0
- data/examples/gh-cli.tape +13 -0
- data/examples/gif_loop.gif +0 -0
- data/examples/gif_loop.png +0 -0
- data/examples/gif_loop.tape +5 -0
- data/examples/include.mp4 +0 -0
- data/examples/include.png +0 -0
- data/examples/include.tape +1 -0
- data/examples/include_with_set.mp4 +0 -0
- data/examples/include_with_set.png +0 -0
- data/examples/include_with_set.tape +2 -0
- data/examples/meta/cli.tape +10 -0
- data/examples/nerdfonts.mp4 +0 -0
- data/examples/nerdfonts.png +0 -0
- data/examples/nerdfonts.tape +9 -0
- data/examples/output.gif +0 -0
- data/examples/output.mp4 +0 -0
- data/examples/output.png +0 -0
- data/examples/output.tape +8 -0
- data/examples/output.webm +0 -0
- data/examples/products.json +1803 -0
- data/examples/screenshot.mp4 +0 -0
- data/examples/screenshot.png +0 -0
- data/examples/screenshot.tape +9 -0
- data/examples/script.rb +3 -0
- data/examples/set_cursor_bar.mp4 +0 -0
- data/examples/set_cursor_bar.png +0 -0
- data/examples/set_cursor_bar.tape +5 -0
- data/examples/set_cursor_blink.mp4 +0 -0
- data/examples/set_cursor_blink.png +0 -0
- data/examples/set_cursor_blink.tape +4 -0
- data/examples/set_cursor_underline.mp4 +0 -0
- data/examples/set_cursor_underline.png +0 -0
- data/examples/set_cursor_underline.tape +5 -0
- data/examples/set_dimensions.mp4 +0 -0
- data/examples/set_dimensions.png +0 -0
- data/examples/set_dimensions.tape +5 -0
- data/examples/set_font_family.mp4 +0 -0
- data/examples/set_font_family.png +0 -0
- data/examples/set_font_family.tape +4 -0
- data/examples/set_font_size.mp4 +0 -0
- data/examples/set_font_size.png +0 -0
- data/examples/set_font_size.tape +4 -0
- data/examples/set_line_height.mp4 +0 -0
- data/examples/set_line_height.png +0 -0
- data/examples/set_line_height.tape +8 -0
- data/examples/set_margin.mp4 +0 -0
- data/examples/set_margin.png +0 -0
- data/examples/set_margin.tape +7 -0
- data/examples/set_margin_with_border_radius.mp4 +0 -0
- data/examples/set_margin_with_border_radius.png +0 -0
- data/examples/set_margin_with_border_radius.tape +8 -0
- data/examples/set_margin_with_image.mp4 +0 -0
- data/examples/set_margin_with_image.png +0 -0
- data/examples/set_margin_with_image.tape +7 -0
- data/examples/set_padding.mp4 +0 -0
- data/examples/set_padding.png +0 -0
- data/examples/set_padding.tape +7 -0
- data/examples/set_theme.mp4 +0 -0
- data/examples/set_theme.png +0 -0
- data/examples/set_theme.tape +9 -0
- data/examples/set_theme_property.mp4 +0 -0
- data/examples/set_theme_property.png +0 -0
- data/examples/set_theme_property.tape +10 -0
- data/examples/set_typing_speed.mp4 +0 -0
- data/examples/set_typing_speed.png +0 -0
- data/examples/set_typing_speed.tape +6 -0
- data/examples/slides.mp4 +0 -0
- data/examples/slides.png +0 -0
- data/examples/slides.tape +14 -0
- data/examples/space.mp4 +0 -0
- data/examples/space.png +0 -0
- data/examples/space.tape +3 -0
- data/examples/stdin.mp4 +0 -0
- data/examples/stdin.png +0 -0
- data/examples/stdin.tape +7 -0
- data/examples/tab.mp4 +0 -0
- data/examples/tab.png +0 -0
- data/examples/tab.tape +5 -0
- data/examples/themes/3024_day.png +0 -0
- data/examples/themes/3024_night.png +0 -0
- data/examples/themes/aardvark_blue.png +0 -0
- data/examples/themes/abernathy.png +0 -0
- data/examples/themes/adventure.png +0 -0
- data/examples/themes/adventure_time.png +0 -0
- data/examples/themes/afterglow.png +0 -0
- data/examples/themes/alabaster.png +0 -0
- data/examples/themes/alien_blood.png +0 -0
- data/examples/themes/andromeda.png +0 -0
- data/examples/themes/apple_classic.png +0 -0
- data/examples/themes/apple_system_colors.png +0 -0
- data/examples/themes/arcoiris.png +0 -0
- data/examples/themes/argonaut.png +0 -0
- data/examples/themes/arthur.png +0 -0
- data/examples/themes/atelier_sulphurpool.png +0 -0
- data/examples/themes/atom.png +0 -0
- data/examples/themes/atom_one_light.png +0 -0
- data/examples/themes/aurora.png +0 -0
- data/examples/themes/ayu.png +0 -0
- data/examples/themes/ayu_light.png +0 -0
- data/examples/themes/ayu_mirage.png +0 -0
- data/examples/themes/banana_blueberry.png +0 -0
- data/examples/themes/batman.png +0 -0
- data/examples/themes/belafonte_day.png +0 -0
- data/examples/themes/belafonte_night.png +0 -0
- data/examples/themes/birds_of_paradise.png +0 -0
- data/examples/themes/blazer.png +0 -0
- data/examples/themes/blue_berry_pie.png +0 -0
- data/examples/themes/blue_dolphin.png +0 -0
- data/examples/themes/blue_matrix.png +0 -0
- data/examples/themes/bluloco_dark.png +0 -0
- data/examples/themes/bluloco_light.png +0 -0
- data/examples/themes/borland.png +0 -0
- data/examples/themes/breeze.png +0 -0
- data/examples/themes/bright_lights.png +0 -0
- data/examples/themes/broadcast.png +0 -0
- data/examples/themes/brogrammer.png +0 -0
- data/examples/themes/bubbles.png +0 -0
- data/examples/themes/builtin_dark.png +0 -0
- data/examples/themes/builtin_light.png +0 -0
- data/examples/themes/builtin_pastel_dark.png +0 -0
- data/examples/themes/builtin_solarized_dark.png +0 -0
- data/examples/themes/builtin_solarized_light.png +0 -0
- data/examples/themes/builtin_tango_dark.png +0 -0
- data/examples/themes/builtin_tango_light.png +0 -0
- data/examples/themes/c64.png +0 -0
- data/examples/themes/calamity.png +0 -0
- data/examples/themes/catppuccin_frappe.png +0 -0
- data/examples/themes/catppuccin_latte.png +0 -0
- data/examples/themes/catppuccin_macchiato.png +0 -0
- data/examples/themes/catppuccin_mocha.png +0 -0
- data/examples/themes/cga.png +0 -0
- data/examples/themes/chalk.png +0 -0
- data/examples/themes/chalkboard.png +0 -0
- data/examples/themes/challenger_deep.png +0 -0
- data/examples/themes/chester.png +0 -0
- data/examples/themes/ciapre.png +0 -0
- data/examples/themes/clrs.png +0 -0
- data/examples/themes/cobalt2.png +0 -0
- data/examples/themes/cobalt_neon.png +0 -0
- data/examples/themes/coffee_theme.png +0 -0
- data/examples/themes/contrast_light.png +0 -0
- data/examples/themes/coolnight.png +0 -0
- data/examples/themes/crayon_pony_fish.png +0 -0
- data/examples/themes/crystal_violet.png +0 -0
- data/examples/themes/cutie_pro.png +0 -0
- data/examples/themes/cyber_cube.png +0 -0
- data/examples/themes/cyber_punk2077.png +0 -0
- data/examples/themes/cyberdyne.png +0 -0
- data/examples/themes/cyberpunk.png +0 -0
- data/examples/themes/dark_pastel.png +0 -0
- data/examples/themes/dark_plus.png +0 -0
- data/examples/themes/darkermatrix.png +0 -0
- data/examples/themes/darkmatrix.png +0 -0
- data/examples/themes/darkside.png +0 -0
- data/examples/themes/dayfox.png +0 -0
- data/examples/themes/deep.png +0 -0
- data/examples/themes/desert.png +0 -0
- data/examples/themes/dimmed_monokai.png +0 -0
- data/examples/themes/django.png +0 -0
- data/examples/themes/django_reborn_again.png +0 -0
- data/examples/themes/django_smooth.png +0 -0
- data/examples/themes/doom_one.png +0 -0
- data/examples/themes/doom_peacock.png +0 -0
- data/examples/themes/dot_gov.png +0 -0
- data/examples/themes/dracula.png +0 -0
- data/examples/themes/dracula_plus.png +0 -0
- data/examples/themes/duckbones.png +0 -0
- data/examples/themes/duotone_dark.png +0 -0
- data/examples/themes/earthsong.png +0 -0
- data/examples/themes/elemental.png +0 -0
- data/examples/themes/elementary.png +0 -0
- data/examples/themes/encom.png +0 -0
- data/examples/themes/espresso.png +0 -0
- data/examples/themes/espresso_libre.png +0 -0
- data/examples/themes/everblush.png +0 -0
- data/examples/themes/fahrenheit.png +0 -0
- data/examples/themes/fairyfloss.png +0 -0
- data/examples/themes/farmhouse_dark.png +0 -0
- data/examples/themes/farmhouse_light.png +0 -0
- data/examples/themes/fideloper.png +0 -0
- data/examples/themes/firefly_traditional.png +0 -0
- data/examples/themes/firefox_dev.png +0 -0
- data/examples/themes/firewatch.png +0 -0
- data/examples/themes/fish_tank.png +0 -0
- data/examples/themes/flat.png +0 -0
- data/examples/themes/flatland.png +0 -0
- data/examples/themes/flexoki_dark.png +0 -0
- data/examples/themes/flexoki_light.png +0 -0
- data/examples/themes/floraverse.png +0 -0
- data/examples/themes/forest_blue.png +0 -0
- data/examples/themes/framer.png +0 -0
- data/examples/themes/front_end_delight.png +0 -0
- data/examples/themes/fun_forrest.png +0 -0
- data/examples/themes/galaxy.png +0 -0
- data/examples/themes/galizur.png +0 -0
- data/examples/themes/ganyu.png +0 -0
- data/examples/themes/git_hub_dark.png +0 -0
- data/examples/themes/github.png +0 -0
- data/examples/themes/glacier.png +0 -0
- data/examples/themes/glorious.png +0 -0
- data/examples/themes/grape.png +0 -0
- data/examples/themes/grass.png +0 -0
- data/examples/themes/grey_green.png +0 -0
- data/examples/themes/gruvbox_dark.png +0 -0
- data/examples/themes/gruvbox_dark_hard.png +0 -0
- data/examples/themes/gruvbox_light.png +0 -0
- data/examples/themes/guezwhoz.png +0 -0
- data/examples/themes/h4rithd.png +0 -0
- data/examples/themes/h4rithd_com.png +0 -0
- data/examples/themes/ha_x0_r_blue.png +0 -0
- data/examples/themes/ha_x0_r_gr33_n.png +0 -0
- data/examples/themes/ha_x0_r_r3_d.png +0 -0
- data/examples/themes/hacktober.png +0 -0
- data/examples/themes/hardcore.png +0 -0
- data/examples/themes/harper.png +0 -0
- data/examples/themes/highway.png +0 -0
- data/examples/themes/hipster_green.png +0 -0
- data/examples/themes/hivacruz.png +0 -0
- data/examples/themes/homebrew.png +0 -0
- data/examples/themes/hopscotch.png +0 -0
- data/examples/themes/hopscotch_256.png +0 -0
- data/examples/themes/horizon.png +0 -0
- data/examples/themes/hurtado.png +0 -0
- data/examples/themes/hybrid.png +0 -0
- data/examples/themes/hyper.png +0 -0
- data/examples/themes/ic_green_ppl.png +0 -0
- data/examples/themes/ic_orange_ppl.png +0 -0
- data/examples/themes/iceberg_dark.png +0 -0
- data/examples/themes/iceberg_light.png +0 -0
- data/examples/themes/idea.png +0 -0
- data/examples/themes/idle_toes.png +0 -0
- data/examples/themes/ir_black.png +0 -0
- data/examples/themes/iterm2_dark_background.png +0 -0
- data/examples/themes/iterm2_default.png +0 -0
- data/examples/themes/iterm2_light_background.png +0 -0
- data/examples/themes/iterm2_pastel_dark_background.png +0 -0
- data/examples/themes/iterm2_smoooooth.png +0 -0
- data/examples/themes/iterm2_solarized_dark.png +0 -0
- data/examples/themes/iterm2_solarized_light.png +0 -0
- data/examples/themes/iterm2_tango_dark.png +0 -0
- data/examples/themes/iterm2_tango_light.png +0 -0
- data/examples/themes/jackie_brown.png +0 -0
- data/examples/themes/japanesque.png +0 -0
- data/examples/themes/jellybeans.png +0 -0
- data/examples/themes/jet_brains_darcula.png +0 -0
- data/examples/themes/jubi.png +0 -0
- data/examples/themes/juicy_colors.png +0 -0
- data/examples/themes/kanagawa.png +0 -0
- data/examples/themes/kanagawabones.png +0 -0
- data/examples/themes/kibble.png +0 -0
- data/examples/themes/kolorit.png +0 -0
- data/examples/themes/konsolas.png +0 -0
- data/examples/themes/lab_fox.png +0 -0
- data/examples/themes/laser.png +0 -0
- data/examples/themes/later_this_evening.png +0 -0
- data/examples/themes/lavandula.png +0 -0
- data/examples/themes/liquid_carbon.png +0 -0
- data/examples/themes/liquid_carbon_transparent.png +0 -0
- data/examples/themes/liquid_carbon_transparent_inverse.png +0 -0
- data/examples/themes/lovelace.png +0 -0
- data/examples/themes/man_page.png +0 -0
- data/examples/themes/mariana.png +0 -0
- data/examples/themes/material.png +0 -0
- data/examples/themes/material_dark.png +0 -0
- data/examples/themes/material_darker.png +0 -0
- data/examples/themes/material_design_colors.png +0 -0
- data/examples/themes/material_ocean.png +0 -0
- data/examples/themes/mathias.png +0 -0
- data/examples/themes/matrix.png +0 -0
- data/examples/themes/medallion.png +0 -0
- data/examples/themes/mellifluous.png +0 -0
- data/examples/themes/midnight_in_mojave.png +0 -0
- data/examples/themes/mirage.png +0 -0
- data/examples/themes/misterioso.png +0 -0
- data/examples/themes/molokai.png +0 -0
- data/examples/themes/mona_lisa.png +0 -0
- data/examples/themes/monokai_cmder.png +0 -0
- data/examples/themes/monokai_pro.png +0 -0
- data/examples/themes/monokai_pro_filter_octagon.png +0 -0
- data/examples/themes/monokai_pro_filter_ristretto.png +0 -0
- data/examples/themes/monokai_remastered.png +0 -0
- data/examples/themes/monokai_soda.png +0 -0
- data/examples/themes/monokai_vivid.png +0 -0
- data/examples/themes/moonlight_ii.png +0 -0
- data/examples/themes/n0tch2k.png +0 -0
- data/examples/themes/neobones_dark.png +0 -0
- data/examples/themes/neobones_light.png +0 -0
- data/examples/themes/neon.png +0 -0
- data/examples/themes/neopolitan.png +0 -0
- data/examples/themes/neutron.png +0 -0
- data/examples/themes/night_city.png +0 -0
- data/examples/themes/night_lion_v1.png +0 -0
- data/examples/themes/night_lion_v2.png +0 -0
- data/examples/themes/night_owlish_light.png +0 -0
- data/examples/themes/nightfox.png +0 -0
- data/examples/themes/niji.png +0 -0
- data/examples/themes/nocturnal_winter.png +0 -0
- data/examples/themes/nord.png +0 -0
- data/examples/themes/nord_light.png +0 -0
- data/examples/themes/novel.png +0 -0
- data/examples/themes/nvim_dark.png +0 -0
- data/examples/themes/nvim_light.png +0 -0
- data/examples/themes/obsidian.png +0 -0
- data/examples/themes/ocean.png +0 -0
- data/examples/themes/oceanic_material.png +0 -0
- data/examples/themes/oceanic_next.png +0 -0
- data/examples/themes/ollie.png +0 -0
- data/examples/themes/one_dark.png +0 -0
- data/examples/themes/one_half_dark.png +0 -0
- data/examples/themes/one_half_light.png +0 -0
- data/examples/themes/one_star.png +0 -0
- data/examples/themes/operator_mono_dark.png +0 -0
- data/examples/themes/overnight_slumber.png +0 -0
- data/examples/themes/pale_night_hc.png +0 -0
- data/examples/themes/pandora.png +0 -0
- data/examples/themes/paraiso_dark.png +0 -0
- data/examples/themes/paul_millr.png +0 -0
- data/examples/themes/pencil_dark.png +0 -0
- data/examples/themes/pencil_light.png +0 -0
- data/examples/themes/peppermint.png +0 -0
- data/examples/themes/piatto_light.png +0 -0
- data/examples/themes/pnevma.png +0 -0
- data/examples/themes/popping_and_locking.png +0 -0
- data/examples/themes/primary.png +0 -0
- data/examples/themes/primer.png +0 -0
- data/examples/themes/pro.png +0 -0
- data/examples/themes/pro_light.png +0 -0
- data/examples/themes/purple_rain.png +0 -0
- data/examples/themes/purplepeter.png +0 -0
- data/examples/themes/qb64_super_dark_blue.png +0 -0
- data/examples/themes/rapture.png +0 -0
- data/examples/themes/raycast_dark.png +0 -0
- data/examples/themes/raycast_light.png +0 -0
- data/examples/themes/rebecca.png +0 -0
- data/examples/themes/red_alert.png +0 -0
- data/examples/themes/red_planet.png +0 -0
- data/examples/themes/red_sands.png +0 -0
- data/examples/themes/relaxed.png +0 -0
- data/examples/themes/retro.png +0 -0
- data/examples/themes/retrowave.png +0 -0
- data/examples/themes/rippedcasts.png +0 -0
- data/examples/themes/rose_pine.png +0 -0
- data/examples/themes/rose_pine_dawn.png +0 -0
- data/examples/themes/rose_pine_moon.png +0 -0
- data/examples/themes/rouge_2.png +0 -0
- data/examples/themes/royal.png +0 -0
- data/examples/themes/ryuuko.png +0 -0
- data/examples/themes/sakura.png +0 -0
- data/examples/themes/scarlet_protocol.png +0 -0
- data/examples/themes/sea_shells.png +0 -0
- data/examples/themes/seafoam_pastel.png +0 -0
- data/examples/themes/seoulbones_dark.png +0 -0
- data/examples/themes/seoulbones_light.png +0 -0
- data/examples/themes/serendipity_midnight.png +0 -0
- data/examples/themes/serendipity_morning.png +0 -0
- data/examples/themes/serendipity_sunset.png +0 -0
- data/examples/themes/seti.png +0 -0
- data/examples/themes/shades_of_purple.png +0 -0
- data/examples/themes/shaman.png +0 -0
- data/examples/themes/slate.png +0 -0
- data/examples/themes/sleepy_hollow.png +0 -0
- data/examples/themes/smyck.png +0 -0
- data/examples/themes/snazzy.png +0 -0
- data/examples/themes/soft_server.png +0 -0
- data/examples/themes/solarized_darcula.png +0 -0
- data/examples/themes/solarized_dark_higher_contrast.png +0 -0
- data/examples/themes/solarized_dark_patched.png +0 -0
- data/examples/themes/sonoran_gothic.png +0 -0
- data/examples/themes/sonoran_sunrise.png +0 -0
- data/examples/themes/space_gray.png +0 -0
- data/examples/themes/space_gray_eighties.png +0 -0
- data/examples/themes/space_gray_eighties_dull.png +0 -0
- data/examples/themes/spacedust.png +0 -0
- data/examples/themes/spiderman.png +0 -0
- data/examples/themes/spring.png +0 -0
- data/examples/themes/square.png +0 -0
- data/examples/themes/sublette.png +0 -0
- data/examples/themes/subliminal.png +0 -0
- data/examples/themes/sundried.png +0 -0
- data/examples/themes/symfonic.png +0 -0
- data/examples/themes/synthwave.png +0 -0
- data/examples/themes/synthwave_alpha.png +0 -0
- data/examples/themes/synthwave_everything.png +0 -0
- data/examples/themes/tango_adapted.png +0 -0
- data/examples/themes/tango_half_adapted.png +0 -0
- data/examples/themes/teerb.png +0 -0
- data/examples/themes/terafox.png +0 -0
- data/examples/themes/terminal_basic.png +0 -0
- data/examples/themes/thayer_bright.png +0 -0
- data/examples/themes/the_hulk.png +0 -0
- data/examples/themes/theme.tape +13 -0
- data/examples/themes/tinacious_design_dark.png +0 -0
- data/examples/themes/tinacious_design_light.png +0 -0
- data/examples/themes/tokyo_night.png +0 -0
- data/examples/themes/tokyo_night_light.png +0 -0
- data/examples/themes/tokyo_night_storm.png +0 -0
- data/examples/themes/tokyonight.png +0 -0
- data/examples/themes/tokyonight_day.png +0 -0
- data/examples/themes/tokyonight_storm.png +0 -0
- data/examples/themes/tomorrow.png +0 -0
- data/examples/themes/tomorrow_night.png +0 -0
- data/examples/themes/tomorrow_night_blue.png +0 -0
- data/examples/themes/tomorrow_night_bright.png +0 -0
- data/examples/themes/tomorrow_night_burns.png +0 -0
- data/examples/themes/tomorrow_night_eighties.png +0 -0
- data/examples/themes/toy_chest.png +0 -0
- data/examples/themes/treehouse.png +0 -0
- data/examples/themes/twilight.png +0 -0
- data/examples/themes/ubuntu.png +0 -0
- data/examples/themes/ultra_dark.png +0 -0
- data/examples/themes/ultra_violent.png +0 -0
- data/examples/themes/under_the_sea.png +0 -0
- data/examples/themes/unholy.png +0 -0
- data/examples/themes/unikitty.png +0 -0
- data/examples/themes/urple.png +0 -0
- data/examples/themes/vaughn.png +0 -0
- data/examples/themes/vesper.png +0 -0
- data/examples/themes/vibrant_ink.png +0 -0
- data/examples/themes/vimbones.png +0 -0
- data/examples/themes/violet_dark.png +0 -0
- data/examples/themes/violet_light.png +0 -0
- data/examples/themes/warm_neon.png +0 -0
- data/examples/themes/wez.png +0 -0
- data/examples/themes/whimsy.png +0 -0
- data/examples/themes/wild_cherry.png +0 -0
- data/examples/themes/wilmersdorf.png +0 -0
- data/examples/themes/wombat.png +0 -0
- data/examples/themes/wryan.png +0 -0
- data/examples/themes/zenbones.png +0 -0
- data/examples/themes/zenbones_dark.png +0 -0
- data/examples/themes/zenbones_light.png +0 -0
- data/examples/themes/zenburn.png +0 -0
- data/examples/themes/zenburned.png +0 -0
- data/examples/themes/zenwritten_dark.png +0 -0
- data/examples/themes/zenwritten_light.png +0 -0
- data/examples/themes/zeonica.png +0 -0
- data/examples/tmux.mp4 +0 -0
- data/examples/tmux.png +0 -0
- data/examples/tmux.tape +28 -0
- data/examples/type.mp4 +0 -0
- data/examples/type.png +0 -0
- data/examples/type.tape +11 -0
- data/examples/type_file.mp4 +0 -0
- data/examples/type_file.png +0 -0
- data/examples/type_file.tape +23 -0
- data/examples/variable_typing.mp4 +0 -0
- data/examples/variable_typing.png +0 -0
- data/examples/variable_typing.tape +41 -0
- data/examples/wait_until.mp4 +0 -0
- data/examples/wait_until.png +0 -0
- data/examples/wait_until.tape +8 -0
- data/examples/zsh.mp4 +0 -0
- data/examples/zsh.png +0 -0
- data/examples/zsh.tape +4 -0
- data/exe/demotape +11 -0
- data/lib/demo_tape/bounds.rb +15 -0
- data/lib/demo_tape/cli.rb +158 -0
- data/lib/demo_tape/command.rb +341 -0
- data/lib/demo_tape/duration.rb +31 -0
- data/lib/demo_tape/exporter.rb +372 -0
- data/lib/demo_tape/generator.rb +17 -0
- data/lib/demo_tape/lexer.rb +262 -0
- data/lib/demo_tape/parser.rb +889 -0
- data/lib/demo_tape/rcs/bash +32 -0
- data/lib/demo_tape/rcs/fish +31 -0
- data/lib/demo_tape/rcs/zsh +40 -0
- data/lib/demo_tape/runner.rb +722 -0
- data/lib/demo_tape/spacing.rb +5 -0
- data/lib/demo_tape/spinner.rb +37 -0
- data/lib/demo_tape/templates/.keep +0 -0
- data/lib/demo_tape/theme.rb +49 -0
- data/lib/demo_tape/themes/3024_day.json +22 -0
- data/lib/demo_tape/themes/3024_night.json +22 -0
- data/lib/demo_tape/themes/aardvark_blue.json +22 -0
- data/lib/demo_tape/themes/abernathy.json +22 -0
- data/lib/demo_tape/themes/adventure.json +22 -0
- data/lib/demo_tape/themes/adventure_time.json +22 -0
- data/lib/demo_tape/themes/afterglow.json +22 -0
- data/lib/demo_tape/themes/alabaster.json +22 -0
- data/lib/demo_tape/themes/alien_blood.json +22 -0
- data/lib/demo_tape/themes/andromeda.json +22 -0
- data/lib/demo_tape/themes/apple_classic.json +22 -0
- data/lib/demo_tape/themes/apple_system_colors.json +22 -0
- data/lib/demo_tape/themes/arcoiris.json +22 -0
- data/lib/demo_tape/themes/argonaut.json +22 -0
- data/lib/demo_tape/themes/arthur.json +22 -0
- data/lib/demo_tape/themes/atelier_sulphurpool.json +22 -0
- data/lib/demo_tape/themes/atom.json +22 -0
- data/lib/demo_tape/themes/atom_one_light.json +22 -0
- data/lib/demo_tape/themes/aurora.json +22 -0
- data/lib/demo_tape/themes/ayu.json +22 -0
- data/lib/demo_tape/themes/ayu_light.json +22 -0
- data/lib/demo_tape/themes/ayu_mirage.json +22 -0
- data/lib/demo_tape/themes/banana_blueberry.json +22 -0
- data/lib/demo_tape/themes/batman.json +22 -0
- data/lib/demo_tape/themes/belafonte_day.json +22 -0
- data/lib/demo_tape/themes/belafonte_night.json +22 -0
- data/lib/demo_tape/themes/birds_of_paradise.json +22 -0
- data/lib/demo_tape/themes/blazer.json +22 -0
- data/lib/demo_tape/themes/blue_berry_pie.json +22 -0
- data/lib/demo_tape/themes/blue_dolphin.json +22 -0
- data/lib/demo_tape/themes/blue_matrix.json +22 -0
- data/lib/demo_tape/themes/bluloco_dark.json +22 -0
- data/lib/demo_tape/themes/bluloco_light.json +22 -0
- data/lib/demo_tape/themes/borland.json +22 -0
- data/lib/demo_tape/themes/breeze.json +22 -0
- data/lib/demo_tape/themes/bright_lights.json +22 -0
- data/lib/demo_tape/themes/broadcast.json +22 -0
- data/lib/demo_tape/themes/brogrammer.json +22 -0
- data/lib/demo_tape/themes/bubbles.json +22 -0
- data/lib/demo_tape/themes/builtin_dark.json +22 -0
- data/lib/demo_tape/themes/builtin_light.json +22 -0
- data/lib/demo_tape/themes/builtin_pastel_dark.json +22 -0
- data/lib/demo_tape/themes/builtin_solarized_dark.json +22 -0
- data/lib/demo_tape/themes/builtin_solarized_light.json +22 -0
- data/lib/demo_tape/themes/builtin_tango_dark.json +22 -0
- data/lib/demo_tape/themes/builtin_tango_light.json +22 -0
- data/lib/demo_tape/themes/c64.json +22 -0
- data/lib/demo_tape/themes/calamity.json +22 -0
- data/lib/demo_tape/themes/catppuccin_frappe.json +22 -0
- data/lib/demo_tape/themes/catppuccin_latte.json +22 -0
- data/lib/demo_tape/themes/catppuccin_macchiato.json +22 -0
- data/lib/demo_tape/themes/catppuccin_mocha.json +22 -0
- data/lib/demo_tape/themes/cga.json +22 -0
- data/lib/demo_tape/themes/chalk.json +22 -0
- data/lib/demo_tape/themes/chalkboard.json +22 -0
- data/lib/demo_tape/themes/challenger_deep.json +22 -0
- data/lib/demo_tape/themes/chester.json +22 -0
- data/lib/demo_tape/themes/ciapre.json +22 -0
- data/lib/demo_tape/themes/clrs.json +22 -0
- data/lib/demo_tape/themes/cobalt2.json +22 -0
- data/lib/demo_tape/themes/cobalt_neon.json +22 -0
- data/lib/demo_tape/themes/coffee_theme.json +22 -0
- data/lib/demo_tape/themes/contrast_light.json +22 -0
- data/lib/demo_tape/themes/coolnight.json +22 -0
- data/lib/demo_tape/themes/crayon_pony_fish.json +22 -0
- data/lib/demo_tape/themes/crystal_violet.json +22 -0
- data/lib/demo_tape/themes/cutie_pro.json +22 -0
- data/lib/demo_tape/themes/cyber_cube.json +22 -0
- data/lib/demo_tape/themes/cyber_punk2077.json +22 -0
- data/lib/demo_tape/themes/cyberdyne.json +22 -0
- data/lib/demo_tape/themes/cyberpunk.json +22 -0
- data/lib/demo_tape/themes/dark_pastel.json +22 -0
- data/lib/demo_tape/themes/dark_plus.json +22 -0
- data/lib/demo_tape/themes/darkermatrix.json +22 -0
- data/lib/demo_tape/themes/darkmatrix.json +22 -0
- data/lib/demo_tape/themes/darkside.json +22 -0
- data/lib/demo_tape/themes/dayfox.json +22 -0
- data/lib/demo_tape/themes/deep.json +22 -0
- data/lib/demo_tape/themes/default_dark.json +22 -0
- data/lib/demo_tape/themes/default_light.json +22 -0
- data/lib/demo_tape/themes/desert.json +22 -0
- data/lib/demo_tape/themes/dimmed_monokai.json +22 -0
- data/lib/demo_tape/themes/django.json +22 -0
- data/lib/demo_tape/themes/django_reborn_again.json +22 -0
- data/lib/demo_tape/themes/django_smooth.json +22 -0
- data/lib/demo_tape/themes/doom_one.json +22 -0
- data/lib/demo_tape/themes/doom_peacock.json +22 -0
- data/lib/demo_tape/themes/dot_gov.json +22 -0
- data/lib/demo_tape/themes/dracula.json +22 -0
- data/lib/demo_tape/themes/dracula_plus.json +21 -0
- data/lib/demo_tape/themes/duckbones.json +22 -0
- data/lib/demo_tape/themes/duotone_dark.json +22 -0
- data/lib/demo_tape/themes/earthsong.json +22 -0
- data/lib/demo_tape/themes/elemental.json +22 -0
- data/lib/demo_tape/themes/elementary.json +22 -0
- data/lib/demo_tape/themes/encom.json +22 -0
- data/lib/demo_tape/themes/espresso.json +22 -0
- data/lib/demo_tape/themes/espresso_libre.json +22 -0
- data/lib/demo_tape/themes/everblush.json +22 -0
- data/lib/demo_tape/themes/fahrenheit.json +22 -0
- data/lib/demo_tape/themes/fairyfloss.json +22 -0
- data/lib/demo_tape/themes/farmhouse_dark.json +22 -0
- data/lib/demo_tape/themes/farmhouse_light.json +22 -0
- data/lib/demo_tape/themes/fideloper.json +22 -0
- data/lib/demo_tape/themes/firefly_traditional.json +22 -0
- data/lib/demo_tape/themes/firefox_dev.json +22 -0
- data/lib/demo_tape/themes/firewatch.json +22 -0
- data/lib/demo_tape/themes/fish_tank.json +22 -0
- data/lib/demo_tape/themes/flat.json +22 -0
- data/lib/demo_tape/themes/flatland.json +22 -0
- data/lib/demo_tape/themes/flexoki_dark.json +22 -0
- data/lib/demo_tape/themes/flexoki_light.json +22 -0
- data/lib/demo_tape/themes/floraverse.json +22 -0
- data/lib/demo_tape/themes/forest_blue.json +22 -0
- data/lib/demo_tape/themes/framer.json +22 -0
- data/lib/demo_tape/themes/front_end_delight.json +22 -0
- data/lib/demo_tape/themes/fun_forrest.json +22 -0
- data/lib/demo_tape/themes/galaxy.json +22 -0
- data/lib/demo_tape/themes/galizur.json +22 -0
- data/lib/demo_tape/themes/ganyu.json +22 -0
- data/lib/demo_tape/themes/git_hub_dark.json +22 -0
- data/lib/demo_tape/themes/github.json +22 -0
- data/lib/demo_tape/themes/glacier.json +22 -0
- data/lib/demo_tape/themes/glorious.json +21 -0
- data/lib/demo_tape/themes/grape.json +22 -0
- data/lib/demo_tape/themes/grass.json +22 -0
- data/lib/demo_tape/themes/grey_green.json +22 -0
- data/lib/demo_tape/themes/gruvbox_dark.json +22 -0
- data/lib/demo_tape/themes/gruvbox_dark_hard.json +22 -0
- data/lib/demo_tape/themes/gruvbox_light.json +22 -0
- data/lib/demo_tape/themes/guezwhoz.json +22 -0
- data/lib/demo_tape/themes/h4rithd.json +22 -0
- data/lib/demo_tape/themes/h4rithd_com.json +22 -0
- data/lib/demo_tape/themes/ha_x0_r_blue.json +22 -0
- data/lib/demo_tape/themes/ha_x0_r_gr33_n.json +22 -0
- data/lib/demo_tape/themes/ha_x0_r_r3_d.json +22 -0
- data/lib/demo_tape/themes/hacktober.json +22 -0
- data/lib/demo_tape/themes/hardcore.json +22 -0
- data/lib/demo_tape/themes/harper.json +22 -0
- data/lib/demo_tape/themes/highway.json +22 -0
- data/lib/demo_tape/themes/hipster_green.json +22 -0
- data/lib/demo_tape/themes/hivacruz.json +22 -0
- data/lib/demo_tape/themes/homebrew.json +22 -0
- data/lib/demo_tape/themes/hopscotch.json +22 -0
- data/lib/demo_tape/themes/hopscotch_256.json +22 -0
- data/lib/demo_tape/themes/horizon.json +21 -0
- data/lib/demo_tape/themes/hurtado.json +22 -0
- data/lib/demo_tape/themes/hybrid.json +22 -0
- data/lib/demo_tape/themes/hyper.json +22 -0
- data/lib/demo_tape/themes/ic_green_ppl.json +22 -0
- data/lib/demo_tape/themes/ic_orange_ppl.json +22 -0
- data/lib/demo_tape/themes/iceberg_dark.json +22 -0
- data/lib/demo_tape/themes/iceberg_light.json +22 -0
- data/lib/demo_tape/themes/idea.json +22 -0
- data/lib/demo_tape/themes/idle_toes.json +22 -0
- data/lib/demo_tape/themes/ir_black.json +22 -0
- data/lib/demo_tape/themes/iterm2_dark_background.json +22 -0
- data/lib/demo_tape/themes/iterm2_default.json +22 -0
- data/lib/demo_tape/themes/iterm2_light_background.json +22 -0
- data/lib/demo_tape/themes/iterm2_pastel_dark_background.json +22 -0
- data/lib/demo_tape/themes/iterm2_smoooooth.json +22 -0
- data/lib/demo_tape/themes/iterm2_solarized_dark.json +22 -0
- data/lib/demo_tape/themes/iterm2_solarized_light.json +22 -0
- data/lib/demo_tape/themes/iterm2_tango_dark.json +22 -0
- data/lib/demo_tape/themes/iterm2_tango_light.json +22 -0
- data/lib/demo_tape/themes/jackie_brown.json +22 -0
- data/lib/demo_tape/themes/japanesque.json +22 -0
- data/lib/demo_tape/themes/jellybeans.json +22 -0
- data/lib/demo_tape/themes/jet_brains_darcula.json +22 -0
- data/lib/demo_tape/themes/jubi.json +22 -0
- data/lib/demo_tape/themes/juicy_colors.json +22 -0
- data/lib/demo_tape/themes/kanagawa.json +22 -0
- data/lib/demo_tape/themes/kanagawabones.json +22 -0
- data/lib/demo_tape/themes/kibble.json +22 -0
- data/lib/demo_tape/themes/kolorit.json +22 -0
- data/lib/demo_tape/themes/konsolas.json +22 -0
- data/lib/demo_tape/themes/lab_fox.json +22 -0
- data/lib/demo_tape/themes/laser.json +22 -0
- data/lib/demo_tape/themes/later_this_evening.json +22 -0
- data/lib/demo_tape/themes/lavandula.json +22 -0
- data/lib/demo_tape/themes/liquid_carbon.json +22 -0
- data/lib/demo_tape/themes/liquid_carbon_transparent.json +22 -0
- data/lib/demo_tape/themes/liquid_carbon_transparent_inverse.json +22 -0
- data/lib/demo_tape/themes/lovelace.json +22 -0
- data/lib/demo_tape/themes/man_page.json +22 -0
- data/lib/demo_tape/themes/mariana.json +22 -0
- data/lib/demo_tape/themes/material.json +22 -0
- data/lib/demo_tape/themes/material_dark.json +22 -0
- data/lib/demo_tape/themes/material_darker.json +22 -0
- data/lib/demo_tape/themes/material_design_colors.json +22 -0
- data/lib/demo_tape/themes/material_ocean.json +22 -0
- data/lib/demo_tape/themes/mathias.json +22 -0
- data/lib/demo_tape/themes/matrix.json +22 -0
- data/lib/demo_tape/themes/medallion.json +22 -0
- data/lib/demo_tape/themes/mellifluous.json +22 -0
- data/lib/demo_tape/themes/midnight_in_mojave.json +22 -0
- data/lib/demo_tape/themes/mirage.json +22 -0
- data/lib/demo_tape/themes/misterioso.json +22 -0
- data/lib/demo_tape/themes/molokai.json +22 -0
- data/lib/demo_tape/themes/mona_lisa.json +22 -0
- data/lib/demo_tape/themes/monokai_cmder.json +22 -0
- data/lib/demo_tape/themes/monokai_pro.json +22 -0
- data/lib/demo_tape/themes/monokai_pro_filter_octagon.json +21 -0
- data/lib/demo_tape/themes/monokai_pro_filter_ristretto.json +22 -0
- data/lib/demo_tape/themes/monokai_remastered.json +22 -0
- data/lib/demo_tape/themes/monokai_soda.json +22 -0
- data/lib/demo_tape/themes/monokai_vivid.json +22 -0
- data/lib/demo_tape/themes/moonlight_ii.json +21 -0
- data/lib/demo_tape/themes/n0tch2k.json +22 -0
- data/lib/demo_tape/themes/neobones_dark.json +22 -0
- data/lib/demo_tape/themes/neobones_light.json +22 -0
- data/lib/demo_tape/themes/neon.json +22 -0
- data/lib/demo_tape/themes/neopolitan.json +22 -0
- data/lib/demo_tape/themes/neutron.json +22 -0
- data/lib/demo_tape/themes/night_city.json +22 -0
- data/lib/demo_tape/themes/night_lion_v1.json +22 -0
- data/lib/demo_tape/themes/night_lion_v2.json +22 -0
- data/lib/demo_tape/themes/night_owlish_light.json +22 -0
- data/lib/demo_tape/themes/nightfox.json +22 -0
- data/lib/demo_tape/themes/niji.json +22 -0
- data/lib/demo_tape/themes/nocturnal_winter.json +22 -0
- data/lib/demo_tape/themes/nord.json +22 -0
- data/lib/demo_tape/themes/nord_light.json +22 -0
- data/lib/demo_tape/themes/novel.json +22 -0
- data/lib/demo_tape/themes/nvim_dark.json +22 -0
- data/lib/demo_tape/themes/nvim_light.json +22 -0
- data/lib/demo_tape/themes/obsidian.json +22 -0
- data/lib/demo_tape/themes/ocean.json +22 -0
- data/lib/demo_tape/themes/oceanic_material.json +22 -0
- data/lib/demo_tape/themes/oceanic_next.json +22 -0
- data/lib/demo_tape/themes/ollie.json +22 -0
- data/lib/demo_tape/themes/one_dark.json +21 -0
- data/lib/demo_tape/themes/one_half_dark.json +22 -0
- data/lib/demo_tape/themes/one_half_light.json +22 -0
- data/lib/demo_tape/themes/one_star.json +21 -0
- data/lib/demo_tape/themes/operator_mono_dark.json +22 -0
- data/lib/demo_tape/themes/overnight_slumber.json +22 -0
- data/lib/demo_tape/themes/pale_night_hc.json +22 -0
- data/lib/demo_tape/themes/pandora.json +22 -0
- data/lib/demo_tape/themes/paraiso_dark.json +22 -0
- data/lib/demo_tape/themes/paul_millr.json +22 -0
- data/lib/demo_tape/themes/pencil_dark.json +22 -0
- data/lib/demo_tape/themes/pencil_light.json +22 -0
- data/lib/demo_tape/themes/peppermint.json +22 -0
- data/lib/demo_tape/themes/piatto_light.json +22 -0
- data/lib/demo_tape/themes/pnevma.json +22 -0
- data/lib/demo_tape/themes/popping_and_locking.json +22 -0
- data/lib/demo_tape/themes/primary.json +22 -0
- data/lib/demo_tape/themes/primer.json +21 -0
- data/lib/demo_tape/themes/pro.json +22 -0
- data/lib/demo_tape/themes/pro_light.json +22 -0
- data/lib/demo_tape/themes/purple_rain.json +22 -0
- data/lib/demo_tape/themes/purplepeter.json +22 -0
- data/lib/demo_tape/themes/qb64_super_dark_blue.json +22 -0
- data/lib/demo_tape/themes/rapture.json +22 -0
- data/lib/demo_tape/themes/raycast_dark.json +22 -0
- data/lib/demo_tape/themes/raycast_light.json +22 -0
- data/lib/demo_tape/themes/rebecca.json +22 -0
- data/lib/demo_tape/themes/red_alert.json +22 -0
- data/lib/demo_tape/themes/red_planet.json +22 -0
- data/lib/demo_tape/themes/red_sands.json +22 -0
- data/lib/demo_tape/themes/relaxed.json +22 -0
- data/lib/demo_tape/themes/retro.json +22 -0
- data/lib/demo_tape/themes/retrowave.json +21 -0
- data/lib/demo_tape/themes/rippedcasts.json +22 -0
- data/lib/demo_tape/themes/rose_pine.json +22 -0
- data/lib/demo_tape/themes/rose_pine_dawn.json +22 -0
- data/lib/demo_tape/themes/rose_pine_moon.json +22 -0
- data/lib/demo_tape/themes/rouge_2.json +22 -0
- data/lib/demo_tape/themes/royal.json +22 -0
- data/lib/demo_tape/themes/ryuuko.json +22 -0
- data/lib/demo_tape/themes/sakura.json +22 -0
- data/lib/demo_tape/themes/scarlet_protocol.json +22 -0
- data/lib/demo_tape/themes/sea_shells.json +22 -0
- data/lib/demo_tape/themes/seafoam_pastel.json +22 -0
- data/lib/demo_tape/themes/seoulbones_dark.json +22 -0
- data/lib/demo_tape/themes/seoulbones_light.json +22 -0
- data/lib/demo_tape/themes/serendipity_midnight.json +22 -0
- data/lib/demo_tape/themes/serendipity_morning.json +22 -0
- data/lib/demo_tape/themes/serendipity_sunset.json +22 -0
- data/lib/demo_tape/themes/seti.json +22 -0
- data/lib/demo_tape/themes/shades_of_purple.json +22 -0
- data/lib/demo_tape/themes/shaman.json +22 -0
- data/lib/demo_tape/themes/slate.json +22 -0
- data/lib/demo_tape/themes/sleepy_hollow.json +22 -0
- data/lib/demo_tape/themes/smyck.json +22 -0
- data/lib/demo_tape/themes/snazzy.json +22 -0
- data/lib/demo_tape/themes/soft_server.json +22 -0
- data/lib/demo_tape/themes/solarized_darcula.json +22 -0
- data/lib/demo_tape/themes/solarized_dark_higher_contrast.json +22 -0
- data/lib/demo_tape/themes/solarized_dark_patched.json +22 -0
- data/lib/demo_tape/themes/sonoran_gothic.json +21 -0
- data/lib/demo_tape/themes/sonoran_sunrise.json +22 -0
- data/lib/demo_tape/themes/space_gray.json +22 -0
- data/lib/demo_tape/themes/space_gray_eighties.json +22 -0
- data/lib/demo_tape/themes/space_gray_eighties_dull.json +22 -0
- data/lib/demo_tape/themes/spacedust.json +22 -0
- data/lib/demo_tape/themes/spiderman.json +22 -0
- data/lib/demo_tape/themes/spring.json +22 -0
- data/lib/demo_tape/themes/square.json +22 -0
- data/lib/demo_tape/themes/sublette.json +22 -0
- data/lib/demo_tape/themes/subliminal.json +22 -0
- data/lib/demo_tape/themes/sundried.json +22 -0
- data/lib/demo_tape/themes/symfonic.json +22 -0
- data/lib/demo_tape/themes/synthwave.json +22 -0
- data/lib/demo_tape/themes/synthwave_alpha.json +22 -0
- data/lib/demo_tape/themes/synthwave_everything.json +22 -0
- data/lib/demo_tape/themes/tango_adapted.json +22 -0
- data/lib/demo_tape/themes/tango_half_adapted.json +22 -0
- data/lib/demo_tape/themes/teerb.json +22 -0
- data/lib/demo_tape/themes/terafox.json +22 -0
- data/lib/demo_tape/themes/terminal_basic.json +22 -0
- data/lib/demo_tape/themes/thayer_bright.json +22 -0
- data/lib/demo_tape/themes/the_hulk.json +22 -0
- data/lib/demo_tape/themes/tinacious_design_dark.json +22 -0
- data/lib/demo_tape/themes/tinacious_design_light.json +22 -0
- data/lib/demo_tape/themes/tokyo_night.json +21 -0
- data/lib/demo_tape/themes/tokyo_night_light.json +21 -0
- data/lib/demo_tape/themes/tokyo_night_storm.json +21 -0
- data/lib/demo_tape/themes/tokyonight.json +22 -0
- data/lib/demo_tape/themes/tokyonight_day.json +22 -0
- data/lib/demo_tape/themes/tokyonight_storm.json +22 -0
- data/lib/demo_tape/themes/tomorrow.json +22 -0
- data/lib/demo_tape/themes/tomorrow_night.json +22 -0
- data/lib/demo_tape/themes/tomorrow_night_blue.json +22 -0
- data/lib/demo_tape/themes/tomorrow_night_bright.json +22 -0
- data/lib/demo_tape/themes/tomorrow_night_burns.json +22 -0
- data/lib/demo_tape/themes/tomorrow_night_eighties.json +22 -0
- data/lib/demo_tape/themes/toy_chest.json +22 -0
- data/lib/demo_tape/themes/treehouse.json +22 -0
- data/lib/demo_tape/themes/twilight.json +22 -0
- data/lib/demo_tape/themes/ubuntu.json +22 -0
- data/lib/demo_tape/themes/ultra_dark.json +22 -0
- data/lib/demo_tape/themes/ultra_violent.json +22 -0
- data/lib/demo_tape/themes/under_the_sea.json +22 -0
- data/lib/demo_tape/themes/unholy.json +22 -0
- data/lib/demo_tape/themes/unikitty.json +22 -0
- data/lib/demo_tape/themes/urple.json +22 -0
- data/lib/demo_tape/themes/vaughn.json +22 -0
- data/lib/demo_tape/themes/vesper.json +22 -0
- data/lib/demo_tape/themes/vibrant_ink.json +22 -0
- data/lib/demo_tape/themes/vimbones.json +22 -0
- data/lib/demo_tape/themes/violet_dark.json +22 -0
- data/lib/demo_tape/themes/violet_light.json +22 -0
- data/lib/demo_tape/themes/warm_neon.json +22 -0
- data/lib/demo_tape/themes/wez.json +22 -0
- data/lib/demo_tape/themes/whimsy.json +22 -0
- data/lib/demo_tape/themes/wild_cherry.json +22 -0
- data/lib/demo_tape/themes/wilmersdorf.json +22 -0
- data/lib/demo_tape/themes/wombat.json +22 -0
- data/lib/demo_tape/themes/wryan.json +22 -0
- data/lib/demo_tape/themes/zenbones.json +22 -0
- data/lib/demo_tape/themes/zenbones_dark.json +22 -0
- data/lib/demo_tape/themes/zenbones_light.json +22 -0
- data/lib/demo_tape/themes/zenburn.json +22 -0
- data/lib/demo_tape/themes/zenburned.json +22 -0
- data/lib/demo_tape/themes/zenwritten_dark.json +22 -0
- data/lib/demo_tape/themes/zenwritten_light.json +22 -0
- data/lib/demo_tape/themes/zeonica.json +22 -0
- data/lib/demo_tape/token.rb +24 -0
- data/lib/demo_tape/ttyd.rb +74 -0
- data/lib/demo_tape/version.rb +5 -0
- data/lib/demo_tape.rb +30 -0
- data/lib/demotape.rb +3 -0
- metadata +1209 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/examples/tmux.mp4
ADDED
|
Binary file
|
data/examples/tmux.png
ADDED
|
Binary file
|
data/examples/tmux.tape
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Require "tmux"
|
|
2
|
+
|
|
3
|
+
Pause
|
|
4
|
+
Send "tmux -f /dev/null -L test new-session -- bash"
|
|
5
|
+
Enter
|
|
6
|
+
Send "tmux split-window -d -h -- bash && \\"
|
|
7
|
+
Enter
|
|
8
|
+
Send "tmux set status && \\"
|
|
9
|
+
Enter
|
|
10
|
+
Send 'tmux setw pane-border-style "fg=0" && \\'
|
|
11
|
+
Enter
|
|
12
|
+
Send 'tmux setw pane-active-border-style "fg=0"'
|
|
13
|
+
Enter
|
|
14
|
+
Sleep 0.5
|
|
15
|
+
Ctrl+L
|
|
16
|
+
Sleep 1
|
|
17
|
+
Resume
|
|
18
|
+
|
|
19
|
+
Type "Window 1"
|
|
20
|
+
Sleep 1
|
|
21
|
+
|
|
22
|
+
# tmux bind to switch to next pane
|
|
23
|
+
Ctrl+B
|
|
24
|
+
Type "o"
|
|
25
|
+
|
|
26
|
+
Sleep 1
|
|
27
|
+
Type "Window 2"
|
|
28
|
+
Sleep 1
|
data/examples/type.mp4
ADDED
|
Binary file
|
data/examples/type.png
ADDED
|
Binary file
|
data/examples/type.tape
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Set variable_typing 0.3
|
|
2
|
+
Require "vim"
|
|
3
|
+
|
|
4
|
+
Sleep 1s
|
|
5
|
+
Type "vim -u NONE -i NONE"
|
|
6
|
+
Enter
|
|
7
|
+
Sleep 1s
|
|
8
|
+
|
|
9
|
+
# Enable syntax highlighting
|
|
10
|
+
Shift+Colon
|
|
11
|
+
Type "syntax on"
|
|
12
|
+
Enter
|
|
13
|
+
|
|
14
|
+
# Enable syntax highlighting
|
|
15
|
+
Shift+Colon
|
|
16
|
+
Type "source editors/vim/syntax/demotape.vim"
|
|
17
|
+
Enter
|
|
18
|
+
|
|
19
|
+
# Insert mode
|
|
20
|
+
Type "i"
|
|
21
|
+
|
|
22
|
+
TypeFile "examples/type_file.tape"
|
|
23
|
+
Sleep 5s
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Set variable_typing 0.3
|
|
2
|
+
Require "bat"
|
|
3
|
+
Require "vim"
|
|
4
|
+
|
|
5
|
+
Pause
|
|
6
|
+
Send "rm -rf examples/script.rb && rm -rf \"examples/.script.rb*\"\n"
|
|
7
|
+
WaitUntil /^$/
|
|
8
|
+
Clear
|
|
9
|
+
Resume
|
|
10
|
+
|
|
11
|
+
Sleep 1s
|
|
12
|
+
Type "vim -u NONE -i NONE examples/script.rb"
|
|
13
|
+
Enter
|
|
14
|
+
Sleep 1s
|
|
15
|
+
|
|
16
|
+
# Enable syntax highlighting
|
|
17
|
+
Shift+Colon
|
|
18
|
+
Type "syntax on"
|
|
19
|
+
Enter
|
|
20
|
+
|
|
21
|
+
# Insert mode
|
|
22
|
+
Type "i"
|
|
23
|
+
|
|
24
|
+
Type """
|
|
25
|
+
# This is a sample Ruby script
|
|
26
|
+
puts "Hello, World!"
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
Esc
|
|
31
|
+
Sleep 3s
|
|
32
|
+
Shift+Colon
|
|
33
|
+
Type "x"
|
|
34
|
+
Enter
|
|
35
|
+
Sleep 1s
|
|
36
|
+
Type "bat examples/script.rb"
|
|
37
|
+
Enter
|
|
38
|
+
Sleep 2s
|
|
39
|
+
Type "ruby examples/script.rb"
|
|
40
|
+
Enter
|
|
41
|
+
Sleep 3s
|
|
Binary file
|
|
Binary file
|
data/examples/zsh.mp4
ADDED
|
Binary file
|
data/examples/zsh.png
ADDED
|
Binary file
|
data/examples/zsh.tape
ADDED
data/exe/demotape
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require_relative "../lib/demo_tape"
|
|
5
|
+
require_relative "../lib/demo_tape/cli"
|
|
6
|
+
|
|
7
|
+
# `run` is reserved with thor 🫠🙄🤦♂️
|
|
8
|
+
argv = ARGV.dup
|
|
9
|
+
argv[0] = "_run" if argv[0] == "run"
|
|
10
|
+
|
|
11
|
+
DemoTape::CLI.start(argv)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoTape
|
|
4
|
+
Bounds = Struct.new(
|
|
5
|
+
:padding_left,
|
|
6
|
+
:padding_top,
|
|
7
|
+
:with_padding_width,
|
|
8
|
+
:with_padding_height,
|
|
9
|
+
:margin_left,
|
|
10
|
+
:margin_top,
|
|
11
|
+
:with_margin_width,
|
|
12
|
+
:with_margin_height,
|
|
13
|
+
keyword_init: true
|
|
14
|
+
)
|
|
15
|
+
end
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "thor"
|
|
4
|
+
|
|
5
|
+
module DemoTape
|
|
6
|
+
class CLI < Thor
|
|
7
|
+
check_unknown_options!
|
|
8
|
+
|
|
9
|
+
def self.exit_on_failure?
|
|
10
|
+
true
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
desc "run PATH", "Runs a demo tape"
|
|
14
|
+
option :typing_speed,
|
|
15
|
+
type: :string,
|
|
16
|
+
default: "50ms",
|
|
17
|
+
desc: "Global speed for typing"
|
|
18
|
+
option :variable_typing,
|
|
19
|
+
type: :numeric,
|
|
20
|
+
default: 0.25,
|
|
21
|
+
desc: "Whether to add variability to typing speed"
|
|
22
|
+
option :port,
|
|
23
|
+
type: :numeric,
|
|
24
|
+
default: 0,
|
|
25
|
+
desc: "Port for the ttyd server"
|
|
26
|
+
option :output_path,
|
|
27
|
+
type: :array,
|
|
28
|
+
default: [],
|
|
29
|
+
desc: "One or more paths to save the recorded terminal session"
|
|
30
|
+
option :shell,
|
|
31
|
+
type: :string,
|
|
32
|
+
enum: %w[zsh fish bash],
|
|
33
|
+
default: "zsh",
|
|
34
|
+
desc: "Shell to use for the terminal session"
|
|
35
|
+
option :rc_file,
|
|
36
|
+
type: :string,
|
|
37
|
+
desc: "Path to a shell rc file to source on startup"
|
|
38
|
+
option :no_rc,
|
|
39
|
+
type: :boolean,
|
|
40
|
+
default: false,
|
|
41
|
+
desc: "Do not load the default rc file"
|
|
42
|
+
option :theme,
|
|
43
|
+
type: :string,
|
|
44
|
+
default: "default_dark",
|
|
45
|
+
desc: "A built-in theme name or a path to a custom theme JSON file"
|
|
46
|
+
option :width,
|
|
47
|
+
type: :numeric,
|
|
48
|
+
default: 1920,
|
|
49
|
+
desc: "Output video width"
|
|
50
|
+
option :height,
|
|
51
|
+
type: :numeric,
|
|
52
|
+
default: 1080,
|
|
53
|
+
desc: "Output video height"
|
|
54
|
+
option :font_size,
|
|
55
|
+
type: :numeric,
|
|
56
|
+
default: 32,
|
|
57
|
+
desc: "Font size for the terminal session"
|
|
58
|
+
option :font_family,
|
|
59
|
+
type: :string,
|
|
60
|
+
default: %['JetBrainsMono Nerd Font Propo', monospace],
|
|
61
|
+
desc: "Font family for the terminal session"
|
|
62
|
+
option :line_height,
|
|
63
|
+
type: :numeric,
|
|
64
|
+
default: 1.2,
|
|
65
|
+
desc: "Line height for the terminal session"
|
|
66
|
+
option :cursor_blink,
|
|
67
|
+
type: :boolean,
|
|
68
|
+
default: true,
|
|
69
|
+
desc: "Whether the cursor blinks"
|
|
70
|
+
option :cursor_width,
|
|
71
|
+
type: :numeric,
|
|
72
|
+
default: 2,
|
|
73
|
+
desc: "The width of the cursor when in 'bar' style"
|
|
74
|
+
option :cursor_style,
|
|
75
|
+
type: :string,
|
|
76
|
+
enum: %w[block underline bar],
|
|
77
|
+
default: "block",
|
|
78
|
+
desc: "The style of the cursor when the terminal is focused."
|
|
79
|
+
option :letter_spacing,
|
|
80
|
+
type: :numeric,
|
|
81
|
+
default: 0,
|
|
82
|
+
desc: "Letter spacing for the terminal session"
|
|
83
|
+
option :padding,
|
|
84
|
+
type: :array,
|
|
85
|
+
default: [50],
|
|
86
|
+
desc: "Padding around the terminal content. " \
|
|
87
|
+
"It can be 1, 2, or 4 numbers."
|
|
88
|
+
option :fps,
|
|
89
|
+
type: :numeric,
|
|
90
|
+
default: 24,
|
|
91
|
+
desc: "Frames per second for the output video"
|
|
92
|
+
option :overwrite,
|
|
93
|
+
type: :boolean,
|
|
94
|
+
default: false,
|
|
95
|
+
desc: "Whether to overwrite the output file if it exists"
|
|
96
|
+
option :debug,
|
|
97
|
+
type: :boolean,
|
|
98
|
+
default: false,
|
|
99
|
+
desc: "Show additional debug output"
|
|
100
|
+
option :loop,
|
|
101
|
+
type: :boolean,
|
|
102
|
+
default: true,
|
|
103
|
+
desc: "Loop the GIF infinitely"
|
|
104
|
+
option :loop_delay,
|
|
105
|
+
type: :numeric,
|
|
106
|
+
default: 0,
|
|
107
|
+
desc: "Delay time (in seconds) before restarting the GIF animation"
|
|
108
|
+
option :margin,
|
|
109
|
+
type: :array,
|
|
110
|
+
default: [0],
|
|
111
|
+
desc: "Margin around the terminal content. " \
|
|
112
|
+
"It can be 1, 2, or 4 numbers."
|
|
113
|
+
option :margin_fill,
|
|
114
|
+
type: :string,
|
|
115
|
+
default: "#000000",
|
|
116
|
+
desc: "Color or image to use for the margin around the terminal " \
|
|
117
|
+
"content"
|
|
118
|
+
option :border_radius,
|
|
119
|
+
type: :numeric,
|
|
120
|
+
default: 0,
|
|
121
|
+
desc: "Border radius for the terminal canvas"
|
|
122
|
+
option :screenshot_only,
|
|
123
|
+
type: :boolean,
|
|
124
|
+
desc: "Only take screenshots instead of recording a video"
|
|
125
|
+
option :screenshot,
|
|
126
|
+
type: :boolean,
|
|
127
|
+
default: false,
|
|
128
|
+
desc: "Take a single screenshot at the end of the session"
|
|
129
|
+
def _run(file_path = "")
|
|
130
|
+
options = self.options.dup
|
|
131
|
+
options[:padding] =
|
|
132
|
+
Spacing.new(*(options.padding * 4).take(4).map(&:to_i))
|
|
133
|
+
options[:margin] =
|
|
134
|
+
Spacing.new(*(options.margin * 4).take(4).map(&:to_i))
|
|
135
|
+
|
|
136
|
+
if file_path == ""
|
|
137
|
+
file_path = "<stdin>"
|
|
138
|
+
content = $stdin.read
|
|
139
|
+
options[:output_path] = "stdin.mp4" if options.output_path.empty?
|
|
140
|
+
else
|
|
141
|
+
content = File.read(file_path)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
Runner.new(file_path:, content:, thor: shell, options:).run
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
desc "themes", "Lists available built-in themes"
|
|
148
|
+
def themes
|
|
149
|
+
Dir[File.join(__dir__, "themes", "*.json")].each do |path|
|
|
150
|
+
puts File.basename(path, ".json")
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
no_commands do
|
|
155
|
+
# Add helper methods here
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoTape
|
|
4
|
+
class Command
|
|
5
|
+
KEY_MAPPING = {
|
|
6
|
+
"Cancel" => :cancel,
|
|
7
|
+
"Help" => :help,
|
|
8
|
+
"Backspace" => :backspace,
|
|
9
|
+
"Tab" => :tab,
|
|
10
|
+
# "Clear" => :clear,
|
|
11
|
+
"Return" => :return,
|
|
12
|
+
"Enter" => :enter,
|
|
13
|
+
"Shift" => :shift,
|
|
14
|
+
"Control" => :control,
|
|
15
|
+
"Ctrl" => :control,
|
|
16
|
+
"Alt" => :alt,
|
|
17
|
+
"Option" => :alt,
|
|
18
|
+
"Pause" => :pause,
|
|
19
|
+
"Escape" => :escape,
|
|
20
|
+
"Esc" => :escape,
|
|
21
|
+
"Space" => :space,
|
|
22
|
+
"PageUp" => :page_up,
|
|
23
|
+
"PageDown" => :page_down,
|
|
24
|
+
"End" => :end,
|
|
25
|
+
"Home" => :home,
|
|
26
|
+
"Left" => :left,
|
|
27
|
+
"Up" => :up,
|
|
28
|
+
"Right" => :right,
|
|
29
|
+
"Down" => :down,
|
|
30
|
+
"Insert" => :insert,
|
|
31
|
+
"Delete" => :delete,
|
|
32
|
+
"Semicolon" => :semicolon,
|
|
33
|
+
"Colon" => ":",
|
|
34
|
+
"Equals" => :equals,
|
|
35
|
+
"Numpad0" => :numpad0,
|
|
36
|
+
"Numpad1" => :numpad1,
|
|
37
|
+
"Numpad2" => :numpad2,
|
|
38
|
+
"Numpad3" => :numpad3,
|
|
39
|
+
"Numpad4" => :numpad4,
|
|
40
|
+
"Numpad5" => :numpad5,
|
|
41
|
+
"Numpad6" => :numpad6,
|
|
42
|
+
"Numpad7" => :numpad7,
|
|
43
|
+
"Numpad8" => :numpad8,
|
|
44
|
+
"Numpad9" => :numpad9,
|
|
45
|
+
"Multiply" => :multiply,
|
|
46
|
+
"Add" => :add,
|
|
47
|
+
"Separator" => :separator,
|
|
48
|
+
"Subtract" => :subtract,
|
|
49
|
+
"Decimal" => :decimal,
|
|
50
|
+
"Divide" => :divide,
|
|
51
|
+
"F1" => :f1,
|
|
52
|
+
"F2" => :f2,
|
|
53
|
+
"F3" => :f3,
|
|
54
|
+
"F4" => :f4,
|
|
55
|
+
"F5" => :f5,
|
|
56
|
+
"F6" => :f6,
|
|
57
|
+
"F7" => :f7,
|
|
58
|
+
"F8" => :f8,
|
|
59
|
+
"F9" => :f9,
|
|
60
|
+
"F10" => :f10,
|
|
61
|
+
"F11" => :f11,
|
|
62
|
+
"F12" => :f12,
|
|
63
|
+
"Meta" => :meta,
|
|
64
|
+
"Command" => :command,
|
|
65
|
+
"Slash" => "/",
|
|
66
|
+
"BackSlash" => "\\"
|
|
67
|
+
}.freeze
|
|
68
|
+
|
|
69
|
+
VALID_COMMANDS = KEY_MAPPING.keys + %w[
|
|
70
|
+
Clear
|
|
71
|
+
Copy
|
|
72
|
+
Include
|
|
73
|
+
Output
|
|
74
|
+
Pause
|
|
75
|
+
Paste
|
|
76
|
+
Require
|
|
77
|
+
Resume
|
|
78
|
+
Screenshot
|
|
79
|
+
Send
|
|
80
|
+
Set
|
|
81
|
+
Sleep
|
|
82
|
+
Type
|
|
83
|
+
TypeFile
|
|
84
|
+
Wait
|
|
85
|
+
WaitUntil
|
|
86
|
+
].freeze
|
|
87
|
+
|
|
88
|
+
META_COMMANDS = %w[Require Set Include Output].freeze
|
|
89
|
+
COMMANDS_WITH_SPEED = KEY_MAPPING.keys + %w[Type]
|
|
90
|
+
COMMANDS_WITH_TIMEOUT = %w[WaitUntil].freeze
|
|
91
|
+
VALID_TIME_UNITS = %w[ms s m h].freeze
|
|
92
|
+
|
|
93
|
+
# Valid keys that can be used in key combos
|
|
94
|
+
VALID_KEYS = KEY_MAPPING.keys + %w[
|
|
95
|
+
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
|
96
|
+
a b c d e f g h i j k l m n o p q r s t u v w x y z
|
|
97
|
+
0 1 2 3 4 5 6 7 8 9
|
|
98
|
+
].freeze
|
|
99
|
+
|
|
100
|
+
SET_OPTIONS = %w[
|
|
101
|
+
border_radius cursor_blink cursor_style cursor_width font_family font_size
|
|
102
|
+
height line_height loop loop_delay margin margin_fill padding shell theme
|
|
103
|
+
typing_speed variable_typing width
|
|
104
|
+
].freeze
|
|
105
|
+
|
|
106
|
+
attr_reader :type, :args, :options
|
|
107
|
+
attr_accessor :column, :duration_column, :file, :line, :line_content,
|
|
108
|
+
:speed_column, :timeout_column, :tokens
|
|
109
|
+
|
|
110
|
+
def initialize(type, args = "", **options)
|
|
111
|
+
@type = type
|
|
112
|
+
@args = args
|
|
113
|
+
@options = options
|
|
114
|
+
@line = nil
|
|
115
|
+
@column = nil
|
|
116
|
+
@line_content = nil
|
|
117
|
+
@file = nil
|
|
118
|
+
@duration_column = nil
|
|
119
|
+
@speed_column = nil
|
|
120
|
+
@timeout_column = nil
|
|
121
|
+
@tokens = []
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Whether this command represents a key press
|
|
125
|
+
def key?
|
|
126
|
+
VALID_KEYS.include?(type)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
def keys
|
|
130
|
+
return [] unless key?
|
|
131
|
+
|
|
132
|
+
keys = [to_key_value(type)]
|
|
133
|
+
keys += options.fetch(:keys, []).map { to_key_value(it) }
|
|
134
|
+
|
|
135
|
+
keys
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
def to_key_value(input)
|
|
139
|
+
KEY_MAPPING[input] || input.downcase
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Whether this command is a meta-command (i.e., not producing output)
|
|
143
|
+
# Meta commands are executed before regular commands.
|
|
144
|
+
def meta?
|
|
145
|
+
META_COMMANDS.include?(type)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def to_sym
|
|
149
|
+
@to_sym ||= type.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
|
150
|
+
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
|
151
|
+
.tr("-", "_")
|
|
152
|
+
.downcase
|
|
153
|
+
.to_sym
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
def validate_command!
|
|
157
|
+
return if VALID_COMMANDS.include?(type)
|
|
158
|
+
|
|
159
|
+
raise_error "Unknown command: #{type.inspect}"
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def validate_speed!
|
|
163
|
+
return unless options[:speed] && !COMMANDS_WITH_SPEED.include?(type)
|
|
164
|
+
|
|
165
|
+
raise_error "Command #{type.inspect} does not accept speed option"
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
def validate_timeout!
|
|
169
|
+
return unless options[:timeout] && !COMMANDS_WITH_TIMEOUT.include?(type)
|
|
170
|
+
|
|
171
|
+
raise_error "Command #{type.inspect} does not accept timeout option"
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
def validate_set_options!
|
|
175
|
+
return unless type == "Set"
|
|
176
|
+
|
|
177
|
+
# Handle nested options (e.g., theme.background)
|
|
178
|
+
base_option = options[:option].split(".").first
|
|
179
|
+
|
|
180
|
+
return if SET_OPTIONS.include?(base_option)
|
|
181
|
+
|
|
182
|
+
raise_error "Unknown option: #{options[:option].inspect} #{self}",
|
|
183
|
+
column_override: tokens[1].column
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
def validate_keys!
|
|
187
|
+
return unless options[:keys]
|
|
188
|
+
|
|
189
|
+
all_keys = options[:keys] + [type]
|
|
190
|
+
|
|
191
|
+
all_keys.each do |key|
|
|
192
|
+
next if VALID_KEYS.include?(key)
|
|
193
|
+
|
|
194
|
+
unless VALID_COMMANDS.include?(key)
|
|
195
|
+
raise_error "Invalid key in combo: #{key.inspect}"
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
raise_error "Command #{key.inspect} doesn't support key combos"
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
def validate_regex!
|
|
203
|
+
return unless type == "WaitUntil"
|
|
204
|
+
|
|
205
|
+
raise_error "WaitUntil command requires a regex pattern" if args.empty?
|
|
206
|
+
|
|
207
|
+
begin
|
|
208
|
+
options[:pattern] = Regexp.new(args)
|
|
209
|
+
rescue RegexpError => error
|
|
210
|
+
raise_error "Invalid regex pattern: #{error.message}"
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
def prepare!
|
|
215
|
+
validate_command!
|
|
216
|
+
validate_speed!
|
|
217
|
+
validate_timeout!
|
|
218
|
+
normalize_theme_options!
|
|
219
|
+
validate_set_options!
|
|
220
|
+
validate_keys!
|
|
221
|
+
validate_regex!
|
|
222
|
+
validate_duration!
|
|
223
|
+
validate_type_file!
|
|
224
|
+
|
|
225
|
+
normalize_spacing_values!
|
|
226
|
+
|
|
227
|
+
self
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
private def validate_type_file!
|
|
231
|
+
return unless type == "TypeFile"
|
|
232
|
+
|
|
233
|
+
raise_error "TypeFile command requires a file path" if args.empty?
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
private def validate_duration!
|
|
237
|
+
[args, :duration] => [duration, source] if %w[Sleep Wait].include?(type)
|
|
238
|
+
[options[:speed], :speed] => [duration, source] if options[:speed]
|
|
239
|
+
[options[:timeout], :timeout] => [duration, source] if options[:timeout]
|
|
240
|
+
|
|
241
|
+
return unless duration
|
|
242
|
+
|
|
243
|
+
unit = duration[/[a-z]+$/i]
|
|
244
|
+
return if VALID_TIME_UNITS.include?(unit)
|
|
245
|
+
|
|
246
|
+
col = case source
|
|
247
|
+
when :speed then speed_column
|
|
248
|
+
when :timeout then timeout_column
|
|
249
|
+
else duration_column
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
raise_error "Invalid time unit: #{unit.inspect}", column_override: col
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
private def normalize_theme_options!
|
|
256
|
+
return unless type == "Set"
|
|
257
|
+
return unless options[:option]&.include?(".")
|
|
258
|
+
|
|
259
|
+
option, sub_option = *options[:option].split(".", 2)
|
|
260
|
+
|
|
261
|
+
unless option == "theme"
|
|
262
|
+
raise_error "Unexpected attribute #{options[:option].inspect}",
|
|
263
|
+
column_override: tokens[1].column
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
unless Theme.valid_options.include?(sub_option.to_sym)
|
|
267
|
+
raise_error "Invalid theme property",
|
|
268
|
+
column_override: tokens[1].column + 6 # ".theme".size
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
@options[:option] = option
|
|
272
|
+
@options[:sub_option] = sub_option
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
private def normalize_spacing_values!
|
|
276
|
+
return unless type == "Set"
|
|
277
|
+
return unless %w[padding margin].include?(options[:option])
|
|
278
|
+
|
|
279
|
+
@args = (Array(args).map(&:to_i) * 4).take(4)
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
def location(column_override: nil)
|
|
283
|
+
col = column_override || column
|
|
284
|
+
"#{file || '<unknown>'}:#{line}:#{col}"
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
def raise_error(message, column_override: nil)
|
|
288
|
+
col = column_override || column
|
|
289
|
+
|
|
290
|
+
raise DemoTape::ParseError, message unless line && col && line_content
|
|
291
|
+
|
|
292
|
+
error_msg = "#{message} at #{location(column_override:)}:\n"
|
|
293
|
+
error_msg += " #{line_content}\n"
|
|
294
|
+
error_msg += " #{' ' * (col - 1)}^"
|
|
295
|
+
|
|
296
|
+
raise DemoTape::ParseError, error_msg
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
def to_s
|
|
300
|
+
opts_str = options.empty? ? "" : " #{options.inspect}"
|
|
301
|
+
"#{type} #{args.inspect}#{opts_str}"
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
def to_formatted(thor)
|
|
305
|
+
return thor.set_color(type, :blue) unless tokens.any?
|
|
306
|
+
|
|
307
|
+
values = []
|
|
308
|
+
|
|
309
|
+
tokens.each_with_index do |token, index|
|
|
310
|
+
previous_token = tokens[index - 1]
|
|
311
|
+
preceded_by_comma = previous_token.is_a?(Token::Operator) &&
|
|
312
|
+
previous_token.value == ","
|
|
313
|
+
|
|
314
|
+
case token
|
|
315
|
+
when Token::String
|
|
316
|
+
values << " "
|
|
317
|
+
values << thor.set_color(token.raw, :yellow)
|
|
318
|
+
when Token::Operator
|
|
319
|
+
values << thor.set_color(token.value, :white)
|
|
320
|
+
when Token::Number
|
|
321
|
+
values << " " unless previous_token.is_a?(Token::Operator)
|
|
322
|
+
values << " " if preceded_by_comma
|
|
323
|
+
values << thor.set_color(token.value, :magenta)
|
|
324
|
+
when Token::Duration
|
|
325
|
+
values << " " unless previous_token.is_a?(Token::Operator)
|
|
326
|
+
values << thor.set_color(token.value, :magenta)
|
|
327
|
+
when Token::Regex
|
|
328
|
+
values << " "
|
|
329
|
+
values << thor.set_color(token.raw, :green)
|
|
330
|
+
when Token::Identifier
|
|
331
|
+
values << " " if previous_token.is_a?(Token::Identifier)
|
|
332
|
+
values << thor.set_color(token.value, :blue)
|
|
333
|
+
else
|
|
334
|
+
raise "Unexpected token type: #{token.class.name}"
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
values.join.strip
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
end
|