Skip to content

Instantly share code, notes, and snippets.

@technovangelist
Created March 9, 2015 16:28
Show Gist options
  • Select an option

  • Save technovangelist/3354863f4c71fc0676df to your computer and use it in GitHub Desktop.

Select an option

Save technovangelist/3354863f4c71fc0676df to your computer and use it in GitHub Desktop.
Screenboard Align
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