Command-line task and plan management tool
Reason this release was yanked:
Dependency version pinning mistake
Project description
BUSY
Task and plan management tool, for use from the terminal prompt on Linux and MacOS systems.
Installation
Requires Python 3.6.5 or later.
pip3 install busy
Getting started
Add some tasks to your queue.
busy add "Take a shower"
busy add "Do the laundry"
busy add "Phone mom"
busy add "Donate to the Busy project"
Find out what to do next:
busy get
Returns:
Take a shower
When you're done, mark it off to find the next task.
busy finish; busy get
Returns:
Do the laundry
See the whole queue, with sequence numbers.
busy list
Returns:
1 Do the laundry
2 Phone mom
3 Donate to the Busy project
Decide to do the top task later.
busy drop; busy list
Returns:
1 Phone mom
2 Donate to the Busy project
3 Do the laundry
Decide to do a specific task now.
busy pop 2; busy get
Returns:
Donate to the Busy project
Push that task to tomorrow.
busy defer --to tomorrow
Add all the tasks scheduled for today to the list.
busy activate --today
Core Commands
addadds a new item to the bottom of the queue. The item description may be included after the command or written to stdin (i.e. typed on the next line).getgets the top item in the queue, referred to as the "current" item. There are no options.listlists the items in the queue in order with their sequence numbers.popmoves a task or set of items to the top of a queue.dropmoves a task or set of items to the bottom of a queue.deletepermanently removes a task or set of items from a queue. Deletion requires confirmation via input or the--yesoption.manageopens a text editor to edit items.
The list, pop, drop, delete and manage commands allow the designation of specific items.
Item designation can be performed using sequence numbers or tags.
Sequence Numbers
Sequence numbers appear in the output from the list command. Note that the numbering starts with 1, and is not an ID -- the number of a item will change when the queue is modified. So always reference the most recent output from the list command.
When used to designate items, a range of sequence numbers is separated by a hyphen, with no whitespace, and is inclusive. For example, 4-6 designates items 4, 5, and 6. A hyphen without a number after it includes all the items from that item to the end of the queue. A hyphen on its own indicates the last item in the queue.
Below are some examples of task designations by sequence number.
busy pop 5 pops item number 5
busy drop 3-7 drops items 3 through 7 (4 items)
busy list 3- lists all the items from number 3 through the end of the list
busy delete 3 5 7 9 deletes only the items designated
busy defer - defers the last task
busy manage -4 is an error! Use busy manage 1-4 instead.
Items will always be handled in the order they appear in the queue, regardless of the order the criteria are provided. So for example, if a pop command designates some items, they will be moved to the top of the queue in the order, relative to each other, they currently appear in the queue.
The sequence numbers in the list command output are from the queue itself. So the list command does not modify the sequence numbers, even when item designation is applied.
Tags
Items can have tags, which are space-separated hashtags in the item description. An item can have no tags, one tag, or more than one tag. For example the following item description has the tag "errands":
go to the supermarket #errands
Hash tags may be used for item designation, in which case the hash itself ("#") is omitted from the command line. For example, the following command will move all the items with the #errands hash to the top of the queue.
busy pop errands
Whitespace-separated item designation criteria are additive -- that is, a logical OR. For example, the following command will delete all the admin tasks, sales tasks, and tasks 3 and 4.
busy delete admin sales 3 4
Commands that accept item designations support logical defaults, which are:
| Command | Default item(s) |
|---|---|
list |
All items |
pop |
Last item |
drop |
First item |
delete |
First item |
manage |
All items |
Alternate Queues
Busy will manage any number of queues, which are entirely separate ordered sets of items. For example, you might have a shopping queue for items to buy at the store, and a movies queue for films you'd like to watch. The default queue is called tasks and has special properties related to planning.
To designate an alternate queue, use the --queue option on the command.
busy add "Skimmed Milk" --queue shopping
busy get --queue movies
Managing Plans with the defer and activate commands
The default tasks queue supports several specific commands related to planning -- that is, scheduling tasks for the future. Planned tasks are kept in another special queue called plans.
There are two commands related to plan management.
deferremoves a task or set of tasks from thetasksqueue and schedules it or them to reappear at a future date in theplansqueue.activateremoves a task or set of tasks from theplansqueue and replaces it or them into thetasksqueue.
The defer and activate commands accept item designations. The defer command deals with the tasks queue; its default is the top item in the tasks queue. The activate command deals with the plans queue; its default is all the items scheduled for the current date or earlier.
Planning is by date, not time, and is relative to the current date according to the system clock.
In the defer command, the date can be specified using the --to or --for option (they are interchangable). If the options are omitted, then the date can be provided as input.
The date may take any of the following forms:
- A specific date in
YYYY-MM-DDformat, such as2018-10-28. Slashes are also acceptable, but the order is always year, then month, then day - A specific date without the year in
MM-DDformat, such as7-4, which will defer the item to that date in the future (even if it's in the next year) - A specific day of the month as a simple integer, such as
12, which will defer the item to that day of the month, in either the current month or the next month - An integer, a space, and the word
dayordays, such as4 days, which will defer the item to that number of days from today - An integer without a space and the letter
d, such as4d, which is a short form of4 days - The word
tomorrow, which is also the default if no date is provided - The word
today, which is a little odd but obvious
As an example, the following command will defer tasks 4, 5, and 6 from the tasks queue to the date 4 days from today, keeping them in the plans queue until that date.
busy defer 4-6 --for 4 days
Note that the plans queue is keeping the task information (verbatim from the tasks queue) along with the date information (as an absolute date).
To pull tasks off the plans queue and put them back on the tasks queue, use the activate command. There are two ways to use the activate command:
- With the
--todayoption, which is the normal way, and activates all the tasks scheduled for today or earlier, bringing thetaskslist up to date - With designated items from the
plansqueue; note that theactivatecommand accepts item designation from theplansqueue itself
If no items are designated, and there is no --today option, no tasks will be activated.
Followons and the finish command
Like defer, the finish command only works on the tasks queue. It removes the designated Task (or the top task if none is designated) from the queue and adds it to the done queue, with today's date to indicate when it was completed.
Optionally, a Task can have a Followon, which is another task to be added to the queue after the first task is finished. Followons are describe in a Task using an arrow notation. In the following example, the Task "eat" has a followon task "drink".
eat --> drink
Note that the hyphens and whitespace are optional; really the marker that matters for delimiting a followon is the right angle bracket (">"). Also note that right angle bracket is not a valid character in a task description.
When the finish command is executed on the task above, the "eat" task will be recorded as "done" and the "drink" task will be added to the bottom of the tasks queue.
Note that followons can be chained. For example, when the finish command is run on the task illustrated below, a new task "drink > be merry" will be added to the queue. Only when that Task is finished will the "be merry" task itself appear on the queue.
eat > drink > be merry
Repeating tasks
A special type of Followon is the Repeat. In this case, instead of adding the next task to the bottom of the queue, the entire current task -- including the Followon itself -- is entered into the plans queue at some point in the future. Repeats allow for easy management of repeating tasks. Some examples follow.
check email --> repeat in 1 day
phone mom --> repeat on sunday
balance the checkbook --> repeat on 6
The exact syntax for a Repeat is the word "repeat" followed by either "on" or "in" and a relative date phrase -- the same phrases that work with the defer command.
Note that the repetition itself only happens on the finish command. The completed task (i.e. "check email") is entered in the done queue and then the entire task (with the Repeat) is scheduled in the plans queue for the appropriate time in the future.
Projects and the start command
Another special feature of the tasks and plans queues is the start command, which deals with projects.
If a task has tags, the first tag is considered to be its "project" for the purposes of the start command.
The start command is used to start work on a project. If an argument is passed to the command, that's the chosen project. Otherwise the chosen project is the project of the current task (the top item in the tasks queue). The command basically combines steps:
- Calls
activate --todayso the active task list is up-to-date - Calls
manageon the project, to edit the list of tasks for the project - Calls
popon the project, so its tasks are at the top of the list
Details of the manage command
The manage command launches the user's default text editor to directly edit a queue or part of a queue.
The definition of the "default text editor" depends on the OS and configuration but here's the logic:
- Try the EDITOR environment variable
- If that doesn't exist, try the
sensible-editorcommand (Ubuntu) - If that doesn't exist, try the
open -Wcommand (OSX)
The default use of manage will edit the entire queue.
busy manage --queue movies
But it's also possible to designate tasks to be managed. The manage command does its best to replace the edited items in place in the list order. So if you manage the current project (in which all the tasks are at the top), then the edited tasks will still appear at the top. Even if you add tasks, they will be inserted after the last task in the managed set, not at the end of the list. But all the tasks brought up in the editor will be managed. So if you remove a task in the editor, it will be deleted and the others will be moved up to take its place.
Data storage
Busy keeps the queues in plain text files, so if the tool doesn't do something you want, you may edit the files. The files are in a directory together, referred to as the "root". Each file is the name of the queue with a .txt extension. If a required file is missing, it will be created automatically. So typically, the root includes tasks.txt, plans.txt, and any number of custom queue files.
Technically, they are pipe-delimited data files, though tasks.txt only has one field (description); plans.txt has only two fields (date and description), and there is no support for managing separate fields in the Busy tool itself.
The root is designated in one of the following ways, which are tried in order.
- The
--rootoption on the command - The
BUSY_ROOTenvironment variable, if no--rootoption is provided - A directory at
~/.busy, which will be generated as needed if no--rootoption orBUSY_ROOTenvironment variable are provided,
Note that the --root option must come after busy but command-specific options (--yes, --to, --for, --queue, and --today) must come after commands.
The following example shows the --root option with command-specific options on the same command line.
busy --root ~/.config/busy activate --today
Note that Busy does not support concurrency in any form. If two commands are executing at the same time, they may overwrite each other. Overwriting is especially risky with the manage command, which keeps the user's editor open until they close it.
The format is designed to be simple (i.e. non-default queues are really just lists of items) but not idiot-proof. Experimentation might result in unintended consequences.
Development
Although it requires Python 3.6.5 or higher, Busy is designed to function with the Python standard library without any additional pip modules.
However, it requires the tkinter module to use the user interface. On my Mac I did something like this:
brew update && brew upgrade pyenv
then:
env \
PATH="$(brew --prefix tcl-tk)/bin:$PATH" \
LDFLAGS="-L$(brew --prefix tcl-tk)/lib" \
CPPFLAGS="-I$(brew --prefix tcl-tk)/include" \
PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
CFLAGS="-I$(brew --prefix tcl-tk)/include" \
PYTHON_CONFIGURE_OPTS="--with-tcltk-includes='-I$(brew --prefix tcl-tk)/include' --with-tcltk-libs='-L$(brew --prefix tcl-tk)/lib -ltcl8.6 -ltk8.6'" \
pyenv install 3.8.2
Also, we use Pip packages in the devops pipeline, so:
sudo pip3 install coverage pycodestyle twine
Then to run the test suite:
make test
Or to run test coverage:
make cover
And to check style:
make style
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file busy-2.0.3.tar.gz.
File metadata
- Download URL: busy-2.0.3.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95a03bec96bdc3327c579c7ed8c51e0defa4b5c93311bc26388822a3eb8d3ef2
|
|
| MD5 |
94a075cee2bf363d33c75bcce4d01e2f
|
|
| BLAKE2b-256 |
cd129b44d14f6d422abbdd83f5363fddcf9a19fd85e36b1e9c50f9b6fe021943
|
File details
Details for the file busy-2.0.3-py3-none-any.whl.
File metadata
- Download URL: busy-2.0.3-py3-none-any.whl
- Upload date:
- Size: 33.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37c48b6dd36bca5e52f96c2d6f58479f790853808cf6696f4521de34012b9b14
|
|
| MD5 |
eb6b7450cd878206121fad7a135763cb
|
|
| BLAKE2b-256 |
30186b6fdcfc3f3a908db3ccd8c942904a2c6068b0b5e98568a073d444ed208b
|