aboutsummaryrefslogtreecommitdiffstats
path: root/app/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs52
1 files changed, 15 insertions, 37 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 7604137..9cb90ca 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -128,6 +128,7 @@
-- tags.
--
-- @topic tags
+-- @topic markdown
-- TODO Only separate generated tags with a blank line when description does not end with tags
--
@@ -149,6 +150,7 @@
-- @row 42
-- ```
--
+-- @topic markdown
-- @topic tags
-- QUESTION Should automatically generated ids be random?
@@ -223,6 +225,8 @@
-- either a prefix in the list view (e.g. 🏗️, 🐞, ...), or the list
-- should be grouped by the type.
--
+-- @difficulty easy
+--
-- COMMENT I imagine emojis might be off-putting to some potential users. I
-- would like a configuration option to disable emojis and display the marker
-- instead.
@@ -257,45 +261,13 @@
-- the preceding issue.
--
-- `anissue show` should then show all comments below the current output.
-
--- TODO Add options to specify ordering of issues
---
--- When running `anissue list` with the `--order-by` option, the list
--- should be ordered accordingly. Possible values could be
---
--- creation
--- : the time when the issue was created
---
--- update
--- : the time when the issue was updated last
--
--- title
--- : lexicographically by title
---
--- priority
--- : by priority
---
--- Additionally using `--reversed`, the order will be reversed.
---
--- @topic options
---
--- COMMENT `anissue list` now supports `--sort` which allows sorting by tags.
--- To facilitate the first use-case, sorting by creation, an internal tag
--- `@createdAt` has been added. Reversing is possible, ie. `--sort
--- '-@createdAt'`
---
--- Supposing we want to go this direction, I feel like all of the use-cases can
--- be implemented using internal tags and adding support for a couple of data
--- types within String-valued tags. (Sorting by `@createdAt` currently only
--- works because date-based ordering coincides with string-based ordering on
--- the used `YYYY-MM-DD` format.)
---
--- What do you think?
---
--- PS. Nothing prevents us later to extend functionality by special cases,
--- should we dislike an internal `@title` tag.
+-- @priority high
+
+-- TODO Add internal tag `@title`
--
--- COMMENT I like this approach! :)
+-- To support sorting issues by title, we should add an internal `@title`
+-- tag.
-- TODO Add command for (re)generating the cache
--
@@ -370,6 +342,8 @@
-- issues tagged with them. By default the list should be ordered with the
-- topics first which have the most issues.
--
+-- @difficulty easy
+--
-- COMMENT Maybe `anissue tags @topic` could serve that purpose? I imagine
-- `anissue tags` (without a tag given) to list all tags.
--
@@ -669,6 +643,8 @@ main = do
--
-- We have to set `noPager` unconditionally to `True` for now, as not
-- all output is `mdcat` compatible.
+ --
+ -- @topic markdown
putDoc colorize True width $
P.annotate (P.color P.Green) $
P.pretty $
@@ -707,6 +683,8 @@ main = do
-- TODO Move `replaceText` to `Issue`
-- TODO `replaceFile` hardcodes comment
+--
+-- @difficulty easy
replaceText :: Issue -> T.Text -> IO ()
replaceText issue s' = T.writeFile issue.file . replace (indent (comment s')) =<< T.readFile issue.file
where