Last active
December 18, 2015 15:08
-
-
Save kmlawson/5801900 to your computer and use it in GitHub Desktop.
Very simple pdf word count in Skim PDF reader using AppleScript. Assumes file you want word count for is open.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This is a really stripped down and simple version of | |
-- Daniel Shockley's DocInfo, which I had trouble getting | |
-- to work on pandoc converted unicode files. | |
-- Thanks to him for the original script: | |
-- DocInfo (for Skim) | |
-- version 1.0, Daniel A. Shockley, http://www.danshockley.com | |
-- http://www.danshockley.com/files/DocInfo.scpt | |
tell application "Skim" | |
set docName to name of document 1 | |
set docText to get text for document 1 | |
set selText to get text for selection of document 1 | |
set docWords to count of words of docText | |
display dialog "Total words: " & docWords | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment