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?
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Latest posts made by JordanPatterson28
-
Dropbox API as an External Script
-
Image from URL to Dropbox
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)
-
Saving an Image to the Camera Roll from a URL
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 BytesIOwebbrowser.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',)