This file contains hidden or 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
| (* Create Tag Index Note With Hyperlinks to All Notes with that Tag *) | |
| property LF : ASCII character 10 | |
| tell application "Evernote" | |
| set noteTags to every tag | |
| set theTags to {} | |
| repeat with i from 1 to count of noteTags | |
| set theName to name of item i of noteTags | |
| copy theName to end of theTags |
This file contains hidden or 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
| property tb : ASCII character 9 | |
| property LF : ASCII character 10 | |
| tell application "Evernote" | |
| set theQuery to display dialog "What is the title of your writing project?" with title "Project Notebook Template" default answer "" | |
| set projectName to "@" & text returned of theQuery | |
| if (not (notebook named projectName exists)) then | |
| set nb to make notebook with properties {name:projectName} | |
| else | |
| set nb to notebook projectName |
This file contains hidden or 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
| --get input text | |
| set theText to the clipboard | |
| --get each line of outline as list | |
| set theList to paragraphs of theText | |
| --remove tabs and empty line feeds from list | |
| set cleanList to {} | |
| repeat with i from 1 to count of theList | |
| set thisItem to item i of theList |
This file contains hidden or 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
| (* CONVERT MARKDOWN LIST TO NUMERAL OUTLINE | |
| -- Stephen Margheim | |
| -- open source | |
| This script translates simple Markdown outlines into formatted numeral outlines. For example, an outline of the the form: | |
| - item 1 | |
| - sub-item 1 | |
| - sub-sub-item 1 | |
| - sub-sub-sub-item 1 | |
| - sub-item 2 |
This file contains hidden or 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
| (* PROPERTIES *) | |
| property LF : (ASCII character 10) | |
| property LF1 : (ASCII character 32) & (ASCII character 32) & (ASCII character 10) | |
| property tid : AppleScript's text item delimiters | |
| (* THE SCRIPT *) | |
| tell application "Skim" | |
| set theTextStatus to display dialog "Is the PDF a Primary or Secondary text?" buttons {"Primary", "Secondary"} default button {"Secondary"} | |
This file contains hidden or 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
| (* EXPORT ALL SKIM NOTES TO EVERNOTE WITH HYPERLINKS | |
| -- Stephen Margheim | |
| -- 9/7/13 | |
| -- open source | |
| REQUIRED PROGRAMS: | |
| - Skim (pdf viewer and annotator) | |
| - Evernote (cloud based note app) |
This file contains hidden or 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
| t = '- item 1\n\t- sub-item 1\n\t\t- sub-sub-item 1\n\t\t\t- sub-sub-sub-item 1\n\t\t- sub-sub-item 2\n\t- sub-item 2\n- item 2' | |
| # replace tabs with 'x's | |
| nt = t.replace('\t', 'x') | |
| # create list from string | |
| l = nt.split('\n') | |
| # split list into (A) list of prefixes and (B) list of text | |
| pre_l = [] |
This file contains hidden or 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
| from evernote.api.client import EvernoteClient | |
| dev_token = "put your dev token here" | |
| client = EvernoteClient(token=dev_token) | |
| userStore = client.get_user_store() | |
| user = userStore.getUser() | |
| print user.username |
This file contains hidden or 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
| set aList to {"1", "2", "3", "4", "5"} | |
| repeat with anItem in aList -- # actual loop | |
| try | |
| set value to item 1 of anItem | |
| if value = "3" then error 0 -- # simulated `continue` | |
| log value | |
| end try |
This file contains hidden or 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
| -- tell application "InDesignServer" | |
| tell application "Adobe InDesign CS3" | |
| set myDocument to make document | |
| tell myDocument | |
| tell page 1 | |
| set myTextFrame to make text frame | |
| set geometric bounds of myTextFrame to {"6p", "6p", "18p", "18p"} | |
| set contents of myTextFrame to "Hello World!" | |
| end tell |