Skip to main content

a energy bar

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

tonus-1.1.1.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

tonus-1.1.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file tonus-1.1.1.tar.gz.

File metadata

  • Download URL: tonus-1.1.1.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for tonus-1.1.1.tar.gz
Algorithm Hash digest
SHA256 7e95dbe49d71a3be928316218b0dd92bc29c53369e3511d9505fd85da5c24e73
MD5 ec7d08caa51e8894eea155da8eef0675
BLAKE2b-256 e48c781358f28b2e92413f3079b41d67e4eba2be4b5322961a6426725aac046a

See more details on using hashes here.

File details

Details for the file tonus-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: tonus-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for tonus-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b24456245a136cb81cd275c060e9af1856eec3d2a3bf23c639bd8a8e89ef3ac
MD5 94ddb9556a13e753776a5ff6f7a46805
BLAKE2b-256 03fb4e4cf95296f358cf5ea9981bfc6292a9834e3681f55c818a7876fbaabfdf

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