mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
16 lines
428 B
Python
16 lines
428 B
Python
import sys
|
|
import os
|
|
import dop.client
|
|
from django.conf import settings
|
|
|
|
sys.path.append('/srv/newsblur')
|
|
|
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
|
|
|
|
if __name__ == '__main__':
|
|
doapi = dop.client.Client(settings.DO_CLIENT_KEY, settings.DO_API_KEY)
|
|
droplets = doapi.show_active_droplets()
|
|
for droplet in droplets:
|
|
if sys.argv[1] == droplet.name:
|
|
print droplet.ip_address
|
|
break
|