summaryrefslogtreecommitdiff
path: root/Command/AddUrl.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-13 11:06:41 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-13 11:06:41 -0400
commit32eae8c1b1a88cd21f67290a0d7e337bf467adfb (patch)
tree87647585401a7271675eb01716da2b9be8012974 /Command/AddUrl.hs
parentcb5c686b059d37eaa377c5fd8ab20bcf6617f981 (diff)
converted ImportFeed
Diffstat (limited to 'Command/AddUrl.hs')
-rw-r--r--Command/AddUrl.hs22
1 files changed, 14 insertions, 8 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs
index ed76e6c35..4ae80d9d4 100644
--- a/Command/AddUrl.hs
+++ b/Command/AddUrl.hs
@@ -61,14 +61,20 @@ optParser desc = AddUrlOptions
( long "pathdepth" <> metavar paramNumber
<> help "path components to use in filename"
))
- <*> switch
- ( long "relaxed"
- <> help "skip size check"
- )
- <*> switch
- ( long "raw"
- <> help "disable special handling for torrents, quvi, etc"
- )
+ <*> parseRelaxedOption
+ <*> parseRawOption
+
+parseRelaxedOption :: Parser Bool
+parseRelaxedOption = switch
+ ( long "relaxed"
+ <> help "skip size check"
+ )
+
+parseRawOption :: Parser Bool
+parseRawOption = switch
+ ( long "raw"
+ <> help "disable special handling for torrents, quvi, etc"
+ )
seek :: AddUrlOptions -> CommandSeek
seek o = forM_ (addUrls o) $ \u -> do