Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
1
Help us understand the problem. What is going on with this article?
@lovesaemi

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

を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))
  )

以上です。

1
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
1
Help us understand the problem. What is going on with this article?