3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

3分クッキング trelloの情報とる、emacsのorg-modeとかに突っ込む

Last updated at Posted at 2021-05-29

をpythonでやってみた。今日に割当たってるタスクをさっとターミナルで取りたいとき使う

trelloから情報取得

諸兄におかれましてはオレオレスクリプトを保持してクラウドストレージで共有して運用しておられると思われますので
そのあたりに適当に書けば良いかと

#! /usr/bin/env python3
import requests
import json

key = "キー"
token = "トークン"
list = "リストID"
url = "https://trello.com/1/lists/" + list + "/cards?key=" + key + "&token=" + token

response = requests.get(url)
jsonData = response.json()

for j in jsonData:
    print("%s" % (j["name"]))

emacsで呼び出し

皆様はorg-modeを使っていると思いますのでorg-modeにリストを出せるように簡単な関数作りますね。

(defun insert-trello-today()
  (interactive)
  (setq todo
        (shell-command-to-string "/Users/seijiro/.pyenv/shims/python ~/g/scripts/trelloc"))
  (print todo (current-buffer))
  )

以上です。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?