Last active
August 29, 2015 14:18
-
-
Save jkishner/d6f324c405f53e9380ba to your computer and use it in GitHub Desktop.
import a link on the iOS clipboard into wallabag via pythonista
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# I am more than likely importing more libraries than are necessary | |
import urllib2 | |
import urllib | |
import re | |
import clipboard | |
import urlparse | |
import notification | |
import webbrowser | |
import base64 | |
# Grab url (or whatever) from the clipboard | |
u = clipboard.get() | |
# replace everything up to the ? with the URL of your wallabag installation | |
link = "YOURDOMAIN/wallabag/?action=add&autoclose=true&url=" | |
link += base64.b64encode(u) | |
webbrowser.open(link) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment