필자는 Mac@Work #2 – Devonthink를 통한 자료 활용 예제 에서도 밝혔든이 Devonthink를 주 업무 KM으로 사용하고 있다.
Devonthink의 정리된 폴더로 자료를 넣어두고 폴더구조의 탐색 및 검색용도로는 매우 만족하고 있었으나, 분리되어 있는 문서 중 최근 1주 혹은 1개월 동안 등록된 문서만 뽑아볼 수 있는 Smart 폴더 같은 기능을 구현할 수 있는 script를 찾아 공유한다.
화면은 아래와 같이 Devonthink 폴더 구조에 최근 1주, 1개월에 등록된 문서를 자동으로 분류하여 표시하여 준다. 이렇게 하면 최근 등록된 문서만 집중적으로 재확인할 수 있어 매우 편리하다.
우선 방법은
1. 최근 1주, 1개월 문서를 Smart 분류하는 Script를 만든다.
2. 해당 Script를 ~/Library/Application Support/Devonthink Pro/Smart Group/ 에 “This Week”, “This Month”이름으로 저장한다.
3. Devonthink를 실행하고 Menu의 Script > Smart Group에 “This Week”, “This Month” 를 실행시키면 위와 같이 스마트그룹이 생긴다.
4. 해당 “This Week”/”This Month”를 클릭하고 해당 문서를 열람한다.
—————————————————————-
1. 최근 1주, 1개월 문서를 Smart 분류하는 Script를 만든다.
– Script Editor를 실행시키고 아래 코드를 copy & paste한다. ( Application > AppleScript 폴더에 위치)
– 최근 1개월 문서 분류 스크립트
on run try set scriptPath to POSIX path of (path to me) if scriptPath ends with "/" then set scriptPath to "" tell application "DEVONthink Pro" my triggered(create record with {name:"This Month", type:group, attached script:scriptPath}) end tell on error error_message number error_number if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning end try end run on triggered(theRecord) try set theDate to current date set theSeconds to (day of theDate) * 24 * 3600 set theSeconds to theSeconds + (hours of theDate) * 3600 set theSeconds to theSeconds + (minutes of theDate) * 60 set theSeconds to theSeconds + (seconds of theDate) tell application "DEVONthink Pro" if type of theRecord is group then search age (theSeconds) replicate to theRecord with removing replicants end tell on error error_message number error_number if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning end try end triggered
– 최근 1주 문서 분류 스크립트
on run try set scriptPath to POSIX path of (path to me) if scriptPath ends with "/" then set scriptPath to "" tell application "DEVONthink Pro" my triggered(create record with {name:"Last Week", type:group, attached script:scriptPath}) end tell on error error_message number error_number if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning end try end run on triggered(theRecord) try tell application "DEVONthink Pro" if type of theRecord is group then search age (3600 * 24 * 7) replicate to theRecord with removing replicants end tell on error error_message number error_number if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning end try end triggered
2. 해당 Script를 “This Week”, “This Month”이름으로 저장한다.
– Script Editor에서 “Save As”하여 ~/Library/Application Support/Devonthink Pro/Smart Group/ 위치에 저장함.
3. Devonthink를 실행하고 Menu의 Script > Smart Group에 “This Week”, “This Month” 를 실행시키면 해당 스마트그룹이 생긴다.
4. 해당 “This Week”/”This Month”를 클릭하고 해당 문서를 열람한다.
출처 : http://www.devon-technologies.com/scripts/userforum/viewtopic.php?f=20&t=6425
즐~ Devonthink
감사합니다. 좋은 글입니다.