AppleScript로 발표자 메모를 분문에 삽입하기

JS에 대한 이야기는 아니지만 오늘 한 삽질에 대해 수다 좀 떨겠습니다. :bird:

배경 (내가 원했던 것)

어떤 애플리케이션으로 발표자료를 만드느냐에 따라 장단점이 있습니다. 저는 파워포인트를 거처 키노트 그 다음 html로 발표자료를 만드는 bespoke.js 를 사용해왔습니다.
제가 좋아하는 스타일은 이모티콘을 활용하고 글자 몇개씩만 적는 형태입니다.(예: 제 1회 나는 자바스크립트 개발자다 오프닝

키노트로 이모티콘을 활용해서 만들다보니 다음과 같은 두가지 문제가 있더군요.

  1. 슬라이드에 글이 거의 없다보니 슬라이드를 공유할 경우 무슨 내용인지 도무지 알수가 없습니다. 따라서 발표자 메모에 적어둔 내용을 슬라이드안에 복사하고 싶었습니다.
  2. 키노트는 slideshare에 바로 올릴수 없어서 pdf로 전환후 올려야하는데 이럴 경우 한글이 안보입니다.

이 두가지 문제를 해결할 방법을 찾고 삽질 좀 해봤습니다.

:pill: AppleScript : 발표자 메모를 추출해서 body에 넣기

tell application "Keynote"
	activate
	if not (exists document 1) then error number -128
	tell the front document
		repeat with i from 1 to the count of slides
			tell slide i
				if skipped is false then
					set the myNote to presenter notes of it
					set the noteLength to count (myNote)
					set the object text of the default body item to myNote
					tell default body item
						if noteLength is 0 then
							set opacity to 5
						else
							set opacity to 100
						end if
					end tell
				end if
			end tell
		end repeat
	end tell
end tell

:pill: 팁 : slideshare에 pdf 올릴 때 한글이 안보일 경우

다음 명령어를 실행한다.

LANG=C LC_ALL=C sed -i '' s'|/Registry (Adobe) /Ordering (Korea1) /Supplement [0-9]|/Registry(Adobe) /Ordering(Identity) /Supplement 0|g' /path/to/pdf.pdf
1개의 좋아요

그래서 완성한 결과는 다음과 같습니다.

1개의 좋아요