Jump to content

Hackademic

Level 2
  • Content Count

    36
  • Joined

  • Last visited

Community Reputation

8 Neutral

About Hackademic

Recent Profile Visitors

6,504 profile views
  1. These scripts scratched an itch I had to be able to (1) write in Markdown and save it to Evernote as clean HTML and (2) get the text of an Evernote note in Markdown format. There is one script per function. The requirements are few but important. For the Markdown2Evernote script, you will need MultiMarkdown already installed. If it's installed, it should be in "/usr/local/bin/multimarkdown". For the Evernote2Markdown script, you will need the html2text python script. If you have Brett Terpstra's Markdown Service Tools, you can find the code for this script inside of the "md - Convert - HTML to Markdown" Service. Copy the code and save it as a Python script. Or, you can simply download the script here: http://www.aaronsw.com/2002/html2text/html2text.py . Once you download or save the script, you MUST change the second to last line to data = sys.argv[1].decode('utf8'). This will allow the Applescript to pass input via the "do shell script" command. If you don't change the input line in the python code, the Applescript won't work. The Markdown2Evernote script will accept text from the clipboard. This text can begin with 3 types of Metadata: Title, Notebook, and Keywords. For example, Title: This is my title Notebook: Inbox Keywords: tag1, tag2 These metadata types can be substituted with "#", "=", and "@". For example: # This is my title = Inbox @ tag1, tag2 If you don't insert this metadata, the script will title the new note with the data and put it in your default notebook without any tags. The script takes the Markdown-styled text from the clipboard, extracts the metadata (if it's there), converts it to HTML, and creates a new HTML Evernote note. You can find the script here: bit.ly/1aKzVN2 The Evernote2Markdown script will take your currently selected Evernote note and use the html2text script to convert it to Markdown. It will also create a new folder (if it doesn't exist) entitled "Evernote_Markdown_Notes" inside of your Documents folder. It will then create a .md text file with the title of your Evernote note and save it to that folder. Finally, the script will open that .md file in your text editor of choice (simply change the myTextEditor property at the start of the script). For the script to function properly, be sure you change the html2text property to the file path to that script. The property is predefined as "/Users/[username]/Path/to/html2text.py", which is obviously useless. You can get the Applescript here: http://bit.ly/1bgAPeW For those of you who love Markdown and Evernote, these scripts might be of help. stephen hackademic.postach.io
  2. I'm on Evernote 5.2.1 for the Mac, and that option does not appear whenever I select multiple notes. I think that its a great functionality tho. It's worth noting though, that the script to index tags is unique (if a bit superfluous).
  3. To scratch an itch I had, I wrote a couple of Applescripts to automatically generate Index Notes. Index Notes contain a list of all of the notes for a particular criterion in which every note title is a hyperlink to that note. I wrote one script to create an Index Note of a notebook. When run, it offers you a list of all of your notebooks, you select the one you want and it creates a new note in that notebook with hyperlinks to all of the other notes in that notebook. The second script generates an Index Note for a particular tag. When run, it offers a list of all of your tags, you select one and it creates a new note in your default notebook with hyperlinks to all of the notes that have that tag. You could put these Index Notes in your Shortcuts section to create a new level of organization and access to your notes. I've written up a bit more on the scripts here: http://bit.ly/19dqP7f You can also find links to download them there. Hope this helps someone else besides me. stephenhttp://hackademic.postach.io/
  4. For those who prefer to write in Markdown, but want the HTML to reside in Evernote, the Markdown2Evernote service by Brett Terpstra and Martin Kopischke is great. I've also updated it to add wiki functionality. If your interested, my most recent blog post discusses my update, has a download of my version, and links to Martin's most up-to-date version as well: http://bit.ly/17eSfGg
  5. If you prefer to write in Markdown, but want the HTML to reside in Evernote, the Markdown2Evernote service by Brett Terpstra and Martin Kopischke is great. I've also updated it to add wiki functionality. If your interested, my most recent blog post discusses my update, has a download of my version, and links to Martin's most up-to-date version as well: http://bit.ly/17eSfGg
  6. If you were interested in writing in Markdown or MultiMarkdown, but want the HTML to reside in Evernote, the Markdown2Evernote service by Brett Terpstra and Martin Kopischke is great. I've also updated it to add wiki functionality. If your interested, my most recent blog post discusses my update, has a download of my version, and links to Martin's most up-to-date version as well: http://bit.ly/17eSfGg
  7. For those who prefer to write in Markdown, but want the HTML to reside in Evernote, the Markdown2Evernote service by Brett Terpstra and Martin Kopischke is great. I've also updated it to add wiki functionality. If your interested, my most recent blog post discusses my update, has a download of my version, and links to Martin's most up-to-date version as well: http://bit.ly/17eSfGg
  8. Adam, I'm so sorry for the long delay. Your post sparked a total reevaluation of the scripts. I had actually stopped using them, but your post reminded me that they were worth making functional. Your particular issue stems from my original scripts being written to work only with the paid version of TextMate. That was foolish and selfish of me. I agree that these are awesome features so I've totally retooled these functions to work with the Markdown2Evernote Mac OS X Service. For this workflow, you write in Markdown syntax in an external editor and then send that Markdown text to Evernote as a HTML note. I've bundled the autolinking to pre-existing notes and to new notes functions into this service. It is now application agnostic, much faster, and much easier. For a fuller description and a download of the service, see my blog post here: http://bit.ly/17eSfGg
  9. BIG UPDATE: I've totally retooled these functions to work with the Markdown2Evernote Mac OS X Service. For this workflow, you write in Markdown syntax in an external editor and then send that Markdown text to Evernote as a HTML note. I've bundled the autolinking to pre-existing notes and to new notes functions into this service. It is now application agnostic, much faster, and much easier. For a fuller description and a download of the service, see my blog post here: http://bit.ly/17eSfGg
  10. One possible solution is to use Evernote housed template notes or (my own method) to use a TextExpander template. Because TextExpander (or aText) allow for rich text, you can create a well formatted outline template and assign it a shortcut like ",,outline". On your Mac, all you need to do is open up a new note and type ",,outline". Then you fill in as needed and delete as needed. Its not perfect, and writing in Markdown is my own solution, but it might be helpful. stephenhttp://hackademic.postach.io/
  11. fflav, I'm a graduate student in Classical Studies. I use Evernote alot and think a project like this is very important. College students need at least a baseline to start thinking about how to leverage their computers and their applications. I've developed (and am developing, as is always the case) a fairly complex workflow in which Evernote plays a large role. I've been detailing the specifics on a blog I've recently started (the platform is actually grounded on Evernote). Instead of going too indepth (that would take forever), I'll point you there. But, in basic form, I use Evernote to "host" all of my notes. This includes class-notes, notes on primary sources for class, and notes on secondary sources for research. I have a number of AppleScripts to automate various parts of my workflow, but in the end everything is written in plain text and formatted in Markdown. I then send that text to Evernote as HTML. At the heart of my workflow are Hyperlinks. I use my own custom URL for PDFs, I use Evernote's custom URLs, as well as other apps url schemes to embed links to nearly all of the data on my computer. The result is that Evernote is the place where all of my "clickable" links reside, inside of notes. The idea is to create a Personal Wiki on my desktop that glues together all of my primary apps and data. If anyone is interested in more of the specifics, shoot me a message and check out my new blog. Looking forward to reading this ebook, stephenhttp://hackademic.postach.io/
  12. Greg, Your post was a great aid to me this last semester, so I wanted to pass on my thanks. You also helped to start me down the path to figuring out more ways to utilize Evernote in my academic interests. I've actually now started using Evernote almost as a web server to host HTML notes with my own custom hyperlinks to PDFs and other Evernote notes embedded. Its a bit confusing in short form, but inspired by your helpful tutorial, I've starting blogging about what I do and (more importantly) how I do it. But here, I just wanted to say thanks for helping me to discover so many uses for Evernote, stephenhttp://hackademic.postach.io/
  13. I, like Grumpy Monkey, take my notes in the PDF viewer/annotator on mobile platforms. I use a Mac, and I have written some scripts that export my annotations to text files formatted in Markdown with custom URLs back to the original PDF. I then send that Markdown plain text to Evernote as HTML, where all of my hyperlinks become "clickable." This has really helped my actual note taking (all in one place, in the PDF viewer itself) as well as my reviewing (I can easily get back to the original PDF). I've started discussing my methods and putting up my scripts on a new blogging platform that actually uses Evernote as its backbone. If you're on a Mac, some of the things there might be helpful (it's easier for me to refer you than to re-post my thoughts or scripts, which can be a bit long; as Grumpy Monkey knows, having seen a few of them himself). Hope that might help you, stephenhttp://hackademic.postach.io/
  14. As Metrodon correctly notes, the Evernote client cannot do anything this specific. But as you suggest, things get more interesting (and possible) with AppleScript. If I'm interpreting your needs correctly, this script ought to get the job done. tell application "Evernote" set LF to ASCII character 10 set theTag to "hack" set foundNotes to find notes "tag:page" set plainNotes to "" repeat with i from 1 to count of foundNotes set the_HTML to HTML content of (item i of foundNotes) set plain_Text to do shell script "echo " & quoted form of the_HTML & space & "| textutil -convert txt -stdin -stdout" set plainNotes to plainNotes & plain_Text & LF & "- - - - - - - - - -" & LF & LF end repeat set tid to AppleScript's text item delimiters set AppleScript's text item delimiters to "- - - - - - - - - -" set notesList to text items of plainNotes set notesList to items 1 through -2 of notesList set AppleScript's text item delimiters to tid set matched_notesList to {} repeat with i from 1 to count of notesList if item i of notesList contains theTag then copy item i of notesList to the end of matched_notesList end if end repeat set tid to AppleScript's text item delimiters set AppleScript's text item delimiters to LF & LF & LF if (count of matched_notesList) is greater than 1 then set final_notesList to {} repeat with i from 1 to count of matched_notesList copy item i of matched_notesList to the end of final_notesList end repeat set notesText to final_notesList as string set theParagraphs to paragraphs of notesText set matched_paragraphs to {} repeat with i from 1 to count of theParagraphs if item i of theParagraphs contains theTag then copy item i of theParagraphs to the end of matched_paragraphs end if end repeat set theResult to matched_paragraphs as string else set notesText to matched_notesList as string set theParagraphs to paragraphs of notesText set matched_paragraphs to {} repeat with i from 1 to count of theParagraphs if item i of theParagraphs contains theTag then copy item i of theParagraphs to the end of matched_paragraphs end if end repeat set theResult to matched_paragraphs as string end if tell application "TextEdit" activate set newDoc to make new document with properties {text:theResult} end tell set AppleScript's text item delimiters to tidend tell Key things to note: set theTag to "hack" set foundNotes to find notes "tag:page" Change theTag to whatever the text in the notes is that you want to find the paragraphs of. I'm assuming that the notes you want are actually tagged with the tag you want to find in the notes themselves. If they aren't, find some way to find the specific notes you want. Change the text after "tag:" to whatever the tag is that will get you a small number of notes (the more specific the search, the faster the script; and vice versa). You can also use other search syntax. This is just an example. Also, you need to have an empty TextEdit document open. The paragraphs with your theTag will be printed there. As the script stands (I wrote it hastily), it only prints the text of the paragraphs with your search term. It doesn't highlight that term and it doesn't tell you which specific note that particular paragraph comes from. But you could add that I'm sure. Hope this helps, stephenhttp://hackademic.postach.io/
  15. Welcome to the forums and welcome to AppleScripting. I was right where you are only a few months ago, so I know the feeling. On your larger search for Evernote Applescripting help and tutorials, here are a few resources that really got me off the ground: * http://veritrope.com/code_type/evernote/ -- has a great collection of Evernote specific AppleScripts with fantastic commentary in-line. Veritrope (Justin) is a bit of a genius when it comes to Applescript and specifically Evernote. Def study some of his scripts and get a feel for how he manipulates Evernote. * http://dev.evernote.com/documentation/local/chapters/mac.php -- this is a sample Applescript for Evernote that shows how the main terms in the Dictionary can be used. Very helpful for the basics and the syntax. As for your specific request, check out this script by Veritrope -- http://veritrope.com/code/evernote-get-plain-text-of-selected-note/ It uses shell scripting, but it gets the job done, so you don't need to fully understand how the shell script works. Finally, to write that plain text to a new text file, here's a simple script for Mac's TextEdit (using the plain_Text variable from Veritrope's script): tell application "TextEdit" set newDoc to make new document with properties {text:plain_Text} end tell Hope that helps, and let me know if you have any further questions, stephenhttp://hackademic.postach.io/
×
×
  • Create New...