Skip to content

guxsousa/trellocard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trellocard

Made for Übersicht

A screenshot showing todo.txt-widget in action

Requirements

The widget may require jq (a lightweight and flexible command-line JSON processor).

Summary

This widget will display a chosen card from Trello

Edit index.coffee accordingly.

Duplicate calls and methods to display more cards if necessary.

Features

The ubersicht widget processes the information directly

update: (output, domEl) ->
  data  = JSON.parse(output)
  for list of data
    listData = data[list] if data[list].name is this.listName
  $domEl = $(domEl)
  $domEl.html("<div class='entry listName'>#{listData.name}</div>")

  for item in listData.cards
    $domEl.append @renderItem(item)

renderItem: (data) ->
  """
    <div class='entry'>▪︎ #{data.name}</div>
  """

However, it can mine the information first, and then create an array to be displayed as following:

URL="https://api.trello.com/1/boards/$boardId/lists?fields=name&cards=open&card_fields=name&key=$apiKey&token=$token"

USER_AGENT="User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1535.3 Safari/537.36"

BOARD=$(curl -s $URL -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H "$USER_AGENT")

CATEGORY=$(echo "$BOARD")

echo "To Do :: TODAY"
echo "$CATEGORY" | jq '.[0].cards | .[].name'

Acknowledgments

http://tracesof.net/uebersicht-widgets/#to-do-list

About

A script to display trello card information

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published