SYNOPSIS

Convert directory from old to new sytax based on configuration using a combination of predefined functions.

Accept a couple of subcommands to achieve this flexibly.

Allow simplest possible specificaton of conversion rules for different ranges of documents specified by regex matched to document name.

When configured fully, conversion of complete directory trees should become possible, e.g.

    subdirs exec:dokkonv:dir /sig/oas/13/01

For Debugging, set

    export DEBUG_BLOKS konv_dir

or similar an invoke with

    perltest dokkonv dir

or similar.

In this case nothing is actually written to file but instead everything is typed out to screen.

TODO

Move to tree-based parsing and deparsing, possibly using something like Parse::Yapp or Tree::Simple.

Reference Materials

started 150313

Similar converter projects have been in use before:

    top2dok(1)
    A2E::Privat::Top2dok(3)
    A2E::Eupat

Function konv_dir

convert files of current directory according to configuration.

Invoke from commandline with

    dokkonv dir

Configuration is laid down in object variable konv2konfig.

The configuration to be used is identified by means of a regex specified in object variable konvdokrex

TODO: move part of the configuration to AppConfig variables.

Subroutine pcpdpe

Set date of today, yesterday and tomorrow as well as weekday for use in _pre.${dok}.txt of Dag-type documents.