add depend-gallery options
This commit is contained in:
parent
ae5dc6b006
commit
adfc8b9a82
1 changed files with 23 additions and 1 deletions
|
@ -29,6 +29,15 @@ data ModeOptions =
|
|||
buildDir :: FilePath,
|
||||
dataDir :: FilePath
|
||||
}
|
||||
| DependGallery {
|
||||
prefix :: FilePath,
|
||||
files :: [FilePath],
|
||||
nsfw :: Bool,
|
||||
who :: Who,
|
||||
output :: Maybe FilePath,
|
||||
buildDir :: FilePath,
|
||||
dataDir :: FilePath
|
||||
}
|
||||
deriving Show
|
||||
|
||||
|
||||
|
@ -39,7 +48,7 @@ optionsParser = globalOpts `info` mainInfo where
|
|||
short 'v' <> long "verbose" <>
|
||||
help "print extra stuff to stderr"
|
||||
subcommands = hsubparser $
|
||||
single <> gallery <> dependSingle
|
||||
single <> gallery <> dependSingle <> dependGallery
|
||||
|
||||
single = command "single" $ singleOpts `info` singleInfo
|
||||
singleOpts = SinglePage <$> file <*> nsfwS <*> output
|
||||
|
@ -81,6 +90,19 @@ optionsParser = globalOpts `info` mainInfo where
|
|||
help "data directory (default: data)"
|
||||
dsInfo = progDesc "generate makefile dependencies for a single page"
|
||||
|
||||
dependGallery = command "depend-gallery" $ dgOpts `info` dgInfo
|
||||
dgOpts =
|
||||
DependGallery <$> prefixArg <*> files <*> nsfwG <*> who
|
||||
<*> output <*> buildDir <*> dataDir
|
||||
prefixArg = strArgument $
|
||||
metavar "PREFIX" <> help "target directory"
|
||||
who = option (maybeReader readWho) $
|
||||
short 'w' <> long "who" <>
|
||||
metavar "mine|not-mine|all" <>
|
||||
value All <>
|
||||
help "select by artist"
|
||||
dgInfo = progDesc "generate makefile dependencies for a gallery"
|
||||
|
||||
mainInfo = progDesc "static gallery site generator" <> fullDesc
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue