From a212514bbf0ee409089184fbb55a8105124b4567 Mon Sep 17 00:00:00 2001 From: gryf Date: Sat, 21 Oct 2023 09:49:33 +0200 Subject: [PATCH] Use latin1 encoding as a default for Amiga file names. --- README.rst | 13 ++++++----- ulzx | 65 ++++++++++++++++++++++++++++++++---------------------- 2 files changed, 47 insertions(+), 31 deletions(-) diff --git a/README.rst b/README.rst index dc02eb2..7376f98 100644 --- a/README.rst +++ b/README.rst @@ -29,12 +29,15 @@ Installation * install `extfslib`_ * copy ``ulzx`` to ``~/.local/share/mc/extfs.d/`` -* add or change entry for files handle in ``~/.config/mc/mc.ext``:: +* add or change entry for files handle in ``~/.config/mc/mc.ext``: - # lzx - regex/\.[lL][zZ][xX]$ - Open=%cd %p/ulzx:// - View=%view{ascii} unlzx -v %f +.. code:: ini + + [lzx] + Regex=\.lzx$ + RegexIgnoreCase=true + Open=%cd %p/ulzx:// + View=%view{ascii} unlzx -v %f License ======= diff --git a/ulzx b/ulzx index 29f1b45..9a8828e 100755 --- a/ulzx +++ b/ulzx @@ -30,37 +30,44 @@ import extfslib class ULzx(extfslib.Archive): """LZX archive handle. Provides interface to MC's extfs subsystem""" - LINE_PAT = re.compile(b"^\s+(?P\d+)\s+" - b"((n/a)|\d+)\s" - b"(?P