Jump to content
We apologize for the inconvenience, but chat support is currently unavailable. Please feel free to submit an email ticket or reach out at discussion.evernote.com. Thank you for understanding. ×

Search the Community

Showing results for tags 'applescript'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Calendars

There are no results to display.

There are no results to display.

Forums

  • General Discussion
    • Community Announcements
    • Evernote General Discussions
    • Evernote Integrations
    • Evernote API Discussion
    • FAQ's: Best Answers
  • Evernote Betas
    • Public Betas
  • Evernote Business
    • Evernote Business Technical Issues
    • Evernote Business Requests
  • Possible Bugs/Technical Issues
    • Evernote for Android Issues
    • Evernote for iOS Issues (Versions 10.0 and above)
    • Evernote for iOS Issues (Versions 8.24.6 and under)
    • Evernote for Mac Issues (Versions 10.0 and above)
    • Evernote for Mac Issues (Versions 7.14 and under)
    • Evernote for Windows Issues (Versions 10.0 and above)
    • Evernote for Windows Issues (Versions 6.25.1 and under)
    • General Technical Issues
    • Web Client Issues
    • ScanSnap Home Support
    • Evernote Product Suite Issues
  • Product Feedback/Feature Requests
    • Evernote for Android Requests
    • Evernote for iOS Requests (Versions 10.0 and above)
    • Evernote for iOS Requests (Versions 8.24.6 and under)
    • Evernote for Mac Requests (Versions 10.0 and above)
    • Evernote for Mac Requests (Versions 7.14 and under)
    • Evernote for Windows Requests (Versions 10.0 and above)
    • Evernote for Windows Requests (Versions 6.25.1 and under)
    • General Feature Requests
    • Evernote Web Client Requests
    • Evernote Product Suite Requests
  • Foro de discusión de Evernote
    • Anuncios Comunitarios
    • Discusión General
    • Posibles Defectos/Problemas Técnicos
    • Solicitud de Funciones
  • International Forums
    • Japanese Discussions
    • Brazilian Portuguese Discussions
    • Korean Discussions
    • Traditional Chinese Discussions
  • Evernote Forum Archives
  • Web Clipper***

Blogs

There are no results to display.

There are no results to display.

Categories

There are no results to display.

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Subscription

Found 46 results

  1. The package: EVND (Ever Notedown) So this is a plugin for Atom Editor by Github that acts like an alternate editor for the Evernote Mac Client. Basically it extends Atom's Markdown editing capacities with features like LaTeX/MathJax equation editing, TOC, footnotes, image insertion via pasting, etc. And it communicates with the Evernote Mac Client via AppleScript so it can do things like creating/updating notes (as rendered HTML), import notes from Evernote and convert to Markdown formats, etc. I initially wrote this for my own use, and over the course of about a year, it has become increasingly…complicated. And I’m guessing that other people might find some use with this, so I thought I’d share. (And if there are developers out there interested in this project, that wuold be great -- it's open source under MIT license). I’ve been using EVND to write my notes, but I don’t have the time or means to do more serious tests, hence I can only say the status is “Works For Me”. Since it uses AppleScript, so obviously it's OSX only. But as Evernote has similar scriptibility for OSX and Windows, so it should be very easy to extend it to support Windows, if there are developers out there interested in doing so. Demo 1 (Overview, creating notes from Atom/EVND and send to Evernote): http://i.imgur.com/fPmoN2F.gifv Demo 2 (Text formating with shortcut keys - bold, italics, highlight, underline, etc.): http://i.imgur.com/6FLTdjh.gif Demo 3 (Update note content, tags, etc. and push the changes to Evernote): http://i.imgur.com/zN5Ey8P.gif Demo 4 (Create note in Evernote, import to Atom/EVND with notelink and convert the content to Markdown, featuring lists, functioning Checkboxes, etc.): http://i.imgur.com/g6bZzN0.gif Demo 5 (Create note in Evenote, search in Atom/EVND with query string and import the target note and convert to Markdown, featuring image attachments): http://i.imgur.com/PbUf1Ss.gif Demo 6 (For a EVND & Evernote syncd note, annotate the image attachments in Evernote, and sync the changes back to EVND): http://i.imgur.com/nQVkv4H.gif More to come... More demos (as gif animation): http://imgur.com/a/UCVGi Some features: OS X only (See Installation and Status section for more info) Local note editing: This plugin works by communicating with the Evernote OSX Client via AppleScript, so all the work is done on your local machine, no authorization required. 2-way editing (…ish): (1) Edit notes in EVND or in Evernote, and sync changes… to some extend; (2) Import notes from Evernote and convert to Markdown format. Evenote meta info: notebook and tags Images and Attachments: (1) Pasting, drag-and-drop, markdown syntax, etc.; (2) 2-way sync (get changes/annotations made in Evernote) Functioning TOC (table of contents) and footnotes: Clickable links even in Evernote client! LaTeX Mathematical Expressions with MathJax (and user-defined Macros) Icon fonts and emojis All the regular Github-Flavored-Markdown features (links, lists, tables, etc.) Quick notes from selected text: code snippets, etc. Configurable themes for markdown rendering: Several markdown rendering themes are available to choose, you can also edit the stylesheets yourself. Auto backup and version control (with GIT) Sort & search notes Export well-formated HTMLs Enhanced Markdown editing experience in Atom Supports inline-HTML syntax highlighting Syncronized scrolling and tab switching of editor and preview panel Shortcut keys for formatting text (bold, italics, udnerline, highlights, blockquotes, etc.) Please read this shared Evernote note for more info (it's best viewed in the Evernote Mac Client, you can use "Save to Evernote").
  2. I've understood that there is no "native" way to automatically import stuff from a given folder in the Mac version of Evernote, without resorting to AppleScripts that may or may not work after an update to either the operating system or Evernote. But, in the Windows version you can do this from Evernote itself. So this is something of a workaround, but if you use Dropbox or any other Cloud storage service (who doesn't these days?) AND you have access to a Windows computer that stays on most of the time, like a media sharing machine at home, your computer at work, in the basement or whatever, you can set up Evernote for Windows on that one, and set the Import folder to be a folder in your Cloud service. This way, any file that is placed in this folder from any computer, will be synced to Evernote through the Windows machine automatically no matter where you happen to be when putting it in there. The caveat is that the Windows machine must stay powered on at all times for this to work seamlessly. If you just want to be sure that the contents gets into Evernote eventually, you can rely on it being imported when you power on the Windows machine, anyway. Just a clumsy workaround for something that should be implemented on all versions of Evernote! Chris
  3. I have to import several images to an Evernote notebook but I need to have each note creation date changed to the image creation date. I'm trying to do it using Hazel and AppleScript but had no success changing the note creation date. I set Hazel to monitor a folder on my Mac looking for new images and I have the following script sending them to Evernote: tell application "Evernote" activate create note from file theFile notebook {"Test"} end tell I'm not a developer and have little experience with AppleScript. That said I have already tried my best using, for example, "creationDate" to completing the script and could never get it to change the creation date. All I got so far was a loop importing the same file over and over again or an error from Hazel. Would appreciate some help from you guys. Thank you!
  4. Hi, following a discussion requesting the ability to link Apple Mail messages into Evernote, I post this applescript. The procedure is: select an evernote Note (target) select one or more message(s) in Apple's Mail run the script. Link(s) will be created in the selected Evernote Note pointing to the Mail message(s). The link will work on any other mac having the same Mail account and even on iOS devices (provided the message is one of the most recent ones). Feel free to use it and modify at your convenience. set _links to {} set _Titles to {} set _dates to {} tell application "Mail" set _sel to get selection repeat with _msg in _sel set _messageURL to "message:\\%3c" & _msg's message id & "%3e" set end of _links to _messageURL set myTitle to the subject of _msg set end of _Titles to myTitle set theDate to date received of _msg set theString to ((time string of theDate) & " " & (day of theDate) as string) & " " & (month of theDate) as string set theAuthor to sender of _msg set theString to theString & " - " & theAuthor & " - " set end of _dates to theString end repeat set AppleScript's text item delimiters to return set the clipboard to (_links as string) end tell tell application "Evernote" activate try set theNotes to selection repeat with thisNote in theNotes set theHTML to HTML content of thisNote repeat with n from 1 to count of _links set _messageURL to item n of _links set theTitle to item n of _Titles set theDate to item n of _dates -- append thisNote html "<div><b><a href=" & _messageURL & ">" & theTitle & "</a></b></div>" set theHTML to "<div><b>" & theDate & " <a href=" & _messageURL & ">" & theTitle & "</a></b></div>" & theHTML set HTML content of thisNote to theHTML end repeat end repeat end try end tell
  5. Hello everyone! I am certainly not a pro in applescript. i am building an export routine in applescript exporting notebook. I know: this has been the content of a few forums already... and it works well. I just want to make it better... At the moment, the script exports all the notebook i tell him or all of them. That is fine. The only thing I wold like to add is: Tell the script to compare if the notebook modification date if newer than the existing exported file on the disk. For date i need to get the modification of the notebook in question and compare it with the date of the already exported file on disk. That would be no problem, if i would not be stuck on the that d..... modification date. set modification to "whatever" does not work - or i do something wrong - which is absolutely possible! Heeelp! Thanks Here the script (starting version) - if i do not get over this - i cannot continue... with timeout of (30 * 60) seconds tell application "Evernote" activate display dialog "Evernote running" delay 2 set notebookName to ("!Inbox") display dialog notebookName delay 2 set datestamp to (modification date) display dialog datestamp delay 4 end tell end timeout
  6. These new weblinks are extremely frustrating. I don't want them. I need Evernote to spring into action when I click on an Evernote link not my web browser. I do not understand why this option has eclipsed the classic link? I have Evernote on all my devices and the internal link opens the app on whichever device I'm using no matter where it was created. Using Evernote in a browsers, especially on mobile devices is a nightmare, which I assume is why we have the apps! Please O please give us an option to change the default links. There are some reasons I need internal links: 1. I do not save passwords in browsers and need to constantly log in. 2. Evernote is always running, my browser isn't. 3. I don't always have internet access. 4. It is so much easier to have applications that link to Evernote have those links open in the Evernote app and not the browser. The browser app is far inferior to the actual app on my mac. So, question: How do I set the default linking method to be the classic links? Why? I use a number of Keyboard Maestro actions which are now broken as the require the classic link which is difficult to simulate using Keyboard Maestro.
  7. I have a script that moves the currently selected note to a notebook called "Notes". It is mapped to ctrl-opt-f using "FastScripts" so I can quickly file things. I have been using it since 25 Jun 2014 with no trouble. Since 23 Jul 2014, moving notes with this script causes the change to "Notes" notebook to not sync. The note is still in "Notes" on the Mac client (5.5.2 (402634 Direct)) where I used the script, but not on any of the other clients (other Mac, iOS, web). I have confirmed this through repeated experiments. Here are the tests I did to confirm this: View a set of notes in the "Incoming" notebook in Mac Evernote client Change the notebook of "Note 1" to "Notes", using the drop down list to left of tags Sync Mac, then sync iPad "Note 1" shows up in "Notes" on iPad Change the notebook of "Note 2" to "Notes" using ctrl-cmd-m, then selecting "Notes" from the drop down list Sync Mac, then sync iPad "Note 2" shows up in "Notes" on iPad –– Everything is fine up to here –– Change the notebook of "Note 3" to "Notes" using ctrl-opt-f that calls the attached script Sync Mac, then sync iPad "Note 3" shows up in "Incoming" on iPad, even after multiple re-syncs. It should be in "Notes" I raised this as ticket # 655982 , and received the following reply from support, so I assume they will not investigate further. My script is attached. Has anyone seen anything like this before?
  8. I am trying to create a Hazel script that takes a date from the file Hazel is making an Evernote note from and uses that as the creation date of the note. Can anyone tell me how to do this? I've got a script that can do this after the fact, but I can't seem to get it to work within Hazel. Thanks in advance! Jamie
  9. I used to have an applescript that worked well for me. It would create a note and named it based on the date, then place the cursor at the first space and TYPE (not paste, type) a brief word. The reason the typing is important is the word typed was a textexpander trigger word. This has worked great for years but it no longer does. Here is the part that no longer seems to be working. tell application "Evernote" activate tell application "System Events" keystroke return keystroke "..journal " keystroke return keystroke " " end tell end tell This used to call up the front note (created above) go into the note then type keystrokes using System Events. It no longer does that. it still seems to type the letters, but it's somewhere is space, not the note. It does trigger textexpander, but even then it's not in the note so it doesn't matter. Any idea on what has changed and how to fix this?
  10. I recently upgraded from Outlook 2011 to 2016. I had a really nice script available in the older version where I was able to select an email and, I suppose it could be called, print it to EN after selecting a notebook from a list. It was really quite nice. The resulting note in EN was clean without any of the forwarding ">" and other litter that comes with it. Dragging and dropping to EN leaves it in EML format as a file attachment. MS has chosen to not allow for the Applescripts in this new version. Any suggestions for alternative methods of achieving this?
  11. Hi, I'm hoping that you can help with a problem I'm really stuck on, given I'm a premium user. Im using applescript to automate some tasks, (importing a bunch of files from a tree of directories) and it is working well. However, I need to determine if, as I'm about to upload an additional file, if I've already uploaded it before, within a specific notebook. I'd like to do this based upon having set the "source url" for each note to the location I originally attached the file from. So, as I'm creating a note, with a file attachment, I've set the source url to its path on my Mac. The problem comes when I use the "fine notes" commend with both notebook and sure url as the search string. Both are variables, which are set depending upon the notebook I'm working in, and the file I want to upload in a note (or don't want to if already present). I'm having trouble getting the search syntax right. I've need successful earlier in the script, searching for notes within a notebook, and having specific tags. However the syntax for the source url search is eluding me... too many quotes and slashes for nested quotes. its very sensitive to spaces etc. for example to fine a specifically tagged note within a notebook I used the follow, and it works well.... set searchTag to "Attachment_Index_Note" set matches to find notes "notebook:\"" & EVnotebook & "\" tag:\"Attachment_Index_Note\"" if matches = {} then # no such note...else # found the note ...end if Now to my questions... I want to do a similar search, but to see if a note in a notebook (in a variable, as above) with a specific source url (in a variable unlike above) exists.For example, I've tried... set SNotes to {} tell application "Evernote" set SNotes to find notes "notebook:\"" & EVnotebook & "\" source URL: \"" & new_attachment_path & "\"" #<<<---- The Problem Part - syntax end tell # BYPASS STORED FILE Feature if SNotes is equal to {} then # no such file ... #can make the file. end if Can anyone help with this?
  12. I want to run an AppleScript to check my calendar every sunday for the next week, and if there is a repeating all-day event, put it as a note into Evernote. I successfully wrote the script that can select all-day events and put them into notes, but NOT THE ONES THAT ARE REPEATING. It seems, that repeating events are not really in the calendar on the (repeating) specific days, more like they are only a calculated iteration of the first event that repeats. Is there a solution or a workaround for this?
  13. Because EN Mac does not provide us with a total account count of Notes, Notebooks, and Tags, I put together this simple AppleScript do to the job. Just copy/paste this code into your AppleScript, or Script, Editor, and save to the ~/Library/Scripts/Applications/Evernote folder. You may need to create the Applications and Evernote folders. I named the file EN Account Statistics (Counts).scpt When you are in the EN Mac app, you can run this script from the Scripts icon in the menu bar. Enjoy! --—————————————tell application "Evernote" --————————————— set strAcctName to (name of current account) set numTags to count of tags set numNB to count of notebooks set numNotes to count of (find notes "*") set strMsg to "Account Name: " & strAcctName ¬ & return & return & "Num of Notes: " & numNotes ¬ & return & "Num of Notebooks: " & numNB ¬ & return & "Num of Tags: " & numTags set strMTitle to "Evernote Mac Account Statistics" display dialog strMsg with title strMTitle ¬ with icon caution end tell
  14. Hello. I am in a Windows environment at work, using OS X at home and iOS8 in between. EN on all platforms and OmniFocus on the Apple devices. Outlook at work is set up with a VBS that forwards any emails of my choice to Omnifocus. What I am missing, is a way to send stuff from my EN on Windows to Omnifocus. To do this, I downloaded the attached script from asianefficiency.com. This script is supposed to add notes tagged with "review"in EN, to OmniFocus and include a link directly to the note in the local EN app. By leaving the Mac at home on, with EN, Lingon 3 and Omnifocus running, all EN notes I tag with "review" in Windows at work should be synced back to EN on Mac at home and then be read by the Applescript and added to Omnifocus on the Mac. This is again synced to my iOS8 device, which I intend to use as my task manager at work. Now, it seems to more or less do this, but something strange is going on with the "review" tag in EN; it seems to be copied in increments ("review 1", "review 2", "review 3" etc..) and sometimes removed entirely and then changing tags on notes from "review" to one of these copied ones. The script will only touch notes tagged with "review", so for many notes it does not do anything. Also it deletes the tag entirely from EN. I want the tag to remain in the taglist and have tried with unassign instead of delete in the script, but that just leaves the tags on the notes, so Omnifocus keeps getting copies of the same notes over and over.. Im suspecting my issues may have something to do with multiple devices syncing EN together, creating conflicts, but I don´t know much about this stuff. Anybody who understands what is going on here and is able to help me? Evernote2Omnifocus.rtf
  15. I had a few conflicts between notes recently, so wrote an applescript to call an external diff tool, which saves having to export the notes. It compares the XML version of the note (easy to change to HTML) since the lines in the contents.html note file seemed to be concatenated together. The XML file seem to be more consistent with number of lines. The markup tags are still shown, but should still give an indication of the lines that changed. Hopefully an integrated diff tool might be include in Evernote at some stage (*Applescript to launch a diff tool to compare two notes in Evernote. Useful to compare conflicting notes1. Place the script file in ~/Library/Scripts/Applications/Evernote2. Ensure Applescript menu bar item is on. Option to turn on/off is under General Preferences in AppleScript Editor3. The variable difftool can be change to any command line tool you require*)-- opendiff launches FileMerge.app developer tool-- /Applications/Xcode.app/Contents/Applications/FileMerge.app set difftool to "/usr/bin/opendiff"--set difftool to "/usr/bin/visdiff"tell application id "com.evernote.Evernote" try set selected_notes to selection if (count of selected_notes) = 2 then set firstNoteId to my getNoteId(local id of (item 1 of selected_notes)) set secondNoteId to my getNoteId(local id of (item 2 of selected_notes)) set evernoteLibPath to (POSIX path of (path to library folder from user domain as string)) & "Application Support/Evernote/accounts/Evernote/" set evernoteUserid to name of (get current account) set contentPath to evernoteLibPath & evernoteUserid & "/content/" -- Noticed HTML file may be identical content, but some lines might be joined together on single long lines, -- so compare Evernote enml XML data file instead do shell script difftool & " '" & contentPath & "/" & firstNoteId & "/content.enml' '" & contentPath & "/" & secondNoteId & "/content.enml'" else display alert "Compare Two Notes:" message "Please select only 2 notes to compare" end if on error error_message number error_number display alert "Compare Two Notes: ERROR" message "Error running script (" & error_number & ") : " & error_message as warning end tryend tellon getNoteId(note_id) set AppleScript's text item delimiters to "/" set the id_items to every text item of note_id set AppleScript's text item delimiters to "" return last item of id_itemsend getNoteId I've also placed it on Github Gist https://gist.github.com/hooli/7699092
  16. Hi Evernote fans! I'm new to Evernote, but not to the concept. Thanks for making a great product. I own a Fujitsu ScanSnap s1500m scanner (and it's awesome). For the past 18 months, I scan in all my papers, receipts, everything into Mariner Software's "Paperless" application. While I like this application, the absence of an iPad/iPhone version and/or a Web version is quite limiting. I would like to migrate my entire Paperless library (~1400 documents at last count, mostly PDF) including tags into Evernote. Does anyone know how how? I have nicely sorted all my documents in Paperless to have their correct date, and tagged - and would like to have this reflected in Evernote (i.e. tags, creation date). It's very easy to simply drag + drop all files into Evernote and have them appear as Notes but I would like my tags to be carried over and creation date saved. Anyone have any ideas? I really don't want to have to spend days figuring out how to write a script to export from the Paperless SQLite database, and then another script/tool to import into Evernote.... Thanks Ryan.
  17. I often want to save articles from the Wall Street Journal app when reading on my iPad. To do this, I would email the article to myself via the share button in the WSJ app, then, at the end of the week, I go through all of the articles I sent to myself, open them in my browser, and use the Web Clipper extension to save them to my Evernote account. The extension for clipping articles works very well, and I love the simplified article style so the articles are easy to read. However, the process of doing this for each article I want to save was slow and repetitive. To solve this, I learned AppleScript and I wrote a script that automatically picks up the link for the article from the emails I send to myself, and then uses the "Create note from URL" command to Clip the article from the WSJ url and places it in the notebook I specify. This process works, but the way that Evernote clips articles from AppleScript is very ugly and difficult to read. It includes HTML text from the ads on the page, as well as the entire list of comments at the bottom of the page. Is it possible to change the way that Evernote clips a page when invoked by AppleScript? If not, then I would like to place a feature request for the ability to match the styles of web clipping available in the extension when using AppleScript (such as the Simplified Article). Thanks in advance for any help.
  18. I have a Scansnap Manager and some Hazel rules. Everything I scan goes to a specific notebook in Evernote after a Hazel rule, but another copy always stays in my Evernote Inbox. Is there a way or a rule to trash this Inbox copy and let me stay only with the one in the notebook? Thanks
  19. Like many users (I imagine), I initially fell in love with Evernote and its ability truly to be my external brain. I have used it extensively this year (my first year of grad school). However, I began to flirt with alternatives in the wiki-verse because I really love the idea of what I call organic horizontal organization; that is, a form of organization at the base level of notes (or pages, or documents, or what ever you call your base note form) that is interconnected among itself, creating an inter-locking, inter-linking web. This is the true power of wikis. As a Mac user, I worked with Voodoopad for a while. Although I loved to no hassle page linking (simply type a WikiWord and a new page is created; if a page exists and you type its title somewhere, it is automatically linked), I did not love the Interface. Specifically, I felt it greatly lacked a means of powerful Vertical Organization; that is, the nested organization with multiple levels seen in Finder, for example. This was always one of my favorite aspects of EN as well, with the Stacks and Notebooks. Another issue for the personal desktop wiki program was the cumbersomeness of external linking. While it was almost magical how easily Voodoopad linked to voodoopad pages, it was quite the hassle to link to external files. I was particularly frustrated by this fault because I take advantage of numerous apps now creating their own custom URL schemes to create an inter-linked knowledge base across my various applications. In struggling to automate external link creation in Voodoopad via Applescript, I stumbled across Markdown (I'm late to the game, I know). While I had seen simply Markdown syntax before (# for header, etc), I had not seen the Markdown linking syntax. It is quite simple, and being plain text, easily automated. Unfortunately, while Voodoopad can export its documents from Markdown to HTML, it cannot easily view Markdown as HTML within the program. Thus my cross-app links look quite ugly (i.e. The script below will take the text of an EN note, search for WikiWords, and create new notes with those WikiWord titles. It will then retrieve the note links of these new notes, create Markdown formated [title](link) entries for each, and replace them in the text. One then merely pastes into Markable and exports to EN. With this script, you can write a new note, put in WikiWords as you wood in a personal wiki and it will generate new pages if necessary and link to all pages with WikiWord titles. The script currently creates all new notes in a new Notebook that is named the original note title. Each note you write thus becomes an Index Page (in Voodoopad speak) for its sub notes. While the script doesn't quite create the fluidity of a personal desktop wiki (finishing typing a word and it links), it does create a very fluid wiki-like experience in EN (tests run appr. 3 seconds). This script is definently a beta. And I am an Applescript noob, so I doubt it is the most efficient. But it works quick enough for me. Any additions or alterations are welcome. I would love to add soon an AutoLinking function (a la Voodoopad's automatically link to a page if you type the page title), as well as migrate away from the third-party app Markable to get from Markdown to Evernote. But, as it stands, this script will Wikify your Evernote. Script is here (the forum won't currently let me attach a script file to the post, sorry). (* Wikify Evernote Applescript -- Stephen Margheim -- open source this script take the selected note and treat it as the Index Page for Wiki-Style sub-pages created in a seperate Notebook that is entitled the same as your Note. It uses WikiWords and [bracketed] words as the base for the newly created notes. NOTE: You may either type WikiWords or [bracketed] words, but multiple words within brackets (i.e. [multiple words]) will create 2 notes: "multiple" and "words". The script functions by [1] turning the content of the selected EN note into plain text, [2] searching that text for WikiWords and placing [brackets] around them, [3] extracting all terms that are contained within [brackets], [4] creating a new Notebook in EN (if necessary) with name of selected note, [5] searching EN for existing notes with titles of the [bracketed] terms, a "Wiki" tag, and placed in the newly created Notebook, [6] creating all necessary notes in the new Notebook, [7] getting the note links of all the notes in that new Notebook, [8] putting the note name and note URl together in Markdown format, [9] putting [brackets] back around the note titles, [10] creates 2 lists: one, of [bracketed] note titles (which were WikiWords and [brackets] in original note); and two, of Markdown formatted note titles and note links, [11] removes any duplicates from lists, [12] sorts both lists so that they are in the same order, [13] finds [bracketed] terms and WikiWords in original notes and replaces with Markdown formatted [Note Title](Note Link), and finally [14] exports new text to Markdown editor for Evernote, Markable. At this point the user must manually export the Markdown text to Evernote as HTML (very important, and not currently the default setting). Currently, exporting to EN opens dialog box with Notebooks--navigate to notebook with original note--and then to the notes in that Notebook--navigate to the original note--and update. A bug in the current version of Markable renames the orifinal EN to "Unsaved" if the Markable document is not saved in the program. I have seen Ruby scripts online to push Markdown to EN, but have yet to explore how best to integrate them into this script. I am sure it is easy, and would get rid of the manual export in Markable (as well as the current bugs). So if anyone wants to embed those Ruby scripts, feel free. I would love that. I note upfront that this is cobbled together from numerous other scripts and handlers; some altered more than others. I have attempted to note original authors for sections of the script throughout, but I haven't slept much, so I'm not certain that I didn't miss a few. *) --get selected note tell application "Evernote" try set Evernote_Selection to selection if Evernote_Selection = {} then display dialog "Please select the note to Wikify" end if set noteName to (title of item 1 of Evernote_Selection) end try --get plain text of note; from Justin's Veritrope script set the_HTML to HTML content of (item 1 of Evernote_Selection) set plain_Text to do shell script "echo " & quoted form of the_HTML & space & "| textutil -convert txt -stdin -stdout" end tell set the clipboard to plain_Text Wikify() set Bracketed_text to the clipboard tell application "Evernote" set Evernote_text to the clipboard end tell extractBetween(Evernote_text, "[", "]") set Bracket_list to the clipboard set BracketLater_list to get words of Bracket_list --search for and create notes from above list tell application "Evernote" set tid to AppleScript's text item delimiters set Wiki_list to the clipboard set Wiki_list_count to (count words of Wiki_list) as number if (not (notebook named noteName exists)) then make notebook with properties {name:noteName} end if set notebook1 to notebook noteName set notebook_search to name of notebook1 set i to 1 repeat with i from 1 to Wiki_list_count set Wiki_word to word i of Wiki_list set matches to find notes "intitle:" & Wiki_word & " " & "tag:Wiki" & " " & "notebook:\"" & notebook_search & "\"" if matches = {} then set Wiki_note to create note title Wiki_word with text "" notebook notebook1 if (not (tag named "Wiki" exists)) then make tag with properties {name:"Wiki"} end if set tag1 to tag "Wiki" assign tag1 to Wiki_note end if if (i > Wiki_list_count) then exit repeat end if end repeat --All sub notes are now created with appropriate tag and title --Next, synchronize to get note links for all wiki notes set noteLink to missing value repeat until isSynchronizing is false end repeat synchronize delay 0.1 end tell delay 1 --to ensure that the sync is complete before querying for note links (have had "missing value" returned with smaller delay. If you have a larger note, you may need to up the delay here to get all your note link data below --get note links for all wiki notes tell application "Evernote" set theNotebook to notebook notebook_search set Evernote_Selection to every note of theNotebook set wikiLinks to {} set the clipboard to "" repeat with i from 1 to the count of Evernote_Selection set noteURL to note link of item i of Evernote_Selection set noteName to title of item i of Evernote_Selection set theWikiLink to "[" & noteName & "]" & "(" & noteURL & ")" & return set the clipboard to (the clipboard) & theWikiLink end repeat set WikiLinks_list to the clipboard end tell delay 0.5 --another safety-valve to ensure EN is caught up with our quick data retrieval --put [brackets] back around the terms from the earlier list that created the new EN notes above; for find and replace later set NewBracket_list to every item of BracketLater_list set the clipboard to "" repeat with i from 1 to the count of NewBracket_list set itemName to item i of NewBracket_list set theBracketName to "[" & itemName & "]" & return set the clipboard to (the clipboard) & theBracketName end repeat set NewBracket_list2 to the clipboard --this variable has a simple string of your WikiWords set Bracket_list2 to get paragraphs of NewBracket_list2 --this variable puts bracketed text string into list form set WikiLinks_list2 to get paragraphs of WikiLinks_list --this variable takes your list of Wiki-Markdown links and puts into list form --delete any duplicate WikiWords in your note from the List set this_text to Bracket_list2 set FinalBracketList to my remove_duplicates(this_text) --sort both lists to get in indentical order set Sorted_FinalBracketList to my simple_sort(FinalBracketList) set Sorted_WikiLinks_list2 to my simple_sort(WikiLinks_list2) --find and replace [bracketed] terms in the text with Markdown [title](link) set the_string to Bracketed_text set search_strings to Sorted_FinalBracketList set replace_strings to Sorted_WikiLinks_list2 set ListNumber to the (count of search_strings) as number set OldDelims to AppleScript's text item delimiters set the clipboard to "" repeat with i from 1 to ListNumber set AppleScript's text item delimiters to item i of search_strings set newText to text items of the_string set AppleScript's text item delimiters to item i of replace_strings set the_string to newText as text set the clipboard to the_string set AppleScript's text item delimiters to OldDelims end repeat set FinalText to the clipboard --this says it all! --Send Markdown text to Markable tell application "Markable" activate activate end tell tell application "System Events" keystroke "a" using {command down} keystroke "v" using {command down} end tell (* Here, the user must manually export to EN. Note the Preview in Markable. Ensure text is sound. To export, go Export -> Save To Evernote. Dialog box opens with list of your Notebooks. At bottom is choice between "Format: Markdown [or] HTML". Markdown will be selected. Select HTML. Then select your Notebook, and navigate to the original note. Save and return to EN to sync. If title is renamed to "Unsaved", be sure to re-rename it to its original title. Hopefully, if someone else can fit this into the Ruby shell, these issues will likely dissolve by circumventing Markable*) (* SUBROUTINES *) --Wikify handler from Fridemar Pache on Wikify() considering case set clb to the clipboard as text if clb = "" then exit repeat end if set UpperCaseChars to "ABCDEFGHIJKLMNOPQRSTUVWXYZ" set LowerCaseChars to "abcdefghijklmnopqrstuvwxyz" set Digits to "0123456789" set WikiWordChars to UpperCaseChars & LowerCaseChars & Digits set countClb to (count characters of clb) set i to 1 set currentChar to character i of clb set wikifiedText to "" repeat while i ≤ countClb -- a substring before a wikiWord repeat while i ≤ countClb set possibleWikiWord to "" set CamelCaseCount to 0 if (currentChar is in UpperCaseChars) then exit repeat end if set wikifiedText to wikifiedText & currentChar set i to i + 1 if (i > countClb) then exit repeat end if set currentChar to character i of clb end repeat -- possible WikiWord repeat while (i ≤ countClb) set possibleWikiWord to possibleWikiWord & currentChar if currentChar is in UpperCaseChars then set CamelCaseCount to CamelCaseCount + 1 end if set i to i + 1 if (i > countClb) then exit repeat end if set currentChar to character i of clb if not (currentChar is in WikiWordChars) then if CamelCaseCount ≥ 2 then set WikiWord to possibleWikiWord set wikifiedText to wikifiedText & "[" & WikiWord & "]" exit repeat else set noWikiWord to possibleWikiWord set wikifiedText to wikifiedText & noWikiWord exit repeat end if end if end repeat end repeat set the clipboard to wikifiedText end considering end Wikify --Search with brackets handler from Yvan Koenig to extractBetween(SearchText, startText, endText) set tid to AppleScript's text item delimiters set AppleScript's text item delimiters to startText set liste to text items of SearchText set AppleScript's text item delimiters to endText set extracts to {} repeat with subText in liste if subText contains endText then copy text item 1 of subText to end of extracts end if end repeat set AppleScript's text item delimiters to " " set extracts to extracts as text set the clipboard to extracts set AppleScript's text item delimiters to tid end extractBetween --handler from Qwerty Denzel on MacScripter on remove_duplicates(this_text) set not_list to class of this_text is not list if not_list then set this_text to paragraphs of this_text set new_text to {} repeat with this_line in this_text if this_line is not in new_text then set end of new_text to (contents of this_line) end repeat if not_list then set text item delimiters to return tell new_text to set new_text to beginning & ({""} & rest) set text item delimiters to "" end if return new_text end remove_duplicates --from www.macosautomation.com on simple_sort(my_list) set the index_list to {} set the sorted_list to {} repeat (the number of items in my_list) times set the low_item to "" repeat with i from 1 to (number of items in my_list) if i is not in the index_list then set this_item to item i of my_list as text if the low_item is "" then set the low_item to this_item set the low_item_index to i else if this_item comes before the low_item then set the low_item to this_item set the low_item_index to i end if end if end repeat set the end of sorted_list to the low_item set the end of the index_list to the low_item_index end repeat return the sorted_list end simple_sort
  20. Like many users (I imagine), I initially fell in love with Evernote and its ability truly to be my external brain. I have used it extensively this year (my first year of grad school). However, I began to flirt with alternatives in the wiki-verse because I really love the idea of what I call Organic Horizontal Organization; that is, a form of organization at the base level of notes (or pages, or documents, or what ever you call your base note form) that is interconnected among itself, creating an inter-locking, inter-linking web. This is the true power of wikis. As a Mac user, I worked with Voodoopad for a while. I was excited to text the power of a personal wiki to really utilize both Internal (within the program) and External (to other programs files) Links. Although I loved to no hassle internally linking to other Voodoopad pages (simply type a WikiWord and a new page is created; if a page exists and you type its title somewhere, it is automatically linked), I did not love the Interface. Specifically, I felt it greatly lacked a means of powerful Vertical Organization; that is, the nested organization with multiple levels seen in Finder, for example. This was always one of my favorite aspects of EN as well, with the Stacks and Notebooks. I also found it cumbersome for External Linking. While it was almost magical how easily Voodoopad linked to voodoopad pages, it was quite the hassle to link to external files. I was particularly frustrated by this fault because I take advantage of numerous apps now creating their own custom URL schemes to create an inter-linked knowledge base across my various applications. In struggling to automate external link creation in Voodoopad via Applescript, I stumbled across Markdown (I'm late to the game, I know). While I had seen simply Markdown syntax before (# for header, etc), I had not seen the Markdown linking syntax. It is quite simple, and being plain text, easily automated. Unfortunately, while Voodoopad can export its documents from Markdown to HTML, it cannot easily view Markdown as HTML within the program. Thus my cross-app links look quite ugly. Evernote, however, presents HTML notes beautifully. So I wrote two Applescripts to create Wiki-like functionality within Evernote. The essential tools Applescript and the Markdown2Evernote command for TextMate (which can also be a Service for any text editor. More information here (http://blog.timlockridge.com/blog/2013/02/03/using-textmate-and-markdown-with-evernote-configuring-a-workflow/) and here (http://nsuserview.kopischke.net/post/6223792409/i-can-has-some-markdown). Other than that, the scripts run text manipulations and Evernote searches to get what I want. My goal is to mimic the key functionality of Internal Linking in personal wiki programs: [1] to autolink to new notes that are created without having to leave the current note [2] to autolink to pre-existing notes without having to leave the current note Each script performs one of these functions. In the future, I will try to combine them into one autolinking script. I have initial versions of both scripts in the Developer's section of the forum (http://discussion.evernote.com/topic/38682-wikify-evernote-via-applescript/). But I wanted to give as many people access as possible. Plus, I updated both scripts. I have attached both scripts as .txt files below. I would love for people to test them and see how they work. They have detailed preambles that explain what they do and how to get them to work, but I will replicate the essential details here. [1] To autolink to new notes: This script take the selected note and makes it an Index Page for Wiki-Style sub-pages created in a seperate Notebook that is entitled the same as your Note. It uses WikiWords and [[bracketed]] words as the base for the newly created notes. To use, you simply type up a note and put in WikiWords or a term in [[double brackets]]. When the note is finished, run the script, and you will now have an Index-like note with in-text links to new notes in a new notebook with your notes title. NOTE: You may either type WikiWords or [[bracketed]] words, but multiple words within brackets (i.e. [[multiple words]]) will create 2 notes: "multiple" and "words". [2] To autolink to pre-existing notes:This script searches for matches in the current EN note to pre-existing Wiki notes and links to them. This can work because the previous script assigns the tag "Wiki" to every note it creates. Thus, all of you notes that are apart of your Wiki web can be searched specifically. It thus mimics the autolinking functionality of personal wikis, such as Voodoopad. To use, you simply either type up a note or go to an existing note and run the script. NOTE: For the script to work best, I would highly recommend that you create Unique Titles for your Wiki notes. Although Evernote allows this, it mucks up the precision of this process if you have two notes (for example) that are both titled "WikiWords" and have the tag "Wiki". This could easily happen if you run the first script on two separate notes, both of which contain the term "WikiWords". You would then have two notes in two notebooks with this title. To combat this, in the future, I hope to combine both scripts and run them such that new notes with the same title are not created. Notes and warnings aside, these two scripts can help you to Wikify your Evernote. Wikify Evernote_autolinking to existing notes v.2.txt Wikify Evernote_autolinking to new notes v.2.txt
  21. This page has a handy AppleScript that you can use to auto-send tasks to Evernote. Just change the email address in the script to your "send to Evernote" email address and you're set. The site has a full description, but basically you add an iCal event to a specific Calendar for a specific date/time. When that time is reached, the script will email you the details. Useful for those, like me, that are starting to use EN for just about everything.
×
×
  • Create New...