Skip to main content

A task flow management tool for syncing todo files with taskwarrior

Project description

Mana-bar (法力槽)

Mana-bar 是一个基于命令行的任务流管理工具,旨在帮助你管理不同项目的“精力”或“疲劳值”。通过设定每个项目的疲劳上限和消耗速率,你可以更好地规划和追踪你的工作状态,避免过度劳累。

简介

在日常工作中,我们往往会在多个项目之间切换。Mana-bar 引入了“法力值”(Mana)或“疲劳值”的概念:

  • 每个项目都有一个疲劳上限(Total Fatigue)。
  • 当你开始在一个项目上工作时,疲劳值会随着时间积累。
  • 不同的项目可以设置不同的消耗速率(Rate)。
  • 当疲劳值达到上限时,意味着你需要休息或切换到其他项目。
  • 疲劳值会随着时间的推移(休息)通过某种机制恢复(当前代码逻辑主要关注记录和显示)。

安装

确保你已经安装了 Python 3.10+。

git clone <repository_url>
cd Mana-bar
pip install .

或者使用 pip 安装依赖:

pip install -e .

使用说明

安装完成后,你可以使用 mana 命令来管理你的任务。

1. 添加项目 (Add)

开始管理一个新项目之前,你需要先添加它,并设置其疲劳上限和消耗速率。

mana add <project_name> --total <total_fatigue> --rate <fatigue_rate>
  • <project_name>: 项目名称。
  • --total, -t: 疲劳值上限,默认 156。
  • --rate, -r: 疲劳消耗速率,默认 1.0。

示例:

mana add coding -t 200 -r 1.5

2. 开始任务 (Open)

开始在一个项目上工作。

mana open <project_name> [--task <task_desc>] [--extra <extra_id>]
  • <project_name>: 项目名称。
  • --task, -t: (可选) 任务描述。
  • --extra, -e: (可选) 额外ID。

示例:

mana open coding -t "Implement README"

3. 结束任务 (Close)

停止当前项目的计时。

mana close <project_name>

示例:

mana close coding

4. 查看项目状态 (Check)

查看指定项目的当前疲劳值状态。

mana check <project_name>

输出将显示一个进度条,指示当前的精力和疲劳状态。

5. 查看所有项目 (Checkall)

查看所有项目的状态。

mana checkall

开发

本项目使用 Typer 构建 CLI,使用 Rich 进行终端美化。

依赖安装

pip install -r requirements.txt
# 或者
pip install .[dev]

运行测试

pytest

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mana_bar-0.1.17.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mana_bar-0.1.17-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file mana_bar-0.1.17.tar.gz.

File metadata

  • Download URL: mana_bar-0.1.17.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mana_bar-0.1.17.tar.gz
Algorithm Hash digest
SHA256 4b04be06a3d95d606ac990df6d87fc700e3705a465c9b4e67fa631d92041da9b
MD5 16b44404988237da9f320eaf3166c771
BLAKE2b-256 ce7039f1d25a728a6d29a771d2c8e813639e92d52d294bda4a23a26f47d9e463

See more details on using hashes here.

File details

Details for the file mana_bar-0.1.17-py3-none-any.whl.

File metadata

  • Download URL: mana_bar-0.1.17-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mana_bar-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 cccb706520f2101f9fede95639fe47fadfeb73b26a22c06b4f9d335f8d4b7abc
MD5 5d5e87cb3b24b8e493e12fb1d2effb98
BLAKE2b-256 657dbdbfebfabbb631a86fc23c6fa53c85f239e4064b0f229cc3b6bd9d0591d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page