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
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoTape
|
|
4
|
+
class Duration
|
|
5
|
+
VALID_UNITS = %w[ms s m h].freeze
|
|
6
|
+
|
|
7
|
+
def self.parse(input)
|
|
8
|
+
input = "0#{input}" if input.to_s.start_with?(".")
|
|
9
|
+
|
|
10
|
+
return input if input.is_a?(Numeric)
|
|
11
|
+
return 1 if input.to_s.strip.empty?
|
|
12
|
+
|
|
13
|
+
value, unit = *input.match(/((?:\d+\.)?(?:\d+))([a-z]{1,2})?/).captures
|
|
14
|
+
|
|
15
|
+
unit ||= "s"
|
|
16
|
+
|
|
17
|
+
case unit
|
|
18
|
+
when "ms"
|
|
19
|
+
value.to_f / 1000.0
|
|
20
|
+
when "s"
|
|
21
|
+
value.to_f
|
|
22
|
+
when "m"
|
|
23
|
+
value.to_f * 60.0
|
|
24
|
+
when "h"
|
|
25
|
+
value.to_f * 3600.0
|
|
26
|
+
else
|
|
27
|
+
raise ArgumentError, "Unknown time unit: #{unit.inspect}"
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoTape
|
|
4
|
+
class Exporter
|
|
5
|
+
attr_reader :tmp_dir, :frame_count, :options, :theme
|
|
6
|
+
|
|
7
|
+
def initialize(tmp_dir:, frame_count:, options:, theme:)
|
|
8
|
+
@tmp_dir = tmp_dir
|
|
9
|
+
@frame_count = frame_count
|
|
10
|
+
@options = options
|
|
11
|
+
@theme = theme
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def bounds
|
|
15
|
+
@bounds ||= compute_image_bounds
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def video(path)
|
|
19
|
+
text_input = tmp_dir.join("frame-text-%05d.png")
|
|
20
|
+
cursor_input = tmp_dir.join("frame-cursor-%05d.png")
|
|
21
|
+
mask_path = tmp_dir.join("border-radius-mask.png")
|
|
22
|
+
|
|
23
|
+
create_border_radius_mask(
|
|
24
|
+
bounds.with_padding_width,
|
|
25
|
+
bounds.with_padding_height,
|
|
26
|
+
options.border_radius,
|
|
27
|
+
mask_path
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
# Check if margin_fill is a file path
|
|
31
|
+
if File.file?(options.margin_fill)
|
|
32
|
+
# Use image as background
|
|
33
|
+
filter = build_filter_with_image_background(bounds, mask_path)
|
|
34
|
+
|
|
35
|
+
inputs = []
|
|
36
|
+
inputs << "-framerate #{options.fps} -i #{text_input}"
|
|
37
|
+
inputs << "-framerate #{options.fps} -i #{cursor_input}"
|
|
38
|
+
inputs << "-loop 1 -i #{Shellwords.escape(options.margin_fill)}"
|
|
39
|
+
inputs << "-loop 1 -i #{Shellwords.escape(mask_path)}"
|
|
40
|
+
else
|
|
41
|
+
# Use solid color as background
|
|
42
|
+
filter = build_filter_with_color_background(bounds, mask_path)
|
|
43
|
+
|
|
44
|
+
inputs = []
|
|
45
|
+
inputs << "-framerate #{options.fps} -i #{text_input}"
|
|
46
|
+
inputs << "-framerate #{options.fps} -i #{cursor_input}"
|
|
47
|
+
inputs << "-loop 1 -i #{Shellwords.escape(mask_path)}"
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
cmd = <<~CMD
|
|
51
|
+
ffmpeg -y \
|
|
52
|
+
-loglevel error \
|
|
53
|
+
#{inputs.join(" \\\n ")} \
|
|
54
|
+
-filter_complex "#{filter}" \
|
|
55
|
+
-frames:v #{frame_count} \
|
|
56
|
+
-c:v libx264 \
|
|
57
|
+
-pix_fmt yuv420p \
|
|
58
|
+
-r #{options.fps} \
|
|
59
|
+
-movflags +faststart \
|
|
60
|
+
#{Shellwords.escape(path)}
|
|
61
|
+
CMD
|
|
62
|
+
|
|
63
|
+
system(cmd)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def webm(path)
|
|
67
|
+
text_input = tmp_dir.join("frame-text-%05d.png")
|
|
68
|
+
cursor_input = tmp_dir.join("frame-cursor-%05d.png")
|
|
69
|
+
|
|
70
|
+
# Always create border radius mask (square corners if radius is 0)
|
|
71
|
+
mask_path = tmp_dir.join("border-radius-mask.png")
|
|
72
|
+
create_border_radius_mask(
|
|
73
|
+
bounds.with_padding_width,
|
|
74
|
+
bounds.with_padding_height,
|
|
75
|
+
options.border_radius,
|
|
76
|
+
mask_path
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
# Check if margin_fill is a file path
|
|
80
|
+
if File.file?(options.margin_fill)
|
|
81
|
+
# Use image as background
|
|
82
|
+
filter = build_filter_with_image_background(bounds, mask_path)
|
|
83
|
+
|
|
84
|
+
inputs = []
|
|
85
|
+
inputs << "-framerate #{options.fps} -i #{text_input}"
|
|
86
|
+
inputs << "-framerate #{options.fps} -i #{cursor_input}"
|
|
87
|
+
inputs << "-loop 1 -i #{Shellwords.escape(options.margin_fill)}"
|
|
88
|
+
inputs << "-loop 1 -i #{Shellwords.escape(mask_path)}"
|
|
89
|
+
else
|
|
90
|
+
# Use solid color as background
|
|
91
|
+
filter = build_filter_with_color_background(bounds, mask_path)
|
|
92
|
+
|
|
93
|
+
inputs = []
|
|
94
|
+
inputs << "-framerate #{options.fps} -i #{text_input}"
|
|
95
|
+
inputs << "-framerate #{options.fps} -i #{cursor_input}"
|
|
96
|
+
inputs << "-loop 1 -i #{Shellwords.escape(mask_path)}"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
cmd = <<~CMD
|
|
100
|
+
ffmpeg -y \
|
|
101
|
+
-loglevel error \
|
|
102
|
+
#{inputs.join(" \\\n ")} \
|
|
103
|
+
-filter_complex "#{filter}" \
|
|
104
|
+
-frames:v #{frame_count} \
|
|
105
|
+
-c:v libvpx-vp9 \
|
|
106
|
+
-pix_fmt yuva420p \
|
|
107
|
+
-b:v 0 \
|
|
108
|
+
-crf 30 \
|
|
109
|
+
-r #{options.fps} \
|
|
110
|
+
#{Shellwords.escape(path)}
|
|
111
|
+
CMD
|
|
112
|
+
|
|
113
|
+
system(cmd)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
def gif(path)
|
|
117
|
+
text_input = tmp_dir.join("frame-text-%05d.png")
|
|
118
|
+
cursor_input = tmp_dir.join("frame-cursor-%05d.png")
|
|
119
|
+
loop_flag = options.loop ? "-loop 0" : "-loop -1"
|
|
120
|
+
|
|
121
|
+
# Always create border radius mask (square corners if radius is 0)
|
|
122
|
+
mask_path = tmp_dir.join("border-radius-mask.png")
|
|
123
|
+
create_border_radius_mask(
|
|
124
|
+
bounds.with_padding_width,
|
|
125
|
+
bounds.with_padding_height,
|
|
126
|
+
options.border_radius,
|
|
127
|
+
mask_path
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
# Check if margin_fill is a file path
|
|
131
|
+
if File.file?(options.margin_fill)
|
|
132
|
+
# Use image as background
|
|
133
|
+
filter = build_filter_with_image_background(bounds, mask_path)
|
|
134
|
+
|
|
135
|
+
inputs = []
|
|
136
|
+
inputs << "-framerate #{options.fps} -i #{text_input}"
|
|
137
|
+
inputs << "-framerate #{options.fps} -i #{cursor_input}"
|
|
138
|
+
inputs << "-loop 1 -i #{Shellwords.escape(options.margin_fill)}"
|
|
139
|
+
inputs << "-loop 1 -i #{Shellwords.escape(mask_path)}"
|
|
140
|
+
else
|
|
141
|
+
# Use solid color as background
|
|
142
|
+
filter = build_filter_with_color_background(bounds, mask_path)
|
|
143
|
+
|
|
144
|
+
inputs = []
|
|
145
|
+
inputs << "-framerate #{options.fps} -i #{text_input}"
|
|
146
|
+
inputs << "-framerate #{options.fps} -i #{cursor_input}"
|
|
147
|
+
inputs << "-loop 1 -i #{Shellwords.escape(mask_path)}"
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
filter = apply_gif_loop_delay(filter)
|
|
151
|
+
total_frames = calculate_gif_total_frames
|
|
152
|
+
|
|
153
|
+
cmd = <<~CMD
|
|
154
|
+
ffmpeg -y \
|
|
155
|
+
-loglevel error \
|
|
156
|
+
#{inputs.join(" \\\n ")} \
|
|
157
|
+
-filter_complex "#{filter}" \
|
|
158
|
+
-frames:v #{total_frames} \
|
|
159
|
+
#{loop_flag} \
|
|
160
|
+
-r #{options.fps} \
|
|
161
|
+
#{Shellwords.escape(path)}
|
|
162
|
+
CMD
|
|
163
|
+
|
|
164
|
+
system(cmd)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
def png(path)
|
|
168
|
+
text_input = tmp_dir.join(format("frame-text-%05d.png", frame_count))
|
|
169
|
+
cursor_input = tmp_dir.join(format("frame-cursor-%05d.png", frame_count))
|
|
170
|
+
|
|
171
|
+
# Always create border radius mask (square corners if radius is 0)
|
|
172
|
+
mask_path = tmp_dir.join("border-radius-mask.png")
|
|
173
|
+
create_border_radius_mask(
|
|
174
|
+
bounds.with_padding_width,
|
|
175
|
+
bounds.with_padding_height,
|
|
176
|
+
options.border_radius,
|
|
177
|
+
mask_path
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
# Check if margin_fill is a file path
|
|
181
|
+
if File.file?(options.margin_fill)
|
|
182
|
+
# Use image as background
|
|
183
|
+
filter = build_filter_with_image_background(bounds, mask_path)
|
|
184
|
+
|
|
185
|
+
inputs = []
|
|
186
|
+
inputs << "-i #{Shellwords.escape(text_input.to_s)}"
|
|
187
|
+
inputs << "-i #{Shellwords.escape(cursor_input.to_s)}"
|
|
188
|
+
inputs << "-i #{Shellwords.escape(options.margin_fill)}"
|
|
189
|
+
inputs << "-i #{Shellwords.escape(mask_path)}"
|
|
190
|
+
else
|
|
191
|
+
# Use solid color as background
|
|
192
|
+
filter = build_filter_with_color_background(bounds, mask_path)
|
|
193
|
+
|
|
194
|
+
inputs = []
|
|
195
|
+
inputs << "-i #{Shellwords.escape(text_input.to_s)}"
|
|
196
|
+
inputs << "-i #{Shellwords.escape(cursor_input.to_s)}"
|
|
197
|
+
inputs << "-i #{Shellwords.escape(mask_path)}"
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
cmd = <<~CMD
|
|
201
|
+
ffmpeg -y \
|
|
202
|
+
-loglevel error \
|
|
203
|
+
#{inputs.join(" \\\n ")} \
|
|
204
|
+
-filter_complex "#{filter}" \
|
|
205
|
+
-frames:v 1 \
|
|
206
|
+
#{Shellwords.escape(path)}
|
|
207
|
+
CMD
|
|
208
|
+
|
|
209
|
+
system(cmd)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
def get_png_dimensions(file_path)
|
|
213
|
+
File.open(file_path, "rb") do |f|
|
|
214
|
+
f.read(8) # Skip PNG signature
|
|
215
|
+
f.read(4) # Skip chunk length
|
|
216
|
+
f.read(4) # Skip "IHDR"
|
|
217
|
+
width = f.read(4).unpack1("N") # Read width (big-endian)
|
|
218
|
+
height = f.read(4).unpack1("N") # Read height (big-endian)
|
|
219
|
+
[width, height]
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
def compute_image_bounds
|
|
224
|
+
first_frame = tmp_dir.glob("frame-text-*.png").first
|
|
225
|
+
actual_width, actual_height = get_png_dimensions(first_frame)
|
|
226
|
+
padding = options.padding
|
|
227
|
+
margin = options.margin
|
|
228
|
+
|
|
229
|
+
# options.width and options.height are the FINAL output dimensions
|
|
230
|
+
# We need to work backwards: final size includes margin
|
|
231
|
+
final_width = options.width
|
|
232
|
+
final_height = options.height
|
|
233
|
+
|
|
234
|
+
# Calculate how much space is available for padding area
|
|
235
|
+
# (after subtracting margin)
|
|
236
|
+
available_for_padding_width = final_width - margin.left - margin.right
|
|
237
|
+
available_for_padding_height = final_height - margin.top - margin.bottom
|
|
238
|
+
|
|
239
|
+
# Calculate content width/height with user-specified padding
|
|
240
|
+
content_width = actual_width + padding.left + padding.right
|
|
241
|
+
content_height = actual_height + padding.top + padding.bottom
|
|
242
|
+
|
|
243
|
+
# Any additional space needed goes to right and bottom
|
|
244
|
+
extra_width = [0, available_for_padding_width - content_width].max
|
|
245
|
+
extra_height = [0, available_for_padding_height - content_height].max
|
|
246
|
+
|
|
247
|
+
# Dimensions after padding is applied
|
|
248
|
+
# (fits within available space after margin)
|
|
249
|
+
with_padding_width = content_width + extra_width
|
|
250
|
+
with_padding_height = content_height + extra_height
|
|
251
|
+
|
|
252
|
+
Bounds.new(
|
|
253
|
+
padding_left: padding.left,
|
|
254
|
+
padding_top: padding.top,
|
|
255
|
+
with_padding_width:,
|
|
256
|
+
with_padding_height:,
|
|
257
|
+
margin_left: margin.left,
|
|
258
|
+
margin_top: margin.top,
|
|
259
|
+
with_margin_width: final_width,
|
|
260
|
+
with_margin_height: final_height
|
|
261
|
+
)
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
def build_filter_with_image_background(bounds, _mask_path)
|
|
265
|
+
# Input 0: text frames
|
|
266
|
+
# Input 1: cursor frames
|
|
267
|
+
# Input 2: background image
|
|
268
|
+
# Input 3: mask
|
|
269
|
+
|
|
270
|
+
# Scale background to output size and center/crop if needed
|
|
271
|
+
filter = "[2:v]scale=#{bounds.with_margin_width}:#{bounds.with_margin_height}:force_original_aspect_ratio=increase,crop=#{bounds.with_margin_width}:#{bounds.with_margin_height}[bg];" # rubocop:disable Layout/LineLength
|
|
272
|
+
|
|
273
|
+
# Overlay text+cursor, add padding
|
|
274
|
+
filter += "[0:v][1:v]overlay=0:0"
|
|
275
|
+
filter += ",pad=#{bounds.with_padding_width}:#{bounds.with_padding_height}:#{bounds.padding_left}:#{bounds.padding_top}:#{theme.background}" # rubocop:disable Layout/LineLength
|
|
276
|
+
|
|
277
|
+
# Apply border radius mask
|
|
278
|
+
filter += "[term];[3]loop=-1[mask];[term][mask]alphamerge[terminal];"
|
|
279
|
+
|
|
280
|
+
# Overlay terminal on background, centered
|
|
281
|
+
filter += "[bg][terminal]overlay=(W-w)/2:(H-h)/2"
|
|
282
|
+
filter
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
def build_filter_with_color_background(bounds, _mask_path)
|
|
286
|
+
# Overlay text+cursor, add padding, then add margin
|
|
287
|
+
filter = "[0:v][1:v]overlay=0:0"
|
|
288
|
+
filter += ",pad=#{bounds.with_padding_width}:#{bounds.with_padding_height}:#{bounds.padding_left}:#{bounds.padding_top}:#{theme.background}" # rubocop:disable Layout/LineLength
|
|
289
|
+
|
|
290
|
+
# Apply border radius mask
|
|
291
|
+
filter += "[term];[2]loop=-1[mask];[term][mask]alphamerge"
|
|
292
|
+
|
|
293
|
+
filter += ",pad=#{bounds.with_margin_width}:#{bounds.with_margin_height}:#{bounds.margin_left}:#{bounds.margin_top}:#{options.margin_fill}" # rubocop:disable Layout/LineLength
|
|
294
|
+
filter
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
def create_border_radius_mask(width, height, radius, path)
|
|
298
|
+
# Ensure radius is non-negative
|
|
299
|
+
radius = [0, radius.to_i].max
|
|
300
|
+
|
|
301
|
+
# Create a grayscale image for the alpha mask
|
|
302
|
+
img = ChunkyPNG::Image.new(width, height, ChunkyPNG::Color::BLACK)
|
|
303
|
+
|
|
304
|
+
if radius.zero?
|
|
305
|
+
# No border radius - just fill everything white
|
|
306
|
+
(0...height).each do |y|
|
|
307
|
+
(0...width).each do |x|
|
|
308
|
+
img[x, y] = ChunkyPNG::Color::WHITE
|
|
309
|
+
end
|
|
310
|
+
end
|
|
311
|
+
else
|
|
312
|
+
# Draw a white rounded rectangle
|
|
313
|
+
# Fill the main rectangle
|
|
314
|
+
(radius...(height - radius)).each do |y|
|
|
315
|
+
(0...width).each do |x|
|
|
316
|
+
img[x, y] = ChunkyPNG::Color::WHITE
|
|
317
|
+
end
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
(0...height).each do |y|
|
|
321
|
+
(radius...(width - radius)).each do |x|
|
|
322
|
+
img[x, y] = ChunkyPNG::Color::WHITE
|
|
323
|
+
end
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Draw the four rounded corners
|
|
327
|
+
draw_rounded_corner(img, radius, radius, radius)
|
|
328
|
+
draw_rounded_corner(img, width - radius - 1, radius, radius)
|
|
329
|
+
draw_rounded_corner(img, radius, height - radius - 1, radius)
|
|
330
|
+
draw_rounded_corner(img, width - radius - 1, height - radius - 1,
|
|
331
|
+
radius)
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
img.save(path)
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
def draw_rounded_corner(img, cx, cy, radius)
|
|
338
|
+
(-radius..radius).each do |dy|
|
|
339
|
+
(-radius..radius).each do |dx|
|
|
340
|
+
dist_sq = (dx * dx) + (dy * dy)
|
|
341
|
+
next unless dist_sq <= (radius + 1) * (radius + 1)
|
|
342
|
+
|
|
343
|
+
x = cx + dx
|
|
344
|
+
y = cy + dy
|
|
345
|
+
if x.negative? || x >= img.width || y.negative? || y >= img.height
|
|
346
|
+
next
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
img[x, y] = ChunkyPNG::Color::WHITE
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
def apply_gif_loop_delay(filter)
|
|
355
|
+
delay = Duration.parse(options.loop_delay)
|
|
356
|
+
|
|
357
|
+
return filter unless delay.positive?
|
|
358
|
+
|
|
359
|
+
delay_frames = (delay * options.fps).ceil
|
|
360
|
+
"#{filter},tpad=stop_mode=clone:stop_duration=#{delay_frames}"
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
def calculate_gif_total_frames
|
|
364
|
+
delay = Duration.parse(options.loop_delay)
|
|
365
|
+
|
|
366
|
+
return frame_count unless delay.positive?
|
|
367
|
+
|
|
368
|
+
delay_frames = (delay * options.fps).ceil
|
|
369
|
+
frame_count + delay_frames
|
|
370
|
+
end
|
|
371
|
+
end
|
|
372
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoTape
|
|
4
|
+
class Generator < Thor::Group
|
|
5
|
+
include Thor::Actions
|
|
6
|
+
|
|
7
|
+
attr_accessor :options
|
|
8
|
+
|
|
9
|
+
def self.source_root
|
|
10
|
+
File.join(__dir__, "templates")
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
no_commands do
|
|
14
|
+
# Add helper methods here
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DemoTape
|
|
4
|
+
class Lexer
|
|
5
|
+
def self.tokenize(content)
|
|
6
|
+
new.tokenize(content)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
attr_reader :line_map
|
|
10
|
+
|
|
11
|
+
def tokenize(content)
|
|
12
|
+
tokens = []
|
|
13
|
+
@line_map = {}
|
|
14
|
+
@line_number = 0
|
|
15
|
+
token_index = 0
|
|
16
|
+
in_multiline = false
|
|
17
|
+
multiline_content = []
|
|
18
|
+
multiline_start_line = 0
|
|
19
|
+
multiline_start_col = 1
|
|
20
|
+
|
|
21
|
+
content.each_line do |line|
|
|
22
|
+
@line_number += 1
|
|
23
|
+
original_line = line.dup
|
|
24
|
+
stripped_line = line.strip
|
|
25
|
+
|
|
26
|
+
# Handle multiline string collection
|
|
27
|
+
if in_multiline
|
|
28
|
+
if stripped_line == '"""'
|
|
29
|
+
# End of multiline string
|
|
30
|
+
in_multiline = false
|
|
31
|
+
|
|
32
|
+
# Create the multiline string token,
|
|
33
|
+
# but first, strip the initial linebreak after the opening quotes
|
|
34
|
+
multiline_content.first.gsub!(/\A\r?\n/, "")
|
|
35
|
+
multiline_text = multiline_content.join("\n")
|
|
36
|
+
@line_map[token_index] = {
|
|
37
|
+
line: multiline_start_line,
|
|
38
|
+
column: multiline_start_col,
|
|
39
|
+
content: '"""',
|
|
40
|
+
raw: '"""..."""'
|
|
41
|
+
}
|
|
42
|
+
tokens << [:STRING, multiline_text]
|
|
43
|
+
token_index += 1
|
|
44
|
+
|
|
45
|
+
# Add NEWLINE token after multiline string
|
|
46
|
+
@line_map[token_index] = {
|
|
47
|
+
line: @line_number,
|
|
48
|
+
column: 1,
|
|
49
|
+
content: '"""'
|
|
50
|
+
}
|
|
51
|
+
tokens << [:NEWLINE, "\n"]
|
|
52
|
+
token_index += 1
|
|
53
|
+
|
|
54
|
+
multiline_content = []
|
|
55
|
+
else
|
|
56
|
+
# Collect line content (preserve original spacing)
|
|
57
|
+
multiline_content << line.chomp
|
|
58
|
+
end
|
|
59
|
+
next
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Skip empty lines and comments (but only when not in multiline)
|
|
63
|
+
next if stripped_line.empty? || stripped_line.start_with?("#")
|
|
64
|
+
|
|
65
|
+
line_tokens = tokenize_line(stripped_line)
|
|
66
|
+
|
|
67
|
+
# Check if any token starts a multiline string
|
|
68
|
+
multiline_idx = line_tokens.find_index do |t|
|
|
69
|
+
t[0] == :TRIPLE_QUOTE_START
|
|
70
|
+
end
|
|
71
|
+
if multiline_idx
|
|
72
|
+
# Process tokens before the triple quote
|
|
73
|
+
line_tokens[0...multiline_idx].each do |token|
|
|
74
|
+
col = token[2] || 1
|
|
75
|
+
raw = token[3] || token[1].to_s
|
|
76
|
+
|
|
77
|
+
@line_map[token_index] = {
|
|
78
|
+
line: @line_number,
|
|
79
|
+
column: col,
|
|
80
|
+
content: original_line.strip,
|
|
81
|
+
raw: raw
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
token.pop if token.size == 4
|
|
85
|
+
token.pop if token.size == 3
|
|
86
|
+
token_index += 1
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
tokens.concat(line_tokens[0...multiline_idx])
|
|
90
|
+
|
|
91
|
+
# Start multiline mode
|
|
92
|
+
in_multiline = true
|
|
93
|
+
multiline_start_line = @line_number
|
|
94
|
+
multiline_start_col = line_tokens[multiline_idx][2] || 1
|
|
95
|
+
multiline_content = []
|
|
96
|
+
next
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Store line metadata separately indexed by token position
|
|
100
|
+
line_tokens.each do |token|
|
|
101
|
+
col = token[2] || 1
|
|
102
|
+
raw = token[3] || token[1].to_s
|
|
103
|
+
|
|
104
|
+
@line_map[token_index] = {
|
|
105
|
+
line: @line_number,
|
|
106
|
+
column: col,
|
|
107
|
+
content: original_line.strip,
|
|
108
|
+
raw: raw
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
# Remove column and raw from token before adding to tokens array
|
|
112
|
+
token.pop if token.size == 4 # Remove raw
|
|
113
|
+
token.pop if token.size == 3 # Remove column
|
|
114
|
+
token_index += 1
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
tokens.concat(line_tokens)
|
|
118
|
+
|
|
119
|
+
@line_map[token_index] = {
|
|
120
|
+
line: @line_number,
|
|
121
|
+
column: 1,
|
|
122
|
+
content: original_line.strip
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
tokens << [:NEWLINE, "\n"]
|
|
126
|
+
token_index += 1
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
tokens
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
private def tokenize_line(line)
|
|
133
|
+
tokens = []
|
|
134
|
+
scanner = StringScanner.new(line)
|
|
135
|
+
|
|
136
|
+
until scanner.eos?
|
|
137
|
+
# Track column position before scanning token
|
|
138
|
+
col = scanner.pos + 1
|
|
139
|
+
|
|
140
|
+
# Whitespace (emit as token instead of skipping)
|
|
141
|
+
if scanner.scan(/\s+/)
|
|
142
|
+
tokens << [:SPACE, scanner[0], col]
|
|
143
|
+
next
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Triple-quoted string start
|
|
147
|
+
if scanner.scan('"""')
|
|
148
|
+
tokens << [:TRIPLE_QUOTE_START, '"""', col, '"""']
|
|
149
|
+
|
|
150
|
+
# Double-quoted string (with escape support)
|
|
151
|
+
elsif scanner.scan(/"((?:[^"\\]|\\.)*)"/)
|
|
152
|
+
tokens << [:STRING, unescape_string(scanner[1]), col, scanner[0]]
|
|
153
|
+
|
|
154
|
+
# Single-quoted string (with escape support)
|
|
155
|
+
elsif scanner.scan(/'((?:[^'\\]|\\.)*)'/) # rubocop:disable Lint/DuplicateBranch
|
|
156
|
+
tokens << [:STRING, unescape_string(scanner[1]), col, scanner[0]]
|
|
157
|
+
|
|
158
|
+
# Regex pattern (between forward slashes)
|
|
159
|
+
elsif scanner.scan(%r{/((?:[^/\\]|\\.)*)/})
|
|
160
|
+
tokens << [:REGEX, scanner[1], col, scanner[0]]
|
|
161
|
+
|
|
162
|
+
# Duration (number + time unit - any identifier)
|
|
163
|
+
elsif scanner.scan(/(\d+(?:\.\d+)?|\.\d+)([a-zA-Z]+)/)
|
|
164
|
+
tokens << [
|
|
165
|
+
:NUMBER,
|
|
166
|
+
scanner[1].include?(".") ? scanner[1].to_f : scanner[1].to_i,
|
|
167
|
+
col,
|
|
168
|
+
scanner[1]
|
|
169
|
+
]
|
|
170
|
+
# TIME_UNIT starts after the number
|
|
171
|
+
time_unit_col = col + scanner[1].length
|
|
172
|
+
tokens << [:TIME_UNIT, scanner[2], time_unit_col, scanner[2]]
|
|
173
|
+
|
|
174
|
+
# Number
|
|
175
|
+
elsif scanner.scan(/\d+(?:\.\d+)?|\.\d+/)
|
|
176
|
+
value = scanner[0].include?(".") ? scanner[0].to_f : scanner[0].to_i
|
|
177
|
+
tokens << [:NUMBER, value, col, scanner[0]]
|
|
178
|
+
|
|
179
|
+
# At symbol
|
|
180
|
+
elsif scanner.scan("@")
|
|
181
|
+
tokens << [:AT, "@", col, "@"]
|
|
182
|
+
|
|
183
|
+
# Plus symbol
|
|
184
|
+
elsif scanner.scan("+")
|
|
185
|
+
tokens << [:PLUS, "+", col, "+"]
|
|
186
|
+
|
|
187
|
+
# Comma
|
|
188
|
+
elsif scanner.scan(",")
|
|
189
|
+
tokens << [:COMMA, ",", col, ","]
|
|
190
|
+
|
|
191
|
+
# Identifier (including dot notation for nested options)
|
|
192
|
+
elsif scanner.scan(/[a-zA-Z_][\w.]*/)
|
|
193
|
+
tokens << [:IDENTIFIER, scanner[0], col, scanner[0]]
|
|
194
|
+
|
|
195
|
+
# Word
|
|
196
|
+
elsif scanner.scan(/\S+/)
|
|
197
|
+
tokens << [:WORD, scanner[0], col, scanner[0]]
|
|
198
|
+
|
|
199
|
+
else
|
|
200
|
+
break
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
tokens
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
def unescape_string(str)
|
|
208
|
+
# First handle Unicode escapes to avoid double-processing
|
|
209
|
+
str = str.gsub(/\\u([0-9a-fA-F]{4})/) do
|
|
210
|
+
code_point = Regexp.last_match(1).to_i(16)
|
|
211
|
+
|
|
212
|
+
# Check if this is a high surrogate (0xD800-0xDBFF)
|
|
213
|
+
if code_point.between?(0xD800, 0xDBFF)
|
|
214
|
+
# Look ahead for low surrogate
|
|
215
|
+
remaining = Regexp.last_match.post_match
|
|
216
|
+
|
|
217
|
+
if remaining =~ /^\\u([dD][c-fC-F][0-9a-fA-F]{2})/
|
|
218
|
+
low_surrogate = Regexp.last_match(1).to_i(16)
|
|
219
|
+
|
|
220
|
+
# Combine surrogates into single code point
|
|
221
|
+
full_code_point = 0x10000 +
|
|
222
|
+
((code_point - 0xD800) << 10) +
|
|
223
|
+
(low_surrogate - 0xDC00)
|
|
224
|
+
|
|
225
|
+
# Return the character and mark the low surrogate for removal
|
|
226
|
+
"#{[full_code_point].pack('U*')}\u0000SKIP6"
|
|
227
|
+
else
|
|
228
|
+
# Orphaned high surrogate, keep as-is
|
|
229
|
+
[code_point].pack("U*")
|
|
230
|
+
end
|
|
231
|
+
elsif code_point.between?(0xDC00, 0xDFFF)
|
|
232
|
+
# Low surrogate without high surrogate, skip if marked
|
|
233
|
+
""
|
|
234
|
+
else
|
|
235
|
+
[code_point].pack("U*")
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Remove skip markers left by surrogate pair processing
|
|
240
|
+
str = str.gsub("\x00SKIP6", "")
|
|
241
|
+
|
|
242
|
+
# Handle 8-digit Unicode escapes
|
|
243
|
+
str = str.gsub(/\\U([0-9a-fA-F]{8})/) do
|
|
244
|
+
code_point = Regexp.last_match(1).to_i(16)
|
|
245
|
+
[code_point].pack("U*")
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Handle other escape sequences
|
|
249
|
+
str.gsub(/\\(.)/) do
|
|
250
|
+
case Regexp.last_match(1)
|
|
251
|
+
when "n" then "\n"
|
|
252
|
+
when "t" then "\t"
|
|
253
|
+
when "r" then "\r"
|
|
254
|
+
when "\\" then "\\"
|
|
255
|
+
when '"' then '"'
|
|
256
|
+
when "'" then "'"
|
|
257
|
+
else Regexp.last_match(1) # Keep other escapes as-is
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
end
|