Skip to main content

用于 trello 的 CLI

项目描述

特雷洛工具

用于trello的 CLI

开发安装

你应该在 venv 中运行它。做这样的事情:

$ python3 -m venv ~/venv3
$ . ~/venv3/bin/activate
$ mkdir -p ~/src
$ git clone https://github.com/mrda/trellotool.git
$ cd trellotool
$ pip install -U pip
$ pip install -Ur requirements.txt
$ pip install -e .

安装发行版

这就是 pypi 的用途!

$ pip install --user trellotool

用法

Trellotool 具有板、列表和卡片的概念。卡片是列表的一部分,列表是板的一部分。首先,您需要定义默认情况下要使用哪个板,以及哪些列表用于哪些内容。这就是你这样做的方式:

$ trellotool board list # this will show you all the boards you have available to access
$ trellotool board set 5d718f75a279e72b4a96baca # this sets a default board

现在,让我们看看您的板上定义了哪些列表,并定义哪些板是哪些:

$ trellotool list list
Board: Your Board Name
+--------------------------+-------------------+
| id                       | name              |
+--------------------------+-------------------+
| 5d7191360fd4b323358fc535 | Backlog           |
| 5d718975a279e7274a9ebacb | To Do             |
| 5d718975a279e7274a9ebacc | In Progress       |
| 5d7170831e61ac479bef4177 | Blocked           |
| 5d7190f431d7303469954aff | In Review         |
| 5d718fa5a279e7274a9ebacd | Done              |
| 5e6021f2206bff6e61047d01 | Ready to archive? |
+--------------------------+-------------------+
$ trellotool list set todo 5d718975a279e7274a9ebacb
$ trellotool list set backlog 5d7191360fd4b323358fc535
$ trellotool list set in_progress 5d718975a279e7274a9ebacc

这样就完成了我们需要做的设置。要查看每个板上有哪些可用的卡片,您可以执行以下操作:

$ trellotool card list todo
+--------------------------+------------------------------------------------------------------+------+--------------+-----------------+-------------------------------+
| id                       | name                                                             | due  | due complete | members         | short url                     |
+--------------------------+------------------------------------------------------------------+------+--------------+-----------------+-------------------------------+
| 5d76d71a0cb04361ce4dc240 | Research random things about giraffes                            | None | False        | michaeldubya    | https://trello.com/c/dM4BSIKV |
| 5d71b669bb06553eaeceb376 | Eat a whole jar of peanut butter in one day                      | None | False        | anthonysmith    | https://trello.com/c/hTsXmvHC |
| 5d76eb2a91e7815d38797338 | Sync some tracks for the boys                                    | None | False        | steadytevor     | https://trello.com/c/0gBfOpDG |
| 5e666c42656a3e4fefdeadb3 | Preliminary pep8 compliance for new code module                  | None | False        | jeremiahthefrog | https://trello.com/c/w6zbMQ6A |
| 5db6f5d99cf4cd3da85f4ae8 | Get status reports in on time by writing a reminder script       | None | False        | jeremiahthefrog | https://trello.com/c/7ZrdTfCl |
| 5d726e09da03b65fac9972f1 | Improve unit test coverage on the legacy module we just included | None | False        | jeremiahthefrog | https://trello.com/c/yyzwbF1L |
+--------------------------+------------------------------------------------------------------+------+--------------+-----------------+-------------------------------+

你可以对其他板做同样的事情,用“in_progress”或“backlog”替换“todo”。

下一步是在板上添加一些卡片:

$ trellotool card add "Add F30 support to mongrel-punt"

当然,能够查看卡片总是很重要的:

$ trellotool card show 5d726e09da03b65fac9972f1
+-----------------+-----------------------------------------------------------------------+
| field           | value                                                                 |
+-----------------+-----------------------------------------------------------------------+
| name            | Improve unit test coverage on the legacy module we just included      |
| id              | 5e30901187796e2335676f06                                              |
| last activity   | 2020-03-09 19:54:15.045000+00:00                                      |
| shortUrl        | https://trello.com/c/yyzwbF1                                          |
| desc            | Improve the test coverage by examing cover and look for low-hanging   |
|                 | fruit, and to improve the functionality that is covered by our tests. |
| due             | None                                                                  |
| is due complete | False                                                                 |
| closed          | False                                                                 |
| members         | jeremiahthefrog                                                       |
+-----------------+-----------------------------------------------------------------------+

您还可以在列表之间移动卡片,并支持列表别名:

trellotool card move 5e30901187796e2335676f06 todo
trellotool card move 5e30901187796e2335676f06 5d718fa5a279e7274a9ebacd # move to the Done list

获得帮助

如果您不确定哪些命令可用,或者它们需要哪些参数,您可以在任何命令或子命令的末尾附加“帮助”以获得帮助。IE

$ trellotool help
Available commands for trellotool are: board, card, help, list
board <subcommand>
card <subcommand>
help - Display help information
list <subcommand>
$ trellotool card help
Available commands for card are: add, help, list, move, show
add [-e] <card title> [<list-alias> | <list-id>] - Add a new card to an optionally specified <list-alias> or <list-id>, if not specified, defaults to the <backlog> list. If provided, -e will invoke $EDITOR, allowing you to provide the new card's description
help - Display help information
list - List all cards for the current list
move <card-id> (<list-alias> | list-id>) - Move card <card-id> to the list specified by either the <list-alias> or <list-id>
show <card-id> - Show card fields

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

trellotool-0.0.4.tar.gz (13.7 kB 查看哈希

已上传 source