Skip to content

Instantly share code, notes, and snippets.

View fractaledmind's full-sized avatar

Stephen Margheim fractaledmind

View GitHub Profile
@fractaledmind
fractaledmind / Export Chrome Selection, Title, and URL to TextMate
Created August 12, 2013 18:47
This script gets the selected text, page title, and URL from your current Chrome tab and exports to TextMate (or TextEdit, see the comment)
tell application "Google Chrome"
set LF to (ASCII character 32) & (ASCII character 32) & (ASCII character 10)
copy selection of active tab of window 1
delay 0.1
set theTitle to title of active tab of window 1
set theURL to URL of active tab of window 1
set FinalText to "[" & theTitle & "](" & theURL & ")" & LF & "\"" & (the clipboard) & "\"" & LF & LF & LF
tell application "TextMate"
insert FinalText
@fractaledmind
fractaledmind / Insert Markdown Link of Evernote Note into TextMate
Last active December 20, 2015 23:39
This script embeds a Markdown Inline link for an Evernote note into your current TextMate (or TextEdit) document. You can choose either to get the URL of the currently selected Evernote note or your can navigate your folder structure to find any note and insert its URL.
@fractaledmind
fractaledmind / Insert Markdown Link of DEVONthink Item into TextMate
Last active December 20, 2015 23:39
This script inserts a Markdown Inline Link for a DEVONthink item into your current TextMate (or TextEdit) document. You can choose either whatever item is currently selected, or you can navigate your DEVONthink database to insert a URL for any item.
@fractaledmind
fractaledmind / Insert Markdown Link of BibDesk Item into TextMate
Last active December 20, 2015 23:39
This script inserts a Markdown Inline Link for a BibDesk item into your current TextMate (or TextEdit) document. You can choose either whatever item is currently selected, or you can navigate your BibDesk database to insert a URL for any item.
@fractaledmind
fractaledmind / Insert Markdown Link of VoodooPad Page into TextMate
Created August 12, 2013 19:09
This script inserts a Markdown Inline Link for a VoodooPad page into your current TextMate (or TextEdit) document. You can choose either whatever item is currently selected, or you can navigate your VoodooPad document to insert a URL for any item.
@fractaledmind
fractaledmind / Wikify: Choose Link App
Created August 12, 2013 19:16
This script can be compiled as an application to allow you to insert a Markdown Inline Link to either an Evernote, BibDesk, DEVONthink, or VoodooPad item into your current TextMate document. This script is central to my Wikify project, wherein I am attempting to interconnect as much of my desktop data as possible. Since these 4 apps all have cus…
@fractaledmind
fractaledmind / Insert Markdown Links for current Skim page (DEVONthink URL)
Last active April 8, 2020 00:14
REQUIRED PROGRAMS: -- Skim -- TextMate (I have alternate code for TextEdit as well) -- DEVONthink This script is a modification of a script by John Sidiropoulos at http://organognosi.blogspot.com. This script offers you a dialog box with two options: (1) insert a Markdown formatted Inline Link to the current page of the pdf you are viewing in Sk…
@fractaledmind
fractaledmind / Insert Markdown Links for current Skim page (Custom URL)
Last active December 20, 2015 23:39 — forked from fractaledmind/Insert Markdown Links for current Skim page (DEVONthink URL)
REQUIRED PROGRAMS: -- Skim -- TextMate (I have alternate code for TextEdit as well) This script offers you a dialog box with two options: (1) insert a Markdown formatted Inline Link to the current page of the pdf you are viewing in Skim at your cursor position in TextMate, or (2) insert a Markdown formatted Reference Link to the page. Either lin…
@fractaledmind
fractaledmind / Get MMD CiteKey from BibDesk
Created August 12, 2013 19:36
REQUIRED PROGRAM: -- BibDesk This script copies to the clipboard a MultiMarkdown (MMD) cite key for an item in your BibDesk library. The script will present a dialog box with all of your BibDesk groups, and then, once you select a group, of all the items in that group. When you select an item, its cite key is copied to the clipboard, so that you…
tell application "BibDesk"
set allDocs to every document of application "BibDesk"
set listofDocs to {}
repeat with theDoc in allDocs
set thename to the name of theDoc
copy thename to the end of listofDocs
end repeat
if (not ((count of listofDocs) is 1)) then
set SelDoc to choose from list of listofDocs with title "Select BibDesk Database" with prompt ¬
@fractaledmind
fractaledmind / Wikify Evernote: Autolinking to New Notes
Created August 13, 2013 19:53
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 …
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)
set notebookName to (name of notebook of item 1 of Evernote_Selection)
end try