Skip to content

Instantly share code, notes, and snippets.

View WebpageTitle.py
import urllib
import clipboard
import bs4
import console
link = clipboard.get()
console.show_activity()
soup = bs4.BeautifulSoup(urllib.urlopen(link))
View ImageResize.py
import photos
import Image
choose = photos.pick_image()
final = choose.resize((800,600),Image.ANTIALIAS)
saveit = photos.save_image(final)
if saveit is True:
View WebScraper.py
import selenium
from selenium import webdriver
import time
URL = "http://edatai.us/blog/2012/11/20/placing-kpis-different-cron-schedules"
b = webdriver.Firefox()
b.get(URL)
for i in range(2, 806):
View clipboard_check.py
#Convert clipboard to uppercase/lowercase
import clipboard
text = clipboard.get()
if text == '':
print 'No text in clipboard'
else:
uppercase = text.upper()
if uppercase != text:
new_clip = uppercase
else:
View ImgResize.py
import Image, ImageOps, ImageFilter
import photos
import console
import clipboard
import datetime
img = photos.pick_image()
today = datetime.datetime.now()
View ImportToOF.py
#Summary: Takes copied text and creates new task in OmniFocus
#By: Jason Verly
#Rev: 2013-02-04
#Rev Note: Added Page Title & URL to clipped txt
import webbrowser
import clipboard
import urllib
import console
import sys
View Clipboard_to_MD.py
import markdown
import clipboard
input_file = clipboard.get()
s = input_file
md = markdown.Markdown()
View ImportToOmnifocus.py
#Summary: Takes copied text and creates new task in OmniFocus
#By: Jason Verly
#Rev: 2013-02-02
import webbrowser
import clipboard
import urllib
import console
task = console.input_alert('Task', 'Enter task description')
View CliptoDrafts.py
#Summary: Takes copied text and creates new task in OmniFocus
#By: Jason Verly
#Rev: 2013-02-04
#Rev Note: Added Page Title & URL to clipped txt
import webbrowser
import clipboard
import urllib
import console
import sys
View Markdown Conversion.py
# Markdown Conversion
#
# This script demonstrates how you can convert Markdown documents
# to HTML and view the results in the built-in browser.
import os, tempfile, codecs
import console, clipboard, webbrowser
from markdown2 import markdown
DEMO = '''
You can’t perform that action at this time.