Skip to content

Commit

Permalink
fix(trello): fix token generation URL + pass .env file.
Browse files Browse the repository at this point in the history
closes #1.
  • Loading branch information
adrienjoly committed Jan 26, 2020
1 parent dc4fcfa commit 4e19c01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion trello/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# from https://trello.com/app-key
TRELLO_API_KEY="xxx"

# from: https://trello.com/1/authorize?scope=read&expiration=never&name=backup&key=REPLACE_WITH_YOUR_API_KEY
# from: https://trello.com/1/authorize?scope=read&expiration=never&name=backup&response_type=token&key=REPLACE_WITH_YOUR_API_KEY
TRELLO_TOKEN="yyy"
7 changes: 4 additions & 3 deletions trello/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

set -e # this script will exit if any command returns a non-null value

source .env # must define TRELLO_API_KEY and TRELLO_TOKEN

BACKUP_PATH="$PWD"
# ℹ️ the script will generate a subdirectory in it like: 2018-07-29_12-13-18_backup

mkdir -p $BACKUP_PATH

echo "Backing up trello boards to a subdirectory of $BACKUP_PATH ..."

docker run -t -e TRELLO_API_KEY=$TRELLO_API_KEY -e TRELLO_TOKEN=$TRELLO_TOKEN \
# docker run -it jtpio/trello-full-backup /bin/sh
# then: $ cat /usr/local/lib/python3.6/site-packages/trello_full_backup/backup.py

docker run -t --rm --env-file ./.env \
-v $BACKUP_PATH:/app jtpio/trello-full-backup trello-full-backup --attachment-size -1 --organizations
# --closed-boards --archived-cards

Expand Down

0 comments on commit 4e19c01

Please sign in to comment.