diff options
Diffstat (limited to 'tprint/src/Options.hs')
-rw-r--r-- | tprint/src/Options.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tprint/src/Options.hs b/tprint/src/Options.hs index 703c23b..f4c7ebd 100644 --- a/tprint/src/Options.hs +++ b/tprint/src/Options.hs | |||
@@ -41,6 +41,9 @@ data TPrint = TPrint | |||
41 | } | 41 | } |
42 | deriving (Show, Generic, PrettyVal) | 42 | deriving (Show, Generic, PrettyVal) |
43 | 43 | ||
44 | data Interactive = Interactive | ||
45 | deriving (Show, Generic, PrettyVal) | ||
46 | |||
44 | data Operation | 47 | data Operation |
45 | = Printers | 48 | = Printers |
46 | | Jobs | 49 | | Jobs |
@@ -66,6 +69,7 @@ data Operation | |||
66 | , draftTitle :: Maybe DraftTitle | 69 | , draftTitle :: Maybe DraftTitle |
67 | , input :: Input | 70 | , input :: Input |
68 | } | 71 | } |
72 | | DraftEdit { draftId :: DraftId } | ||
69 | | Draft { draftId :: DraftId } | 73 | | Draft { draftId :: DraftId } |
70 | | DraftDelete { draftId :: DraftId } | 74 | | DraftDelete { draftId :: DraftId } |
71 | | DraftPrint | 75 | | DraftPrint |
@@ -125,6 +129,9 @@ cmdDraftCreate = info cmdDraftCreate' $ progDesc "Create a new draft" | |||
125 | cmdDraftReplace = info cmdDraftReplace' $ progDesc "Update the contents and title of a draft" | 129 | cmdDraftReplace = info cmdDraftReplace' $ progDesc "Update the contents and title of a draft" |
126 | where cmdDraftReplace' = DraftReplace <$> aDraft <*> optional pTitle <*> pInput | 130 | where cmdDraftReplace' = DraftReplace <$> aDraft <*> optional pTitle <*> pInput |
127 | 131 | ||
132 | cmdDraftEdit = info cmdDraftEdit' $ progDesc "Edit an existing draft" | ||
133 | where cmdDraftEdit' = DraftEdit <$> aDraft | ||
134 | |||
128 | cmdDraft = info cmdDraft' $ progDesc "Retrieve a drafts contents" | 135 | cmdDraft = info cmdDraft' $ progDesc "Retrieve a drafts contents" |
129 | where cmdDraft' = Draft <$> aDraft | 136 | where cmdDraft' = Draft <$> aDraft |
130 | 137 | ||
@@ -146,6 +153,7 @@ pOperation = hsubparser $ mconcat [ command "printers" cmdPrinters | |||
146 | ) (progDesc "Interact with jobs") | 153 | ) (progDesc "Interact with jobs") |
147 | , command "draft" $ info ( hsubparser $ mconcat [ command "create" cmdDraftCreate | 154 | , command "draft" $ info ( hsubparser $ mconcat [ command "create" cmdDraftCreate |
148 | , command "replace" cmdDraftReplace | 155 | , command "replace" cmdDraftReplace |
156 | , command "edit" cmdDraftEdit | ||
149 | , command "content" cmdDraft | 157 | , command "content" cmdDraft |
150 | , command "delete" cmdDraftDelete | 158 | , command "delete" cmdDraftDelete |
151 | , command "print" cmdDraftPrint | 159 | , command "print" cmdDraftPrint |