X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbin%2Froles%2Froles.ml;h=6d9620c8f633451fe3caffca93bf105161ea849c;hb=cfccf434a57e10848d74d06674af4ec9cef0f0ca;hp=2b61c1264010c7154adbfb8783b7b89e42c443a2;hpb=f5bc9206835d61109a72c7b973dad8dd21914950;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/bin/roles/roles.ml b/matita/matita/contribs/lambdadelta/bin/roles/roles.ml index 2b61c1264..6d9620c8f 100644 --- a/matita/matita/contribs/lambdadelta/bin/roles/roles.ml +++ b/matita/matita/contribs/lambdadelta/bin/roles/roles.ml @@ -13,16 +13,28 @@ module EE = RolesEngine module EG = RolesGlobal module ET = RolesTypes module EU = RolesUtils +module WE = WebEngine -let help_C = " Set this working directory (default: current directory)" +let help_B = " Set this base url (default: http://helm.cs.unibo.it/lambdadelta/)" +let help_C = " Set this relative working directory (default: invocation directory)" let help_L = " Debug osn lexer" +let help_W = " Run as an LWS application" let help_X = " Reset all options to defaults" let help_a = " Add selected names to a role" +let help_m = " Add roles relating matching names" +let help_o = " Add top objects for this stage" +let help_p = " Print current status on standard output" let help_r = " Load current status" let help_s = " Start a stage with this version" let help_t = " Toggle the selection of this pointed entry" let help_w = " Save current status" -let help = "Usage: roles [ -LXarw | -C | -s | -t | ]*" +let help = "Usage: roles [ -LWXamprw | -B | -C | -os | -t | ]*" + +let change_cwd s = + EG.cwd := Filename.concat !EG.cwd s + +let add_tops s = + EE.add_tops (EU.version_of_string s) let new_stage s = EE.new_stage (EU.version_of_string s) @@ -33,14 +45,19 @@ let toggle_entry s = let process s = match Filename.extension s with | ".txt" -> EE.read_waiting s - | x -> EU.raise_error (ET.EExt x) + | x -> EU.raise_error (ET.EWrongExt x) let _main = try Arg.parse [ - "-C", Arg.String ((:=) EG.wd), help_C; + "-B", Arg.String ((:=) EG.base_url), help_B; + "-C", Arg.String change_cwd, help_C; "-L", Arg.Set EG.debug_lexer, help_L; + "-W", Arg.Unit WE.init, help_W; "-X", Arg.Unit EG.clear, help_X; "-a", Arg.Unit EE.add_role, help_a; + "-m", Arg.Unit EE.add_matching, help_m; + "-o", Arg.String add_tops, help_o; + "-p", Arg.Unit EE.print_status, help_p; "-r", Arg.Unit EE.read_status, help_r; "-s", Arg.String new_stage, help_s; "-t", Arg.String toggle_entry, help_t;