From 7bd1773856d09f309cfc42c064408182bf838539 Mon Sep 17 00:00:00 2001 From: Sebastian Kuzminsky Date: Thu, 3 Jul 2025 16:52:52 -0600 Subject: [PATCH 1/2] WIP `ent new` --- src/bin/ent/main.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/bin/ent/main.rs b/src/bin/ent/main.rs index 238bbe3..53ecf9d 100644 --- a/src/bin/ent/main.rs +++ b/src/bin/ent/main.rs @@ -16,14 +16,12 @@ struct Args { enum Commands { /// List issues. List, - // Mdbook { - // /// The name of the recipe to create MD Book for. - // target: String, - // }, - // Info { - // /// The name of the recipe to show info for. - // target: String, - // }, + + /// Create a new issue. + New { + title: Option, + description: Option, + }, } fn main() -> anyhow::Result<()> { @@ -38,6 +36,12 @@ fn main() -> anyhow::Result<()> { println!("{} {} ({:?})", uuid, issue.title, issue.state); } } + Commands::New { title, description } => { + println!( + "should make a new issue, title={:?}, description={:?}", + title, description + ); + } } Ok(()) From 5b73a6b34cf73a6c0648a049023dd6c468e9a5a7 Mon Sep 17 00:00:00 2001 From: Sebastian Kuzminsky Date: Fri, 4 Jul 2025 00:51:12 -0600 Subject: [PATCH 2/2] add a Todo file, ironically --- Todo.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Todo.md diff --git a/Todo.md b/Todo.md new file mode 100644 index 0000000..56728ad --- /dev/null +++ b/Todo.md @@ -0,0 +1,30 @@ +# To do + +* migrate this todo list into entomologist + +* teach it to work with a git branch + - unpack the branch to a directory with `git worktree ${TMPDIR} ${BRANCH}` + - operate on the issues in that worktree + - git commit the result back to ${BRANCH} + - delete and prune the worktree + +* implement `ent new` + +* implement user control over state transitions + +* implement `ent comment ${ISSUE} [-m ${MESSAGE}]` + - each issue dir has a `comments` subdir + - each comment is identified by a sha1-style uid + - each comment is a file or directory under the `${ISSUE}/comments` + - comments are ordered by ctime? + +* implement `ent edit ${ISSUE} [-t ${TITLE}] [-d ${DESCRIPTION}]` + - or would it be better to put the title and description together into a new `message`, like git commits? + +* implement `ent edit ${COMMENT}` + +* implement `ent attach ${ISSUE} ${FILE}` + - each issue has its own independent namespace for attached files + - issue description & comments can reference attached files via standard md links + +* write a manpage