Commit 18e86e27 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-06-08 15:29:46 by cvscast] beppe: added example of Unix script

Original author: cvscast
Date: 2003-06-08 15:29:46+00:00
parent b4160bdf
......@@ -55,6 +55,32 @@ scripts, which are executed successively.</li>
<box title="Scripting" link="scripting">
CDuce can also be used for writing using scripts. As usual it suffices to start
the script file by <code> #!%%install_dir%%/cduce</code> to call in a batch way
the cduce interpreter. Here is an example of a script file that prints all the
titles of the filters of an Evolution mail client.
type Filter = <filteroptions>[<ruleset> [(<rule>[<title>String _*])+]];;
let filter : Filter =
match load_xml "/home/beppe/evolution/filters.xml" with
| x&Filter -> x
| _ -> raise "Not a filter document"
in print_xml(<filters>([filter]/<ruleset>_/<rule>_/<title>_)) ;;
<box title="Phrases" link="phrases">
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment