Restructure as a stand-along project
[mw2txt.git] / README.md
1 Some of the classes I TA use [Maple][].  (Caveat: I prefer [[Python]],
2 as a more general language.  Use [[SymPy]] or [Sage][] if you need
3 symbolic processing.)  Anyhow, I get Maple worksheets to grade.
4 [[SSH]]ing into the department computer lab to fire up `xmaple` is a
5 pain, so I wrote [[mw2txt.py]] to extract the Maple commands from the
6 worksheet.  It benefits from the fact that worksheets are fairly clean
7 XML.  Graphs and equations are more difficult, since they have
8 complicated layout and are stored as encoded blobs.  Other than that,
9 things work pretty well.  Here's the output from my [[example.mw]]
10 example worksheet, picking out the math-mode sections (in red) and
11 unprocessed blocks (in yellow) from the comments (uncolored).
12
13 <pre><code>$ mw2txt.py --color example.mw 
14 Hi there
15 <span style="color: red">&gt; restart;
16 &gt; interface(prettyprint=0):
17 &gt; 1;#</span> one  <span style="color: red">+</span> plus <span style="color: red">2</span> two <span style="color: red">;</span>
18 1
19 <span style="color: red">&gt; 3 + 4;</span>  bold
20 7
21 <span style="color: yellow">Equation</span>
22 </code></pre>
23
24 [Maple]: http://www.maplesoft.com/products/maple/
25 [Sage]: http://www.sagemath.org/
26
27 [[!tag tags/code]]
28 [[!tag tags/python]]