Go Back   AppleForum > Lounge > Mac Life

 
 
thread_tools
2008-06-19, 05:19 AM   #46
yangyang
Member
 
yangyang's Avatar
 
Registered: Apr 2003
My Mac: PB G4 15-inch FW800 Super drive/iSight/PB1400C/IPod Shuffle
Posts: 40
오프라인
domina님의 미투데이
__________________
잘먹고 잘살자!
  Reply With Quote
2008-06-20, 01:16 AM   #47
dahlia
New Member
 
dahlia's Avatar
 
Registered: Feb 2004
My Mac: PowerBook 15" (M8981KH/A)
Posts: 8
오프라인
저도 합니다.
__________________
blog.dahlia.pe.kr
  Reply With Quote
2008-06-20, 06:06 AM   #48
mrhjkim
Member
 
Registered: Jan 2008
My Mac: MacBook
Posts: 27
온라인
인용:
gnucian 님이 쓰신 글 글 보기
근데 Twitter는 Applescript로 만들어서 Quicksilver에 action으로 등록해 놓으면 Quicksilver에서 바로 보낼 수 있는 꼼수가 있던데
Albireo's PowerBook Forum - View Single Post - Twitter
미투데이는 이런 꼼수 없나요? +_+
위 사이트에서 참고하여 다음과 같이 script를 만들었습니다. 필요하신 분들은 사용해 보시기 바랍니다.

설치 방법도 거의 똑같습니다.

1. 아래에서 user_account,user_key를 자신의 계정 정보를 이용하여 설정 한 후 ~/Library/Application Support/Quicksilver/Actions 디렉토리에 me2day.scpt 로 저장(디렉토리가 없으면 생성 후 저장)

Code:
using terms from application "Quicksilver"
	on process text me2day
		set wordcount to do shell script "echo " & quoted form of me2day & " | wc -c"
		set wordcount to do shell script "echo " & quoted form of wordcount & " | sed 's/^[ 	]*//'"
		if wordcount as integer > 140 then
			my growlRegister()
			growlNotify("me2day too long", "(" & wordcount & ") characters")
			return nothing
		end if
		set user_account to "xxxxxx"
		-- you can get user_key from http://me2day.net/"user_account"/settings/basic
		set user_key to "xxxxxxxx"
		set results to do shell script "/usr/local/bin/create_post.py " & user_account & " " & user_key & " " & quoted form of me2day
		-- display dialog results
		
		my growlRegister()
		
		growlNotify("me2day Sent", me2day)
	end process text
end using terms from

using terms from application "GrowlHelperApp"
	-- Register Growl
	on growlRegister()
		tell application "GrowlHelperApp"
			register as application "me2day" all notifications {"Alert"} default notifications {"Alert"}
		end tell
	end growlRegister
	
	-- Notify using Growl
	-- Example: growlNotify("This is an Alert","This is a test of the Growl Alert System")
	on growlNotify(grrTitle, grrDescription)
		tell application "GrowlHelperApp"
			notify with name "Alert" title grrTitle description grrDescription application name "me2day"
		end tell
	end growlNotify
end using terms from
2. 아래 파일을 create_post.py 로 /usr/local/bin 에 저장 후 실행 권한을 줌
sudo cp create_post.py /usr/local/bin/.
sudo chmod 755 /usr/local/bin/create_post.py

Code:
#!/usr/bin/env python
import sys, hashlib, urllib;

def main():
	if len(sys.argv) < 4:
		print """Usage: %s user_id user_key message
				user_id      - user id
				user_key     - user key
				message      - 'message text'
				"""%sys.argv[0]
		return 1
	user_id = sys.argv[1]
	user_key = sys.argv[2]
	msg = sys.argv[3]
# app_key is provided by me2day
	app_key = '58586653f1e1fdf987cbd6955f078107'
	create_url = 'http://me2day.net/api/create_post/' + user_id

	try:
		key_append = "81036618"
# ukey format = 8 num key_append(arbitary) + md5(key_append + user_key)
		user_key_md5 = key_append + hashlib.md5(key_append + user_key).hexdigest()
#print user_key_md5
# refer to http://codian.springnote.com/pages/164476
#tag can be added by ('post[tags]', tag)
		query = urllib.urlencode([('uid',user_id),('ukey',user_key_md5),('akey',app_key),('post[body]',msg)])
		result = urllib.urlopen(create_url + '?' + query)
		print result.info()
		return 0
	except:
#		print "-------------"
		return 1

if __name__ == "__main__":
	sys.exit(main())
3. quicksilver 종료 후 재기동

quicksilver 창을 띄운 후,
"." + 내용 입력 후, tab, me2day

저의 경우에는 . 을 입력 후 한영 변환을 두번해야 한글 입력이 되고 영어로 변환을 할 때도 두번 변환을 해줘야 되는 큰 불편함이 있네요^^;;

이 기능이 필요하신 분은 사용을 해보시기 바랍니다.

mrhjkim 님께서 2008-06-20 06:20 AM 에 수정하셨습니다.. 이유: display dialog 삭제
  Reply With Quote
2008-06-26, 01:43 PM   #49
djgroove
Member
 
djgroove's Avatar
 
Registered: Aug 2007
My Mac: new iMac C2D 20"
Posts: 50
오프라인
저도 있어요 ㅎㅎㅎ
친구신청 해주세요!
djgroove님의 미투데이
__________________
교육이 바로 서야 나라가 바로 섭니다!
  Reply With Quote
답글

글타래 옵션


지금 시각: 03:17 AM | Contact Us | 아카이브 | Top
SEO by vBSEO 3.0.0 RC5 All contents copyright © 2001~2008 by AppleForum and/or their respective owners.