yyt


Nameyyt JSON
Version 0.1.7 PyPI version JSON
download
home_pageNone
Summary多分支 worktree 管理工具
upload_time2025-08-21 13:52:10
maintainerNone
docs_urlNone
authorxpp
requires_python>=3.8
licenseNone
keywords git worktree krepo-ng cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # yyt

多分支 worktree 管理工具(支持 `krepo-ng` 与 `git`)。

## 安装

```bash
pip install yyt
```

## 使用

- 创建 worktree:

```bash
yyt add <path> <branch>
```

这会在 `~/<path>/wpsmain` 和 `~/<path>/wpsweb` 下分别创建或切换到 `<branch>`。

- 列出 worktree:

```bash
yyt list
```

- 移除 worktree:

```bash
yyt remove <path>
```

这会移除 `~/<path>/wpsmain` 和 `~/<path>/wpsweb` 的 worktree,并删除整个 `<path>` 目录。

- 配置管理:

```bash
yyt set work_dir=~/workspace  # 设置工作目录
yyt config                    # 显示当前配置
```

- 修改配置和生成构建脚本(仅限 Linux):

```bash
yyt modify                    # 修改 wpsweb/server/Makefile 和生成 build_server.sh
yyt modify --force            # 强制在非 Linux 系统上运行(不推荐)
```

这会自动查找 wpsweb 目录,并执行以下操作:
1. **修改 `server/Makefile`**:
   - 去掉 `-Wl,-s` 参数
   - 将 `-O2` 修改为 `-g`
2. **生成 `build_server.sh`**:
   - 清空文件内容并写入构建脚本
   - 动态替换路径变量(基于当前执行路径)
   - 自动设置执行权限

> **注意**: `modify` 命令仅在 Linux 系统上支持,因为它需要修改 Makefile 和生成 shell 脚本。

## 依赖

- 需要本机已安装并在 PATH 中可用:`krepo-ng`、`git`。
- 配置文件位置:`~/.yyt.json`

## 许可

MIT

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "yyt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "git, worktree, krepo-ng, cli",
    "author": "xpp",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ff/0d/bc9fa277481223c38220da56c69ab923581ef6922b860232f720245519dd/yyt-0.1.7.tar.gz",
    "platform": null,
    "description": "# yyt\n\n\u591a\u5206\u652f worktree \u7ba1\u7406\u5de5\u5177\uff08\u652f\u6301 `krepo-ng` \u4e0e `git`\uff09\u3002\n\n## \u5b89\u88c5\n\n```bash\npip install yyt\n```\n\n## \u4f7f\u7528\n\n- \u521b\u5efa worktree\uff1a\n\n```bash\nyyt add <path> <branch>\n```\n\n\u8fd9\u4f1a\u5728 `~/<path>/wpsmain` \u548c `~/<path>/wpsweb` \u4e0b\u5206\u522b\u521b\u5efa\u6216\u5207\u6362\u5230 `<branch>`\u3002\n\n- \u5217\u51fa worktree\uff1a\n\n```bash\nyyt list\n```\n\n- \u79fb\u9664 worktree\uff1a\n\n```bash\nyyt remove <path>\n```\n\n\u8fd9\u4f1a\u79fb\u9664 `~/<path>/wpsmain` \u548c `~/<path>/wpsweb` \u7684 worktree\uff0c\u5e76\u5220\u9664\u6574\u4e2a `<path>` \u76ee\u5f55\u3002\n\n- \u914d\u7f6e\u7ba1\u7406\uff1a\n\n```bash\nyyt set work_dir=~/workspace  # \u8bbe\u7f6e\u5de5\u4f5c\u76ee\u5f55\nyyt config                    # \u663e\u793a\u5f53\u524d\u914d\u7f6e\n```\n\n- \u4fee\u6539\u914d\u7f6e\u548c\u751f\u6210\u6784\u5efa\u811a\u672c\uff08\u4ec5\u9650 Linux\uff09\uff1a\n\n```bash\nyyt modify                    # \u4fee\u6539 wpsweb/server/Makefile \u548c\u751f\u6210 build_server.sh\nyyt modify --force            # \u5f3a\u5236\u5728\u975e Linux \u7cfb\u7edf\u4e0a\u8fd0\u884c\uff08\u4e0d\u63a8\u8350\uff09\n```\n\n\u8fd9\u4f1a\u81ea\u52a8\u67e5\u627e wpsweb \u76ee\u5f55\uff0c\u5e76\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a\n1. **\u4fee\u6539 `server/Makefile`**\uff1a\n   - \u53bb\u6389 `-Wl,-s` \u53c2\u6570\n   - \u5c06 `-O2` \u4fee\u6539\u4e3a `-g`\n2. **\u751f\u6210 `build_server.sh`**\uff1a\n   - \u6e05\u7a7a\u6587\u4ef6\u5185\u5bb9\u5e76\u5199\u5165\u6784\u5efa\u811a\u672c\n   - \u52a8\u6001\u66ff\u6362\u8def\u5f84\u53d8\u91cf\uff08\u57fa\u4e8e\u5f53\u524d\u6267\u884c\u8def\u5f84\uff09\n   - \u81ea\u52a8\u8bbe\u7f6e\u6267\u884c\u6743\u9650\n\n> **\u6ce8\u610f**: `modify` \u547d\u4ee4\u4ec5\u5728 Linux \u7cfb\u7edf\u4e0a\u652f\u6301\uff0c\u56e0\u4e3a\u5b83\u9700\u8981\u4fee\u6539 Makefile \u548c\u751f\u6210 shell \u811a\u672c\u3002\n\n## \u4f9d\u8d56\n\n- \u9700\u8981\u672c\u673a\u5df2\u5b89\u88c5\u5e76\u5728 PATH \u4e2d\u53ef\u7528\uff1a`krepo-ng`\u3001`git`\u3002\n- \u914d\u7f6e\u6587\u4ef6\u4f4d\u7f6e\uff1a`~/.yyt.json`\n\n## \u8bb8\u53ef\n\nMIT\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "\u591a\u5206\u652f worktree \u7ba1\u7406\u5de5\u5177",
    "version": "0.1.7",
    "project_urls": null,
    "split_keywords": [
        "git",
        " worktree",
        " krepo-ng",
        " cli"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "54f7150230393538aa18c84a2ccdf0991a2feb7350a6e5fd28daa39e1c658824",
                "md5": "e78849c5932e10c3c49c1e8ee7184479",
                "sha256": "1afa2306f6cf11823429c33e371a5f03132a199a064e0664676ff489d8aa6d83"
            },
            "downloads": -1,
            "filename": "yyt-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e78849c5932e10c3c49c1e8ee7184479",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8000,
            "upload_time": "2025-08-21T13:52:08",
            "upload_time_iso_8601": "2025-08-21T13:52:08.300065Z",
            "url": "https://files.pythonhosted.org/packages/54/f7/150230393538aa18c84a2ccdf0991a2feb7350a6e5fd28daa39e1c658824/yyt-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ff0dbc9fa277481223c38220da56c69ab923581ef6922b860232f720245519dd",
                "md5": "2fa9ab8b4708695c1ef6d80d541576af",
                "sha256": "1e4cd9f5e288c9a7f07d09ab27c5ea829274f0f9504eb10be107be513e3d7cac"
            },
            "downloads": -1,
            "filename": "yyt-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "2fa9ab8b4708695c1ef6d80d541576af",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7765,
            "upload_time": "2025-08-21T13:52:10",
            "upload_time_iso_8601": "2025-08-21T13:52:10.684932Z",
            "url": "https://files.pythonhosted.org/packages/ff/0d/bc9fa277481223c38220da56c69ab923581ef6922b860232f720245519dd/yyt-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-21 13:52:10",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "yyt"
}
        
xpp
Elapsed time: 1.20450s