[impression/wrapper_canon.ml] Interface beaucoup plus propre
reste a faire marcher le mode livret darcs-hash:20090529123816-bd074-bee0ef1aa4f8e2f45ec60474559d159b5954746d.gz
This commit is contained in:
parent
3d2f3fb290
commit
7469f4787e
1 changed files with 8 additions and 16 deletions
|
@ -9,9 +9,6 @@
|
||||||
* Dependances: libperl4ocaml-dev (>= 0.9.5-2), libwww-mechanize-perl
|
* Dependances: libperl4ocaml-dev (>= 0.9.5-2), libwww-mechanize-perl
|
||||||
* Compilation: ocamlfind ocamlc -linkpkg -package unix,perl wrapper_canon.ml
|
* Compilation: ocamlfind ocamlc -linkpkg -package unix,perl wrapper_canon.ml
|
||||||
*
|
*
|
||||||
*)
|
|
||||||
|
|
||||||
(*
|
|
||||||
#use "topfind";;
|
#use "topfind";;
|
||||||
#require "perl";;
|
#require "perl";;
|
||||||
#require "unix";;
|
#require "unix";;
|
||||||
|
@ -58,20 +55,18 @@ let binding_long_edge = ref true
|
||||||
let _DuplexType() =
|
let _DuplexType() =
|
||||||
if !duplex then if !binding_long_edge then "2" else "1" else "0"
|
if !duplex then if !binding_long_edge then "2" else "1" else "0"
|
||||||
|
|
||||||
let agrafage = ref true
|
let finition = ref "none"
|
||||||
let piqure = ref false
|
let _Sort() = match !finition with
|
||||||
let _Sort() =
|
"none" -> "0"
|
||||||
if !piqure then "3" else
|
| _ -> "1"
|
||||||
if !agrafage then "1" (* "134" *) else "1"
|
|
||||||
|
|
||||||
let agrafe = ref "NW"
|
let _StapleType () = List.assoc !finition
|
||||||
let _StapleType () = List.assoc !agrafe
|
[ "TopLeft","5"; "TopRight","6"; "BottomLeft","7"; "BottomRight","8";
|
||||||
[ "NW","5"; "NE","6"; "SW","7"; "SE","8"; "N","1"; "S","2"; "W","3"; "E","4"]
|
"Top","1"; "Bottom","2"; "Left","3"; "Right","4"; "none","0"; "book","9"]
|
||||||
|
|
||||||
let couleur = ref false
|
let couleur = ref false
|
||||||
let _ColorMode () = if !couleur then "2" else "1"
|
let _ColorMode () = if !couleur then "2" else "1"
|
||||||
|
|
||||||
|
|
||||||
(** {1: Le formulaire} *)
|
(** {1: Le formulaire} *)
|
||||||
let fields () =
|
let fields () =
|
||||||
[ "Url","http://"; "Mode","100"; "ManualNo","0"; "DocPasswd","";
|
[ "Url","http://"; "Mode","100"; "ManualNo","0"; "DocPasswd","";
|
||||||
|
@ -118,12 +113,9 @@ let options = Arg.align
|
||||||
"-two-sided", Arg.Set duplex, " Impression recto/verso";
|
"-two-sided", Arg.Set duplex, " Impression recto/verso";
|
||||||
"-two-sided-short-edge", Arg.Clear binding_long_edge,
|
"-two-sided-short-edge", Arg.Clear binding_long_edge,
|
||||||
" Reliure sur le bord court";
|
" Reliure sur le bord court";
|
||||||
"-Staple", Arg.Set agrafage, " Agrafage du travail d'impression";
|
|
||||||
"-StapleLocation", Arg.Set_string agrafe,
|
|
||||||
"AZ Agrafe au NW,NE,SE,SW,N,S,E,W";
|
|
||||||
"-CNSaddleStitch", Arg.Set piqure, " Mode livret";
|
|
||||||
"-Monochrom", Arg.Clear couleur, " Impression en noir et blanc";
|
"-Monochrom", Arg.Clear couleur, " Impression en noir et blanc";
|
||||||
"-Color", Arg.Set couleur, " Impression en couleurs";
|
"-Color", Arg.Set couleur, " Impression en couleurs";
|
||||||
|
"-Finition", Arg.Set_string finition, "FINITION Finition: none | Top | TopLeft ... | Book";
|
||||||
]
|
]
|
||||||
|
|
||||||
let usage = "Usage: wrapper_canon [OPTIONS] FILE"
|
let usage = "Usage: wrapper_canon [OPTIONS] FILE"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue