Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

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

Metadata

Release files for mana-bar 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mana-bar 1.1.1
File Size Uploaded Provenance Actions
mana_bar-1.1.1.tar.gz 9.3 kB Without provenance Details for mana_bar-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mana-bar 1.1.1
File Interpreter ABI Platform Actions
mana_bar-1.1.1-py3-none-any.whl Python 3 none any Details for mana_bar-1.1.1-py3-none-any.whl

Total release size: 22.7 kB

Release files / mana_bar-1.1.1.tar.gz

Download URL mana_bar-1.1.1.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f25b117c431f673f8bace5cd53a5343561c5e91ef68059d8ed41de900b15e396
BLAKE2b-256 checksum
How to use checksums
d25d0b163df7e14a7dcd53aa9997594984a9c2473c90434e062a27bfc6e17dd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / mana_bar-1.1.1-py3-none-any.whl

Download URL mana_bar-1.1.1-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6c0b5ddf4104a586e79cd56d879a212cb2d4ea87c6a72a771775d3216eda03c
BLAKE2b-256 checksum
How to use checksums
f3d1e9db65235b35cc7101975600c622434369f8f5a34f0b35d363e5080de935
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for mana-bar 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page