cnvprb - Provide pre- and post- conversion filtering in the translation of CAPA problems into LON-CAPA problem format. cnvprb was written at Ohio University as a way to massage problem translations outside the framework of the flex-based translator. There are a number of library-specific details that either (1) don't belong in the main translator, or (2) are not easy to place there. In overview, the perl script takes one or more files as input. It performs pre-processing of the file (for example, problem number macros are currently useless in the current system, so they are removed). The file(s) are then passed to the flex-based converter. The output of the converter is then post-processed. For example, if there is only one part to a problem, the post-processor will remove the part tags. The output of the perl script is sent to the standard output. The script assumes the flex-based translator (convert) is available in the PATH as capaconverter. This is easy enough to tweak in the script. There are several tags which can be used to insert situation-specific text into the problem. -h [header file] The text in this file is placed directly after the tag and in front of any translated problem code. -t [footer file] The text in this file is placed directly before the tag and after any translated problem code. -s [script] The text in this file is excuted as perl code for each line of output. This can be used for situation-specific substitutions. -f [file names] A list of files provided as input -l [library references] -i [import prefix] CAPA libraries tend to have rooted links and auxilliary files, such as figures, are referenced this way (for example, /serwaylib/Graphics/...). -l serwaylib would identify the string serwaylib as a library reference. In processing it will be expanded to be preceded by the "import prefix". For example, "-l serwaylib -i /res/ohiou" would convert all occurences of "/serwaylib" to "/res/ohiou/serwaylib". Output is sent to standard out. In the distribution directory, I have placed a couple of sample files. Executing the command: cnvprb -h Std_header header -t footer -f serprob.txt \ -i /res/ohiou -l serwaylib -s script >serprob.problem converts the problem serprob.txt(CAPA format) into serprob.problem (lon-capa format). It will have the files Std_header and header placed at the beginning, footer will be inserted at the end, all occurences of /serwaylib will be converted to /res/ohiou/serwaylib, and through the script file "script", all occurences of block will be converted to bloke. Comments: contact Mark Lucas at Ohio University (lucasm@ohiou.edu). Authors: Robert McQueen and Mark Lucas at Ohio University