# Next-action
[![PyPI](https://img.shields.io/pypi/v/next-action.svg)](https://pypi.org/project/next-action/)
[![Updates](https://pyup.io/repos/github/fniessink/next-action/shield.svg)](https://pyup.io/repos/github/fniessink/next-action/)
[![Build Status](https://travis-ci.com/fniessink/next-action.svg?branch=master)](https://travis-ci.com/fniessink/next-action)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/746457c462cd4d9fa23f05424fa932b4)](https://www.codacy.com/app/frank_10/next-action?utm_source=github.com&utm_medium=referral&utm_content=fniessink/next-action&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/746457c462cd4d9fa23f05424fa932b4)](https://www.codacy.com/app/frank_10/next-action?utm_source=github.com&utm_medium=referral&utm_content=fniessink/next-action&utm_campaign=Badge_Coverage)
[![SonarQube Badge](https://sonarcloud.io/api/project_badges/measure?project=fniessink%3Anext-action&metric=alert_status)](https://sonarcloud.io/api/project_badges/measure?project=fniessink%3Anext-action&metric=alert_status)
Determine the next action to work on from a list of actions in a todo.txt file.
Don't know what *Todo.txt* is? See <https://github.com/todotxt/todo.txt> for the *Todo.txt* specification.
*Next-action* is not a tool for editing todo.txt files, see <http://todotxt.org> for available options.
## Table of contents
- [Demo](#demo)
- [Installation](#installation)
- [Usage](#usage)
- [Limiting the tasks from which next actions are selected](#limiting-the-tasks-from-which-next-actions-are-selected)
- [Showing more than one next action](#showing-more-than-one-next-action)
- [Task dependencies](#task-dependencies)
- [Styling the output](#styling-the-output)
- [Configuring *Next-action*](#configuring-next-action)
- [Option details](#option-details)
- [Recent changes](#recent-changes)
- [Developing *Next-action*](#developing-next-action)
- [Installing the development environment](#installing-the-development-environment)
- [Running unit tests](#running-unit-tests)
- [Running quality checks](#running-quality-checks)
## Demo
![gif](https://raw.githubusercontent.com/fniessink/next-action/master/docs/demo.gif)
## Installation
*Next-action* requires Python 3.6 or newer.
`pip install next-action`
## Usage
```console
$ next-action --help
Usage: next-action [-h] [--version] [-c [<config.cfg>] | -w] [-f <todo.txt> ...] [-r <ref>] [-s [<style>]] [-a
| -n <number>] [-d [<due date>] | -o] [-p [<priority>]] [--] [<context|project> ...]
Show the next action in your todo.txt. The next action is selected from the tasks in the todo.txt file based
on task properties such as priority, due date, and creation date. Limit the tasks from which the next action
is selected by specifying contexts the tasks must have and/or projects the tasks must belong to.
Optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
Configuration options:
-c [<config.cfg>], --config-file [<config.cfg>]
filename of configuration file to read (default: ~/.next-action.cfg); omit filename
to not read any configuration file
-w, --write-config-file
generate a sample configuration file and exit
Input options:
-f <todo.txt>, --file <todo.txt>
filename of todo.txt file to read; can be '-' to read from standard input; argument
can be repeated to read tasks from multiple todo.txt files (default: ~/todo.txt)
Output options:
-r {always,never,multiple}, --reference {always,never,multiple}
reference next actions with the name of their todo.txt file (default: when reading
multiple todo.txt files)
-s [<style>], --style [<style>]
colorize the output; available styles: abap, algol, algol_nu, arduino, autumn,
borland, bw, colorful, default, emacs, friendly, fruity, igor, lovelace, manni,
monokai, murphy, native, paraiso-dark, paraiso-light, pastie, perldoc, rainbow_dash,
rrt, tango, trac, vim, vs, xcode (default: None)
Show multiple next actions:
-a, --all show all next actions
-n <number>, --number <number>
number of next actions to show (default: 1)
Limit the tasks from which the next actions are selected:
-d [<due date>], --due [<due date>]
show only next actions with a due date; if a date is given, show only next actions
due on or before that date
-o, --overdue show only overdue next actions
-p [<priority>], --priority [<priority>]
minimum priority (A-Z) of next actions to show (default: None)
@<context> ... contexts the next action must have
+<project> ... projects the next action must be part of; if repeated the next action must be part
of at least one of the projects
-@<context> ... contexts the next action must not have
-+<project> ... projects the next action must not be part of
Use -- to separate options with optional arguments from contexts and projects, in order to handle cases
where a context or project is mistaken for an argument to an option.
```
Assuming your todo.txt file is your home folder, running *Next-action* without arguments will show the next action you should do. Given this [todo.txt](https://raw.githubusercontent.com/fniessink/next-action/master/docs/todo.txt), calling mom would be the next action:
```console
$ next-action
(A) Call mom @phone
```
The next action is determined using priority. Due date is considered after priority, with tasks due earlier getting precedence over tasks due later. Creation date is considered after due date, with older tasks getting precedence over newer tasks. Finally, tasks that belong to more projects get precedence over tasks that belong to fewer projects.
Several types of tasks can not be a next action:
- completed tasks (~~`x This is a completed task`~~),
- tasks with a creation date in the future (`9999-01-01 Start preparing for five-digit years`),
- tasks with a future threshold date (`Start preparing for emigration to Mars t:3000-01-01`), and
- blocked tasks (see [task dependencies](#task-dependencies) below).
### Limiting the tasks from which next actions are selected
#### By contexts and/or projects
You can limit the tasks from which *Next-action* picks the next action by passing contexts and/or projects:
```console
$ next-action @work
(C) Finish proposal for important client @work
$ next-action +DogHouse
(G) Buy wood for new +DogHouse @store
$ next-action +DogHouse @home
Get rid of old +DogHouse @home
```
When you supply multiple contexts and/or projects, the next action belongs to all of the contexts and at least one of the projects:
```console
$ next-action +DogHouse +PaintHouse @store @weekend
(B) Buy paint to +PaintHouse @store @weekend
```
It is also possible to exclude contexts, which means the next action will not have the specified contexts:
```console
$ next-action +PaintHouse -@store
Borrow ladder from the neighbors +PaintHouse @home
```
And of course, in a similar vein, projects can be excluded:
```console
$ next-action -+PaintHouse @store
(G) Buy wood for new +DogHouse @store
```
If no tasks match the combination of tasks and projects, it's time to get some coffee:
```console
$ next-action +DogHouse @weekend
Nothing to do!
```
But, if there's nothing to do because you use contexts or projects that aren't present in the todo.txt file, *Next-action* will warn you:
```console
$ next-action +PaintGarage @freetime
Nothing to do! (warning: unknown context: freetime; unknown project: PaintGarage)
```
#### By due date
To limit the the tasks from which the next action is selected to actions wi
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共35个文件
py:26个
txt:5个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:next-action-1.5.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
next-action-1.5.0.tar.gz (35个子文件)
next-action-1.5.0
PKG-INFO 24KB
next_action.egg-info
PKG-INFO 24KB
requires.txt 36B
SOURCES.txt 1KB
entry_points.txt 61B
top_level.txt 18B
dependency_links.txt 1B
tests
__init__.py 0B
unittests
test_pick_action.py 14KB
todotxt
test_task.py 19KB
test_tasks.py 2KB
__init__.py 0B
output
test_reference.py 424B
test_color.py 1KB
__init__.py 0B
__init__.py 0B
arguments
test_config.py 23KB
test_parser.py 15KB
__init__.py 0B
test_cli.py 10KB
setup.cfg 75B
setup.py 1KB
README.md 20KB
next_action
pick_action.py 2KB
todotxt
task.py 5KB
__init__.py 489B
tasks.py 529B
cli.py 2KB
output
__init__.py 567B
color.py 535B
reference.py 247B
__init__.py 83B
arguments
parser.py 13KB
__init__.py 537B
config.py 4KB
共 35 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 苹果CMS红色red1电影影视主题网站模板
- 光大证券-20170725-阻力支撑相对强度(RSRS)选股-技术指标系列报告之三.pdf
- EMV 4.4 Book 1~4
- 1_pt_cfix .xlsx
- EMV 4.3 Book 1~4
- EMV 4.2 Book 1~4
- EMV 4.1 Book 1~4
- 基于Python实现的遥感图像的语义分割,分别使用Deeplab V3+和unet模型+源代码+文档说明+数据集.zip
- Python基于Django服装仓库进销存库存管理系统+源代码+文档说明+数据库(高分毕设)
- 2024魔改php版大屏微信墙互动展示系统 大屏幕互动系统程序动态背景图和配乐素材含搭建教程
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功