Skip to content

Associate projects w/a directory so that users can make entries & export reports w/o picking a proj ID every time #4

@extrabad

Description

@extrabad

I can't believe I've done this instead of real work, but I crave formalization of this feature request I've tossed your way a few times in the past couple months.

Current behavior

To work with a given project, users must manually select it by ID. Projects are not associated with anything in particular.

Desired behavior

When my shell's working directory is in ~/code/project-foo, I invoke your utility, and no .hidden project files exist1, prompt me to name a new project, then save it to the DB and write its ID to .hidden. Do this even if I did not pass the "new project" flag.

When a .hidden file does exist and I invoke your utility, do things without requiring me to pick a proj.

With these powers combined, you could support a workflow like the following:

$ cd ~/code/my-new-proj
$ bbpm entry
No bbpm project in ~/code/my-new-proj. Enter the project's name (default my-new-proj): bread's toaster
Created new project bread's toaster.
<editor automatically opened, I write my entry>
Saved new entry #1 in bread's toaster.

$ emacs work.rs
$ bbpm entry
<editor automatically opened, I write my entry>
Saved new entry #2 in bread's toaster.

$ emacs work2.rs
$ bbpm export --format=pdf

Usecase(s)

I double-dog dare you to tell me the workflow I described is not super good.


1: Worth considering how you want this to behave when .hidden exists and doesn't contain a valid ID, or when it exists and contains a valid ID that doesn't exist in the DB. Also, .hidden is just a placeholder name; use something that won't conflict with other hidden files lying around.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions