A reversible transform of an IMP file

David Haslam <dfhdfh-g/[email protected]> Fri, 11 Apr 2025 18:10:02 +0000
Newsgroups gmane.comp.literature.sword.devel
Message-ID <J0S3F6aq4wVw0l4OoBxFtxdXOySKCXbj_QwhBENETG15KwotUS2Z7yme9X31luC6AezCtfM_eFyNVL4-0xThEUElxJcQZbKRWAvoby1wT0U=@protonmail.com>
Dear friends who enjoy analysing SWORD modules:

Here's a useful transform to apply to the output of mod2imp.

Replace all PCRE "(<[^/])" by "\r\n\t$1" (without the quotes)

This inserts a new line and a single horizontal tab before each XML element in the text.
It excludes all XML end elements such as "</name>" that start with "</"

When many words are encoded (e.g. for Strong's, etc) the transformed file is easier to read.

The use of the horizontal tab ensures that the transform is 100% reversible, thus:

Replace all PCRE"\r\n\t" by ""

NB. The EOL is for Windows users.
Those of you on Linux or Mac can easily adapt as required.

Best regards,

David

Sent with [Proton Mail](https://pr.tn/ref/SWXT9A5YZ67G) secure email.

_______________________________________________
sword-devel mailing list: [email protected]
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page