Created
March 9, 2015 16:28
-
-
Save technovangelist/3354863f4c71fc0676df to your computer and use it in GitHub Desktop.
Screenboard Align
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dogapi import dog_http_api as api | |
| import console | |
| import json | |
| from StringIO import StringIO | |
| api.api_key = 'apikey' | |
| api.application_key = 'appkey' | |
| board_id = console.input_alert('enter screenboard id') | |
| sb= api.get_screenboard(board_id) | |
| for widget in sb['widgets']: | |
| widget['x'] = round(widget['x']) | |
| widget['y']=round(widget['y']) | |
| widget['height']=round(widget['height']) | |
| widget['width']=round(widget['width']) | |
| sb['board_title']=sb['board_title'] + '-aligned' | |
| api.create_screenboard(sb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment