<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Starting Reiot</title>
	<atom:link href="http://boxcatstudio.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://boxcatstudio.wordpress.com</link>
	<description>PICNEKO Creative</description>
	<lastBuildDate>Sun, 10 Jul 2011 04:13:36 +0000</lastBuildDate>
	<language>ko</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='boxcatstudio.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/11ebc99f89defe187e65a6c68b422dde?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Starting Reiot</title>
		<link>http://boxcatstudio.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://boxcatstudio.wordpress.com/osd.xml" title="Starting Reiot" />
	<atom:link rel='hub' href='http://boxcatstudio.wordpress.com/?pushpress=hub'/>
		<item>
		<title>jQuery Proven Performance Tips &amp; Tricks</title>
		<link>http://boxcatstudio.wordpress.com/2011/07/09/jquery-proven-performance-tips-tricks/</link>
		<comments>http://boxcatstudio.wordpress.com/2011/07/09/jquery-proven-performance-tips-tricks/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 01:46:11 +0000</pubDate>
		<dc:creator>Reiot</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">https://boxcatstudio.wordpress.com/?p=3011355240</guid>
		<description><![CDATA[jQuery Proven Performance Tips &#38; Tricks 간단 요약 - 최신 버전을 사용해라. (1.4 보다 1.6이 2배 가까이 빠르다) - id 선택자가 class 선택자보다 5-10배 이상 빠르다. - 가상 선택자는 느리니까 최대한 쓰지 말 것. 검색 영역의 모든 요소를 다 뒤진다!! - 부모에서 자식을 찾는 방법은 $parent.find(&#8216;.child&#8217;) 가 제일 빠르다. 다른 것은 잊어라. (근데 왜 children() [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355240&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.slideshare.net/AddyOsmani/jquery-proven-performance-tips-tricks">jQuery Proven Performance Tips &amp; Tricks</a> 간단 요약</p>
<p>- 최신 버전을 사용해라. (1.4 보다 1.6이 2배 가까이 빠르다)<br />
- id 선택자가 class 선택자보다 5-10배 이상 빠르다.<br />
- 가상 선택자는 느리니까 최대한 쓰지 말 것. 검색 영역의 모든 요소를 다 뒤진다!!<br />
- 부모에서 자식을 찾는 방법은 $parent.find(&#8216;.child&#8217;) 가 제일 빠르다. 다른 것은 잊어라. (근데 왜 children() 이 더 안빠르지..)<br />
- jQuery 객체는 꼭 필요할 때에만 만들 것.<br />
- 항상 캐싱할 것<br />
- 체인 방식을 애용할 것. 이미 필터링된 집합을 이용하므로 빠르다. 코드도 간단해진다.<br />
- bind, live 보다 delegate가 좋다!<br />
- DOM insert/append 는 가급적 한번에 끝낼 것. 무거운 연산을 해야 할 경우 일단 detach 했다가 다시 넣으면 좋다.<br />
- $.each() 는 느리니까 그냥 for 를 쓸 수 있으면 써라.<br />
- $.method 보다 로레벨 함수인 $.fn.method 가 빠르다.</p>
<p>대체로 아는 이야기라는 점이 슬프다. 그걸 아는 놈이 짠 코드가 이 모양이라니.. ㅠㅠ </p>
<p>그나저나 jsperf.com 같은 걸로 브라우저별로 검증해보지 않으면 다 공허한 이야기인 듯. 재미있는 건 IE 6/7 클래스 선택자의 속도가 다른 브라우저보다 1000-2000배 느리다는 점과, 크롬 13.x 의 성능이 갑자기 앞뒤버전보다 확 떨어졌다는 것. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />Filed under: <a href='http://boxcatstudio.wordpress.com/category/programming/'>programming</a> Tagged: <a href='http://boxcatstudio.wordpress.com/tag/jquery/'>jquery</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boxcatstudio.wordpress.com/3011355240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boxcatstudio.wordpress.com/3011355240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boxcatstudio.wordpress.com/3011355240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boxcatstudio.wordpress.com/3011355240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boxcatstudio.wordpress.com/3011355240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boxcatstudio.wordpress.com/3011355240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boxcatstudio.wordpress.com/3011355240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boxcatstudio.wordpress.com/3011355240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boxcatstudio.wordpress.com/3011355240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boxcatstudio.wordpress.com/3011355240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boxcatstudio.wordpress.com/3011355240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boxcatstudio.wordpress.com/3011355240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boxcatstudio.wordpress.com/3011355240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boxcatstudio.wordpress.com/3011355240/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355240&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boxcatstudio.wordpress.com/2011/07/09/jquery-proven-performance-tips-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbde5851aba25cb54556a97037b5e96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">reiot</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery Mobile Tip</title>
		<link>http://boxcatstudio.wordpress.com/2011/06/18/jquery-mobile-tip/</link>
		<comments>http://boxcatstudio.wordpress.com/2011/06/18/jquery-mobile-tip/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 14:18:35 +0000</pubDate>
		<dc:creator>Reiot</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[jquerymobile]]></category>

		<guid isPermaLink="false">http://reiot.com/?p=3011355221</guid>
		<description><![CDATA[jQuery Mobile(이후 jQM)으로 아이패드용 클리앙 뷰어를 만든 경험을 토대로 팁을 정리했습니다. 이후, 편의상 경어를 사용합니다. data-xxx jQM의 위젯들은 다른 jQuery 위젯이나 플러그인들과는 달리 자바스크립트로 옵션을 지정하는 대신, HTML 의 data- 속성을 이용해서 모양새와 동작을 지정한다.   가장 중요한 것은 data-role 속성인데, HTML 태그에 page, header, content, footer 에서부터 listview, navibar, button 등의 &#8220;역할&#8221;을 지정하면, jQM이 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355221&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>jQuery Mobile(이후 jQM)으로 아이패드용 클리앙 뷰어를 만든 경험을 토대로 팁을 정리했습니다. 이후, 편의상 경어를 사용합니다.</p>
<h2>data-xxx</h2>
<p>jQM의 위젯들은 다른 jQuery 위젯이나 플러그인들과는 달리 자바스크립트로 옵션을 지정하는 대신, HTML 의 data- 속성을 이용해서 모양새와 동작을 지정한다.</p>
<p> </p>
<p>가장 중요한 것은 data-role 속성인데, HTML 태그에 page, header, content, footer 에서부터 listview, navibar, button 등의 &#8220;역할&#8221;을 지정하면, jQM이 알아서 적당한 렌더링 해준다는 거다. 이를 통해서 자바스크립트 코드는 거의 손대지도 않고 순수 HTML 만으로 깔끔한 모바일 뷰를 만들어낼 수 있게 된다.</p>
<p>예를 들어 버튼을 만들어야 된다고 하자. 단순한 anchor 에 data-role=&#8221;button&#8221; 속성을 넣는 것만으로 버튼을 만들 수 있다. 버튼 아이콘은 data-icon 으로 바꾸고, 페이지 전환 애니메이션이 필요할 경우 data-transition= slide | slideup | slidedown | pop | flip | fade 을 사용하면 되고, 또 data-direction=&#8221;reverse&#8221; 으로 애니메이션 방향을 반대로 바꿀 수 있다. 만약 페이지 전환이 아니라 다이얼로그를 띄워야 할 때 anchor.rel 속성처럼 data-rel=&#8221;dialog&#8221; 속성을 지정하면 된다.</p>
<p>이 모든 것이 JS 코드 한줄 없이도 자동적으로 이루어지게 만든, jQM 개발팀에게 박수를 보낸다.</p>
<h2>페이지와 캐싱</h2>
<p>페이지는 보통 header &#8211; content &#8211; footer 로 나뉘는, jQM의 가장 핵심적인 구성 요소다. 그냥 모바일 화면의 하나의 뷰라고 생각하면 된다. HTML 파일 안에 여러 개의 페이지들이 존재할 수 있다. 보통은 각 페이지들 마다 #id 를 붙여두면 되긴 한데, AJAX 로 읽어오는 페이지들의 하위 요소(예를 들면 listview)에 #id를 붙여서 jQuery로 접근하는 것은 가급적 피해야 한다.</p>
<p> </p>
<p>왜냐하면 모바일 환경의 특성상 이미 방문했던 페이지에 대해서 다시 서버에 요청을 하지 않기 위해서, jQM은 이미 한번 방문했던 페이지들은 URL 을 해쉬한 키값으로 DOM 에 저장한 후 숨겨버린다. 그러므로, 동일한 #id 를 가진 페이지가 캐싱될 경우 자바스크립트에서 검색하는 게 불가능하므로, 현재 화면에 보이는 페이지를 기준으로 CSS 클래스로 찾는 것을 권한다.</p>
<p>그냥 페이지 전환이 발생하면 항상 div.data-role=&#8221;page&#8221; 라는 게 무조건 추가된다고 생각하면 이해가 빠를 듯하다. 참고로 로컬 캐싱된 이런 페이지들에 대해 히스토리(Back-Forward) 이동을 적용하기 위해서 yourdomain.com/#/some/where 등의 로컬 주소로 변환된다는 점에 유의할 것.(트위터에서 쓰는 방식이랑 비슷한건데, 뭔가 이걸 가리키는 용어가 있었던 듯&#8230; 가물가물..)</p>
<h2>ul-li-thumb 문제</h2>
<p>리스트 아이템(li) 바로 아래에 이미지 태그를 넣어두면, jQM은 자동적으로 트위터와 같은 2단 레이아웃으로 바꾼다. 내부적으로 이미지에 ul-li-icon 또는 ul-li-thumb 클래스를 붙이고 li 에다가도 ul-li-has-thumb 같은 클래스를 붙여서 크기와 너비, 마진을 설정해버린다.</p>
<p> </p>
<p>한편으로는 좋은 기능이지만, 원치않는 경우라고 해도 이미지 크기가 강제로 줄어들게 된다. 해결책은 리스트 바로 아래 자식 이미지를 다른 태그로 둘러싸서 jQuery 검색에 걸리지 않게 만들면 된다.</p>
<p>see also: <a href="http://forum.jquery.com/topic/latest-release-list-thumbnail-issue">http://forum.jquery.com/topic/latest-release-list-thumbnail-issue</a></p>
<h2>터치 이벤트 사용하기</h2>
<p>데스크탑에서 개발하다가 아이패드에서 테스트해보니 유독 내가 만든 버튼만 클릭이 잘 안먹는 경우가 있어서 뭔가 했는데, 가만히 생각해보니 click 이벤트와 touch 이벤트는 별개라는 사실을 잠시 잊어서 생긴 문제였다. 항상 tap (tab 이 아니다) 이벤트를 click 과 함께 등록해야 된다 <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>fixed header &amp; footer</h2>
<p>data-position=&#8221;fixed&#8221; 를 이용하면 헤더나 푸터를 스크롤에 관계없이 화면에 고정할 수 있다. 스크롤 할 때에는 사라져서 편한 거 같은데, 막상 아이패드에서는 이게 번쩍거리거나 프레임을 떨어뜨리는 문제가 있으므로 적당히 사용해야 할 거 같다. 나도 처음에는 긴 글이 있을 때 넣으면 좋겠거니 했는데, 워낙 깜빡임이 심해서 빼버렸다. 페이지 전환 애니메이션도 너무 과하면 곤란한 듯하다.</p>
<h2>$.mobile.ajaxEnabled = false</h2>
<p>기본적으로, 링크를 클릭하면 jqm은 이동하려는 페이지가 DOM에 없을 때에만, ajax()를 호출해서 페이지를 자동으로 만든다.  그런데 backbone 같은 MVC 라이브러리를 사용할 경우, 이런 흐름은 달라져야 된다. 사용자가 링크를 클릭하면 관련된 모델을 fetch 하고 컬렉션을 적당히 변경한 후, 페이지는 backbone 뷰가 자동으로 만들어주는 느낌이 가장 어울릴 것이다. 즉 ajaxEnabled 옵션을 끄고 관련된 이벤트들을 직접 바인딩해서 처리하면 된다.</p>
<h2>소소한 팁들</h2>
<ul>
<li>버튼을 헤더의 오른 편으로 정렬하기 : 버튼의 class 속성에 ui-btn-right 를 추가하면 된다.</li>
<li>data-backbtn=&#8221;false&#8221;: jQM 1.0a4.1 까지는 페이지 전환시 자동적으로 헤더에 Back 버튼이 추가되므로, 돌아가기 버튼이 필요없는 메인 페이지 등에서는 이 속성을 지정하면 된다.</li>
<li>원치않는 nested list : ul-li-thumb 와 마찬가지로 li 바로 아래에 ul 이나 ol 이 있으면 자동적으로 페이지가 만들어지므로, 다른 태그로 둘러싸면 된다.</li>
<li>사용자가 추가한 버튼에 live(&#8220;click tap&#8221;) 을 지정하면 이벤트가 2개 발생되는 모양이다. 그냥 tap 만 넣어도 컴퓨터에서는 잘 동작한다.</li>
<li>자바스크립트로 리스트 아이템을 추가한 후 listview(&#8220;refresh&#8221;)를 해도 그 안에 있는 inset listview 는 별도의 쿼리를 통해서 listview 위젯으로 만들어야 한다. 샘플 코드는 여기 <a href="http://jsfiddle.net/Reiot/CpudD/">http://jsfiddle.net/Reiot/CpudD/</a></li>
</ul>
<p> </p>
<br />Filed under: <a href='http://boxcatstudio.wordpress.com/category/programming/'>programming</a> Tagged: <a href='http://boxcatstudio.wordpress.com/tag/jquerymobile/'>jquerymobile</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boxcatstudio.wordpress.com/3011355221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boxcatstudio.wordpress.com/3011355221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boxcatstudio.wordpress.com/3011355221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boxcatstudio.wordpress.com/3011355221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boxcatstudio.wordpress.com/3011355221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boxcatstudio.wordpress.com/3011355221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boxcatstudio.wordpress.com/3011355221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boxcatstudio.wordpress.com/3011355221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boxcatstudio.wordpress.com/3011355221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boxcatstudio.wordpress.com/3011355221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boxcatstudio.wordpress.com/3011355221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boxcatstudio.wordpress.com/3011355221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boxcatstudio.wordpress.com/3011355221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boxcatstudio.wordpress.com/3011355221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355221&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boxcatstudio.wordpress.com/2011/06/18/jquery-mobile-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbde5851aba25cb54556a97037b5e96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">reiot</media:title>
		</media:content>
	</item>
		<item>
		<title>clienpad.appspot.com</title>
		<link>http://boxcatstudio.wordpress.com/2011/06/18/clienpad-appspot-com/</link>
		<comments>http://boxcatstudio.wordpress.com/2011/06/18/clienpad-appspot-com/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 13:22:39 +0000</pubDate>
		<dc:creator>Reiot</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[clien]]></category>
		<category><![CDATA[jquerymobile]]></category>

		<guid isPermaLink="false">http://reiot.com/?p=3011355215</guid>
		<description><![CDATA[와이프가 아이패드에서 클리앙을 보시는게 너무 불편해 보여서, jQuery Mobile 공부 삼아 간단히 웹앱을 만들어봤습니다. 소스 코드는 GitHub 에 공개해두었습니다. 주소: http://clienpad.appspot.com  소스코드: https://github.com/Reiot/clienpad Google App Engine 으로 프록시 서버를 만들었고, jQuery Mobile을 이용해서 모바일 브라우저에서 JSON 으로 받아서 보여주는 방식입니다. 가능하면 프록시 서버 없이 하고 싶었는데 iOS 에서 돌아가도록 할려다 보니 방법이 없더군요. 구현에 관련해서 간단히 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355215&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-3011355218" title="clienpad" src="http://boxcatstudio.files.wordpress.com/2011/06/clienpad.png?w=645" alt=""   /></p>
<p>와이프가 아이패드에서 클리앙을 보시는게 너무 불편해 보여서, jQuery Mobile 공부 삼아 간단히 웹앱을 만들어봤습니다. 소스 코드는 GitHub 에 공개해두었습니다.</p>
<ul>
<li>주소: <a href="http://clienpad.appspot.com">http://clienpad.appspot.com </a></li>
<li>소스코드: <a href="http://github.com/Reiot/clienpad">https://github.com/Reiot/clienpad</a></li>
</ul>
<p>Google App Engine 으로 프록시 서버를 만들었고, jQuery Mobile을 이용해서 모바일 브라우저에서 JSON 으로 받아서 보여주는 방식입니다. 가능하면 프록시 서버 없이 하고 싶었는데 iOS 에서 돌아가도록 할려다 보니 방법이 없더군요.</p>
<p>구현에 관련해서 간단히 정리해보자면,</p>
<ul>
<li>template 의 최신 기능 때문에 django 1.2 를 이용했는데, 코드 레벨에서는 거의 webapp 만 사용했습니다;;;</li>
<li>memcache 에 각 URL 을 파싱한 dict를 저장하는데, 60초 정도만 살아남도록 했습니다. 그래서 그런지 처음 접속하는 사람은 제법 느린 편입니다. 반응 속도가 4-5초 정도가 나오는 바람에 와이프가 많이 실망하네요. ㅠㅠ 다시 생각해보니 그냥 JSON 이나 렌더링된 문자열 자체를 저장하는게 나을 수 있겠네요.</li>
<li><a href="http://www.crummy.com/software/BeautifulSoup/">Beautiful Soup</a> 으로 HTML DOM 파싱을 했습니다. 클리앙의 HTML 구조가 old-school 같아서 (ㅎㅎ) 시간이 좀 걸렸습니다;;;</li>
</ul>
<p>조만간 jQuery Mobile 팁에 관한 글을 좀 써보겠습니다.</p>
<br />Filed under: <a href='http://boxcatstudio.wordpress.com/category/programming/'>programming</a> Tagged: <a href='http://boxcatstudio.wordpress.com/tag/appengine/'>appengine</a>, <a href='http://boxcatstudio.wordpress.com/tag/clien/'>clien</a>, <a href='http://boxcatstudio.wordpress.com/tag/jquerymobile/'>jquerymobile</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boxcatstudio.wordpress.com/3011355215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boxcatstudio.wordpress.com/3011355215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boxcatstudio.wordpress.com/3011355215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boxcatstudio.wordpress.com/3011355215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boxcatstudio.wordpress.com/3011355215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boxcatstudio.wordpress.com/3011355215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boxcatstudio.wordpress.com/3011355215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boxcatstudio.wordpress.com/3011355215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boxcatstudio.wordpress.com/3011355215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boxcatstudio.wordpress.com/3011355215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boxcatstudio.wordpress.com/3011355215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boxcatstudio.wordpress.com/3011355215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boxcatstudio.wordpress.com/3011355215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boxcatstudio.wordpress.com/3011355215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355215&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boxcatstudio.wordpress.com/2011/06/18/clienpad-appspot-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbde5851aba25cb54556a97037b5e96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">reiot</media:title>
		</media:content>

		<media:content url="http://boxcatstudio.files.wordpress.com/2011/06/clienpad.png" medium="image">
			<media:title type="html">clienpad</media:title>
		</media:content>
	</item>
		<item>
		<title>Ant Cookbook</title>
		<link>http://boxcatstudio.wordpress.com/2011/04/14/ant-cookbook/</link>
		<comments>http://boxcatstudio.wordpress.com/2011/04/14/ant-cookbook/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 15:17:53 +0000</pubDate>
		<dc:creator>Reiot</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ant]]></category>

		<guid isPermaLink="false">http://reiot.com/?p=3011355207</guid>
		<description><![CDATA[Property vs. Var 상수인 Property은 하위 Target 에게 보이지 않지만, 변수인 Var 는 보인다. 특정 확장자를 가진 파일만 삭제하기(recursive) 특정 폴더 이하 모든 하위 폴더를 삭제하기(빈 폴더 포함) 정규식을 이용해서 파일 이름 바꾸기 apply task 보다는 move task + regexpmapper 를 이용하면 간단하다. move 는 대상 폴더가 없으면 무조건 만들기 때문에 편하다! 경로에서 부모 폴더(dirname)와 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355207&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Property vs. Var</strong></p>
<p>상수인 Property은 하위 Target 에게 보이지 않지만, 변수인 Var 는 보인다.</p>
<p><strong>특정 확장자를 가진 파일만 삭제하기(recursive)</strong></p>
<p><pre class="brush: xml;">
&lt;delete&gt;
	&lt;fileset dir=&quot;${dir}/..&quot; includes=&quot;**/*.js&quot;/&gt;
&lt;/delete&gt;
</pre></p>
<p><strong>특정 폴더 이하 모든 하위 폴더를 삭제하기(빈 폴더 포함)</strong></p>
<p><pre class="brush: xml;">
&lt;delete includeemptydirs=&quot;yes&quot;&gt;
	&lt;fileset dir=&quot;${dir}&quot; includes=&quot;**/*&quot;/&gt;
&lt;/delete&gt;
</pre></p>
<p><strong>정규식을 이용해서 파일 이름 바꾸기</strong></p>
<p>apply task 보다는 move task + regexpmapper 를 이용하면 간단하다. move 는 대상 폴더가 없으면 무조건 만들기 때문에 편하다!<strong> </strong></p>
<p><pre class="brush: xml;">
&lt;!--
&lt;apply executable=&quot;mv&quot;&gt;
	&lt;fileset dir=&quot;${dir}&quot; includes=&quot;*.png&quot;/&gt;
	-v&quot;/&gt;
	&lt;srcfile/&gt;
	&lt;targetfile/&gt;
	&lt;regexpmapper from=&quot;^_\d\d\d\d_(.*)\.png$&quot; to=&quot;${dir}/\1.png&quot;/&gt;
&lt;/apply&gt;
--&gt;

&lt;move todir=&quot;${dir}&quot;&gt;
	&lt;fileset dir=&quot;${dir}&quot; includes=&quot;*.png&quot;/&gt;
	&lt;regexpmapper from=&quot;_\d\d\d\d_(.*)\.png&quot; to=&quot;\1.png&quot;/&gt;
&lt;/move&gt;
</pre></p>
<p><strong>경로에서 부모 폴더(dirname)와 파일명(basename)으로 분리하기</strong></p>
<p>basename 의 suffix 를 지정하면 확장자 없는 순수 파일명만 저장할 수 있다.</p>
<p><pre class="brush: xml;">
	&lt;dirname property=&quot;parentdir&quot; file=&quot;${file}&quot;/&gt;
	&lt;basename property=&quot;basename&quot; file=&quot;${file}&quot; suffix=&quot;.png&quot;/&gt;
</pre></p>
<p><strong>파일명에 정규식을 적용해서 속성에 저장하기</strong></p>
<p>propertyregex 를 이용하면 된다. 이때 디폴트값을 정해줄 수도 있다.</p>
<p><pre class="brush: xml;">
&lt;propertyregex property=&quot;output&quot;
	input=&quot;${file}&quot;
	regexp=&quot;(.+?)_(.+)&quot;
	select=&quot;\2&quot;
	defaultValue=&quot;${default}&quot;/&gt;
</pre></p>
<p><strong>하위 폴더 각각에 대해서 특정 타겟을 실행하기</strong></p>
<p>foreach task 를 이용하면 된다. 이때 dirset 은 항상 부모 폴더 자신(./)을 포함하는데, excludes=./ 등으로 자신을 제거할 수 없으므로, 아래처럼 includes=*/** 으로 제외할 수 있다.</p>
<p><pre class="brush: xml;">
&lt;foreach param=&quot;dir&quot; target=&quot;xxx&quot;&gt;
	&lt;path&gt;
		&lt;dirset dir=&quot;${parentdir}&quot; includes=&quot;*/**&quot;/&gt;
	&lt;/path&gt;
&lt;/foreach&gt;
</pre></p>
<p><strong>Exec vs. Apply</strong></p>
<p>exec 는 커맨드라인 명령을 1회 실행하지만, apply 는 특정 집합에 대해서 for 루프처럼 실행이 가능하다.<br />
이때 arg value 는 -v 나 -f 같은 단일 파라미터이고, arg line 은 &#8211;output xxx 처럼 공백이 들어가는 긴 파라미터에 사용한다.<br />
또한 regexpmapper 를 이용해서 targetfile 에 대해 정규식을 적용할 수도 있다.</p>
<p><pre class="brush: xml;">
&lt;exec executable=&quot;${file.python}&quot;&gt;
	&lt;arg value=&quot;trim.py&quot;/&gt;
	&lt;arg value=&quot;--verbose&quot;/&gt;
	json ${trim.dir}/anchor.json&quot;/&gt;
	&lt;arg value=&quot;${trim.dir}&quot;/&gt;
&lt;/exec&gt;
&lt;apply executable=&quot;${file.python}&quot;&gt;
	&lt;fileset dir=&quot;${flip.dir}&quot; includes=&quot;*.png&quot; excludes=&quot;*.r.png&quot;/&gt;
	&lt;arg value=&quot;flip.py&quot;/&gt;
	&lt;arg value=&quot;--verbose&quot;/&gt;
	&lt;arg value=&quot;-o&quot;/&gt;
	&lt;targetfile/&gt;
	&lt;srcfile/&gt;
	&lt;regexpmapper from=&quot;(.*)\.png$&quot; to=&quot;${flip.dir}/${flip.default}.png&quot;/&gt;
&lt;/apply&gt;
</pre></p>
<p><strong>파일 출력</strong></p>
<p>echo task를 이용하면 화면 출력 뿐만 아니라, 파일에 임의의 문자열을 append를 할 수 있다. 이걸 이용하면 concat task 를 쓰지 않고도 header 나 footer 를 간단하게 넣을 수 있다.</p>
<p><pre class="brush: xml;">
&lt;echo file=&quot;${script}&quot; append=&quot;yes&quot;&gt;
	sprites = sprites || {};
	sprites.data = sprites.data || {};
&lt;/echo&gt;
</pre></p>
<p><strong>파일 이어붙일 때 필터링하기</strong></p>
<p>filterchain 을 이용해서 특정 문자열을 포함한 라인을 제거하거나, tokenfilter + replaceregex 를 이용해서 문자열을 바꿀 수도 있다.</p>
<p><pre class="brush: xml;">
&lt;concat destfile=&quot;${script}&quot; append=&quot;yes&quot;&gt;
	&lt;path&gt;
		&lt;filelist dir=&quot;${dir}&quot; files=&quot;${json}&quot; /&gt;
	&lt;/path&gt;
	&lt;filterchain&gt;
		&lt;linecontains negate=&quot;true&quot;&gt;
			&lt;contains value=&quot;trimmed&quot;/&gt;
		&lt;/linecontains&gt;
		&lt;tokenfilter&gt;
			&lt;!--
			&lt;replaceregex pattern=&quot;\{&quot;frames&quot;\:&quot; replace='sprites[&quot;${spritename}&quot;] =' flags=&quot;g&quot;/&gt;
			--&gt;
			&lt;!-- remove .&lt;span class=&quot;hiddenSpellError&quot; pre=&quot;remove &quot;&gt;png&lt;/span&gt; --&gt;
			&lt;replaceregex pattern=&quot;\.png&quot; replace='' flags=&quot;g&quot;/&gt;
		&lt;/tokenfilter&gt;
	&lt;/filterchain&gt;
&lt;/concat&gt;
</pre></p>
<p><strong>파일을 복사하면서 이름 바꾸기</strong></p>
<p>copy task 와 globmapper 를 쓰면 파일을 복사하면서 단순하게 이름을 바꿀 수 있다.</p>
<p><pre class="brush: xml;">
&lt;copy todir=&quot;${destdir}&quot;&gt;
	&lt;fileset dir=&quot;${srcdir}&quot; includes=&quot;*.png&quot;/&gt;
&lt;/copy&gt;
&lt;copy todir=&quot;${destdir}&quot;&gt;
	&lt;filelist dir=&quot;${srcdir}&quot; files=&quot;${src}.js&quot;/&gt;
	&lt;mapper type=&quot;glob&quot; from=&quot;*.js&quot; to=&quot;sprite.*.js&quot;/&gt;
&lt;/copy&gt;
</pre></p>
<p><strong>명령 실행시 입력 리다이렉트 적용하기</strong></p>
<p>잘 알려지진 않았지만, 구글 앱엔진의 패스워드를 파일에 저장한 후, appcfg.py &#8211;passin &lt; file 을 이용하면 자동화가 가능하다. ant 에서는 exec 의 inputstring 으로 대체할 수 있다.</p>
<p><pre class="brush: xml;">
&lt;exec executable=&quot;appcfg.py&quot; inputstring=&quot;${bulkload.pass}&quot;&gt;
            &lt;arg value=&quot;${bulkload.cmd}&quot;/&gt;
            &lt;arg line=&quot;--application=${bulkload.appid}&quot;/&gt;
            &lt;arg value=&quot;--config_file=${bulkload.config}&quot;/&gt;
            &lt;arg value=&quot;--email=${bulkload.email}&quot;/&gt;
            &lt;arg value=&quot;--url=${bulkload.url}&quot;/&gt;
            &lt;arg value=&quot;--kind=${bulkload.kind}&quot;/&gt;
            &lt;arg value=&quot;--filename=${bulkload.csv}&quot;/&gt;
            &lt;arg value=&quot;--no_cookies&quot;/&gt;
            passin&quot;/&gt;
            &lt;arg value=&quot;.&quot;/&gt;
        &lt;/exec&gt;
</pre></p>
<br />Filed under: <a href='http://boxcatstudio.wordpress.com/category/programming/'>programming</a> Tagged: <a href='http://boxcatstudio.wordpress.com/tag/ant/'>ant</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boxcatstudio.wordpress.com/3011355207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boxcatstudio.wordpress.com/3011355207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boxcatstudio.wordpress.com/3011355207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boxcatstudio.wordpress.com/3011355207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boxcatstudio.wordpress.com/3011355207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boxcatstudio.wordpress.com/3011355207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boxcatstudio.wordpress.com/3011355207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boxcatstudio.wordpress.com/3011355207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boxcatstudio.wordpress.com/3011355207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boxcatstudio.wordpress.com/3011355207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boxcatstudio.wordpress.com/3011355207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boxcatstudio.wordpress.com/3011355207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boxcatstudio.wordpress.com/3011355207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boxcatstudio.wordpress.com/3011355207/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355207&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boxcatstudio.wordpress.com/2011/04/14/ant-cookbook/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbde5851aba25cb54556a97037b5e96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">reiot</media:title>
		</media:content>
	</item>
		<item>
		<title>Bulkloader GData Connector</title>
		<link>http://boxcatstudio.wordpress.com/2011/04/14/bulkloader-gdata-connector/</link>
		<comments>http://boxcatstudio.wordpress.com/2011/04/14/bulkloader-gdata-connector/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 05:01:53 +0000</pubDate>
		<dc:creator>Reiot</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[bulkload]]></category>

		<guid isPermaLink="false">http://reiot.com/?p=3011355200</guid>
		<description><![CDATA[구글 앱엔진은 데이터스토어의 내용을 로컬 파일로 내려받거나 올리는 벌크로딩을 지원한다. 그런데 막상 기획 데이터와 실시간 연동하려면, 스프레드시트를 편집한 후 CSV로 &#8216;하나씩&#8217; 다운받아서 다시 콘솔창에서 appcfg.py 로 &#8216;한 종류씩&#8217; 올려야 하는, 상당히 피곤한 과정을 거쳐야 한다. 만약 구글 스프레드시트의 데이터를 바로 데이터스토어로 올리고 내릴 수 있다면 얼마나 편할까? 해서 스프레드시트 API 를 써서 직접 만들어봤는데, Model [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355200&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>구글 앱엔진은 데이터스토어의 내용을 로컬 파일로 내려받거나 올리는 벌크로딩을 지원한다. 그런데 막상 기획 데이터와 실시간 연동하려면, 스프레드시트를 편집한 후 CSV로 &#8216;하나씩&#8217; 다운받아서 다시 콘솔창에서 appcfg.py 로 &#8216;한 종류씩&#8217; 올려야 하는, 상당히 피곤한 과정을 거쳐야 한다.</p>
<p>만약 구글 스프레드시트의 데이터를 바로 데이터스토어로 올리고 내릴 수 있다면 얼마나 편할까? 해서 스프레드시트 API 를 써서 직접 만들어봤는데, Model 당 import/export/create 코드를 각각 작성해야 하는 단점이 있었다. 그런데,&nbsp;이미 bulkloader.yaml 를 만들어서 관리중이라면, 아래 커넥터를 써서 간단하게 구현할 수 있다.</p>
<p><a href="http://code.google.com/p/bulkloader-gdata-connector/">http://code.google.com/p/bulkloader-gdata-connector/</a></p>
<p>기본적인 사항들은 <a href="http://code.google.com/p/bulkloader-gdata-connector/wiki/GettingStarted">가이드 문서</a>를 읽어보면 되고, 아래 다음 사항들을 참고하면 된다.</p>
<ul>
<li>django 1.2 를 사용할 경우, 코드 맨 위에 	use_library(&#8216;django&#8217;, &#8217;1.2&#8242;)를 추가할 것. 그렇지 않으면 무서운 0.96.4 is already in use 에러를 맛보리라.</li>
<li>구글앱스 도메인을 사용할 경우&nbsp;GenerateAuthSubURL(&#8230;, domain=&#8217;yourapps.com&#8217;) 을 추가할 것.</li>
<li>컬럼 이름에는 공백, underscore(_), 대문자를 사용하면 안된다.</li>
<li>내보내기는 제법 오랜 시간이 걸리지만, 불러오는 건 꽤 빠르다. 즉 최초에 한번 내보내고 그 다음부터는 금방 금방 불러올 수 있다는 뜻이다. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>단점이라면, 데이터를 불러오려면 콘솔 즉 프로그래머의 개입(==패스워드 입력)이 필요하다는 점이다. 웹 기반 UI 에서 Connector를 어찌어찌 잘 부를 수 있으면 좋겠는데, 워낙 코드가 복잡해서;;</li>
</ul>
<br />Filed under: <a href='http://boxcatstudio.wordpress.com/category/programming/'>programming</a> Tagged: <a href='http://boxcatstudio.wordpress.com/tag/appengine/'>appengine</a>, <a href='http://boxcatstudio.wordpress.com/tag/bulkload/'>bulkload</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boxcatstudio.wordpress.com/3011355200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boxcatstudio.wordpress.com/3011355200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boxcatstudio.wordpress.com/3011355200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boxcatstudio.wordpress.com/3011355200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boxcatstudio.wordpress.com/3011355200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boxcatstudio.wordpress.com/3011355200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boxcatstudio.wordpress.com/3011355200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boxcatstudio.wordpress.com/3011355200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boxcatstudio.wordpress.com/3011355200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boxcatstudio.wordpress.com/3011355200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boxcatstudio.wordpress.com/3011355200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boxcatstudio.wordpress.com/3011355200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boxcatstudio.wordpress.com/3011355200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boxcatstudio.wordpress.com/3011355200/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355200&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boxcatstudio.wordpress.com/2011/04/14/bulkloader-gdata-connector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbde5851aba25cb54556a97037b5e96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">reiot</media:title>
		</media:content>
	</item>
		<item>
		<title>app engine python with django 1.2</title>
		<link>http://boxcatstudio.wordpress.com/2011/04/06/app-engine-python-with-django-1-2/</link>
		<comments>http://boxcatstudio.wordpress.com/2011/04/06/app-engine-python-with-django-1-2/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 03:10:29 +0000</pubDate>
		<dc:creator>Reiot</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[Google App Engine]]></category>

		<guid isPermaLink="false">http://boxcatstudio.wordpress.com/?p=3011355190</guid>
		<description><![CDATA[구글 앱엔진에서 django 1.2 를 사용하려면, main.py 와 appengine_config.py  에 아래 코드를 넣어야 한다. 그런데, remote_api_shell.py 로 연결할 때에도 실행해야 하기 때문에, 가급적 별도의 파일에 넣어서 한번에 import 를 하는 걸 권장한다. (via stackoverflow.com) 원래 _(&#8220;xxx&#8221;) 는 윈도우 계열에서 유니코드를 위한 매크로인데, 아마 위 코드랑 충돌이 있을지도 모르겠다. Filed under: programming Tagged: appengine, django, Google App Engine<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355190&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>구글 앱엔진에서 django 1.2 를 사용하려면, main.py 와 appengine_config.py  에 아래 코드를 넣어야 한다. 그런데, remote_api_shell.py 로 연결할 때에도 실행해야 하기 때문에, 가급적 별도의 파일에 넣어서 한번에 import 를 하는 걸 권장한다. (via <a href="http://stackoverflow.com/questions/4994913/app-engine-default-django-version-change">stackoverflow.com</a>)</p>
<p><pre class="brush: python;">
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from google.appengine.dist import use_library
use_library('django', '1.2')
from django.conf import settings
_ = settings.TEMPLATE_DIRS
</pre></p>
<p>원래 _(&#8220;xxx&#8221;) 는 윈도우 계열에서 유니코드를 위한 매크로인데, 아마 위 코드랑 충돌이 있을지도 모르겠다. <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p><pre class="brush: python;">
from django.utils.translation import ugettext as _
</pre></p>
<br />Filed under: <a href='http://boxcatstudio.wordpress.com/category/programming/'>programming</a> Tagged: <a href='http://boxcatstudio.wordpress.com/tag/appengine/'>appengine</a>, <a href='http://boxcatstudio.wordpress.com/tag/django/'>django</a>, <a href='http://boxcatstudio.wordpress.com/tag/google-app-engine/'>Google App Engine</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boxcatstudio.wordpress.com/3011355190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boxcatstudio.wordpress.com/3011355190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boxcatstudio.wordpress.com/3011355190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boxcatstudio.wordpress.com/3011355190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boxcatstudio.wordpress.com/3011355190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boxcatstudio.wordpress.com/3011355190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boxcatstudio.wordpress.com/3011355190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boxcatstudio.wordpress.com/3011355190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boxcatstudio.wordpress.com/3011355190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boxcatstudio.wordpress.com/3011355190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boxcatstudio.wordpress.com/3011355190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boxcatstudio.wordpress.com/3011355190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boxcatstudio.wordpress.com/3011355190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boxcatstudio.wordpress.com/3011355190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355190&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boxcatstudio.wordpress.com/2011/04/06/app-engine-python-with-django-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbde5851aba25cb54556a97037b5e96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">reiot</media:title>
		</media:content>
	</item>
		<item>
		<title>Export/Import Generic ReferenceProperty</title>
		<link>http://boxcatstudio.wordpress.com/2011/03/17/exportimport-generic-referenceproperty/</link>
		<comments>http://boxcatstudio.wordpress.com/2011/03/17/exportimport-generic-referenceproperty/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 04:02:42 +0000</pubDate>
		<dc:creator>Reiot</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[bulkloader]]></category>

		<guid isPermaLink="false">http://reiot.com/?p=3011355185</guid>
		<description><![CDATA[구글 앱엔진의 참조 속성인 db.ReferenceProperty(reference_class=None) 은 &#8211; 권장할만 하지는 않지만 &#8211; 아무 키 값이나 담을 수 있는 컬럼으로 사용할 수 있다. 문제는 이 값을 export/import 할 때 key_id_or_name_as_string + create_foreign_key 조합을 사용할 수 없다는 점이다. 이걸 해결하려면 내보낼 때에는 (kind, id or name) 2개의 컬럼으로 내보낸 다음, 가져올 때에는 이걸 합치면 된다. 또다른 문제는 부모키가 없는 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355185&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>구글 앱엔진의 참조 속성인 db.ReferenceProperty(reference_class=None) 은 &#8211; 권장할만 하지는 않지만 &#8211; 아무 키 값이나 담을 수 있는 컬럼으로 사용할 수 있다. 문제는 이 값을 export/import 할 때 key_id_or_name_as_string + create_foreign_key 조합을 사용할 수 없다는 점이다. 이걸 해결하려면 내보낼 때에는 (kind, id or name) 2개의 컬럼으로 내보낸 다음, 가져올 때에는 이걸 합치면 된다.</p>
<p>또다른 문제는 부모키가 없는 단순 객체일 경우에는 create_deep_key 를 쓸 수도 없다는 점이다. 따라서 이런 유틸리티 함수를 만들었다.</p>
<p><pre class="brush: python;">
def create_foreign_key_with(kind_col):
    &quot;&quot;&quot;
    for ReferenceProperty(reference_class=None) =&gt; generic key with unknowning kind.

    - property: item_type
      external_name: item_type_value
      import_transform: transformutil.create_foreign_key_with('item_type_kind'))
      export:
          - external_name: item_type_kind
            export_transform: transform.key_kind
          - external_name: item_type_value
            export_transform: transform.key_id_or_name_as_string

    &quot;&quot;&quot;
    def create_foreign_key_with_lambda(value, bulkload_state):
        kind = bulkload_state.current_dictionary[kind_col]
        if not kind or not value:
            return None
        logging.info('kind:%s value:%s' %(kind, value))
        return datastore.Key.from_path(kind, value)
    return create_foreign_key_with_lambda

</pre><br />
물론 bulkloader.yaml 맨 위에 위 소스 파일을 import 해주는 것은 잊지 말아야 한다.</p>
<br />Filed under: <a href='http://boxcatstudio.wordpress.com/category/programming/'>programming</a> Tagged: <a href='http://boxcatstudio.wordpress.com/tag/appengine/'>appengine</a>, <a href='http://boxcatstudio.wordpress.com/tag/bulkloader/'>bulkloader</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boxcatstudio.wordpress.com/3011355185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boxcatstudio.wordpress.com/3011355185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boxcatstudio.wordpress.com/3011355185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boxcatstudio.wordpress.com/3011355185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boxcatstudio.wordpress.com/3011355185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boxcatstudio.wordpress.com/3011355185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boxcatstudio.wordpress.com/3011355185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boxcatstudio.wordpress.com/3011355185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boxcatstudio.wordpress.com/3011355185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boxcatstudio.wordpress.com/3011355185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boxcatstudio.wordpress.com/3011355185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boxcatstudio.wordpress.com/3011355185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boxcatstudio.wordpress.com/3011355185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boxcatstudio.wordpress.com/3011355185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355185&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boxcatstudio.wordpress.com/2011/03/17/exportimport-generic-referenceproperty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbde5851aba25cb54556a97037b5e96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">reiot</media:title>
		</media:content>
	</item>
		<item>
		<title>Create a Memory Collage in Photoshop</title>
		<link>http://boxcatstudio.wordpress.com/2011/03/07/create-a-memory-collage-in-photoshop/</link>
		<comments>http://boxcatstudio.wordpress.com/2011/03/07/create-a-memory-collage-in-photoshop/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 19:30:44 +0000</pubDate>
		<dc:creator>Reiot</dc:creator>
				<category><![CDATA[link]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://reiot.com/?p=3011355179</guid>
		<description><![CDATA[Create a Memory Collage in Photoshop &#124; StoodIt 콜라쥬 만들 때의 그림자, 리얼한 그래디언트의 처리법&#8230; Create a Sleek and Clean MP3 Player Interface Filed under: link Tagged: photoshop, tutorial<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355179&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><img class="aligncenter" title="via Stoodit.com" src="http://stoodit.com/wp-content/uploads/final4-640x360.jpg" alt="" width="448" height="252" /></p>
<p style="text-align:center;"><a href="http://stoodit.com/2011/03/create-a-memory-collage-in-photoshop/">Create a Memory Collage in Photoshop | StoodIt</a></p>
<p style="text-align:center;">콜라쥬 만들 때의 그림자, 리얼한 그래디언트의 처리법&#8230;</p>
<p style="text-align:center;"><img class="aligncenter" title="via psdtut+" src="http://d2f8dzk2mhcqts.cloudfront.net/0648_mp3/tutorial-mp3-player-137.jpg" alt="" width="487" height="288" /></p>
<p style="text-align:center;"><a href="http://feedproxy.google.com/~r/psdtuts/~3/1OZKcddJBiY/">Create a Sleek and Clean MP3 Player Interface</a></p>
<br />Filed under: <a href='http://boxcatstudio.wordpress.com/category/link/'>link</a> Tagged: <a href='http://boxcatstudio.wordpress.com/tag/photoshop/'>photoshop</a>, <a href='http://boxcatstudio.wordpress.com/tag/tutorial/'>tutorial</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boxcatstudio.wordpress.com/3011355179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boxcatstudio.wordpress.com/3011355179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boxcatstudio.wordpress.com/3011355179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boxcatstudio.wordpress.com/3011355179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boxcatstudio.wordpress.com/3011355179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boxcatstudio.wordpress.com/3011355179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boxcatstudio.wordpress.com/3011355179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boxcatstudio.wordpress.com/3011355179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boxcatstudio.wordpress.com/3011355179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boxcatstudio.wordpress.com/3011355179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boxcatstudio.wordpress.com/3011355179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boxcatstudio.wordpress.com/3011355179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boxcatstudio.wordpress.com/3011355179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boxcatstudio.wordpress.com/3011355179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355179&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boxcatstudio.wordpress.com/2011/03/07/create-a-memory-collage-in-photoshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbde5851aba25cb54556a97037b5e96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">reiot</media:title>
		</media:content>

		<media:content url="http://stoodit.com/wp-content/uploads/final4-640x360.jpg" medium="image">
			<media:title type="html">via Stoodit.com</media:title>
		</media:content>

		<media:content url="http://d2f8dzk2mhcqts.cloudfront.net/0648_mp3/tutorial-mp3-player-137.jpg" medium="image">
			<media:title type="html">via psdtut+</media:title>
		</media:content>
	</item>
		<item>
		<title>JavaScript Inheritance Pattern</title>
		<link>http://boxcatstudio.wordpress.com/2011/03/02/javascript-inheritance-pattern/</link>
		<comments>http://boxcatstudio.wordpress.com/2011/03/02/javascript-inheritance-pattern/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 12:36:24 +0000</pubDate>
		<dc:creator>Reiot</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://reiot.com/?p=3011355143</guid>
		<description><![CDATA[Basic Theory crockford 횽의 글만 읽으면 대충 자바스크립트 상속에 대한 구현 방법은 이해할 수 있다. 귀찮으니까 설명은 생략한다. http://javascript.crockford.com/inheritance.html : 맨 마지막 줄이 핵심이다 http://javascript.crockford.com/prototypal.html http://www.crockford.com/javascript/private.html Sample Codes goog.inherits() : http://code.google.com/intl/ko-KR/closure/library/docs/introduction.html backbone extend : http://documentcloud.github.com/backbone/#Model-extend Base.js : http://dean.edwards.name/weblog/2006/05/prototype-and-base/ inheritance (prototype plugin) : http://code.google.com/p/inheritance/ jquery-inheritance : http://code.google.com/p/jquery-inheritance/ javascript MVC Class : http://javascriptmvc.com/docs.html#&#38;who=jQuery.Class JS.Class : http://jsclass.jcoglan.com/inheritance.html John Resig&#8217;s Simple JavaScript Inheritance: http://ejohn.org/blog/simple-javascript-inheritance/ 여담이지만, 조만간 JSON [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355143&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Basic Theory</h2>
<h2><span style="font-weight:normal;font-size:13px;">crockford 횽의 글만 읽으면 대충 자바스크립트 상속에 대한 구현 방법은 이해할 수 있다. 귀찮으니까 설명은 생략한다. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></h2>
<ul>
<li><a href="http://javascript.crockford.com/inheritance.html">http://javascript.crockford.com/inheritance.html</a> : 맨 마지막 줄이 핵심이다 <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </li>
<li><a href="http://javascript.crockford.com/inheritance.html"></a><a href="http://javascript.crockford.com/prototypal.html">http://javascript.crockford.com/prototypal.html</a></li>
<li><a href="http://www.crockford.com/javascript/private.html">http://www.crockford.com/javascript/private.html</a></li>
</ul>
<h2>Sample Codes</h2>
<ul>
<li>goog.inherits() : <a href="http://code.google.com/intl/ko-KR/closure/library/docs/introduction.html">http://code.google.com/intl/ko-KR/closure/library/docs/introduction.html</a></li>
<li>backbone extend : <a href="http://documentcloud.github.com/backbone/#Model-extend">http://documentcloud.github.com/backbone/#Model-extend</a><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;"> </span></li>
<li>Base.js : <a href="http://dean.edwards.name/weblog/2006/05/prototype-and-base/">http://dean.edwards.name/weblog/2006/05/prototype-and-base/</a></li>
<li>inheritance (prototype plugin) : <a href="http://code.google.com/p/inheritance/">http://code.google.com/p/inheritance/</a></li>
<li>jquery-inheritance : <a href="http://code.google.com/p/jquery-inheritance/">http://code.google.com/p/jquery-inheritance/</a></li>
<li>javascript MVC Class : <a href="http://javascriptmvc.com/docs.html#&amp;who=jQuery.Class">http://javascriptmvc.com/docs.html#&amp;who=jQuery.Class</a></li>
<li>JS.Class : <a href="http://jsclass.jcoglan.com/inheritance.html">http://jsclass.jcoglan.com/inheritance.html</a></li>
<li>John Resig&#8217;s Simple JavaScript Inheritance: <a href="http://ejohn.org/blog/simple-javascript-inheritance/">http://ejohn.org/blog/simple-javascript-inheritance/</a></li>
</ul>
<p>여담이지만, 조만간 JSON 기반 프로토콜을 온라인 게임에서 사용하는 게 당연한 세상이 올지도 모르겠다.</p>
<br />Filed under: <a href='http://boxcatstudio.wordpress.com/category/programming/'>programming</a> Tagged: <a href='http://boxcatstudio.wordpress.com/tag/javascript/'>javascript</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boxcatstudio.wordpress.com/3011355143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boxcatstudio.wordpress.com/3011355143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boxcatstudio.wordpress.com/3011355143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boxcatstudio.wordpress.com/3011355143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boxcatstudio.wordpress.com/3011355143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boxcatstudio.wordpress.com/3011355143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boxcatstudio.wordpress.com/3011355143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boxcatstudio.wordpress.com/3011355143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boxcatstudio.wordpress.com/3011355143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boxcatstudio.wordpress.com/3011355143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boxcatstudio.wordpress.com/3011355143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boxcatstudio.wordpress.com/3011355143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boxcatstudio.wordpress.com/3011355143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boxcatstudio.wordpress.com/3011355143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=3011355143&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boxcatstudio.wordpress.com/2011/03/02/javascript-inheritance-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbde5851aba25cb54556a97037b5e96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">reiot</media:title>
		</media:content>
	</item>
		<item>
		<title>TextMate Tips</title>
		<link>http://boxcatstudio.wordpress.com/2011/03/01/textmate-tips/</link>
		<comments>http://boxcatstudio.wordpress.com/2011/03/01/textmate-tips/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 11:24:47 +0000</pubDate>
		<dc:creator>Reiot</dc:creator>
				<category><![CDATA[stories]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://reiot.com/?p=2320</guid>
		<description><![CDATA[깔끔하게 지우기 한글 폰트 설치 2바이트 문자들이 모두 깨지는 관계로 전용 한글 폰트를 구해야 한다. 누가 나눔코딩글꼴의 TextMate 버전을 안 만들어줄까? http://www.appleforum.com/application/45362-textmate에서-한글-글꼴폭-문제.html 유용한 단축키 ⌘(cmd, window) ⌥ (option, alt) ^(control) ⇧(shift) ⌘T : 빠른 파일 찾아가기 ⇧⌘T : 현재 파일의 심볼 찾기 ^⇧V : 현재 파일의 정적 분석 및 검증(Validation). 파이썬일 경우 pylint, 자바스크립트일 경우 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=2320&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><span style="font-size:15px;">깔끔하게 지우기</span></h2>
<p><pre class="brush: plain;">
rm ~/Library/Preferences/com.macromates.*
rm -rf /Library/Application Support/TextMate/
rm -rf ~/Library/Application Support/TextMate/
</pre></p>
<h3>한글 폰트 설치</h3>
<p>2바이트 문자들이 모두 깨지는 관계로 전용 한글 폰트를 구해야 한다. 누가 나눔코딩글꼴의 TextMate 버전을 안 만들어줄까?</p>
<p><a href="http://www.appleforum.com/application/45362-textmate%EC%97%90%EC%84%9C-%ED%95%9C%EA%B8%80-%EA%B8%80%EA%BC%B4%ED%8F%AD-%EB%AC%B8%EC%A0%9C.html">http://www.appleforum.com/application/45362-textmate에서-한글-글꼴폭-문제.html</a></p>
<h3><span style="font-size:20px;">유용한 단축키</span></h3>
<p>⌘(cmd, window) ⌥ (option, alt) ^(control) ⇧(shift)</p>
<ul>
<li>⌘T : 빠른 파일 찾아가기</li>
<li>⇧⌘T : 현재 파일의 심볼 찾기</li>
<li>^⇧V : 현재 파일의 정적 분석 및 검증(Validation). 파이썬일 경우 pylint, 자바스크립트일 경우 jslint 가 실행된다.</li>
<li>⌃⌘R : 현재 편집중인 파일을 Project+ 사이드바로 찾기</li>
</ul>
<p>더 많은 팁은 <a href="http://stackoverflow.com/questions/99807/what-are-some-useful-textmate-shortcuts">http://stackoverflow.com/questions/99807/what-are-some-useful-textmate-shortcuts</a> 에서 찾아볼 수 있다.</p>
<h2>추천 번들 &amp; 플러그인</h2>
<h3>zen coding</h3>
<p>via <a href="http://code.google.com/p/zen-coding/">http://code.google.com/p/zen-coding/</a></p>
<p>TextMate 도 강력한 툴이지만 이놈도 만만치않다. 마법같은 ⌘R 의 힘을 느껴보시라.</p>
<h3>Project+</h3>
<p>via <a href="http://ciaranwal.sh/projectplus">http://ciaranwal.sh/projectplus</a></p>
<h3>GetBundles</h3>
<p>via <a title="solutions.treypiepmeier.com" href="http://solutions.treypiepmeier.com/2009/02/25/installing-getbundles-on-a-fresh-copy-of-textmate/">solutions.treypiepmeier.com</a></p>
<p><pre class="brush: plain;">
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd !$
svn co http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/
osascript -e 'tell app &quot;TextMate&quot; to reload bundles'
</pre></p>
<h3>YUI compressor textmate bundle</h3>
<p>via <a href="http://www.experienceinternet.co.uk/software/yui-compressor-textmate-bundle/">http://www.experienceinternet.co.uk/software/yui-compressor-textmate-bundle/</a></p>
<h3>PyLint</h3>
<p>파이썬 소스 파일에 대해서 ^⇧V 로 정적 분석 및 검증을 할 수 있다. 설치한 후 TextMate PATH 에 /usr/local/bin 을 추가해야 한다. 참고로 easy_install 으로 모듈을 설치할 때 파이썬 버전을 지정하려면 아래와 같이 하면 된다.</p>
<p><pre class="brush: plain;">sudo easy_install-2.5 pylint</pre></p>
<p>각종 경고 목록은 <a href="http://www.logilab.org/card/pylintfeatures">http://www.logilab.org/card/pylintfeatures</a> 에 있다. <br />
현재 파일에서 경고를 끄려면,<br />
<pre class="brush: plain;"># pylint: disable=W0232,R0902,C0103,C0301</pre></p>
<h2>정규식</h2>
<h3>Basic</h3>
<ul>
<li>캡처한 문자열은 $1, $2 .. 를 이용한다. $0 은 전체를 의미한다.</li>
</ul>
<h3>no trailing space after comma</h3>
<p>pylint 를 돌려보면 콤마(,) 다음에 공백을 무조건 넣으라고 한다. negative look  ahead  를 이용하면 간단하다.</p>
<p><pre class="brush: plain;">
Find: &quot;,(?![\s])&quot;
Replace: &quot;, &quot;
</pre></p>
<h2>참고 자료</h2>
<ul>
<li><a title="How I Use TextMate" href="http://al3x.net/2008/12/03/how-i-use-textmate.html">http://al3x.net/2008/12/03/how-i-use-textmate</a></li>
</ul>
<br />Filed under: <a href='http://boxcatstudio.wordpress.com/category/stories/'>stories</a> Tagged: <a href='http://boxcatstudio.wordpress.com/tag/programming-2/'>Programming</a>, <a href='http://boxcatstudio.wordpress.com/tag/textmate/'>textmate</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/boxcatstudio.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/boxcatstudio.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/boxcatstudio.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/boxcatstudio.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/boxcatstudio.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/boxcatstudio.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/boxcatstudio.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/boxcatstudio.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/boxcatstudio.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/boxcatstudio.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/boxcatstudio.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/boxcatstudio.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/boxcatstudio.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/boxcatstudio.wordpress.com/2320/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=boxcatstudio.wordpress.com&amp;blog=8724445&amp;post=2320&amp;subd=boxcatstudio&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://boxcatstudio.wordpress.com/2011/03/01/textmate-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cbde5851aba25cb54556a97037b5e96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">reiot</media:title>
		</media:content>
	</item>
	</channel>
</rss>
