• JordanPatterson28

    I am using the method posted by ole to create a Dropbox app register it then pull the info into other scripts in pythonista. Is this possible in editorial, to reference another script?

    posted in Editorial read more
  • JordanPatterson28

    I am trying to write a script to upload an image at a public url to my Dropbox. I already have several other scripts uploading text files to Dropbox but he image isn't working. Any ides based on the code below?

    import Image 
    import photos
    import sys 
    import webbrowser 
    import console 
    import urllib 
    from urllib import urlopen 
    from io import BytesIO 
    from DropboxLogin import get_client
    dropbox_client = get_client()
    import clipboard
    import keychain
    import time
    import httplib
    
    
    url = 'http://313e5987718b346aaf83-f5e825270f29a84f7881423410384342.r78.cf1.rackcdn.com/Pythonista_-_screenshotscopy.PNG'
    
    img = urlopen(url).read()
    buffer = Image.open(BytesIO(img))
    img.save(buffer, 'PNG')
    buffer.seek(0)
    response = dropbox_client.put_file('/Public/test.png', buffer)

    posted in Pythonista read more
  • JordanPatterson28

    I found a small piece of code posted on this forum to save an image from a url to the camera roll and it works very well. I added a small text manipulation of the URL and a notification below but I have one issue. The image saved to the camera roll has no EXIF metadata. Am I doing somthing wrong or is this not possible?

    Thanks

    import Image
    import photos
    import clipboard
    import notification
    import sys
    import webbrowser
    import console
    import urllib
    from urllib import urlopen
    from io import BytesIO

    webbrowser.open('drafts://')

    dburl = clipboard.get()
    url = dburl.replace('www', 'dl')

    img = Image.open(BytesIO(urlopen(url).read()))
    photos.save_image(img)

    notification.schedule('Photo saved to camera roll', 1, 'default',)

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!