trello-full-backup
trello-full-backup copied to clipboard
Teams
OK, I found that teams are supported with the '--organizations' switch. There is one small bug in the organizations.
The folder 'me' contains always all 'Boards'. Hence if a board 'Board 1' belongs to the organization/team 'Team 1' this board shows up in the backup two times.
2015-11-12_23-28-36_backup/ └── me ...└── Board 1 └── team 1 ...└── Board 1
This increases the amount of downloaded data big time.
` org_boards_data = {} my_boards_url = '{}members/me/boards{}'.format(API, auth)
orgs = []
if args.orgs:
org_boards_data['Personal Boards'] = requests.get(my_boards_url).json()
org_url = '{}members/me/organizations{}'.format(API, auth)
orgs = requests.get(org_url).json()
else:
org_boards_data['All Boards'] = requests.get(my_boards_url).json()
for org in orgs:
boards_url = '{}organizations/{}/boards{}'.format(API, org['id'], auth)
boards_data = requests.get(boards_url).json()
for board in boards_data:
org_boards_data['Personal Boards'].remove(board)
org_boards_data[org['displayName'] + ' (' + org['name'] + ')'] = boards_data
for org, boards in org_boards_data.items():
print('Processing', org)
mkdir(org)
os.chdir(org)
boards = filter_boards(boards, args.closed_boards)
for board in boards:
backup_board(board, args)
os.chdir('..')
print('Trello Full Backup Completed!')`
This is my solution at the end of the backup script which solves the problem.
I added
print('Backup organizations:', bool(args.orgs))
behind
print('Backup archived lists:', bool(args.archived_lists))
, too.
Thanks for the report!
There is a work in progress in PR #17 to drop support for the folder tree structure and clean things up a bit. We can get your fix in once this is done.