In this post I will explain the process of my action/script for quicksilver. The action is quite simple; you choose a file that is currently on your public folder via quicksilver and then run the publicLink action to get the public link and paste it anywhere you need it.
I started using Quicksilver and loved functions like move to and copy to. Then I started using dropbox and using the copy to and move to the dropbox folder. The problem was that I had to manually get the public link for any file in the dropbox folder. This was very disruptive when you are used to using quicksilver and its simple functions. Also, I always had to get the main index file from my dropbox folder (search: pyndexer) so it was not productive getting the same link over and over again manually.
The usual solution:
Search. I started searching for the solution but I had no luck. So I decided it was time to use my programming skills and make it myself.
I searched for the requirements for a quicksilver script. I found that you needed applescript knowledge. This was the first time I heard of this scripting language so I decided to read a couple of things and look for examples.
I came across three vital webpages that I used for my solution.
I knew I needed a find and replace algorithm so I decided to search for a pre-made one. The first link was useful for seeing how to interact with the clipboard. The third link was useful for seeing different examples and one script very similar to my solution but different at the same time.
Testing the work:
When I finished my script, I didn’t worried about a method to see if there were characters not used in URLs like spaces and other symbols. I decided to try it and see how it worked without it. It worked! It turns out that most browsers (if not all, I tried with 3) replace this characters when pressing enter and it redirects you to the correct webpage. I did a quick test to see different types of names of the files and everything worked.
What I learned:
I learned that it’s pretty awesome to develop your own solutions. I felt powerful. Also I wanted to share the solution if somebody else needs it. It’s pretty cool what you can achieve in a long night with some searching skills and basic developing knowledge.
First you have to open the "applescript editor EDIT:(or script editor)" and copy the code available here. Change both properties and save it on the specific location with the name "publicLink" and your done. Use quicksilver to search for a file that you know that it's on your public folder and then press tab and then type "publicLink" and then press enter. You will have on your clipboard the link ready to be shared! EDIT* the final step is to restart quicksilver Where to save: ~/Library/Application Support/Quicksilver/Actions Be sure to replace both properties! to get your public dropbox folder, locate it in the finder then click get info and on the general tab it says "where" copy that string and add "/public/"property ifolder : "/Users/maltigloos/Dropbox/Public/" property dropboxID : 123456 on findAndReplace2(toFind, toReplace, theText) set astid to AppleScript's text item delimiters set AppleScript's text item delimiters to toFind set textItems to theText's text items set AppleScript's text item delimiters to toReplace tell textItems to set editedText to beginning & toReplace & rest set AppleScript's text item delimiters to astid return editedText end findAndReplace2 using terms from application "Quicksilver" on open theseitems if application "Dropbox" is not running then launch application "Dropbox" repeat with aitem in theseitems tell application "Finder" set r to POSIX path of (aitem as text) set completePath to r as text set docName to my findAndReplace2(ifolder, "", completePath) set theurl to "http://dl.getdropbox.com/u/" & dropboxID & "/" & docName set the clipboard to theurl end tell end repeat end open end using terms from
For more info check this!
In this post I will share a wallpaper I made. Everything started about a year ago, when I found this image. I never found who was the original artist of the design. So if someone knows this drop a line in the comments.
Many months later I downloaded the app called Brushes for the iPhone. I didn’t know where to start so I just chose to recreate this image using the app. I also wanted to see how good the app exports were. Here is the video of the process:
I finally exported the drawing to the computer and modified it a bit. It had several imperfections that were very noticeable with a bigger screen.
Here is the final product. It’s 1280 by 800. It’s actually cropped for my computer screen, the final image is bigger.
DO NOT COVET YOUR IDEAS.
Give away everything you know, and more will come back to you.
You will remember from school other students preventing you from seeing their answers by placing their arms around their exercise book or exam paper.
It is the same at work, people are secretive with ideas. ‘Don’t tell them that, they’ll take credit for it.’
The problems with hoarding is you end up living off your reserves. Eventually you’ll become stale.
If you give away everything you have, you are let with nothing. This forces you to look, to be aware, to replenish.
Somehow the more you give away the more comes back to you.
Ideas are open knowledge. Don’t claim ownership.
They’re not your ideas anyway, they’re someone else’s. They are out there floating by on the ether.
You just have to put yourself in a frame of mind to pick them up.
This sums up my reasons for creating this blog. I had a couple of images and wallpapers in folders that I made some time ago and I decided the best move was to publish them. This inspires me to create more and more. Also, I think this is the tendency of life and human relations thanks to technology and the ease of accessing information (the internet). Yet, I don’t agree completely with Paul Arden but that is another thing.
(saw this excerpt on lifehacker)
Just a quick sketch I did using the iPhone app called Brushes. I liked how Kermit looked with the thinking/intellectual pose but I don’t like that the lines aren’t straight. After all, I just did it for fun and because I like Kermit the frog and Henson’s work.