File:
[LON-CAPA] /
loncom /
homework /
CAPA-converter /
conversion_wrapper /
README
Revision
1.1:
download - view:
text,
annotated -
select for diffs
Wed Mar 20 18:15:00 2002 UTC (22 years, 5 months ago) by
albertel
Branches:
MAIN
CVS tags:
version_2_9_X,
version_2_9_99_0,
version_2_9_1,
version_2_9_0,
version_2_8_X,
version_2_8_99_1,
version_2_8_99_0,
version_2_8_2,
version_2_8_1,
version_2_8_0,
version_2_7_X,
version_2_7_99_1,
version_2_7_99_0,
version_2_7_1,
version_2_7_0,
version_2_6_X,
version_2_6_99_1,
version_2_6_99_0,
version_2_6_3,
version_2_6_2,
version_2_6_1,
version_2_6_0,
version_2_5_X,
version_2_5_99_1,
version_2_5_99_0,
version_2_5_2,
version_2_5_1,
version_2_5_0,
version_2_4_X,
version_2_4_99_0,
version_2_4_2,
version_2_4_1,
version_2_4_0,
version_2_3_X,
version_2_3_99_0,
version_2_3_2,
version_2_3_1,
version_2_3_0,
version_2_2_X,
version_2_2_99_1,
version_2_2_99_0,
version_2_2_2,
version_2_2_1,
version_2_2_0,
version_2_1_X,
version_2_1_99_3,
version_2_1_99_2,
version_2_1_99_1,
version_2_1_99_0,
version_2_1_3,
version_2_1_2,
version_2_1_1,
version_2_1_0,
version_2_12_X,
version_2_11_X,
version_2_11_5_msu,
version_2_11_5,
version_2_11_4_uiuc,
version_2_11_4_msu,
version_2_11_4,
version_2_11_3_uiuc,
version_2_11_3_msu,
version_2_11_3,
version_2_11_2_uiuc,
version_2_11_2_msu,
version_2_11_2_educog,
version_2_11_2,
version_2_11_1,
version_2_11_0_RC3,
version_2_11_0_RC2,
version_2_11_0_RC1,
version_2_11_0,
version_2_10_X,
version_2_10_1,
version_2_10_0_RC2,
version_2_10_0_RC1,
version_2_10_0,
version_2_0_X,
version_2_0_99_1,
version_2_0_2,
version_2_0_1,
version_2_0_0,
version_1_99_3,
version_1_99_2,
version_1_99_1_tmcc,
version_1_99_1,
version_1_99_0_tmcc,
version_1_99_0,
version_1_3_X,
version_1_3_3,
version_1_3_2,
version_1_3_1,
version_1_3_0,
version_1_2_X,
version_1_2_99_1,
version_1_2_99_0,
version_1_2_1,
version_1_2_0,
version_1_1_X,
version_1_1_99_5,
version_1_1_99_4,
version_1_1_99_3,
version_1_1_99_2,
version_1_1_99_1,
version_1_1_99_0,
version_1_1_3,
version_1_1_2,
version_1_1_1,
version_1_1_0,
version_1_0_99_3,
version_1_0_99_2,
version_1_0_99_1,
version_1_0_99,
version_1_0_3,
version_1_0_2,
version_1_0_1,
version_1_0_0,
version_0_99_5,
version_0_99_4,
version_0_99_3,
version_0_99_2,
version_0_99_1,
version_0_99_0,
version_0_6_2,
version_0_6,
version_0_5_1,
version_0_5,
loncapaMITrelate_1,
language_hyphenation_merge,
language_hyphenation,
conference_2003,
bz6209-base,
bz6209,
bz5969,
bz2851,
PRINT_INCOMPLETE_base,
PRINT_INCOMPLETE,
HEAD,
GCI_3,
GCI_2,
GCI_1,
BZ5971-printing-apage,
BZ5434-fox,
BZ4492-merge,
BZ4492-feature_horizontal_radioresponse,
BZ4492-feature_Support_horizontal_radioresponse,
BZ4492-Support_horizontal_radioresponse
- adding Ohio Universities CAPA -> LON-CAPA cleanup scripts
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>