I use a program called !Zonk to produce and edit my websites. It is
a 20 year old program that continues to work well with one small
problem. I have used the program with several flavours of RICS OS
in the main on VA, I use it now on this Pi courtesy of Aemulor.
The program allows the creation of template files for the look and
feel of the site along with data files for the content. The
templates and data files are text files containing HTML fom which
!Zonk builds HTML files according to instructions encoded in the
templates.
The 'one small problem' is in the naming and location of the
finished files and seems to be related to some Regex content within
an editable system file in !Zonk; the relevant stuff seems to be in
this segment...
# these default setups create filenames based on the 'leaf' part of
the
# datafile name, add /htm and put them in an 'htm' directory
below the
# data directory which *must* already exist
oneout: ((?:[^\.]*\.)*)(\w{1,6})[^\.]*$::htm.\2/htm
I seem, at some time, to have managed to edit the entry perhaps to
accomodate long file names.
oneout: ((?:[^\.]*\.)*)([^/\.]+)[^\.]*$::htm.\2/htm
Under my current setup the output doesn't incorporate the leafname
(just /htm)and puts it one directory level above where is intended.
Whether this is a Pi/Aemulor issue or a Regex one isn't clear to
me. I wonder if anyone can provide any insight
Do you have some examples of the string that is being searched, and
the results?
In article <[email protected]>,
Martin <[email protected]> wrote:
[Snip]
Do you have some examples of the string that is being searched,
and the results?
In VA with RISC OS 4.39
<any$Dir>index/txt (the searched string) is combined with <any$Dir>template/text to produce <any$Dir>.htm.index/html (the
output string).
On this Pi with RO 5.28 and Aemulor
<any$Dir>index/txt is combined with <any$Dir>template/text to
produce <any$Dir>/html (the result). The leaf name hasn't been
translated and the output is in the wrong directory.
In article <[email protected]>,
Brian Jordan <[email protected]> wrote:
In article <[email protected]>,
Martin <[email protected]> wrote:
[Snip]
Do you have some examples of the string that is being searched,
and the results?
In VA with RISC OS 4.39
<any$Dir>index/txt (the searched string) is combined with <any$Dir>template/text to produce <any$Dir>.htm.index/html (the
output string).
On this Pi with RO 5.28 and Aemulor
<any$Dir>index/txt is combined with <any$Dir>template/text to
produce <any$Dir>/html (the result). The leaf name hasn't been
translated and the output is in the wrong directory.
It seems that it may use Regex, but that will AFAIK just produce a
part of the input string which matches the search, or no match. It
does not 'combine' things. There must be other processing doing that.
Does Zonk use the Regex module? If so, which version?
What language is Zonk written in? Is source available?
I do have a no-quite-finished test harness here for the Regex module,
and certainly neither of your search strings seem to match a typical
full filename. But there are many Syntax option bits for the Regex
module, and we would need to know what settings are being used.
In article <[email protected]>,
Martin <[email protected]> wrote:
In article <[email protected]>,
The program is written in C with a small Basic front end <deskzonk>
for RISC OS. The core program does the combining of the data and
templates and finally outputs the combined file ready to FTP.
Intrigued by your comment I RMkilled the Regex module and Zonk
works without it so whatever is going on seems to be entirely
within Zonk. There is documentation which relates to Regex but
doesn't explain where and how to use it. I shall explore further, I
have just installed and re-registered an old VA and will play with
the program there, perhaps this is the point to end the NG
discussion for the time being.
Meanwhile it is this program which enabled me to produce and
maintain clubmans.org.uk with its many pages and I'd hate to be
without it and would love to get it running fully on this Pi.
I use a program called !Zonk to produce and edit my websites.
The 'one small problem' is in the naming and location of the finished
files and seems to be related to some Regex content within an editable
system file in !Zonk; the relevant stuff seems to be in this segment...
# these default setups create filenames based on the 'leaf' part of the
# datafile name, add /htm and put them in an 'htm' directory below the
# data directory which *must* already exist
oneout: ((?:[^\.]*\.)*)(\w{1,6})[^\.]*$::htm.\2/htm
I seem, at some time, to have managed to edit the entry perhaps to
accomodate long file names.
oneout: ((?:[^\.]*\.)*)([^/\.]+)[^\.]*$::htm.\2/htm
Under my current setup the output doesn't incorporate the leafname (just /htm)and puts it one directory level above where is intended. Whether
this is a Pi/Aemulor issue or a Regex one isn't clear to me. I wonder if anyone can provide any insight?
In message <[email protected]>
on 7 Feb 2024 Brian Jordan wrote:
I use a program called !Zonk to produce and edit my websites.
Those regular expressions look like they're written in Perl-compatible syntax. Try looking up PCRE, an open source library which has been incorporated in PHP and a number of other languages to provide advanced regular expression support. (PCRE was developed by the same person as
the RISC OS music typesetting system PMS.)
I am afraid I have no idea why the program would work differently on
the Pi from on VA.
You could try simplifying the expression a bit and see if that helps.
For example:
oneout: ^(.*\.)?([^/\.]+)[^\.]*$::htm.\2/htm
should have the same effect.
I am afraid I have no idea why the program would work differently
on the Pi from on VA.
It seems RISC OS 5.28 on the Pi has a Regex module whereas RISC OS
4.39 on VA doesn't. Maybe some sort of clash on the Pi? I'm going
to investigate further.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 714 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 135:34:15 |
| Calls: | 12,087 |
| Files: | 14,997 |
| Messages: | 6,517,369 |