diff options
Diffstat (limited to 'src/GF/Shell')
| -rw-r--r-- | src/GF/Shell/HelpFile.hs | 17 | ||||
| -rw-r--r-- | src/GF/Shell/PShell.hs | 8 | ||||
| -rw-r--r-- | src/GF/Shell/ShellCommands.hs | 14 |
3 files changed, 21 insertions, 18 deletions
diff --git a/src/GF/Shell/HelpFile.hs b/src/GF/Shell/HelpFile.hs index 2723e5fbc..31da095aa 100644 --- a/src/GF/Shell/HelpFile.hs +++ b/src/GF/Shell/HelpFile.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/05/12 10:03:33 $ +-- > CVS $Date: 2005/05/17 12:37:17 $ -- > CVS $Author: aarne $ --- > CVS $Revision: 1.3 $ +-- > CVS $Revision: 1.4 $ -- -- Help on shell commands. Generated from HelpFile by 'make help'. -- PLEASE DON'T EDIT THIS FILE. @@ -339,11 +339,13 @@ txtHelpFile = "\n examples:" ++ "\n tq -cat=NP TestResourceEng TestResourceSwe -- quiz for NPs" ++ "\n" ++ - "\ntl, translation_list: tl Lang Lang Int" ++ - "\n Random-generates a list of Int translation exercises from Lang1 to Lang2." ++ + "\ntl, translation_list: tl Lang Lang" ++ + "\n Random-generates a list of ten translation exercises from Lang1" ++ + "\n to Lang2. The number can be changed by a flag." ++ "\n HINT: use wf to save the exercises in a file." ++ "\n flags:" ++ "\n -cat" ++ + "\n -number" ++ "\n examples:" ++ "\n tl -cat=NP TestResourceEng TestResourceSwe -- quiz list for NPs" ++ "\n" ++ @@ -359,13 +361,14 @@ txtHelpFile = "\n examples:" ++ "\n mq -cat=N -lang=TestResourceSwe -- quiz for Swedish nouns" ++ "\n" ++ - "\nml, morphology_list: ml Int" ++ - "\n Random-generates a list of Int morphological exercises," ++ - "\n keeping score of success." ++ + "\nml, morphology_list: ml" ++ + "\n Random-generates a list of ten morphological exercises," ++ + "\n keeping score of success. The number can be changed with a flag." ++ "\n HINT: use wf to save the exercises in a file." ++ "\n flags:" ++ "\n -cat" ++ "\n -lang" ++ + "\n -number" ++ "\n examples:" ++ "\n ml -cat=N -lang=TestResourceSwe -- quiz list for Swedish nouns" ++ "\n" ++ diff --git a/src/GF/Shell/PShell.hs b/src/GF/Shell/PShell.hs index 480284ccf..78b1f38a6 100644 --- a/src/GF/Shell/PShell.hs +++ b/src/GF/Shell/PShell.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/05/12 10:03:33 $ +-- > CVS $Date: 2005/05/17 12:37:17 $ -- > CVS $Author: aarne $ --- > CVS $Revision: 1.21 $ +-- > CVS $Revision: 1.22 $ -- -- parsing GF shell commands. AR 11\/11\/2001 ----------------------------------------------------------------------------- @@ -104,9 +104,9 @@ pCommand ws = case ws of "so" : s -> aUnit $ CShowOpers $ unwords s "tq" : i:o:[] -> aUnit (CTranslationQuiz (language i) (language o)) - "tl":i:o:n:[] -> aUnit (CTranslationList (language i) (language o) (readIntArg n)) + "tl":i:o:[] -> aUnit (CTranslationList (language i) (language o)) "mq" : [] -> aUnit CMorphoQuiz - "ml" : n : [] -> aUnit (CMorphoList (readIntArg n)) + "ml" : [] -> aUnit CMorphoList "wf" : f : s -> aString (CWriteFile f) s "af" : f : s -> aString (CAppendFile f) s diff --git a/src/GF/Shell/ShellCommands.hs b/src/GF/Shell/ShellCommands.hs index 0bed0e1e5..6144de0f8 100644 --- a/src/GF/Shell/ShellCommands.hs +++ b/src/GF/Shell/ShellCommands.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/05/13 12:40:20 $ --- > CVS $Author: peb $ --- > CVS $Revision: 1.34 $ +-- > CVS $Date: 2005/05/17 12:37:17 $ +-- > CVS $Author: aarne $ +-- > CVS $Revision: 1.35 $ -- -- The datatype of shell commands and the list of their options. ----------------------------------------------------------------------------- @@ -53,9 +53,9 @@ data Command = | CShowOpers String | CTranslationQuiz Language Language - | CTranslationList Language Language Int + | CTranslationList Language Language | CMorphoQuiz - | CMorphoList Int + | CMorphoList | CReadFile FilePath | CWriteFile FilePath @@ -180,9 +180,9 @@ optionsOfCommand co = case co of CShowOpers _ -> flags "res" CTranslationQuiz _ _ -> flags "cat" - CTranslationList _ _ _ -> flags "cat" + CTranslationList _ _ -> flags "cat number" CMorphoQuiz -> flags "cat lang" - CMorphoList _ -> flags "cat lang" + CMorphoList -> flags "cat lang number" CReadFile _ -> none CWriteFile _ -> none |
