Skip to content

Instantly share code, notes, and snippets.

@jkishner
Last active August 29, 2015 14:18
Show Gist options
  • Save jkishner/d6f324c405f53e9380ba to your computer and use it in GitHub Desktop.
Save jkishner/d6f324c405f53e9380ba to your computer and use it in GitHub Desktop.
import a link on the iOS clipboard into wallabag via pythonista
#!/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