add rss [fixes #1]
This commit is contained in:
parent
0f908581df
commit
ecaba4e33d
7 changed files with 132 additions and 7 deletions
|
@ -27,6 +27,15 @@ data ModeOptions =
|
|||
file :: FilePath,
|
||||
output :: Maybe FilePath
|
||||
}
|
||||
| RSS {
|
||||
files :: [FilePath],
|
||||
title :: Text,
|
||||
description :: Text,
|
||||
root :: Text,
|
||||
prefix :: FilePath,
|
||||
output :: Maybe FilePath,
|
||||
dataDir :: FilePath
|
||||
}
|
||||
| DependSingle {
|
||||
file :: FilePath,
|
||||
nsfw :: Bool,
|
||||
|
@ -53,7 +62,7 @@ optionsParser = globalOpts `info` mainInfo where
|
|||
short 'v' <> long "verbose" <>
|
||||
help "print extra stuff to stderr"
|
||||
subcommands = hsubparser $
|
||||
single <> gallery <> index <> dependSingle <> dependGallery
|
||||
single <> gallery <> index <> rss <> dependSingle <> dependGallery
|
||||
|
||||
single = command "single" $ singleOpts `info` singleInfo
|
||||
singleOpts = SinglePage <$> file <*> nsfwS <*> output
|
||||
|
@ -85,6 +94,17 @@ optionsParser = globalOpts `info` mainInfo where
|
|||
help "page title"
|
||||
galleryInfo = progDesc "generate a gallery page"
|
||||
|
||||
rss = command "rss" $ rssOpts `info` rssInfo
|
||||
rssOpts = RSS <$> files <*> title <*> desc <*> root
|
||||
<*> prefix <*> output <*> dataDir
|
||||
desc = strOption $
|
||||
short 'd' <> long "desc" <> metavar "DESC" <>
|
||||
help "gallery description"
|
||||
root = strOption $
|
||||
short 'R' <> long "root" <> metavar "URL" <>
|
||||
help "website root (no trailing slash)"
|
||||
rssInfo = progDesc "generate an rss file for a gallery"
|
||||
|
||||
dependSingle = command "depend-single" $ dsOpts `info` dsInfo
|
||||
dsOpts =
|
||||
DependSingle <$> file <*> nsfwS <*> output <*> prefix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue