This script converts a dictionary or commentary IMP file to a Sword module.

Other, possibly better, options might make use of imp2osis.pl (does not work without heading lines in the IMP file, see this wiki page), and this OSIS Python module (link1, link2).

You will need to add conf files yourself (see below), as well as directories for the generated module files. Module names should not be longer than 15 characters.

Examples (these are for personal commentary and dictionary IMP files):

Add the force option to the swordmodgen.py examples above to acknowledge that old module files may be removed from the destination directory.

Dependencies: python3, libsword-utils (imp2vs and imp2ld)

If you will be editing IMP files with Emacs, the following (added to your ~/.emacs file) will make filling (M-q) work correctly.

(define-derived-mode imp-mode text-mode "IMP"
  "Major mode for editing IMP bible files."
  (setq paragraph-separate "\\([ \t\f]*\\|\\$\\$\\$.*\\)$"))
  (add-to-list 'auto-mode-alist '("\\.imp\\'" . imp-mode))