TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Quicksilver + python + dropbox = awesomeness

1 pointsby monologicalabout 15 years ago
I'm posting this up because I found it very useful, and you probably will too.<p>I needed away to quickly record my thoughts, whether its a startup idea, some task I have to complete, a quote I read somewhere, anything. I wanted the process to be super fast and very easy to do. Now of course I could've just made a todo.txt file and just open it up, but that's stupid.<p>I wrote a script that takes a string as its parameter, it lowers the case, caps the first word, adds a period, and puts a plus (+) at the beginning, and appends it to a file. Both the script and the file live in my dropbox folder, so its accessible from all my computers. Then I setup quicksilver on my mac so that whenever I type ctrl+space+(t)(o)+tab+(string_to_save)+enter, it executes the script with the string and saves it in the todo file in my dropbox folder.<p>So now whenever I have some really cool idea I don't want to forget, I just immediately save it and I'm good to go. I hope you guys find this as useful as I did.<p>&#60;code&#62; #!/usr/local/bin/python<p>import os,sys<p>if len(sys.argv[1:]) == 0: sys.exit()<p>todo = str(" ".join(sys.argv[1:])).strip().lower().capitalize()<p>un = os.popen('whoami', 'r') path = "/Users/%s/Dropbox" % un.readline().strip()<p>with open('%s/todo.txt' % path, 'a') as t: print &#62;&#62;t, "+ %s." % todo &#60;/code&#62;

1 comment

adelevieabout 15 years ago
&#62;I could've just made a todo.txt file and just open it up, but that's stupid.<p>I hope that was tongue and cheek.
评论 #1188165 未加载