├── .gitignore ├── getFlickrToken ├── download-flickr-image ├── up2flickr ├── currentflickr.py ├── snapflickr ├── README.md └── Flickr.textexpander /.gitignore: -------------------------------------------------------------------------------- 1 | *-personal 2 | *.pyc -------------------------------------------------------------------------------- /getFlickrToken: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import flickrapi 4 | import sys 5 | 6 | '''Run this to authorize another program you've registered with Flickr. 7 | The three arguments are: 8 | 9 | 1. The program's api key, which you get from Flickr. 10 | 2. The program's api secret, which you get from Flickr. 11 | 3. The program's permissions (read, write, or delete), which you determine. 12 | 13 | After running, there will be an entry in your ~/.flickr directory with a token 14 | that will allow the program to do what you authorized.''' 15 | 16 | try: 17 | api_key = sys.argv[1] 18 | api_secret = sys.argv[2] 19 | permission = sys.argv[3] 20 | except IndexError: 21 | sys.exit("Usage: %s (read|write|delete)" % __file__) 22 | 23 | flickr = flickrapi.FlickrAPI(api_key, api_secret) 24 | 25 | # See https://github.com/sybrenstuvel/flickrapi/issues/69 26 | flickr.authenticate_via_browser(perms=permission) 27 | -------------------------------------------------------------------------------- /download-flickr-image: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | from urllib2 import urlopen 4 | from currentflickr import currentFlickrURL, currentFlickrTitle 5 | from os import environ 6 | from appscript import app 7 | 8 | # This script downloads the large version of the Flickr image 9 | # currently showing in the browser window and saves it to the 10 | # Desktop. The filename is the Flickr image title, with ".jpg" 11 | # appended if necessary. 12 | 13 | try: 14 | # Get the large version of the image and its title. 15 | name = currentFlickrTitle() 16 | if name[-4:].lower() != '.jpg': 17 | name += '.jpg' 18 | image = urlopen(currentFlickrURL('Large')).read() 19 | 20 | # Open a file for writing with the name of the image. 21 | imgFile = open(environ['HOME'] + '/Desktop/' + name, 'w') 22 | 23 | # Write the image and close the file. 24 | imgFile.write(image) 25 | imgFile.close() 26 | app('Play Sound').play('Macintosh HD:System:Library:Sounds:Glass.aiff') 27 | 28 | except: 29 | app('Play Sound').play('Macintosh HD:System:Library:Sounds:Basso.aiff') 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /up2flickr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- encoding: utf-8 3 | 4 | from flickrapi import FlickrAPI 5 | import sys 6 | import getopt 7 | 8 | import json 9 | import os 10 | import webbrowser 11 | from xml.etree import ElementTree as ET 12 | 13 | usage = """Usage: up2flickr [options] [files] 14 | 15 | Options: 16 | -h show this help message 17 | 18 | Upload image files to Flickr.""" 19 | 20 | 21 | def flickr_dir(name): 22 | return os.path.join(os.environ["HOME"], ".flickr", name) 23 | 24 | 25 | # Flickr parameters 26 | flickr_api_creds = json.load(open(flickr_dir("api_credentials.json"))) 27 | 28 | user_id = flickr_api_creds["user_id"] 29 | api_key = flickr_api_creds["api_key"] 30 | api_secret = flickr_api_creds["api_secret"] 31 | 32 | # Get the command line options. 33 | try: 34 | options, filenames = getopt.getopt(sys.argv[1:], 'h') 35 | except getopt.GetoptError as err: 36 | print(str(err)) 37 | sys.exit(2) 38 | 39 | # Upload the files on the command line. 40 | flickr = FlickrAPI(api_key=api_key, secret=api_secret) 41 | 42 | for fn in filenames: 43 | print("Uploading %s..." % fn) 44 | title = os.path.splitext(os.path.basename(fn))[0] 45 | photo_id = "44879366144" 46 | response = flickr.upload( 47 | filename=fn, 48 | title=title, 49 | 50 | # Make the image private 51 | is_public=0, 52 | 53 | # Hide from public searches 54 | hidden=2, 55 | 56 | format='etree' 57 | ) 58 | 59 | photo_id = response.find('photoid').text 60 | 61 | # Set the licence as CC-BY. 62 | resp = flickr.do_flickr_call( 63 | "flickr.photos.licenses.setLicense", 64 | photo_id=photo_id, 65 | license_id="4" 66 | ) 67 | assert ET.tostring(resp) == b'\n' 68 | 69 | resp = flickr.do_flickr_call( 70 | "flickr.photos.getSizes", 71 | photo_id=photo_id 72 | ) 73 | 74 | sizes = [ 75 | dict(sz.items()) 76 | for sz in resp.find("sizes").findall("size") 77 | ] 78 | 79 | out_path = os.path.join( 80 | os.environ["HOME"], 81 | "repos", "alexwlchan.net", "src", "_flickr", "photo_%s.json" % photo_id 82 | ) 83 | 84 | with open(out_path, "w") as outfile: 85 | outfile.write(json.dumps(sizes)) 86 | 87 | photoURL = 'http://www.flickr.com/photos/%s@N03/%s/' % (user_id, photo_id) 88 | print(" %s" % photoURL) 89 | 90 | webbrowser.open(photoURL) 91 | -------------------------------------------------------------------------------- /currentflickr.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | from flickrapi import FlickrAPI, shorturl 4 | from applescript import asrun 5 | import re 6 | 7 | def currentFlickrID(): 8 | '''Return the ID for the Flickr image currently showing in the browser. 9 | 10 | The function works through Apple Events and supports only the Safari 11 | browser. It will generate an IndexError if the frontmost tab of the 12 | browser isn't showing a Flickr image.''' 13 | 14 | # The regex for extracting user and photo info. 15 | infoRE = r'flickr\.com/photos/(.*)/(\d+)/?' 16 | 17 | # Get the URL of the current page in either Safari. 18 | thisURL = asrun('tell application "Safari" to get the URL of the front document') 19 | 20 | # Extract the user and photo info from the URL. 21 | info = re.findall(infoRE, thisURL) 22 | return info[0][1] 23 | 24 | def currentFlickrTitle(): 25 | '''Return the title of the Flickr image currently showing in the browser. 26 | 27 | The function works through Apple Events and supports only the Safari 28 | browser.''' 29 | 30 | # Flickr parameters 31 | fuser = 'Flickr username' 32 | key = 'Get key from Flickr' 33 | secret = 'Get secret from Flickr' 34 | 35 | # Get the image ID. 36 | try: 37 | imageID = currentFlickrID() 38 | except IndexError: 39 | return "Not a Flickr image" 40 | 41 | # Establish the connection with Flickr. 42 | flickr = FlickrAPI(api_key=key, secret=secret) 43 | 44 | # Get the title. 45 | etree = flickr.photos_getInfo(photo_id = imageID, format = 'etree') 46 | for i in etree[0]: 47 | if i.tag == 'title': 48 | return i.text 49 | break 50 | 51 | # If the size wasn't found. 52 | return "Title not found" 53 | 54 | 55 | def currentFlickrURL(kind): 56 | '''Return a URL for the Flickr image currently showing in the browser. 57 | 58 | The string parameter "kind" can be either "Short" or one of the 59 | standard Flickr image sizes: "Original", "Large", "Medium 800", 60 | "Medium 640", "Medium", "Small 320", "Small", "Thumbnail", "Large 61 | Square", or "Square". If it's Short, the function will return a 62 | flic.kr URL for the image page. If it's one of the others, the 63 | function will return the URL of the image of that size, if 64 | available. 65 | 66 | The function works through Apple Events and supports only the Safari 67 | browser.''' 68 | 69 | 70 | # Flickr parameters 71 | fuser = 'Flickr username' 72 | key = 'Get key from Flickr' 73 | secret = 'Get secret from Flickr' 74 | 75 | # Make sure we're asking for a legitimate kind. 76 | kind = ' '.join([x.capitalize() for x in kind.split()]) 77 | kinds = ["Short", "Original", "Large", "Medium 800", "Medium 640", 78 | "Medium", "Small 320", "Small", "Thumbnail", 79 | "Large Square", "Square"] 80 | if kind not in kinds: 81 | return "Not a legitimate kind of URL" 82 | 83 | # Get the image ID. 84 | try: 85 | imageID = currentFlickrID() 86 | except IndexError: 87 | return "Not a Flickr image" 88 | 89 | # Establish the connection with Flickr. 90 | flickr = FlickrAPI(api_key=key, secret=secret) 91 | 92 | # Get the URL. 93 | if kind == "Short": 94 | return shorturl.url(photo_id = imageID) 95 | else: 96 | etree = flickr.photos_getSizes(photo_id = imageID, format = 'etree') 97 | for i in etree[0]: 98 | if i.attrib['label'] == kind: 99 | return i.attrib['source'] 100 | break 101 | 102 | # If the size wasn't found. 103 | return "Size not found" 104 | 105 | 106 | if __name__ == '__main__': 107 | print currentFlickrURL('Short') 108 | -------------------------------------------------------------------------------- /snapflickr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import Pashua 4 | from flickrapi import FlickrAPI 5 | import Image 6 | import sys, os 7 | import subprocess 8 | import re 9 | 10 | # Local parameters 11 | extension = "png" 12 | localdir = os.environ['HOME'] + "/Pictures/Screenshots" 13 | tempfile = "temp.png" 14 | bgcolor = (61, 101, 156) 15 | bigshadow = (25, 5, 25, 35) 16 | smallshadow = (0, 0, 0, 0) 17 | border = 16 18 | 19 | # Flickr parameters 20 | fuser = 'your Flickr username' 21 | key = 'get your key from Flickr' 22 | secret = 'get your secret from Flickr' 23 | screenshotsID = 'the ID of the Flickr set' 24 | 25 | # Dialog box configuration 26 | conf = ''' 27 | # Window properties 28 | *.title = Snapshot Flickr 29 | 30 | # File name text field properties 31 | fn.type = textfield 32 | fn.default = snap 33 | fn.width = 264 34 | fn.x = 94 35 | fn.y = 130 36 | fnl.type = text 37 | fnl.default = File name: 38 | fnl.x = 20 39 | fnl.y = 132 40 | 41 | # Description text field properties 42 | desc.type = textbox 43 | desc.width = 264 44 | desc.height = 72 45 | desc.x = 94 46 | desc.y = 40 47 | descl.type = text 48 | descl.default = Description: 49 | descl.x = 10 50 | descl.y = 95 51 | 52 | # Size radiobutton properties 53 | radio.type = radiobutton 54 | radio.label = Size of : 55 | radio.option = Original 56 | radio.option = Large 57 | radio.option = Medium 640 58 | radio.option = Medium 500 59 | radio.default = Medium 640 60 | radio.x = 380 61 | radio.y = 50 62 | 63 | # Local files checkbox properties 64 | lf.type = checkbox 65 | lf.label = Local file only 66 | lf.x = 20 67 | lf.y = 5 68 | 69 | # Border checkbox properties 70 | bd.type = checkbox 71 | bd.label = Background border 72 | bd.x = 140 73 | bd.y = 5 74 | bd.default = 1 75 | 76 | # Default button 77 | db.type = defaultbutton 78 | db.label = Save 79 | 80 | # Cancel button 81 | cb.type = cancelbutton 82 | ''' 83 | 84 | # Go to the localdir. 85 | os.chdir(localdir) 86 | 87 | # Capture a portion of the screen and save it to a temporary file. 88 | subprocess.call(["screencapture", "-ioW", "-t", extension, tempfile]) 89 | 90 | # Exit if the user canceled the screencapture. 91 | if not os.access(tempfile, os.F_OK): 92 | sys.exit() 93 | 94 | # Open the dialog box and get the input. 95 | dialog = Pashua.run(conf) 96 | if dialog['cb'] == '1': 97 | os.remove(tempfile) 98 | sys.exit() 99 | 100 | # Rename the temporary file. 101 | fn = '%s.%s' % (dialog['fn'], extension) 102 | subprocess.call(["mv", tempfile, fn]) 103 | 104 | # Add a desktop background border if asked for. 105 | snap = Image.open(fn) 106 | if dialog['bd'] == '1': 107 | # Make a solid-colored background bigger than the screenshot. 108 | snapsize = tuple([ x + 2*border for x in snap.size ]) 109 | bg = Image.new('RGB', snapsize, bgcolor) 110 | bg.paste(snap, (border, border)) 111 | bg.save(fn) 112 | 113 | # Put the image on the clipboard. 114 | impbcopy = os.environ['HOME'] + '/Dropbox/bin/impbcopy' 115 | subprocess.call([impbcopy, fn]) 116 | 117 | # Unless this is just for the clipboard... 118 | if dialog['lf'] != '1': 119 | 120 | # Upload the file. 121 | flickr = FlickrAPI(api_key=key, secret=secret) 122 | response = flickr.upload(filename=fn, title=dialog['fn'],\ 123 | description=dialog['desc'], is_public=1,\ 124 | format='etree') 125 | 126 | # Get the photo info from Flickr. 127 | photoID = response.find('photoid').text 128 | photoURL = 'http://www.flickr.com/photos/%s/%s/' % (fuser, photoID) 129 | 130 | # Add to the screenshots set. 131 | flickr.photosets_addPhoto(photo_id = photoID, photoset_id = screenshotsID) 132 | 133 | # Open the photo page in the default browser. 134 | subprocess.call(['open', photoURL]) 135 | 136 | # Put an img element on the clipboard for the selected size of the image. 137 | size = dialog['radio'] 138 | if size == 'Medium 500': size = 'Medium' 139 | flickr = FlickrAPI(api_key=key, secret=secret) 140 | etree = flickr.photos_getSizes(photo_id = photoID, format = 'etree') 141 | for i in etree[0]: 142 | if i.attrib['label'] == size: 143 | tag = '%s' %\ 144 | (i.attrib['source'], dialog['fn'], dialog['fn']) 145 | subprocess.Popen('pbcopy', stdin=subprocess.PIPE).communicate(tag) 146 | sys.exit() 147 | 148 | # If the selected size wasn't available. 149 | tag = '%s' %\ 150 | ('size_not_found', dialog['fn'], dialog['fn']) 151 | subprocess.Popen('pbcopy', stdin=subprocess.PIPE).communicate(tag) 152 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flickr stuff # 2 | 3 | A set of scripts and libraries for working with Flickr on a Macintosh. They all require [Sybren Stüvel’s FlickrAPI library][2]. 4 | 5 | ## getFlickrToken ## 6 | 7 | 8 | 9 | getFlickrToken authorizes any program you've registered with Flickr (http://www.flickr.com/services/apps/create/) and puts its "token" in your `~/.flickr` directory. It's a command line program that your run with three arguments: 10 | 11 | 1. The program's api key, which you get from Flickr. 12 | 2. The program's api secret, which you get from Flickr. 13 | 3. The program's permissions (read, write, or delete), which you determine. 14 | 15 | 16 | ## snapflickr ## 17 | 18 | snapflickr takes a snapshot of your screen (similar to the builtin ⇧⌘4), saves a copy to your ~/Pictures/Screenshots folder (which you must create first), and uploads a copy to your Flickr account. 19 | 20 | When snapflickr is run, it turns the cursor into a camera, ready to take a snapshot of any window (you can change it to take a snapshot of an arbitrary rectangle by pressing the spacebar). After the snapshot is taken, a window appears in which you provide a file name and (optionally) a description. 21 | 22 | ![snapflickr dialog box](https://farm3.staticflickr.com/2936/14551651529_ed08dd5631_o.png) 23 | 24 | By default, the snapshot is uploaded to your Flickr account, but if you click the "Local file only" checkbox, there's no upload. If the image is uploaded to Flickr, its page is opened in the default browser and an `` tag for the chosen size is put on the clipboard. 25 | 26 | It requires [Carsten Blüm's Pashua application][1] and its accompanying Python library. The use is described in more detail [here][3]. It also requires the [Python Imaging Library][6] to add border around window screenshots. The border is set to 16 pixels and the standard Solid Aqua Dark Blue color from the Desktop system preference. These can be changed in the local parameters section at the top of the file. 27 | 28 | Also near the top of snapflickr is a section of Flickr parameters: 29 | 30 | # Flickr parameters 31 | fuser = 'your Flickr username' 32 | key = 'get your key from Flickr' 33 | secret = 'get your secret from Flickr' 34 | screenshotsID = 'the ID of the Flickr set' 35 | 36 | These must be customized with the appropriate username, API info, and Flickr set ID. 37 | 38 | ## currentflickr.py ## 39 | 40 | This is a Python library for getting the name or certain types of URL for the Flickr image currently showing in your browser (works only for Safari and Chrome—sorry, Firefox users). In addition to the FlickrAPI library, it also requires the [appscript library][4], which allows Python to handle Apple Events (like AppleScript). 41 | 42 | I use the currentFlickrURL function to make TextExpander shell snippets that return the URLs for various sizes of an image and also to return an image's short Flickr URL (http://flic.kr/p/xxxxx). 43 | 44 | Near the top of currentflickr.py is a section of Flickr parameters: 45 | 46 | # Flickr parameters 47 | fuser = 'Flickr username' 48 | key = 'Get key from Flickr' 49 | secret = 'Get secret from Flickr' 50 | 51 | These must be customized with the appropriate username and API info. 52 | 53 | ## Flickr.textexpander ## 54 | 55 | This is a plist of TextExpander shell snippets for getting various Flickr URLs of the image shown in the frontmost tab of the browser. The snippets use the currentflickr.py library, so it must be customized with the user's name and API credentials and installed where Python can find it. 56 | 57 | ## download-flickr-image ## 58 | 59 | A script that downloads the large version of the Flickr image currently showing in the browser window and saves it to the Desktop. The filename is the Flickr image title, with ".jpg" appended if necessary. This is intended to be called via FastScripts or a similar utility. It dings using the Glass sound if it succeeds and burps with the Basso sound if it fails. 60 | 61 | To play the sounds, the script requires the free [Play Sound utility][5] from Microcosm Software. 62 | 63 | ## up2flickr ## 64 | 65 | A script that uploads a list of images to Flickr. The title on Flickr is the file name minus the extension. The images are private by default but can be made public through a command line option. 66 | 67 | Near the top of up2flickr is a section of Flickr parameters: 68 | 69 | # Flickr parameters 70 | fuser = 'Flickr username' 71 | key = 'Get key from Flickr' 72 | secret = 'Get secret from Flickr' 73 | 74 | These must be customized with the appropriate username and API info. 75 | 76 | 77 | 78 | [1]: http://www.bluem.net/en/mac/pashua/ 79 | [2]: http://stuvel.eu/flickrapi 80 | [3]: http://www.leancrew.com/all-this/2012/02/snapflickr-update/ 81 | [4]: http://appscript.sourceforge.net/ 82 | [5]: http://microcosmsoftware.com/playsound/ 83 | [6]: http://www.pythonware.com/products/pil/ 84 | -------------------------------------------------------------------------------- /Flickr.textexpander: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | groupInfo 6 | 7 | expandAfterMode 8 | 0 9 | groupName 10 | Flickr 11 | 12 | snippetsTE2 13 | 14 | 15 | abbreviation 16 | ;1024 17 | abbreviationMode 18 | 0 19 | creationDate 20 | 2011-07-30T03:36:37Z 21 | flags 22 | 2 23 | label 24 | Flickr large image URL 25 | lastUsed 26 | 2012-02-22T04:44:59Z 27 | modificationDate 28 | 2011-07-30T04:42:33Z 29 | plainText 30 | #!/usr/bin/python 31 | 32 | import sys 33 | from currentflickr import currentFlickrURL 34 | 35 | sys.stdout.write(currentFlickrURL('Large')) 36 | 37 | snippetType 38 | 3 39 | useCount 40 | 10 41 | uuidString 42 | 5C1F2B90-C76B-4F98-BDF5-706630FCD74E 43 | 44 | 45 | abbreviation 46 | ;240 47 | abbreviationMode 48 | 0 49 | creationDate 50 | 2011-07-30T03:36:37Z 51 | flags 52 | 2 53 | label 54 | Flickr small image URL 55 | lastUsed 56 | 2011-07-30T21:36:14Z 57 | modificationDate 58 | 2011-07-30T04:42:28Z 59 | plainText 60 | #!/usr/bin/python 61 | 62 | import sys 63 | from currentflickr import currentFlickrURL 64 | 65 | sys.stdout.write(currentFlickrURL('Small')) 66 | 67 | snippetType 68 | 3 69 | useCount 70 | 9 71 | uuidString 72 | 7C44F6DB-E6CA-4C99-A3D3-4ED770234C37 73 | 74 | 75 | abbreviation 76 | ;320 77 | abbreviationMode 78 | 0 79 | creationDate 80 | 2011-07-30T03:36:37Z 81 | flags 82 | 2 83 | label 84 | Flickr small 320 image URL 85 | lastUsed 86 | 2012-04-07T04:53:44Z 87 | modificationDate 88 | 2012-04-07T04:53:03Z 89 | plainText 90 | #!/usr/bin/python 91 | 92 | import sys 93 | from currentflickr import currentFlickrURL 94 | 95 | sys.stdout.write(currentFlickrURL('Small 320')) 96 | 97 | snippetType 98 | 3 99 | useCount 100 | 9 101 | uuidString 102 | 9B8423F4-996A-41E6-8318-288D58BAF282 103 | 104 | 105 | abbreviation 106 | ;100 107 | abbreviationMode 108 | 0 109 | creationDate 110 | 2011-07-30T03:36:37Z 111 | flags 112 | 2 113 | label 114 | Flickr thumb image URL 115 | lastUsed 116 | 2011-07-30T21:36:08Z 117 | modificationDate 118 | 2011-07-30T04:42:19Z 119 | plainText 120 | #!/usr/bin/python 121 | 122 | import sys 123 | from currentflickr import currentFlickrURL 124 | 125 | sys.stdout.write(currentFlickrURL('Thumbnail')) 126 | 127 | snippetType 128 | 3 129 | useCount 130 | 9 131 | uuidString 132 | C6886D18-89EF-4BC1-830B-CE0CC44B7DEF 133 | 134 | 135 | abbreviation 136 | ;75 137 | abbreviationMode 138 | 0 139 | creationDate 140 | 2011-07-30T03:36:37Z 141 | flags 142 | 2 143 | label 144 | Flickr square image URL 145 | lastUsed 146 | 2011-07-30T21:36:03Z 147 | modificationDate 148 | 2011-07-30T04:42:12Z 149 | plainText 150 | #!/usr/bin/python 151 | 152 | import sys 153 | from currentflickr import currentFlickrURL 154 | 155 | sys.stdout.write(currentFlickrURL('Square')) 156 | 157 | snippetType 158 | 3 159 | useCount 160 | 9 161 | uuidString 162 | 8038186D-3CC6-48EE-8A55-6DE9B2F1D406 163 | 164 | 165 | abbreviation 166 | ;150 167 | abbreviationMode 168 | 0 169 | creationDate 170 | 2011-07-30T03:36:37Z 171 | flags 172 | 2 173 | label 174 | Flickr large square image URL 175 | lastUsed 176 | 2012-04-07T04:53:51Z 177 | modificationDate 178 | 2012-04-07T04:52:26Z 179 | plainText 180 | #!/usr/bin/python 181 | 182 | import sys 183 | from currentflickr import currentFlickrURL 184 | 185 | sys.stdout.write(currentFlickrURL('Large Square')) 186 | 187 | snippetType 188 | 3 189 | useCount 190 | 9 191 | uuidString 192 | 15BE2269-1E66-4EB0-97FD-EA0B03E01876 193 | 194 | 195 | abbreviation 196 | ;original 197 | abbreviationMode 198 | 0 199 | creationDate 200 | 2011-07-30T03:33:42Z 201 | flags 202 | 2 203 | label 204 | Flickr original image URL 205 | lastUsed 206 | 2012-04-06T02:25:43Z 207 | modificationDate 208 | 2011-07-30T04:42:53Z 209 | plainText 210 | #!/usr/bin/python 211 | 212 | import sys 213 | from currentflickr import currentFlickrURL 214 | 215 | sys.stdout.write(currentFlickrURL('Original')) 216 | 217 | snippetType 218 | 3 219 | useCount 220 | 77 221 | uuidString 222 | F1FC32A9-468F-4266-833B-03BF4899DC36 223 | 224 | 225 | abbreviation 226 | ;640 227 | abbreviationMode 228 | 0 229 | creationDate 230 | 2010-07-22T19:40:28Z 231 | flags 232 | 2 233 | label 234 | Flickr medium 640 image URL 235 | lastUsed 236 | 2012-04-07T04:16:40Z 237 | modificationDate 238 | 2011-07-30T04:43:30Z 239 | plainText 240 | #!/usr/bin/python 241 | 242 | import sys 243 | from currentflickr import currentFlickrURL 244 | 245 | sys.stdout.write(currentFlickrURL('Medium 640')) 246 | 247 | snippetType 248 | 3 249 | useCount 250 | 254 251 | uuidString 252 | 03D04AED-76CC-4D96-89DC-B08FD1D70856 253 | 254 | 255 | abbreviation 256 | ;800 257 | abbreviationMode 258 | 0 259 | creationDate 260 | 2010-07-22T19:40:28Z 261 | flags 262 | 2 263 | label 264 | Flickr medium 800 image URL 265 | lastUsed 266 | 2012-04-07T04:53:59Z 267 | modificationDate 268 | 2012-04-07T04:51:55Z 269 | plainText 270 | #!/usr/bin/python 271 | 272 | import sys 273 | from currentflickr import currentFlickrURL 274 | 275 | sys.stdout.write(currentFlickrURL('Medium 800')) 276 | 277 | snippetType 278 | 3 279 | useCount 280 | 254 281 | uuidString 282 | 6D73F9A9-2B56-42DF-9579-0BF423BBBE0D 283 | 284 | 285 | abbreviation 286 | ;500 287 | abbreviationMode 288 | 0 289 | creationDate 290 | 2010-07-22T19:40:28Z 291 | flags 292 | 2 293 | label 294 | Flickr medium image URL 295 | lastUsed 296 | 2012-04-07T04:54:15Z 297 | modificationDate 298 | 2011-07-30T04:43:12Z 299 | plainText 300 | #!/usr/bin/python 301 | 302 | import sys 303 | from currentflickr import currentFlickrURL 304 | 305 | sys.stdout.write(currentFlickrURL('Medium')) 306 | 307 | snippetType 308 | 3 309 | useCount 310 | 140 311 | uuidString 312 | F45CF6FA-93EE-42FB-B359-FB1462C87DE4 313 | 314 | 315 | abbreviation 316 | ;flickr 317 | abbreviationMode 318 | 0 319 | creationDate 320 | 2010-04-15T13:49:35Z 321 | flags 322 | 2 323 | label 324 | flic.kr link 325 | lastUsed 326 | 2012-01-17T05:42:51Z 327 | modificationDate 328 | 2011-08-01T01:17:29Z 329 | plainText 330 | #!/usr/bin/python 331 | 332 | import sys 333 | from currentflickr import currentFlickrURL 334 | 335 | sys.stdout.write(currentFlickrURL('Short')) 336 | 337 | snippetType 338 | 3 339 | useCount 340 | 48 341 | uuidString 342 | 01A112FE-204F-475A-9CAB-198A3AFB77CC 343 | 344 | 345 | 346 | 347 | --------------------------------------------------------------------------------