Trello
Trello 是一個基於網路的專案管理和協作工具,讓個人和團隊可以組織和追蹤他們的工作和專案。它提供了一個視覺化介面,稱為「看板 (board)」,使用者可以在其中建立清單和卡片來表示他們的工作和活動。
TrelloLoader 允許您從 Trello 看板載入卡片,並且是基於 py-trello 實作的。
目前僅支援 api_key/token
。
-
點擊手動產生 token 的連結以取得 token。
要指定 API 金鑰和 token,您可以設定環境變數 TRELLO_API_KEY
和 TRELLO_TOKEN
,或者您可以將 api_key
和 token
直接傳遞到 from_credentials
便利建構子方法中。
此載入器允許您提供看板名稱,以將相應的卡片提取到 Document 物件中。
請注意,在官方文件中,看板「名稱 (name)」也稱為「標題 (title)」。
https://support.atlassian.com/trello/docs/changing-a-boards-title-and-description/
您還可以指定多個載入參數,以包含/移除文件 page_content 屬性和元資料的不同欄位。
功能 (Features)
- 從 Trello 看板載入卡片。
- 根據卡片的狀態(開啟或關閉)篩選卡片。
- 在載入的文件中包含卡片名稱、評論和檢查清單。
- 自訂要包含在文件中的其他元資料欄位。
預設情況下,所有卡片欄位都會包含在完整文字 page_content 和元資料中。
%pip install --upgrade --quiet py-trello beautifulsoup4 lxml
# If you have already set the API key and token using environment variables,
# you can skip this cell and comment out the `api_key` and `token` named arguments
# in the initialization steps below.
from getpass import getpass
API_KEY = getpass()
TOKEN = getpass()
········
········
from langchain_community.document_loaders import TrelloLoader
# Get the open cards from "Awesome Board"
loader = TrelloLoader.from_credentials(
"Awesome Board",
api_key=API_KEY,
token=TOKEN,
card_filter="open",
)
documents = loader.load()
print(documents[0].page_content)
print(documents[0].metadata)
API 參考:TrelloLoader
Review Tech partner pages
Comments:
{'title': 'Review Tech partner pages', 'id': '6475357890dc8d17f73f2dcc', 'url': 'https://trello.com/c/b0OTZwkZ/1-review-tech-partner-pages', 'labels': ['Demand Marketing'], 'list': 'Done', 'closed': False, 'due_date': ''}
# Get all the cards from "Awesome Board" but only include the
# card list(column) as extra metadata.
loader = TrelloLoader.from_credentials(
"Awesome Board",
api_key=API_KEY,
token=TOKEN,
extra_metadata=("list"),
)
documents = loader.load()
print(documents[0].page_content)
print(documents[0].metadata)
Review Tech partner pages
Comments:
{'title': 'Review Tech partner pages', 'id': '6475357890dc8d17f73f2dcc', 'url': 'https://trello.com/c/b0OTZwkZ/1-review-tech-partner-pages', 'list': 'Done'}
# Get the cards from "Another Board" and exclude the card name,
# checklist and comments from the Document page_content text.
loader = TrelloLoader.from_credentials(
"test",
api_key=API_KEY,
token=TOKEN,
include_card_name=False,
include_checklist=False,
include_comments=False,
)
documents = loader.load()
print("Document: " + documents[0].page_content)
print(documents[0].metadata)