From b65156814a3fdb2c22efa8356b288bfc2cb0f1f3 Mon Sep 17 00:00:00 2001 From: Dashamir Hoxha <1495805+dashohoxha@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:01:17 +0200 Subject: [PATCH 1/3] Control character can be non alphabetical For example ^[ is ESC. https://www.geeksforgeeks.org/control-characters/ --- asciinema_automation/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asciinema_automation/parse.py b/asciinema_automation/parse.py index fdd98b4..f8b3b99 100644 --- a/asciinema_automation/parse.py +++ b/asciinema_automation/parse.py @@ -43,7 +43,7 @@ def parse_script_file(inputfile: pathlib.Path, timeout: int) -> list["Instructio # Compile regex wait_time_regex = re.compile(r"^#\$ wait (\d*)(?!\S)") delay_time_regex = re.compile(r"^#\$ delay (\d*)(?!\S)") - sendcontrol_command_regex = re.compile(r"^#\$ sendcontrol ([a-z])(?!\S)") + sendcontrol_command_regex = re.compile(r"^#\$ sendcontrol (.)(?!\S)") sendcharacter_command_regex = re.compile(r"^#\$ sendcharacter (.*)(?!\S)") expect_regex = re.compile(r"^#\$ expect (.*)(?!\S)") send_regex = re.compile(r"^#\$ send (.*)(?!\S)") From d99cc6a331359f2fabd720b2be58581e2404845d Mon Sep 17 00:00:00 2001 From: Pierre Marchand Date: Wed, 10 Jul 2024 22:05:10 +0200 Subject: [PATCH 2/3] update ruff call --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cac3a9f..bceccf5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -32,7 +32,7 @@ jobs: - name: Check with ruff run: | - ruff asciinema_automation/ tests/ + ruff check asciinema_automation/ tests/ - name: Check with mypy run: | From 0512f6a77024efc832f80bbe2cbcac6503dea6e3 Mon Sep 17 00:00:00 2001 From: Pierre Marchand Date: Thu, 11 Jul 2024 15:21:28 +0200 Subject: [PATCH 3/3] update version number --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fd44f9..420a69b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,12 @@ All notable changes to this project will be documented in this file. +## 0.2.2 - 2024-07-11 + +### Added + +- Accept non-alphabetical control character PR #17 thanks to @dashohoxha + ## 0.2.1 - 2024-06-09 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index a45e37a..f88337b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "asciinema-automation" -version = "0.2.1" +version = "0.2.2" authors = [{ name = "Pierre Marchand", email = "test@test.com" }] description = "CLI utility to automate asciinema" readme = { file = "README.rst", content-type = "text/x-rst" }