aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb McDaniel <caleb.mcdaniel@rice.edu>2015-02-27 11:29:33 -0600
committerCaleb McDaniel <caleb.mcdaniel@rice.edu>2015-02-27 11:29:33 -0600
commit6b6c9e8c6663c1328a6000849650580833dcb651 (patch)
treed8316639337ff1181e594fe9bdd11be9eb6914e6
parent4f0c5c30809f09bd700cd47035f86a3db1c64669 (diff)
downloadpandoc-6b6c9e8c6663c1328a6000849650580833dcb651.tar.gz
Clarify JSON input and output in usage message
-rw-r--r--pandoc.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/pandoc.hs b/pandoc.hs
index 2290f750a..a0c18bdf6 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -49,7 +49,7 @@ import System.Exit ( exitWith, ExitCode (..) )
import System.FilePath
import System.Console.GetOpt
import Data.Char ( toLower )
-import Data.List ( intercalate, isPrefixOf, isSuffixOf, sort )
+import Data.List ( delete, intercalate, isPrefixOf, isSuffixOf, sort )
import System.Directory ( getAppUserDataDirectory, findExecutable,
doesFileExist, Permissions(..), getPermissions )
import System.IO ( stdout, stderr )
@@ -905,13 +905,15 @@ readMetaValue s = case decode (UTF8.fromString s) of
usageMessage :: String -> [OptDescr (Opt -> IO Opt)] -> String
usageMessage programName = usageInfo
(programName ++ " [OPTIONS] [FILES]" ++ "\nInput formats: " ++
- (wrapWords 16 78 $ readers'names) ++ "\nOutput formats: " ++
+ (wrapWords 16 78 $ readers'names) ++
+ '\n' : replicate 16 ' ' ++
+ "[ *only Pandoc's JSON version of native AST]" ++ "\nOutput formats: " ++
(wrapWords 16 78 $ writers'names) ++
'\n' : replicate 16 ' ' ++
- "[*for pdf output, use latex or beamer and -o FILENAME.pdf]\nOptions:")
+ "[**for pdf output, use latex or beamer and -o FILENAME.pdf]\nOptions:")
where
- writers'names = sort $ "pdf*" : map fst writers
- readers'names = sort $ map fst readers
+ writers'names = sort $ "json*" : "pdf**" : delete "json" (map fst writers)
+ readers'names = sort $ "json*" : delete "json" (map fst readers)
-- Determine default reader based on source file extensions
defaultReaderName :: String -> [FilePath] -> String