DEV Community

Cover image for Day 17 - One Click to Trello Board - 100 days 100 python scripts
Ganesh Raja
Ganesh Raja

Posted on

Day 17 - One Click to Trello Board - 100 days 100 python scripts

Day 17: single_click_save

Whenever I came across new framework or tech terms or articles, I have a habit of adding them into my learning Trello board. Later I can to look up and start learning if I find it useful. But it was harder for me to open trello and add it every time. So I wrote this script. Now I have to just copy the new term to clipboard and click on the script which is executable formate( or as a shortcut ), The term will be stored into Trello and a new notification pops up.

#!/usr/bin/python3
from trello import TrelloClient
import pyperclip
import os
import constants

client = TrelloClient(
    api_key=constants.TRELLO_API_KEY,
    api_secret=constants.TRELLO_API_SECRET,
)

all_boards = client.list_boards()

con_list= client.get_board(constants.TRELLO_LEARNING_BOARD_ID).get_lists(list_filter=None)

data=str(pyperclip.paste())

print(con_list[0].add_card(data))

os.system('notify-send "New Card Added" "'+data+'"')

Please Visit my Git Repo to check out all the previous day challenges.

https://github.com/ganeshraja10/automated-python-scripts

Discussion (0)