Annotation of loncom/homework/CAPA-converter/conversion_wrapper/README, revision 1.1

1.1     ! albertel    1: 
        !             2: cnvprb - Provide pre- and post- conversion filtering in the translation
        !             3: of CAPA problems into LON-CAPA problem format.
        !             4: 
        !             5: cnvprb was written at Ohio University as a way to massage problem
        !             6: translations outside the framework of the flex-based translator.
        !             7: There are a number of library-specific details that either (1) don't
        !             8: belong in the main translator, or (2) are not easy to place there.
        !             9: 
        !            10: In overview, the perl script takes one or more files as input. It
        !            11: performs pre-processing of the file (for example, problem number macros
        !            12: are currently useless in the current system, so they are removed). The
        !            13: file(s) are then passed to the flex-based converter. The output of the
        !            14: converter is then post-processed. For example, if there is only one part
        !            15: to a problem, the post-processor will remove the part tags. The output
        !            16: of the perl script is sent to the standard output.
        !            17: 
        !            18: The script assumes the flex-based translator (convert) is available in
        !            19: the PATH as capaconverter. This is easy enough to tweak in the script.
        !            20: 
        !            21: There are several tags which can be used to insert situation-specific
        !            22: text into the problem.
        !            23: 
        !            24: -h [header file]
        !            25: 
        !            26:    The text in this file is placed directly after the <problem> tag and
        !            27:    in front of any translated problem code.
        !            28: 
        !            29: -t [footer file]
        !            30: 
        !            31:    The text in this file is placed directly before the </problem> tag
        !            32:    and after any translated problem code.
        !            33: 
        !            34: -s [script]
        !            35: 
        !            36:    The text in this file is excuted as perl code for each line of
        !            37:    output. This can be used for situation-specific substitutions.
        !            38: 
        !            39: -f [file names]
        !            40: 
        !            41:    A list of files provided as input
        !            42: 
        !            43: -l [library references]
        !            44: -i [import prefix]
        !            45: 
        !            46:    CAPA libraries tend to have rooted links and auxilliary files, such
        !            47:    as figures, are referenced this way (for example,
        !            48:    /serwaylib/Graphics/...). -l serwaylib would identify the string 
        !            49:    serwaylib as a library reference. In processing it will be expanded
        !            50:    to be preceded by the "import prefix".
        !            51: 
        !            52:    For example, "-l serwaylib -i /res/ohiou" would convert all
        !            53:    occurences of "/serwaylib" to "/res/ohiou/serwaylib".
        !            54: 
        !            55: Output is sent to standard out.
        !            56: 
        !            57: In the distribution directory, I have placed a couple of sample files.
        !            58: Executing the command:
        !            59: 
        !            60: cnvprb -h Std_header header -t footer -f serprob.txt \
        !            61: -i /res/ohiou -l serwaylib -s script >serprob.problem
        !            62: 
        !            63: converts the problem serprob.txt(CAPA format) into serprob.problem
        !            64: (lon-capa format).
        !            65: It will have the files Std_header and header placed at the beginning,
        !            66: footer will be inserted at the end, all occurences of /serwaylib will
        !            67: be converted to /res/ohiou/serwaylib, and through the script file
        !            68: "script", all occurences of block will be converted to bloke.
        !            69: 
        !            70: 
        !            71: 
        !            72: Comments: contact Mark Lucas at Ohio University (lucasm@ohiou.edu).
        !            73: Authors: Robert McQueen and Mark Lucas at Ohio University

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>