SITE SEARCH

검색

사이트 전체 글을 빠르게 찾을 수 있습니다.

RSS FEED

RSS 구독

RSS 리더에서 Project Research의 새 글을 바로 받아볼 수 있습니다.

EMAIL SUBSCRIBE

이메일 구독

새 글을 이메일로 받아봅니다. RSS는 별도 RSS 아이콘을 눌러 동일한 크기의 패널에서 열 수 있습니다.

이메일로 블로그 구독하기

이 블로그를 구독하고 이메일로 새글의 알림을 받으려면 이메일 주소를 입력하세요







Devonthink 문서 중 1주, 1달 동안 등록된 문서 목록 Smart Group 만들기

시리즈

필자는 Mac@Work #2 – Devonthink를 통한 자료 활용 예제 에서도 밝혔든이 Devonthink를 주 업무 KM으로 사용하고 있다.

Devonthink의 정리된 폴더로 자료를 넣어두고 폴더구조의 탐색 및 검색용도로는 매우 만족하고 있었으나, 분리되어 있는 문서 중 최근 1주 혹은 1개월 동안 등록된 문서만 뽑아볼 수 있는 Smart 폴더 같은 기능을 구현할 수 있는 script를 찾아 공유한다.

화면은 아래와 같이 Devonthink 폴더 구조에 최근 1주, 1개월에 등록된 문서를 자동으로 분류하여 표시하여 준다. 이렇게 하면 최근 등록된 문서만 집중적으로 재확인할 수 있어 매우 편리하다.

DEVONthink ProScreenSnapz001.png

우선 방법은

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개월 문서 분류 스크립트

[sourcecode language=’python’]
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
[/sourcecode]

– 최근 1주 문서 분류 스크립트
[sourcecode language=’python’]
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
[/sourcecode]

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

Project Research에서 더 알아보기

지금 구독하여 계속 읽고 전체 아카이브에 액세스하세요.

계속 읽기