fniessink / next-action Goto Github PK
View Code? Open in Web Editor NEWNext-action: determine the next action to work on from a list of actions in a todo.txt file
License: Apache License 2.0
Next-action: determine the next action to work on from a list of actions in a todo.txt file
License: Apache License 2.0
Tasks with a start date in the future can't be the next action (yet).
$ next-action --write-config-file --style colourful --number 3
# Configuration file for Next-action. Edit the settings below as you like.\n"
file: ~/todo.txt
number: 3
style: colorful
Flatten e.g {'number': ["must be of ['integer'] type"]}
to number must of be integer type
and {'file': [{0: ['must be of string type']}]}
to file item 0 must be of string type
.
Possible solution: https://pypi.org/project/ConfigArgParse/
$ next-action mom
(A) Call mom @phone
$ next-action -all "colou?r"
Pick paint color +PaintHouse
Select paint colour +DogHouse
$ next_action --version
next-action 0.0.4
Separate colors for priority, contexts, projects, dates, and key-value pairs. Options:
$ next_action -@work
(B) Work out
Or maybe
$ next_action not @work
(B) Work out
Instead of [@CONTEXT [@CONTEXT ...]] [+PROJECT [+PROJECT ...]] [-@CONTEXT [-@CONTEXT ...]] [-+PROJECT [-+PROJECT ...]]
Have something like [ [-]@CONTEXT | [-]@PROJECT ] ...
Or even switch from positional arguments to optional arguments:
-i @CONTEXT | +PROJECT, --include @CONTEXT | +PROJECT
-x/-e @CONTEXT | +PROJECT, --exclude @CONTEXT | +PROJECT
A configuration file, written in Python, could contain a mapping of contexts to Boolean functions that return True if the context is applicable, False otherwise.
For example:
contexts = {
"@night": lambda: 18 <= datetime.datetime.now().hour <= 23,
"@work": lambda: requests.get("http://ipinfo.io").json()["city"] == "Amsterdam"
}
$ next action
Buy present for dad
$ next_action done
Give present to dad
This feature would entail changing the todo.txt, which none of the other features do so far.
$ next-action @home
(A) Install smoke detectors @home
number: 3
or
all: True
Note that if the config file has number: 3
, specifying --all
on the command line should overwrite it.
Since tasks will usually belong to a single project, it doesn't make sense to require the next action to belong to all projects specified. So, the next action is a task that belongs to at least one of the specified projects.
$ next-action +GarageSale +SpringCleaning
Clean out the garage +GarageSale
If a context is specified as well, then the next action should have that context:
$ next-action +GarageSale +SpringCleaning @home
Dry clean curtains +SpringCleaning @home
$ next-action --priority C --all
(A) Call mom
(B) Write proposal for client
(C) Buy beer
(C) Lose weight
Giving no priority would amount to --priority Z
. --no-priority
would pick the next action from tasks without priority.
Currently, a Python traceback is shown.
Show which file the next action was selected from somehow, e.g.:
$ next-action --file work.txt home.txt
(A) Fix leaking roof [home.txt]
$ cat todo.txt | next-action -
Buy newspaper
Use the fileinput module for iterating over the files, including stdin.
$ next-action --due 2018-05-01 # Limit to tasks due on the exact date, or tasks due before or on the specified date?
File taxes due:2018-05-01
The help info and examples should be generated to prevent typo's and inconsistencies.
$ next-action --this-option-does-not-exist
usage: next-action [-h] [--version] [-f <todo.txt>] [-n <number> | -a] [<context|project> ...]
next-action: error: unrecognized arguments: --this-option-does-not-exist
$ next-action -f this-file-does-not-exist
Can't find this-file-does-not-exist
Maybe --version
should do this?
$ next-action --version
next-action 0.16.0
next-action 0.17.0 is available; install with "pip install --upgrade next-action"
$ next-action -f todo.txt -f big-project.txt
(B) Review proposal [big-project.txt]
Options: always, never, when reading multiple files (default)
Select a next action that is over due:
$ next-action --over-due
Buy flowers due:2018-02-14
Show all overdue next actions:
$ next-action --all --over-due
Buy flowers due:2018-02-14
Submit taxes due:2018-05-01
$ cat ~/.next-action.cfg
number: 3
$ next-action
(A) Call mom
(B) Do dishes
(C) Take out trash
$ next-action --no-config
(A) Call mom
The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.
Due dates are not part of the todo.txt spec, but are usually added using the key:value pattern, e.g.:
Pay taxes due:2018-05-01
$ next-action --all
(A) World peace
(B) End hunger
(C) Call mom @home
Make a pizza @home
Should this be an option? Default on/off?
While tasks usually belong to one project, they will often have multiple contexts. So the next action should typically have all specified contexts.
$ next_action @work @lunch
Eat fruit @lunch @work and @home
A task with a creation date should come before a task without a creation date, all other things equal.
Tasks with future creation dates are already ignored.
$ next_action -n3 # Or --number 3
(A) World peace
(B) End hunger
Call mom @home
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.